astAddress.Un return size } func (m *TCPConfigureSrcAddresses) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(m.VrfID) buf.EncodeUint8(uint8(m.FirstAddress.Af)) buf.EncodeBytes(m.FirstAddress.Un.XXX_UnionData[:], 16) buf.EncodeUint8(uint8(m.LastAddress.Af)) buf.EncodeBytes(m.LastAddress.Un.XXX_UnionData[:], 16) return buf.Bytes(), nil } func (m *TCPConfigureSrcAddresses) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.VrfID = buf.DecodeUint32() m.FirstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) copy(m.FirstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) m.LastAddress.Af = ip_types.AddressFamily(buf.DecodeUint8()) copy(m.LastAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16)) return nil } // TCPConfigureSrcAddressesReply defines message 'tcp_configure_src_addresses_reply'. type TCPConfigureSrcAddressesReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *TCPConfigureSrcAddressesReply) Reset() { *m = TCPConfigureSrcAddressesReply{} } func (*TCPConfigureSrcAddressesReply) GetMessageName() string { return "tcp_configure_src_addresses_reply" } func (*TCPConfigureSrcAddressesReply) GetCrcString() string { return "e8d4e804" } func (*TCPConfigureSrcAddressesReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *TCPConfigureSrcAddressesReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *TCPConfigureSrcAddressesReply) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *TCPConfigureSrcAddressesReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } func init() { file_tcp_binapi_init() } func file_tcp_binapi_init() { api.RegisterMessage((*TCPConfigureSrcAddresses)(nil), "tcp_configure_src_addresses_67eede0d") api.RegisterMessage((*TCPConfigureSrcAddressesReply)(nil), "tcp_configure_src_addresses_reply_e8d4e804") } // Messages returns list of all messages in this module. func AllMessages() []api.Message { return []api.Message{ (*TCPConfigureSrcAddresses)(nil), (*TCPConfigureSrcAddressesReply)(nil), } }