[prev in list] [next in list] [prev in thread] [next in thread]
List: dhcp-server
Subject: Re: getting agent.remote-id via omapi
From: Jarkko Torppa <torppa () staff ! megabaud ! fi>
Date: 2003-06-04 10:58:48
[Download RAW message or body]
*** From dhcp-server -- To unsubscribe, see the end of this message. ***
neufeld@pittstate.edu said:
> My guess is it's not even _on_ some big list.
There is no support for getting agent.* stuff from OMAPI out of box, the
patch to code is quite trivial.
I can't make nice patch of the change as I have some other changes in the
code that surrond this piece but this should be put into server/omapi.c
function dhcp_lease_stuff_values before /* Write out the inner object, if
any */ comment
/* Put out agent options if any */
if(lease-> agent_options) {
struct option_cache *oc;
pair p;
for(p = lease->agent_options->first; p; p = p -> cdr) {
oc = (struct option_cache *)p -> car;
if (oc -> data.len) {
/* omapi_connection_put_name */
status = omapi_connection_put_uint16(c,
strlen(oc -> option -> name)+6);
if(status == ISC_R_SUCCESS)
status=omapi_connection_copyin(c, (const unsigned char
*)"agent.",6);
if(status == ISC_R_SUCCESS)
status=omapi_connection_copyin(c, (const unsigned char
*)oc->option->name,
strlen(oc->option->name));
/* The size */
if(status == ISC_R_SUCCESS)
status=omapi_connection_put_uint32(c, oc -> data.len);
if(status == ISC_R_SUCCESS)
status=omapi_connection_copyin(c, oc -> data.data,
oc -> data.len);
if(status != ISC_R_SUCCESS)
return status;
}
}
}
--
Jarkko Torppa, Elisa Internet
-----------------------------------------------------------------------
List Archives : http://www.isc.org/ml-archives/dhcp-server/
Unsubscribe : http://www.isc.org/dhcp-lists.html
-or- : mailto:dhcp-server-request@isc.org?Subject=unsubscribe
-----------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic