X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Fudp.h;h=2cc743abd02f4a83d3cd7e71b9f2870fe8975164;hb=e6b37dbe81b4492796fd262f95fc94e06cb67966;hp=be2ff64e150c6bb0b2c16680f42f214fb3d36cda;hpb=0f48b41ce8edd3b6d549d641b35901e4b51a5132;p=tpg%2Facess2.git diff --git a/Modules/IPStack/udp.h b/Modules/IPStack/udp.h index be2ff64e..2cc743ab 100644 --- a/Modules/IPStack/udp.h +++ b/Modules/IPStack/udp.h @@ -9,6 +9,9 @@ #include "ipv4.h" typedef struct sUDPHeader tUDPHeader; +typedef struct sUDPServer tUDPServer; +typedef struct sUDPPacket tUDPPacket; +typedef struct sUDPChannel tUDPChannel; struct sUDPHeader { @@ -19,4 +22,42 @@ struct sUDPHeader Uint8 Data[]; }; +struct sUDPPacket +{ + struct sUDPPacket *Next; + size_t Length; + Uint8 Data[]; +}; + +struct sUDPChannel +{ + struct sUDPChannel *Next; + tInterface *Interface; + Uint16 LocalPort; + union { + tIPv4 v4; + tIPv6 v6; + } RemoteAddr; + Uint16 RemotePort; + tVFS_Node Node; + tSpinlock lQueue; + tUDPPacket * volatile Queue; + tUDPPacket *QueueEnd; +}; + +struct sUDPServer +{ + struct sUDPServer *Next; + + tVFS_Node Node; + + tInterface *Interface; + Uint16 ListenPort; + int NextID; + int NumChannels; + tUDPChannel *Channels; + tSpinlock Lock; + tUDPChannel * volatile NewChannels; +}; + #endif