X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Fipstack.h;h=54d8fb822075fac8808dacf695ea55beeacbe51d;hb=07173b260d76a7e6482838c02d5deb2ead2afbb2;hp=9315f4028e95c596a0ab0cbe28671973c8d26a85;hpb=0f48b41ce8edd3b6d549d641b35901e4b51a5132;p=tpg%2Facess2.git diff --git a/Modules/IPStack/ipstack.h b/Modules/IPStack/ipstack.h index 9315f402..54d8fb82 100644 --- a/Modules/IPStack/ipstack.h +++ b/Modules/IPStack/ipstack.h @@ -5,7 +5,7 @@ #ifndef _IPSTACK_H_ #define _IPSTACK_H_ -#include +#include #include typedef union uIPv4 tIPv4; @@ -13,6 +13,7 @@ typedef union uIPv6 tIPv6; typedef struct sMacAddr tMacAddr; typedef struct sAdapter tAdapter; typedef struct sInterface tInterface; +typedef struct sSocketFile tSocketFile; typedef void (*tIPCallback)(tInterface *Interface, void *Address, int Length, void *Buffer); @@ -34,6 +35,7 @@ struct sInterface { struct sInterface *Next; tVFS_Node Node; tAdapter *Adapter; + int TimeoutDelay; // Time in miliseconds before a connection times out int Type; // 0 for disabled, 4 for IPv4 and 6 for IPv6 union { struct { @@ -62,6 +64,17 @@ struct sAdapter { char Device[]; }; +/** + * \brief Describes a socket file definition + */ +struct sSocketFile +{ + struct sSocketFile *Next; + const char *Name; + + tVFS_Node *(*Init)(tInterface *Interface); +}; + static const tMacAddr cMAC_BROADCAST = {{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}}; #define MAC_SET(t,v) memcpy(&(t),&(v),sizeof(tMacAddr)) @@ -80,4 +93,6 @@ static const tMacAddr cMAC_BROADCAST = {{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}}; #define ntohs(in) BigEndian16(in) #define ntohl(in) BigEndian32(in) +extern int IPStack_AddFile(tSocketFile *File); + #endif