Kernel - Implementing SysSpawn
[tpg/acess2.git] / Modules / IPStack / main.c
index c89e79a..9b9930e 100644 (file)
@@ -30,6 +30,11 @@ extern tRoute        *IPStack_AddRoute(const char *Interface, void *Network, int Subnet
 
 // === GLOBALS ===
 MODULE_DEFINE(0, VERSION, IPStack, IPStack_Install, NULL, NULL);
+tVFS_NodeType  gIP_RootNodeType = {
+       .ReadDir = IPStack_Root_ReadDir,
+       .FindDir = IPStack_Root_FindDir,
+       .IOCtl = IPStack_Root_IOCtl
+};
 tDevFS_Driver  gIP_DriverInfo = {
        NULL, "ip",
        {
@@ -37,9 +42,7 @@ tDevFS_Driver gIP_DriverInfo = {
        .NumACLs = 1,
        .ACLs = &gVFS_ACL_EveryoneRX,
        .Flags = VFS_FFLAG_DIRECTORY,
-       .ReadDir = IPStack_Root_ReadDir,
-       .FindDir = IPStack_Root_FindDir,
-       .IOCtl = IPStack_Root_IOCtl
+       .Type = &gIP_RootNodeType
        }
 };
 
@@ -229,7 +232,7 @@ int IPStack_CompareAddress(int AddressType, const void *Address1, const void *Ad
        const Uint8     *addr1 = Address1, *addr2 = Address2;
        
        // Sanity check size
-       if( CheckBits < 0 )     CheckBits = 0;
+       if( CheckBits < 0 )     CheckBits = size*8;
        if( CheckBits > size*8 )        CheckBits = size*8;
        
        if( CheckBits == 0 )    return 1;       // /0 matches anything

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