Lines Matching defs:net
68 #include <net/if.h>
87 int net; /* socket descriptor */
201 close(net);
317 if ((net = socket(AF_INET, SOCK_RAW, protnum)) < 0) {
325 if (bind(net, &wherefrom, sizeof(wherefrom)) < 0) {
331 if (connect(net,&whereto,sizeof(struct sockaddr_in)) < 0 ) {
333 close(net);
345 if (tun > net)
348 lastfd = net;
353 FD_SET(tun,&rfds); FD_SET(net,&rfds);
358 close(net);
363 close(net);
368 if(FD_ISSET(net,&rfds)) {
370 len = read(net, buf, sizeof(buf));
384 if(send(net, buf, len,0) <= 0) {