本文整理汇总了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;
}
示例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))
);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例8: unicornscan_out_open
static void
unicornscan_out_open(struct Output *out, FILE *fp)
{
UNUSEDPARM(out);
fprintf(fp, "#masscan\n");
init_tcp_services();
}
示例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))
);
}
示例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;
}
示例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
);
}
示例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))
);
}
示例13: status_finish
void
status_finish(struct Status *status)
{
UNUSEDPARM(status);
fprintf(stderr,
" \r");
}
示例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;
}
示例15: null_PCAP_CLOSE
static void null_PCAP_CLOSE(void *hPcap)
{
#ifdef STATICPCAP
pcap_close(hPcap);
return;
#endif
UNUSEDPARM(hPcap);
}