summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/modifiers.go
AgeCommit message (Collapse)Author
2019-05-09NewReplyFromRequest: copy gw ipPablo Mazzini
2019-05-09[dhcpv4] Do not Gateway IP address on packets sent by clients (#287)Marco Guerri
Relays might drop packets coming from clients if they have the Gateway IP set. This modifier is supposed to be used by relays: `WithReply` is used only by clients.
2019-03-13[dhcpv4] simplify userclass handling (#249)Pablo Mazzini
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-19dhcpv4: build more packets with modifiersChristopher Koch
Also drop unnecessary return value of Modifier.
2019-01-15dhcpv4: add option code list type for simpler modifiers.Christopher Koch
2019-01-15dhcpv4: conform to RFC 2131 with respect to options.Christopher Koch
Removes AddOption and GetOption. RFC 2131 specifies that options may only appear once (Section 4.1). If an option does appear more than once, its byte values must be concatenated. RFC 3396 further specifies that to send options longer than 255 bytes, one option may be split into multiple option codes, which must be concatenated back together by the receiver. Both of these are concerned with the byte representation of options. Fact is, based on both RFCs one can say that an option may only appear once, but may be composed of multiple values. Because an option may appear only once logically in any case, we remove the AddOption and GetOption functions and leave only UpdateOption and GetOneOption. Also remove all additions & checks of the End option - the marshaling and unmarshaling code is exclusively responsible for that now.
2019-01-09dhcpv4: export packet members; remove setters and getters.Christopher Koch
2019-01-09dhcpv4: introduce TransactionID type.Christopher Koch
2018-12-08Added netconf v4 tests and required modifiersAndrea Barberio
2018-11-06[WIP] Added DHCPv4 server (#178)insomniac
* Added DHCPv4 server * Added more modifiers * Fixed some bugs
2018-08-24DHCPv4 relay modifier (#149)Mikołaj Walczak
2018-08-22Requested Options modifier for DHCPv4 (#147)Mikołaj Walczak
2018-08-10Added modifier for netbootv4 (#124)Owen Mooney
2018-07-29Add support for modifiers to dhcpv4Owen Mooney