X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fivac.git;a=blobdiff_plain;f=src%2Finet.h;h=e7c48b7576b124df0b5cbd952ffedab9dd2921c4;hp=7f949acee819d4628bdeb28714251dacf13590e0;hb=058c06c0b8b2dbbde5ee32b54ad8e502527cd155;hpb=96a136a4a5ac3321cf3d72328b9fd8167c007a17 diff --git a/src/inet.h b/src/inet.h index 7f949ac..e7c48b7 100644 --- a/src/inet.h +++ b/src/inet.h @@ -16,6 +16,7 @@ /* defines */ #define MAX_CONNECTIONS 32 + #define IP_DIGITS 16 #define C_IN_USE (1<<0) #define C_INFO_A (1<<1) @@ -23,6 +24,11 @@ #define C_ESTABL (1<<3) #define C_HANGUP (1<<4) +#define SEND_I_MAX 128 +#define SEND_I_NAME 'n' +#define SEND_I_G_CAP 'g' +#define SEND_I_AV_CAP 'c' + /* net specific variables */ typedef s_connection { int fd; @@ -30,14 +36,19 @@ typedef s_connection { char ip[IP_DIGITS]; in_port_t port; unsigned char status; + unsigned char cap; /* general capabilities */ + unsigned short avcap; /* audio/video capabilities */ } t_connection; typedef s_net { int l_fd; /* listen file descriptor */ in_port_t l_port; + unsigned char cap; + unsigned short avcap; /* limited connections by now -- replaced by list management later */ int c_count; t_connection connection[MAX_CONNECTIONS]; + unsigned int sendmask; /* 32 bits for maximum of 32 connections */ } t_net; #endif