X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fivac.git;a=blobdiff_plain;f=src%2Fnetwork.h;h=079cea387df6e8cef3cca6113638105deed90702;hp=52531914db456f6bf5adff4f7d1d8f6aac2d6b95;hb=d525cc402e67386372745a4bc3c04a488ea264f7;hpb=9fb0ced14058a258508a61f998059a0f9ab005de diff --git a/src/network.h b/src/network.h index 5253191..079cea3 100644 --- a/src/network.h +++ b/src/network.h @@ -17,6 +17,7 @@ /* defines */ #define MAX_CONNECTIONS 32 +#define MAX_NIC_DEVICE 32 #define IP_DIGITS 16 #define C_IN_USE (1<<0) @@ -61,6 +62,7 @@ typedef struct s_net { int c_count; t_connection connection[MAX_CONNECTIONS]; unsigned int sendmask; /* 32 bits for maximum of 32 connections */ + char nic[MAX_NIC_DEVICE]; } t_net; /* function prototypes */ @@ -77,8 +79,7 @@ int network_deselect(t_net *net,int channel); int network_manage_incoming(t_net *net); int network_send(int fd,unsigned char *data,int datasize); int network_receive(int fd,unsigned char *data,int datasize); -int network_udp_listen_init(t_net *net,int port); -int network_set_udp_ports(t_net *net,int port); +int network_udp_listen_init(t_net *net); int network_udp_receive(t_net *net,int channel, unsigned char *data,int count); int network_udp_send(t_net *net,int channel, unsigned char *data,int size); int network_udp_shutdown(t_net *net);