X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Frouting.c;h=643de1ee4a914bd07695c5ce6c906acced0337b7;hb=8025b7daeb599847864cc3d8e3c2a41e63e3789d;hp=33b756cb8602d15f5d4282bd99a71b0d1a4997da;hpb=8c721d1069e9c0c769b847e9903d83b99d1acdfe;p=tpg%2Facess2.git diff --git a/Modules/IPStack/routing.c b/Modules/IPStack/routing.c index 33b756cb..643de1ee 100644 --- a/Modules/IPStack/routing.c +++ b/Modules/IPStack/routing.c @@ -244,12 +244,13 @@ tRoute *IPStack_FindRoute(int AddressType, void *Address) */ static const char *casIOCtls_Route[] = { DRV_IOCTLNAMES, - "get_network", // Get network - (void *Data) - "set_network", // Set network - (void *Data) - "get_nexthop", // Get next hop - (void *Data) - "set_nexthop", // Set next hop - (void *Data) - "getset_subnetbits", // Get/Set subnet bits - (int *Bits) - "getset_metric", // Get/Set metric - (int *Metric) + "get_network", // Get network - (void *Data), returns boolean success + "set_network", // Set network - (void *Data), returns boolean success + "get_nexthop", // Get next hop - (void *Data), returns boolean success + "set_nexthop", // Set next hop - (void *Data), returns boolean success + "getset_subnetbits", // Get/Set subnet bits - (int *Bits), returns current value + "getset_metric", // Get/Set metric - (int *Metric), returns current value + "get_interface", // Get interface name - (char *Name), returns name length, NULL OK NULL }; @@ -325,6 +326,15 @@ int IPStack_Route_IOCtl(tVFS_Node *Node, int ID, void *Data) } return rt->Metric; + // Get interface name + case 10: + if( Data ) { + if( !CheckMem(Data, strlen(rt->Interface->Name) + 1) ) + return -1; + strcpy(Data, rt->Interface->Name); + } + return strlen(rt->Interface->Name); + default: return 0; }