Cleanup Commit
[tpg/acess2.git] / Modules / IPStack / ipstack.h
index 94fabbb..95f93c4 100644 (file)
@@ -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  {
@@ -59,9 +61,21 @@ struct sAdapter {
         int    NRef;
        
        tMacAddr        MacAddr;
+        int    DeviceLen;
        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 +94,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

UCC git Repository :: git.ucc.asn.au