mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-10-14 09:55:33 +08:00
avoid MSG_PEEK
This commit is contained in:
@@ -26,6 +26,10 @@ extern int random_drop;
|
||||
|
||||
extern int ifindex;
|
||||
|
||||
extern char g_packet_buf[buf_len];
|
||||
extern int g_packet_buf_len;
|
||||
extern int g_packet_buf_cnt;
|
||||
|
||||
struct icmphdr
|
||||
{
|
||||
uint8_t type;
|
||||
@@ -108,6 +112,9 @@ int try_to_list_and_bind(int & bind_fd,u32_t local_ip_uint32,int port); //try t
|
||||
int client_bind_to_a_new_port(int & bind_fd,u32_t local_ip_uint32);//find a free port and bind to it.
|
||||
int client_bind_to_a_new_port2(int &fd,const address_t& address);
|
||||
|
||||
int discard_raw_packet();
|
||||
int pre_recv_raw_packet();
|
||||
|
||||
int send_raw_ip(raw_info_t &raw_info,const char * payload,int payloadlen);
|
||||
|
||||
int peek_raw(packet_info_t &peek_info);
|
||||
|
Reference in New Issue
Block a user