Found a problem with if_readsocket!
Brian J. Murrell
brian_murrell at ssd.bctel.net
Sun Feb 13 18:53:04 UTC 2000
Hi Ted, et. al
I found the problem I was having while hacking OMAPI into the dhcp
client. If you will recall I was having a with select returning with an
error of "invalid file descriptor". Well I found the (indirect)
problem. The function:
int if_readsocket (h)
omapi_object_t *h;
{
struct interface_info *ip;
if (h -> type != dhcp_type_interface)
return ISC_R_INVALIDARG;
ip = (struct interface_info *)h;
return ip -> rfdesc;
}
will return "39" (ISC_R_INVALIDARG) if the omapi_object_t "*h" is not a
"dhcp_type_interface". The problem being of course that 39 can also be
a valid file descriptor. So how to know an error occurred and that the
fd was not really 39?
This is only an indirect problem of course. if_readsocket () should not
get an invalid omapi_object_t argument. I am still chasing that one
down.
b.
--
Brian J. Murrell InterLinx Support Services, Inc.
North Vancouver, B.C. 604 983 UNIX
Platform and Brand Independent UNIX Support - R3.2 - R4 - BSD
More information about the dhcp-hackers
mailing list