X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FIPStack%2Finterface.c;h=ea4295420f8369650a4c137ed810d62e28359b3c;hb=200fecd6756067c8bf806fd11eaeb3b65090c68b;hp=9a47ba700f9fbcb37833cb141205fc4d82095f17;hpb=7ba570fe3cc5418f42decf5b72ac2295cce9e60f;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/IPStack/interface.c b/KernelLand/Modules/IPStack/interface.c index 9a47ba70..ea429542 100644 --- a/KernelLand/Modules/IPStack/interface.c +++ b/KernelLand/Modules/IPStack/interface.c @@ -22,14 +22,14 @@ extern tVFS_Node gIP_AdaptersNode; // === PROTOTYPES === int IPStack_Root_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]); -tVFS_Node *IPStack_Root_FindDir(tVFS_Node *Node, const char *Name); +tVFS_Node *IPStack_Root_FindDir(tVFS_Node *Node, const char *Name, Uint Flags); int IPStack_Root_IOCtl(tVFS_Node *Node, int ID, void *Data); int IPStack_AddFile(tSocketFile *File); tInterface *IPStack_AddInterface(const char *Device, int Type, const char *Name); int IPStack_Iface_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]); -tVFS_Node *IPStack_Iface_FindDir(tVFS_Node *Node, const char *Name); +tVFS_Node *IPStack_Iface_FindDir(tVFS_Node *Node, const char *Name, Uint Flags); int IPStack_Iface_IOCtl(tVFS_Node *Node, int ID, void *Data); // === GLOBALS === @@ -110,11 +110,8 @@ int IPStack_Root_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]) /** * \brief Get the node of an interface */ -tVFS_Node *IPStack_Root_FindDir(tVFS_Node *Node, const char *Name) +tVFS_Node *IPStack_Root_FindDir(tVFS_Node *Node, const char *Name, Uint Flags) { - #if 0 - int i, num; - #endif tInterface *iface; ENTER("pNode sName", Node, Name); @@ -282,6 +279,8 @@ tInterface *IPStack_AddInterface(const char *Device, int Type, const char *Name) sprintf(iface->Name, "%i", (int)iface->Node.ImplInt); } + LOG("Creating interface '%s'", iface->Name); + // Append to list SHORTLOCK( &glIP_Interfaces ); if( gIP_Interfaces ) { @@ -304,7 +303,7 @@ tInterface *IPStack_AddInterface(const char *Device, int Type, const char *Name) */ int IPStack_AddFile(tSocketFile *File) { - Log_Log("IPStack", "Added file '%s'", File->Name); +// Log_Log("IPStack", "Added file '%s'", File->Name); File->Next = gIP_FileTemplates; gIP_FileTemplates = File; return 0; @@ -333,7 +332,7 @@ int IPStack_Iface_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]) /** * \brief Gets a named node from an interface directory */ -tVFS_Node *IPStack_Iface_FindDir(tVFS_Node *Node, const char *Name) +tVFS_Node *IPStack_Iface_FindDir(tVFS_Node *Node, const char *Name, Uint Flags) { tSocketFile *file = gIP_FileTemplates; @@ -342,9 +341,13 @@ tVFS_Node *IPStack_Iface_FindDir(tVFS_Node *Node, const char *Name) { if( strcmp(file->Name, Name) == 0 ) break; } - if(!file) return NULL; + if(!file) { + LOG("File '%s' unknown", Name); + return NULL; + } // Pass the buck! + LOG("File '%s' calling %p", file->Init); return file->Init(Node->ImplPtr); }