Requesting help appending relay agent option in v6

Petrin, Benjamin b.petrin at WPI.EDU
Wed Apr 1 16:05:49 UTC 2009


Hi everyone,

I'm attempting to make changes to the relay agent for v6 to add an option to the packets being processed upwards (client to server) that contains the hardware address of the client. I have developed code that will retrieve the hardware address for the client from the relay agent's neighbor discovery table based on the IPv6 source address (thanks David Hankins for the hint there).

So I now need to append this as an option to the packet. I'm looking at "process_up6" in /relay/dhcrelay.c and I can see where the interface-id and relay-msg are added to the packet. I'm looking for a bit of assistance on how I can go about adding another option without breaking anything...I'm getting a little lost in the "save_option_buffer" function being called in common/options.c as well as "prepare_option_buffer". Is there someone that wouldn't mind explaining a bit how these work and go about affecting the outward bound packet? 

Many thanks,
Benjamin Petrin


More information about the dhcp-workers mailing list