当前位置: 首页>>代码示例>>C++>>正文


C++ UNUSEDPARM函数代码示例

本文整理汇总了C++中UNUSEDPARM函数的典型用法代码示例。如果您正苦于以下问题:C++ UNUSEDPARM函数的具体用法?C++ UNUSEDPARM怎么用?C++ UNUSEDPARM使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了UNUSEDPARM函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: telnet_parse

static void
telnet_parse(  const struct Banner1 *banner1,
        void *banner1_private,
        struct ProtocolState *pstate,
        const unsigned char *px, size_t length,
        struct BannerOutput *banout,
        struct InteractiveData *more)
{
    unsigned state = pstate->state;
    unsigned i;

    UNUSEDPARM(banner1_private);
    UNUSEDPARM(banner1);
    UNUSEDPARM(more);

    for (i=0; i<length; i++)
    switch (state) {
    case 0:
        if (px[i] == '\r')
            continue;
        if (px[i] == '\n' || px[i] == '\0' || !isprint(px[i])) {
            state++;
            tcp_close(more);
            continue;
        }
        banout_append_char(banout, PROTO_SSH2, px[i]);
        break;
    default:
        i = (unsigned)length;
        break;
    }
    pstate->state = state;
}
开发者ID:TimCook1,项目名称:masscan,代码行数:33,代码来源:proto-tcp-telnet.c

示例2: text_out_banner

/*************************************** *************************************
 ****************************************************************************/
static void
text_out_banner(struct Output *out, FILE *fp, time_t timestamp,
        unsigned ip, unsigned ip_proto, unsigned port,
        enum ApplicationProtocol proto, unsigned ttl,
        const unsigned char *px, unsigned length)
{
    char banner_buffer[4096];


    UNUSEDPARM(out);
    UNUSEDPARM(ttl);

    fprintf(fp, "%s %s %u %u.%u.%u.%u %u %s %s\n",
        "banner",
        name_from_ip_proto(ip_proto),
        port,
        (ip>>24)&0xFF,
        (ip>>16)&0xFF,
        (ip>> 8)&0xFF,
        (ip>> 0)&0xFF,
        (unsigned)timestamp,
        masscan_app_to_string(proto),
        normalize_string(px, length, banner_buffer, sizeof(banner_buffer))
        );
}
开发者ID:101010111100,项目名称:masscan,代码行数:27,代码来源:out-text.c

示例3: ssh_parse

static void
ssh_parse(  const struct Banner1 *banner1,
        void *banner1_private,
        struct Banner1State *pstate,
        const unsigned char *px, size_t length,
        char *banner, unsigned *banner_offset, size_t banner_max)
{
    unsigned state = pstate->state;
    unsigned i;

    UNUSEDPARM(banner1_private);
    UNUSEDPARM(banner1);

    for (i=0; i<length; i++)
    switch (state) {
    case 0:
        if (px[i] == '\r')
            continue;
        if (px[i] == '\n' || px[i] == '\0' || !isprint(px[i])) {
            state = STATE_DONE;
            continue;
        }
        if (*banner_offset < banner_max)
            banner[(*banner_offset)++] = px[i];
        break;
    default:
        i = (unsigned)length;
        break;
    }
    pstate->state = state;
}
开发者ID:Web5design,项目名称:masscan,代码行数:31,代码来源:proto-ssh.c

示例4: null_PCAP_DISPATCH

static unsigned null_PCAP_DISPATCH(void *hPcap, unsigned how_many_packets, PCAP_HANDLE_PACKET handler, void *handle_data)
{
#ifdef STATICPCAP
	return pcap_dispatch(hPcap, how_many_packets, handler, handle_data);
#endif
	UNUSEDPARM(hPcap);UNUSEDPARM(how_many_packets);UNUSEDPARM(handler);UNUSEDPARM(handle_data);
	return 0;
}
开发者ID:robertdavidgraham,项目名称:wifi-mon,代码行数:8,代码来源:pcaplive.c

示例5: null_PCAP_OPEN_LIVE

static void * null_PCAP_OPEN_LIVE(const char *devicename, unsigned snap_length, unsigned is_promiscuous, unsigned read_timeout, char *errbuf)
{
#ifdef STATICPCAP
	return pcap_open_live(devicename, snap_length, is_promiscuous, read_timeout, errbuf);
#endif
	seterr(errbuf, "libpcap not loaded");
	UNUSEDPARM(devicename);UNUSEDPARM(snap_length);UNUSEDPARM(is_promiscuous);UNUSEDPARM(read_timeout);
	return NULL;
}
开发者ID:KxCode,项目名称:ferret,代码行数:9,代码来源:in-pcaplive.c

示例6: perftest_server_to_client_response

void
perftest_server_to_client_response(struct Adapter *adapter,
                                   struct Thread *thread, struct Packet *pkt)
{
    struct TestAdapter *testadapter = (struct TestAdapter *)adapter->userdata;
    struct PerfTest *perftest = testadapter->parent;
    
    UNUSEDPARM(thread);
    UNUSEDPARM(perftest);
    
    
    
}
开发者ID:carlosf,项目名称:robdns,代码行数:13,代码来源:perftest.c

示例7: extract_item

void extract_item(struct Ferret *ferret, struct NetFrame *frame, const unsigned char *px, 
				  unsigned length, unsigned *r_offset, 
				  const unsigned char **r_object, unsigned *r_object_len)
{
	unsigned len;

	UNUSEDPARM(ferret);

	if (*r_offset + 1 > length) {
		FRAMERR(frame, "truncated\n");
		*r_offset = length+1;
		return;
	}

	len = px[*r_offset];
	(*r_offset)++;

	if (*r_offset + len > length)
		len = length-*r_offset;

	*r_object = px + *r_offset;
	*r_object_len = len;

	*r_offset += len;
}
开发者ID:hanshaze,项目名称:Cred_Harvester,代码行数:25,代码来源:atalknbp.c

示例8: unicornscan_out_open

static void
unicornscan_out_open(struct Output *out, FILE *fp)
{
    UNUSEDPARM(out);
    fprintf(fp, "#masscan\n");
    init_tcp_services();
}
开发者ID:Hell0wor1d,项目名称:masscan,代码行数:7,代码来源:out-unicornscan.c

示例9: text_out_banner

/*************************************** *************************************
 ****************************************************************************/
static void
text_out_banner(struct Output *out, FILE *fp, time_t timestamp,
        unsigned ip, unsigned ip_proto, unsigned port,
        enum ApplicationProtocol proto, const unsigned char *px, unsigned length)
{
    char banner_buffer[4096];
    char ip_proto_sz[64];

    switch (ip_proto) {
    case 1: strcpy_s(ip_proto_sz, sizeof(ip_proto_sz), "icmp"); break;
    case 6: strcpy_s(ip_proto_sz, sizeof(ip_proto_sz), "tcp"); break;
    case 17: strcpy_s(ip_proto_sz, sizeof(ip_proto_sz), "udp"); break;
    default: sprintf_s(ip_proto_sz, sizeof(ip_proto_sz), "(%u)", ip_proto); break;
    }

    UNUSEDPARM(out);

    fprintf(fp, "%s %s %u %u.%u.%u.%u %u %s %s\n",
        "banner",
        ip_proto_sz,
        port,
        (ip>>24)&0xFF,
        (ip>>16)&0xFF,
        (ip>> 8)&0xFF,
        (ip>> 0)&0xFF,
        (unsigned)timestamp,
        masscan_app_to_string(proto),
        normalize_string(px, length, banner_buffer, sizeof(banner_buffer))
        );
}
开发者ID:ak2consulting,项目名称:masscan,代码行数:32,代码来源:out-text.c

示例10: banner_ssh

unsigned
banner_ssh(  struct Banner1 *banner1,
        unsigned state,
        const unsigned char *px, size_t length,
        char *banner, unsigned *banner_offset, size_t banner_max)
{
    unsigned i;

    UNUSEDPARM(banner1);

    for (i=0; i<length; i++)
    switch (state) {
    case 0:
        if (px[i] == '\r')
            continue;
        if (px[i] == '\n' || px[i] == '\0' || !isprint(px[i])) {
            state = STATE_DONE;
            continue;
        }
        if (*banner_offset < banner_max)
            banner[(*banner_offset)++] = px[i];
        break;
    default:
        i = (unsigned)length;
        break;
    }
    return state;
}
开发者ID:0817,项目名称:masscan,代码行数:28,代码来源:proto-ssh.c

示例11: xml_out_status

static void
xml_out_status(struct Output *out, FILE *fp, time_t timestamp, int status,
               unsigned ip, unsigned ip_proto, unsigned port, unsigned reason, unsigned ttl)
{
    char reason_buffer[128];
    UNUSEDPARM(out);
    fprintf(fp, "<host endtime=\"%u\">"
                    "<address addr=\"%u.%u.%u.%u\" addrtype=\"ipv4\"/>"
                    "<ports>"
                    "<port protocol=\"%s\" portid=\"%u\">"
                    "<state state=\"%s\" reason=\"%s\" reason_ttl=\"%u\"/>"
                    "</port>"
                    "</ports>"
                "</host>"
                "\r\n",
        (unsigned)timestamp,
        (ip>>24)&0xFF,
        (ip>>16)&0xFF,
        (ip>> 8)&0xFF,
        (ip>> 0)&0xFF,
        name_from_ip_proto(ip_proto),
        port,
        status_string(status),
        reason_string(reason, reason_buffer, sizeof(reason_buffer)),
        ttl
        );
}
开发者ID:JT5D,项目名称:masscan,代码行数:27,代码来源:out-xml.c

示例12: xml_out_banner

static void
xml_out_banner(struct Output *out, FILE *fp, time_t timestamp,
        unsigned ip, unsigned ip_proto, unsigned port,
        enum ApplicationProtocol proto, const unsigned char *px, unsigned length)
{
    char banner_buffer[4096];

    UNUSEDPARM(out);

    fprintf(fp, "<host endtime=\"%u\">"
                    "<address addr=\"%u.%u.%u.%u\" addrtype=\"ipv4\"/>"
                    "<ports>"
                    "<port protocol=\"%s\" portid=\"%u\">"
                    "<service name=\"%s\" banner=\"%s\">"
                    "</service>"
                    "</port>"
                    "</ports>"
                "</host>"
                "\r\n",
        (unsigned)timestamp,
        (ip>>24)&0xFF,
        (ip>>16)&0xFF,
        (ip>> 8)&0xFF,
        (ip>> 0)&0xFF,
        name_from_ip_proto(ip_proto),
        port,
        masscan_app_to_string(proto),
        normalize_string(px, length, banner_buffer, sizeof(banner_buffer))
        );
}
开发者ID:JT5D,项目名称:masscan,代码行数:30,代码来源:out-xml.c

示例13: status_finish

void
status_finish(struct Status *status)
{
    UNUSEDPARM(status);
    fprintf(stderr, 
"                                                                             \r");
}
开发者ID:0817,项目名称:masscan,代码行数:7,代码来源:main-status.c

示例14: null_PCAP_MINOR_VERSION

static int null_PCAP_MINOR_VERSION(void *p)
{
#ifdef STATICPCAP
	return pcap_minor_version(p);
#endif
	UNUSEDPARM(p);
	return 0;
}
开发者ID:robertdavidgraham,项目名称:wifi-mon,代码行数:8,代码来源:pcaplive.c

示例15: null_PCAP_CLOSE

static void null_PCAP_CLOSE(void *hPcap)
{
#ifdef STATICPCAP
	pcap_close(hPcap);
	return;
#endif
	UNUSEDPARM(hPcap);
}
开发者ID:robertdavidgraham,项目名称:wifi-mon,代码行数:8,代码来源:pcaplive.c


注:本文中的UNUSEDPARM函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。