summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/option_relay_agent_information.go
AgeCommit message (Collapse)Author
2021-08-27dhcpv4: Add RelaySourcePortSubOption constantAnatole Denis
As described in RFC8357 this is a 0-length suboption used to indicate that the relay supports the arbitrary UDP port behavior from RFC8357 Since this is 0-length the constant is enough to handle the full behavior Signed-off-by: Anatole Denis <natolumin@unverle.fr>
2020-09-20- rename raiValue to raiSubOptionValue to avoid confusion, and move it next ↵Hu Jun
to raiSubOptionCode - a few minor changes to address latest feedback Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-09-05- restore OptionGeneric.String()Hu Jun
- add raiValue in option_relay_agent_information.go to implement fmt.Stringer - change test cases accordingly Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-08-31- fixed some test cases broken by this PRHu Jun
- add a space in OptionGeneric.String() - move the indenting "\n" from OptionHumanizer.Stringify to RelayOptions.String() Signed-off-by: Hu Jun <hujun.work@gmail.com>
2020-08-09- fix relayHumanizer.CodeHumanizer so it uses raiSubOptionCodeHu Jun
- update OptionHumanizer.Stringify so it include an additional newline for option82 - update OptionGeneric.String so it include a string output in addition to existing byte slice output Signed-off-by: Hu Jun <hujun.work@gmail.com>
2019-10-25Added additional DHCP4 Relay Agent Information sub options (as per various ↵Mantic
RFCs). Signed-off-by: Mantic <mikey.whitaker@gmail.com>
2019-03-13Adding CircuitId parsing logic into dhcpv4 lib (#255)Akshay Navale
2019-01-24dhcpv4: getters instead of gettersChristopher Koch
From: r := GetRouter(d.Options) To: r := d.Router()
2019-01-24dhcpv4: nicer API for option parsing.Christopher Koch
From: r := d.GetOneOption(OptionRouter).(*OptRouter).Routers d.UpdateOption(&OptRouter{Routers: []net.IP{net.IP{192, 168, 0, 1}}}) To: r := GetRouter(d.Options) d.UpdateOption(OptRouter(net.IP{192, 168, 0, 1}, ...))
2019-01-14dhcpv4: thoroughly fix type docs. Refer to RFCs.Christopher Koch
2019-01-14dhcpv4: change OptionCode to an interface for humanization.Christopher Koch
Interface'd OptionCodes can print the correct human string. It sucks because option codes are just a byte, but depending on where you use them, they are interpreted differently. BSDP option codes != DHCP option codes.
2019-01-11dhcpv4: remove unused Option.Length function.Christopher Koch
2019-01-11dhcpv4: simplify marshaling options to binary.Christopher Koch
- Consolidate writing the option code and length to Options.Marshal rather than doing it in each individual option. - Use uio in marshaling code.
2019-01-10dhcpv4: simplify option parsing.Christopher Koch
option's codes and lengths were being parsed twice: once in ParseOption and once in each option type's Parse implementation. Consolidate such that it only happens once. Additionally, only pass data to options that they should parse -- we know the length before the Parse function is called, so the option only gets to see the data it needs to see. Also, use uio.Lexer to simplify parsing code in general. Easier to read and reason about.
2018-11-11OptRelayAgentInformation: increase coveragePablo Mazzini
2018-11-11OptRelayAgentInformation: fix commentPablo Mazzini
2018-11-11add OptRelayAgentInformationPablo Mazzini