X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Modules%2FIPStack%2Fipstack.h;h=2076d5a778037119142e22e501006aba393b385e;hb=37eb4d555b07704870b7dc87591d72b5b2539dec;hp=071c62b1e975fb6f4ab8f0953866b1adf97949c6;hpb=8051546ad5894e093211d2ec69dde6b99cdaa71d;p=tpg%2Facess2.git diff --git a/Modules/IPStack/ipstack.h b/Modules/IPStack/ipstack.h index 071c62b1..2076d5a7 100644 --- a/Modules/IPStack/ipstack.h +++ b/Modules/IPStack/ipstack.h @@ -38,21 +38,6 @@ struct sMacAddr { Uint8 B[6]; } __attribute__((packed)); -struct sInterface { - struct sInterface *Next; //!< Next interface in list - - tVFS_Node Node; //!< Node to use the interface - - tAdapter *Adapter; //!< Adapter the interface is associated with - int TimeoutDelay; //!< Time in miliseconds before a packet times out - int Type; //!< Interface type, see ::eInterfaceTypes - - void *Address; //!< IP address (stored after the Name) - int SubnetBits; //!< Number of bits that denote the address network - - char Name[]; -}; - /** * \brief Route definition structure */ @@ -69,6 +54,23 @@ typedef struct sRoute { int Metric; //!< Route priority } tRoute; +struct sInterface { + struct sInterface *Next; //!< Next interface in list + + tVFS_Node Node; //!< Node to use the interface + + tAdapter *Adapter; //!< Adapter the interface is associated with + int TimeoutDelay; //!< Time in miliseconds before a packet times out + int Type; //!< Interface type, see ::eInterfaceTypes + + void *Address; //!< IP address (stored after the Name) + int SubnetBits; //!< Number of bits that denote the address network + + tRoute Route; //!< Interface route + + char Name[]; +}; + /** * \brief Represents a network adapter */ @@ -114,7 +116,8 @@ static const tMacAddr cMAC_BROADCAST = {{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}}; extern int IPStack_AddFile(tSocketFile *File); extern int IPStack_GetAddressSize(int AddressType); -extern int IPStack_CompareAddress(int AddressType, void *Address1, void *Address2, int CheckBits); +extern int IPStack_CompareAddress(int AddressType, const void *Address1, const void *Address2, int CheckBits); +extern const char *IPStack_PrintAddress(int AddressType, const void *Address); extern tRoute *IPStack_FindRoute(int AddressType, tInterface *Interface, void *Address);