|
发表于 2016-6-16 12:56:59
|
显示全部楼层
static void process_stdin(char* data, size_t datalen)
{
EVENTLOG2(VERBOSE, "process_stdin()::recvied %d bytes of %s data from stdin", datalen, data);
if (strcmp(data, "q") == 0)
{
flag = false;
return;
}
sockaddrunion saddr;
str2saddr(&saddr, "127.0.0.1", USED_UDP_PORT);
int sampledata = 27;
uchar tos = IPTOS_DEFAULT;
int sentsize = nit.send_ip_packet(nit.ip4_socket_despt_, data,
datalen, &saddr, tos);
assert(sentsize == datalen);
}static void process_stdin(char* data, size_t datalen)
{
EVENTLOG2(VERBOSE, "process_stdin()::recvied %d bytes of %s data from stdin", datalen, data);
if (strcmp(data, "q") == 0)
{
flag = false;
return;
}
sockaddrunion saddr;
str2saddr(&saddr, "127.0.0.1", USED_UDP_PORT);
int sampledata = 27;
uchar tos = IPTOS_DEFAULT;
int sentsize = nit.send_ip_packet(nit.ip4_socket_despt_, data,
datalen, &saddr, tos);
assert(sentsize == datalen);
} |
|