X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Modules%2FIPStack%2Fudp.h;h=391478941fd571848b237d165cf0253c438c852b;hb=a79a695585e69376330fd6b83b32a573d7df9dc7;hp=be2ff64e150c6bb0b2c16680f42f214fb3d36cda;hpb=0f48b41ce8edd3b6d549d641b35901e4b51a5132;p=tpg%2Facess2.git diff --git a/Modules/IPStack/udp.h b/Modules/IPStack/udp.h index be2ff64e..39147894 100644 --- a/Modules/IPStack/udp.h +++ b/Modules/IPStack/udp.h @@ -9,6 +9,9 @@ #include "ipv4.h" typedef struct sUDPHeader tUDPHeader; +typedef struct sUDPEndpoint tUDPEndpoint; +typedef struct sUDPPacket tUDPPacket; +typedef struct sUDPChannel tUDPChannel; struct sUDPHeader { @@ -19,4 +22,38 @@ struct sUDPHeader Uint8 Data[]; }; +struct sUDPEndpoint +{ + Uint16 Port; + Uint16 AddrType; + union { + tIPv4 v4; + tIPv6 v6; + } Addr; +}; + +struct sUDPPacket +{ + struct sUDPPacket *Next; + tUDPEndpoint Remote; + size_t Length; + Uint8 Data[]; +}; + +struct sUDPChannel +{ + struct sUDPChannel *Next; + tInterface *Interface; + Uint16 LocalPort; + + tUDPEndpoint Remote; // Only accept packets form this address/port pair + int RemoteMask; // Mask on the address + + tVFS_Node Node; + tShortSpinlock lQueue; + tUDPPacket * volatile Queue; + tUDPPacket *QueueEnd; +}; + #endif +