fixed udp "addtess already used" thing + introduced nic device string (used later)
[my-code/ivac.git] / src / network.h
index 5253191..079cea3 100644 (file)
@@ -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);