summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2019-03-13[dhcpv4] simplify userclass handling (#249)Pablo Mazzini
2019-03-11dhcpv6: standardize GetInnerMessageChristopher Koch
2019-03-11dhcpv6: remove setters and getters.Christopher Koch
- Make members directly accessible.
2019-03-11dhcpv6: add explicit unmarshaling functions.Christopher Koch
2019-03-11dhcpv6: rename stuttering types.Christopher Koch
dhcpv6.DHCPv6Message -> dhcpv6.Message dhcpv6.DHCPv6Relay -> dhcpv6.RelayMessage
2019-03-07Allow Unknown OperState of the link interface (#254)Ɓukasz Siudut
* Allow Unknowo OperState of the link interface We hig a bug when Netconf library was failing to bring interface up despite the fact that it was actually up. It turned out that it's oper state was not set to UP, what is expected by the library. According to kernel documentation it is ok proceed if interface state is Up or Unknown: ``` Interface is in RFC2863 operational state UP or UNKNOWN. This is for backward compatibility, routing daemons, dhcp clients can use this flag to determine whether they should use the interface. ``` Also, resaon why operational state may remain Unknown: ``` IF_OPER_UNKNOWN (0): Interface is in unknown state, neither driver nor userspace has set operational state. Interface must be considered for user data as setting operational state has not been implemented in every driver. ``` I modified our code to try DHCP transaction even if `IfUp` failed, but the OperState was equal to Unknown - it worked perfectly. * Skip rt7 test also with go 1.10 and 1.11 As per request from @pmazzini.
2019-01-28update bsdpPablo Mazzini
2019-01-28update bsdpPablo Mazzini
2019-01-28update bsdpPablo Mazzini
2019-01-28[dhcpv4] move default to main directoryPablo Mazzini
2019-01-28Created examples directory and adjusted READMEAndrea Barberio
2019-01-28dhcpv4: moved client into dhcpv4/client4Andrea Barberio
2019-01-28dhcpv6: moved client into dhcpv6/client6Andrea Barberio
2019-01-26dhcpv6: remove unnecessary Length functionChristopher Koch
2019-01-26dhcpv6: move option code and length marshaling to Options.ToBytes.Christopher Koch
2019-01-26dhcpv6: easier option parsingChristopher Koch
- move option parsing to uio buffer library. - move option code and length reading into FromBytes rather than implementing it in each OptionParser.
2019-01-26dhcpv6: use uio buffer in DHCPv6 message parsingChristopher Koch
2019-01-26dhcpv6: move option code types; add Stringer.Christopher Koch
2019-01-26dhcpv6: introduce TransactionID typeChristopher Koch
2019-01-26dhcpv6: clean up MessageTypeChristopher Koch
- print unknown message type numbers. - unexport unneeded map of strings.
2019-01-26dhcpv6: introduce options type.Christopher Koch
2019-01-25[async] re-add modifiers to Send method (#239)Pablo Mazzini
2019-01-24Update CONTRIBUTORS.mdinsomniac
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-20dhcpv4: fix TransactionID in SummaryChristopher Koch
2019-01-20dhcpv4: add Stringer for XIDChristopher Koch
2019-01-19dhcpv4: consolidate all IP options into one file.Christopher Koch
2019-01-19dhcpv4: consolidate string options into one file.Christopher Koch
2019-01-19dhcpv4: build more packets with modifiersChristopher Koch
Also drop unnecessary return value of Modifier.
2019-01-19dhcpv6: added Duid.EqualAndrea Barberio
2019-01-15dhcpv4: add option code list type for simpler modifiers.Christopher Koch
2019-01-15dhcpv4: print values of unknown types in stringifiers.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-14bsdp: simplify version type.Christopher Koch
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-14iana: rename HwTypeType to HWType, add package comment.Christopher Koch
2019-01-14Rename iana.ArchType to iana.Arch.Christopher Koch
2019-01-14dhcpv4: move all list of IPs types to options_ips.go.Christopher Koch
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: remote OptionGetter interface in favor of Options type.Christopher Koch
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.
2019-01-09dhcpv4: export packet members; remove setters and getters.Christopher Koch
2019-01-09dhcpv4: simplify host name and boot file handling.Christopher Koch
2019-01-09dhcpv4: simplify handling of client MAC.Christopher Koch
2019-01-09dhcpv4: nicer (un-)marshaling of DHCP messages.Christopher Koch
2019-01-09dhcpv4: introduce TransactionID type.Christopher Koch
2018-12-23[ztpv4] make it consistent with ztpv6 (#221)insomniac
* [ztpv4] make it consistent with ztpv6