X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fethernet_types%2Fethernet_types.ba.go;h=cad44d6598303980fcc98a8522ca1fa99f23c8a9;hb=fa7a6d1cee22dae3544f2a6fb6759faf588e603a;hp=9b393ff1283712610377937a0f02517f98c086a4;hpb=debc52dea8a81417bb08ca5bb934c7876b6d65e0;p=govpp.git diff --git a/binapi/ethernet_types/ethernet_types.ba.go b/binapi/ethernet_types/ethernet_types.ba.go index 9b393ff..cad44d6 100644 --- a/binapi/ethernet_types/ethernet_types.ba.go +++ b/binapi/ethernet_types/ethernet_types.ba.go @@ -1,6 +1,6 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.3.5-56-gc0da1f2-dirty +// binapi-generator: v0.4.0 // VPP: 21.06-release // source: /usr/share/vpp/api/core/ethernet_types.api.json @@ -35,15 +35,19 @@ func ParseMacAddress(s string) (MacAddress, error) { copy(macaddr[:], mac[:]) return macaddr, nil } + func (x MacAddress) ToMAC() net.HardwareAddr { return net.HardwareAddr(x[:]) } + func (x MacAddress) String() string { return x.ToMAC().String() } + func (x *MacAddress) MarshalText() ([]byte, error) { return []byte(x.String()), nil } + func (x *MacAddress) UnmarshalText(text []byte) error { mac, err := ParseMacAddress(string(text)) if err != nil {