mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-09-17 12:44:27 +08:00
deleted my exit
This commit is contained in:
12
network.cpp
12
network.cpp
@@ -153,13 +153,13 @@ int init_raw_socket()
|
||||
if(raw_send_fd == -1) {
|
||||
mylog(log_fatal,"Failed to create raw_send_fd\n");
|
||||
//perror("Failed to create raw_send_fd");
|
||||
myexit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if(setsockopt(raw_send_fd, SOL_SOCKET, SO_SNDBUFFORCE, &socket_buf_size, sizeof(socket_buf_size))<0)
|
||||
{
|
||||
mylog(log_fatal,"SO_SNDBUFFORCE fail\n");
|
||||
myexit(1);
|
||||
exit(1);
|
||||
}
|
||||
//raw_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_ALL));
|
||||
|
||||
@@ -168,13 +168,13 @@ int init_raw_socket()
|
||||
if(raw_recv_fd == -1) {
|
||||
mylog(log_fatal,"Failed to create raw_recv_fd\n");
|
||||
//perror("");
|
||||
myexit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if(setsockopt(raw_recv_fd, SOL_SOCKET, SO_RCVBUFFORCE, &socket_buf_size, sizeof(socket_buf_size))<0)
|
||||
{
|
||||
mylog(log_fatal,"SO_RCVBUFFORCE fail\n");
|
||||
myexit(1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
//IP_HDRINCL to tell the kernel that headers are included in the packet
|
||||
@@ -184,7 +184,7 @@ int init_raw_socket()
|
||||
if (setsockopt (raw_send_fd, IPPROTO_IP, IP_HDRINCL, val, sizeof (one)) < 0) {
|
||||
mylog(log_fatal,"Error setting IP_HDRINCL %d\n",errno);
|
||||
//perror("Error setting IP_HDRINCL");
|
||||
myexit(2);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
setnonblocking(raw_send_fd); //not really necessary
|
||||
@@ -232,7 +232,7 @@ void init_filter(int port)
|
||||
{
|
||||
mylog(log_fatal,"error set fiter\n");
|
||||
//perror("filter");
|
||||
myexit(-1);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
void remove_filter()
|
||||
|
Reference in New Issue
Block a user