Age | Commit message (Collapse) | Author |
|
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>
|
|
to raiSubOptionCode
- a few minor changes to address latest feedback
Signed-off-by: Hu Jun <hujun.work@gmail.com>
|
|
- 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>
|
|
- 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>
|
|
- 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>
|
|
RFCs).
Signed-off-by: Mantic <mikey.whitaker@gmail.com>
|
|
|
|
From:
r := GetRouter(d.Options)
To:
r := d.Router()
|
|
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}, ...))
|
|
|
|
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.
|
|
|
|
- Consolidate writing the option code and length to Options.Marshal
rather than doing it in each individual option.
- Use uio in marshaling code.
|
|
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.
|
|
|
|
|
|
|