github.com/onosproject/onos-api/go@v0.10.32/onos/fabricsim/hosts.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: onos/fabricsim/hosts.proto
     3  
     4  package fabricsim
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	_ "github.com/gogo/protobuf/gogoproto"
    10  	proto "github.com/gogo/protobuf/proto"
    11  	misc "github.com/onosproject/onos-api/go/onos/misc"
    12  	grpc "google.golang.org/grpc"
    13  	codes "google.golang.org/grpc/codes"
    14  	status "google.golang.org/grpc/status"
    15  	io "io"
    16  	math "math"
    17  	math_bits "math/bits"
    18  )
    19  
    20  // Reference imports to suppress errors if they are not otherwise used.
    21  var _ = proto.Marshal
    22  var _ = fmt.Errorf
    23  var _ = math.Inf
    24  
    25  // This is a compile-time assertion to ensure that this generated file
    26  // is compatible with the proto package it is being compiled against.
    27  // A compilation error at this line likely means your copy of the
    28  // proto package needs to be updated.
    29  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    30  
    31  // HostType represents type of a host, i.e. bare metal, virtual, etc.
    32  type HostType int32
    33  
    34  const (
    35  	HostType_BARE_METAL HostType = 0
    36  	HostType_VIRTUAL    HostType = 1
    37  )
    38  
    39  var HostType_name = map[int32]string{
    40  	0: "BARE_METAL",
    41  	1: "VIRTUAL",
    42  }
    43  
    44  var HostType_value = map[string]int32{
    45  	"BARE_METAL": 0,
    46  	"VIRTUAL":    1,
    47  }
    48  
    49  func (x HostType) String() string {
    50  	return proto.EnumName(HostType_name, int32(x))
    51  }
    52  
    53  func (HostType) EnumDescriptor() ([]byte, []int) {
    54  	return fileDescriptor_032be33f3739b3f8, []int{0}
    55  }
    56  
    57  // Host describes a simulated host (bare metal, VM or container)
    58  type Host struct {
    59  	// unique host id and host type
    60  	ID   HostID   `protobuf:"bytes,1,opt,name=id,proto3,casttype=HostID" json:"id,omitempty"`
    61  	Type HostType `protobuf:"varint,4,opt,name=type,proto3,enum=onos.fabricsim.HostType" json:"type,omitempty"`
    62  	// network interfaces
    63  	Interfaces []*NetworkInterface `protobuf:"bytes,2,rep,name=interfaces,proto3" json:"interfaces,omitempty"`
    64  	Pos        *misc.GridPosition  `protobuf:"bytes,3,opt,name=pos,proto3" json:"pos,omitempty"`
    65  	// virtual hosts being hosted by this (bare metal) host
    66  	Hosts []*Host `protobuf:"bytes,5,rep,name=hosts,proto3" json:"hosts,omitempty"`
    67  }
    68  
    69  func (m *Host) Reset()         { *m = Host{} }
    70  func (m *Host) String() string { return proto.CompactTextString(m) }
    71  func (*Host) ProtoMessage()    {}
    72  func (*Host) Descriptor() ([]byte, []int) {
    73  	return fileDescriptor_032be33f3739b3f8, []int{0}
    74  }
    75  func (m *Host) XXX_Unmarshal(b []byte) error {
    76  	return m.Unmarshal(b)
    77  }
    78  func (m *Host) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    79  	if deterministic {
    80  		return xxx_messageInfo_Host.Marshal(b, m, deterministic)
    81  	} else {
    82  		b = b[:cap(b)]
    83  		n, err := m.MarshalToSizedBuffer(b)
    84  		if err != nil {
    85  			return nil, err
    86  		}
    87  		return b[:n], nil
    88  	}
    89  }
    90  func (m *Host) XXX_Merge(src proto.Message) {
    91  	xxx_messageInfo_Host.Merge(m, src)
    92  }
    93  func (m *Host) XXX_Size() int {
    94  	return m.Size()
    95  }
    96  func (m *Host) XXX_DiscardUnknown() {
    97  	xxx_messageInfo_Host.DiscardUnknown(m)
    98  }
    99  
   100  var xxx_messageInfo_Host proto.InternalMessageInfo
   101  
   102  func (m *Host) GetID() HostID {
   103  	if m != nil {
   104  		return m.ID
   105  	}
   106  	return ""
   107  }
   108  
   109  func (m *Host) GetType() HostType {
   110  	if m != nil {
   111  		return m.Type
   112  	}
   113  	return HostType_BARE_METAL
   114  }
   115  
   116  func (m *Host) GetInterfaces() []*NetworkInterface {
   117  	if m != nil {
   118  		return m.Interfaces
   119  	}
   120  	return nil
   121  }
   122  
   123  func (m *Host) GetPos() *misc.GridPosition {
   124  	if m != nil {
   125  		return m.Pos
   126  	}
   127  	return nil
   128  }
   129  
   130  func (m *Host) GetHosts() []*Host {
   131  	if m != nil {
   132  		return m.Hosts
   133  	}
   134  	return nil
   135  }
   136  
   137  // NetworkInterface describes simulated host's attachment to the network
   138  type NetworkInterface struct {
   139  	// unique port id
   140  	ID PortID `protobuf:"bytes,1,opt,name=id,proto3,casttype=PortID" json:"id,omitempty"`
   141  	// mac address and VLAN
   142  	MacAddress string `protobuf:"bytes,2,opt,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"`
   143  	VLAN       uint32 `protobuf:"varint,6,opt,name=vlan,proto3" json:"vlan,omitempty"`
   144  	// ipv4 address
   145  	IpAddress string `protobuf:"bytes,3,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
   146  	// ipv6 address
   147  	Ipv6Address string `protobuf:"bytes,4,opt,name=ipv6_address,json=ipv6Address,proto3" json:"ipv6_address,omitempty"`
   148  	// behavior
   149  	Behavior *NetworkInterfaceBehavior `protobuf:"bytes,5,opt,name=behavior,proto3" json:"behavior,omitempty"`
   150  }
   151  
   152  func (m *NetworkInterface) Reset()         { *m = NetworkInterface{} }
   153  func (m *NetworkInterface) String() string { return proto.CompactTextString(m) }
   154  func (*NetworkInterface) ProtoMessage()    {}
   155  func (*NetworkInterface) Descriptor() ([]byte, []int) {
   156  	return fileDescriptor_032be33f3739b3f8, []int{1}
   157  }
   158  func (m *NetworkInterface) XXX_Unmarshal(b []byte) error {
   159  	return m.Unmarshal(b)
   160  }
   161  func (m *NetworkInterface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   162  	if deterministic {
   163  		return xxx_messageInfo_NetworkInterface.Marshal(b, m, deterministic)
   164  	} else {
   165  		b = b[:cap(b)]
   166  		n, err := m.MarshalToSizedBuffer(b)
   167  		if err != nil {
   168  			return nil, err
   169  		}
   170  		return b[:n], nil
   171  	}
   172  }
   173  func (m *NetworkInterface) XXX_Merge(src proto.Message) {
   174  	xxx_messageInfo_NetworkInterface.Merge(m, src)
   175  }
   176  func (m *NetworkInterface) XXX_Size() int {
   177  	return m.Size()
   178  }
   179  func (m *NetworkInterface) XXX_DiscardUnknown() {
   180  	xxx_messageInfo_NetworkInterface.DiscardUnknown(m)
   181  }
   182  
   183  var xxx_messageInfo_NetworkInterface proto.InternalMessageInfo
   184  
   185  func (m *NetworkInterface) GetID() PortID {
   186  	if m != nil {
   187  		return m.ID
   188  	}
   189  	return ""
   190  }
   191  
   192  func (m *NetworkInterface) GetMacAddress() string {
   193  	if m != nil {
   194  		return m.MacAddress
   195  	}
   196  	return ""
   197  }
   198  
   199  func (m *NetworkInterface) GetVLAN() uint32 {
   200  	if m != nil {
   201  		return m.VLAN
   202  	}
   203  	return 0
   204  }
   205  
   206  func (m *NetworkInterface) GetIpAddress() string {
   207  	if m != nil {
   208  		return m.IpAddress
   209  	}
   210  	return ""
   211  }
   212  
   213  func (m *NetworkInterface) GetIpv6Address() string {
   214  	if m != nil {
   215  		return m.Ipv6Address
   216  	}
   217  	return ""
   218  }
   219  
   220  func (m *NetworkInterface) GetBehavior() *NetworkInterfaceBehavior {
   221  	if m != nil {
   222  		return m.Behavior
   223  	}
   224  	return nil
   225  }
   226  
   227  // NetworkInterfaceBehavior describes dynamic aspects of a simulated host interface
   228  // and how it manifests its presence on the network.
   229  type NetworkInterfaceBehavior struct {
   230  }
   231  
   232  func (m *NetworkInterfaceBehavior) Reset()         { *m = NetworkInterfaceBehavior{} }
   233  func (m *NetworkInterfaceBehavior) String() string { return proto.CompactTextString(m) }
   234  func (*NetworkInterfaceBehavior) ProtoMessage()    {}
   235  func (*NetworkInterfaceBehavior) Descriptor() ([]byte, []int) {
   236  	return fileDescriptor_032be33f3739b3f8, []int{2}
   237  }
   238  func (m *NetworkInterfaceBehavior) XXX_Unmarshal(b []byte) error {
   239  	return m.Unmarshal(b)
   240  }
   241  func (m *NetworkInterfaceBehavior) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   242  	if deterministic {
   243  		return xxx_messageInfo_NetworkInterfaceBehavior.Marshal(b, m, deterministic)
   244  	} else {
   245  		b = b[:cap(b)]
   246  		n, err := m.MarshalToSizedBuffer(b)
   247  		if err != nil {
   248  			return nil, err
   249  		}
   250  		return b[:n], nil
   251  	}
   252  }
   253  func (m *NetworkInterfaceBehavior) XXX_Merge(src proto.Message) {
   254  	xxx_messageInfo_NetworkInterfaceBehavior.Merge(m, src)
   255  }
   256  func (m *NetworkInterfaceBehavior) XXX_Size() int {
   257  	return m.Size()
   258  }
   259  func (m *NetworkInterfaceBehavior) XXX_DiscardUnknown() {
   260  	xxx_messageInfo_NetworkInterfaceBehavior.DiscardUnknown(m)
   261  }
   262  
   263  var xxx_messageInfo_NetworkInterfaceBehavior proto.InternalMessageInfo
   264  
   265  type GetHostsRequest struct {
   266  }
   267  
   268  func (m *GetHostsRequest) Reset()         { *m = GetHostsRequest{} }
   269  func (m *GetHostsRequest) String() string { return proto.CompactTextString(m) }
   270  func (*GetHostsRequest) ProtoMessage()    {}
   271  func (*GetHostsRequest) Descriptor() ([]byte, []int) {
   272  	return fileDescriptor_032be33f3739b3f8, []int{3}
   273  }
   274  func (m *GetHostsRequest) XXX_Unmarshal(b []byte) error {
   275  	return m.Unmarshal(b)
   276  }
   277  func (m *GetHostsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   278  	if deterministic {
   279  		return xxx_messageInfo_GetHostsRequest.Marshal(b, m, deterministic)
   280  	} else {
   281  		b = b[:cap(b)]
   282  		n, err := m.MarshalToSizedBuffer(b)
   283  		if err != nil {
   284  			return nil, err
   285  		}
   286  		return b[:n], nil
   287  	}
   288  }
   289  func (m *GetHostsRequest) XXX_Merge(src proto.Message) {
   290  	xxx_messageInfo_GetHostsRequest.Merge(m, src)
   291  }
   292  func (m *GetHostsRequest) XXX_Size() int {
   293  	return m.Size()
   294  }
   295  func (m *GetHostsRequest) XXX_DiscardUnknown() {
   296  	xxx_messageInfo_GetHostsRequest.DiscardUnknown(m)
   297  }
   298  
   299  var xxx_messageInfo_GetHostsRequest proto.InternalMessageInfo
   300  
   301  type GetHostsResponse struct {
   302  	Hosts []*Host `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty"`
   303  }
   304  
   305  func (m *GetHostsResponse) Reset()         { *m = GetHostsResponse{} }
   306  func (m *GetHostsResponse) String() string { return proto.CompactTextString(m) }
   307  func (*GetHostsResponse) ProtoMessage()    {}
   308  func (*GetHostsResponse) Descriptor() ([]byte, []int) {
   309  	return fileDescriptor_032be33f3739b3f8, []int{4}
   310  }
   311  func (m *GetHostsResponse) XXX_Unmarshal(b []byte) error {
   312  	return m.Unmarshal(b)
   313  }
   314  func (m *GetHostsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   315  	if deterministic {
   316  		return xxx_messageInfo_GetHostsResponse.Marshal(b, m, deterministic)
   317  	} else {
   318  		b = b[:cap(b)]
   319  		n, err := m.MarshalToSizedBuffer(b)
   320  		if err != nil {
   321  			return nil, err
   322  		}
   323  		return b[:n], nil
   324  	}
   325  }
   326  func (m *GetHostsResponse) XXX_Merge(src proto.Message) {
   327  	xxx_messageInfo_GetHostsResponse.Merge(m, src)
   328  }
   329  func (m *GetHostsResponse) XXX_Size() int {
   330  	return m.Size()
   331  }
   332  func (m *GetHostsResponse) XXX_DiscardUnknown() {
   333  	xxx_messageInfo_GetHostsResponse.DiscardUnknown(m)
   334  }
   335  
   336  var xxx_messageInfo_GetHostsResponse proto.InternalMessageInfo
   337  
   338  func (m *GetHostsResponse) GetHosts() []*Host {
   339  	if m != nil {
   340  		return m.Hosts
   341  	}
   342  	return nil
   343  }
   344  
   345  type GetHostRequest struct {
   346  	ID HostID `protobuf:"bytes,1,opt,name=id,proto3,casttype=HostID" json:"id,omitempty"`
   347  }
   348  
   349  func (m *GetHostRequest) Reset()         { *m = GetHostRequest{} }
   350  func (m *GetHostRequest) String() string { return proto.CompactTextString(m) }
   351  func (*GetHostRequest) ProtoMessage()    {}
   352  func (*GetHostRequest) Descriptor() ([]byte, []int) {
   353  	return fileDescriptor_032be33f3739b3f8, []int{5}
   354  }
   355  func (m *GetHostRequest) XXX_Unmarshal(b []byte) error {
   356  	return m.Unmarshal(b)
   357  }
   358  func (m *GetHostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   359  	if deterministic {
   360  		return xxx_messageInfo_GetHostRequest.Marshal(b, m, deterministic)
   361  	} else {
   362  		b = b[:cap(b)]
   363  		n, err := m.MarshalToSizedBuffer(b)
   364  		if err != nil {
   365  			return nil, err
   366  		}
   367  		return b[:n], nil
   368  	}
   369  }
   370  func (m *GetHostRequest) XXX_Merge(src proto.Message) {
   371  	xxx_messageInfo_GetHostRequest.Merge(m, src)
   372  }
   373  func (m *GetHostRequest) XXX_Size() int {
   374  	return m.Size()
   375  }
   376  func (m *GetHostRequest) XXX_DiscardUnknown() {
   377  	xxx_messageInfo_GetHostRequest.DiscardUnknown(m)
   378  }
   379  
   380  var xxx_messageInfo_GetHostRequest proto.InternalMessageInfo
   381  
   382  func (m *GetHostRequest) GetID() HostID {
   383  	if m != nil {
   384  		return m.ID
   385  	}
   386  	return ""
   387  }
   388  
   389  type GetHostResponse struct {
   390  	Host *Host `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
   391  }
   392  
   393  func (m *GetHostResponse) Reset()         { *m = GetHostResponse{} }
   394  func (m *GetHostResponse) String() string { return proto.CompactTextString(m) }
   395  func (*GetHostResponse) ProtoMessage()    {}
   396  func (*GetHostResponse) Descriptor() ([]byte, []int) {
   397  	return fileDescriptor_032be33f3739b3f8, []int{6}
   398  }
   399  func (m *GetHostResponse) XXX_Unmarshal(b []byte) error {
   400  	return m.Unmarshal(b)
   401  }
   402  func (m *GetHostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   403  	if deterministic {
   404  		return xxx_messageInfo_GetHostResponse.Marshal(b, m, deterministic)
   405  	} else {
   406  		b = b[:cap(b)]
   407  		n, err := m.MarshalToSizedBuffer(b)
   408  		if err != nil {
   409  			return nil, err
   410  		}
   411  		return b[:n], nil
   412  	}
   413  }
   414  func (m *GetHostResponse) XXX_Merge(src proto.Message) {
   415  	xxx_messageInfo_GetHostResponse.Merge(m, src)
   416  }
   417  func (m *GetHostResponse) XXX_Size() int {
   418  	return m.Size()
   419  }
   420  func (m *GetHostResponse) XXX_DiscardUnknown() {
   421  	xxx_messageInfo_GetHostResponse.DiscardUnknown(m)
   422  }
   423  
   424  var xxx_messageInfo_GetHostResponse proto.InternalMessageInfo
   425  
   426  func (m *GetHostResponse) GetHost() *Host {
   427  	if m != nil {
   428  		return m.Host
   429  	}
   430  	return nil
   431  }
   432  
   433  type AddHostRequest struct {
   434  	Host     *Host  `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
   435  	HostedBy HostID `protobuf:"bytes,2,opt,name=hosted_by,json=hostedBy,proto3,casttype=HostID" json:"hosted_by,omitempty"`
   436  }
   437  
   438  func (m *AddHostRequest) Reset()         { *m = AddHostRequest{} }
   439  func (m *AddHostRequest) String() string { return proto.CompactTextString(m) }
   440  func (*AddHostRequest) ProtoMessage()    {}
   441  func (*AddHostRequest) Descriptor() ([]byte, []int) {
   442  	return fileDescriptor_032be33f3739b3f8, []int{7}
   443  }
   444  func (m *AddHostRequest) XXX_Unmarshal(b []byte) error {
   445  	return m.Unmarshal(b)
   446  }
   447  func (m *AddHostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   448  	if deterministic {
   449  		return xxx_messageInfo_AddHostRequest.Marshal(b, m, deterministic)
   450  	} else {
   451  		b = b[:cap(b)]
   452  		n, err := m.MarshalToSizedBuffer(b)
   453  		if err != nil {
   454  			return nil, err
   455  		}
   456  		return b[:n], nil
   457  	}
   458  }
   459  func (m *AddHostRequest) XXX_Merge(src proto.Message) {
   460  	xxx_messageInfo_AddHostRequest.Merge(m, src)
   461  }
   462  func (m *AddHostRequest) XXX_Size() int {
   463  	return m.Size()
   464  }
   465  func (m *AddHostRequest) XXX_DiscardUnknown() {
   466  	xxx_messageInfo_AddHostRequest.DiscardUnknown(m)
   467  }
   468  
   469  var xxx_messageInfo_AddHostRequest proto.InternalMessageInfo
   470  
   471  func (m *AddHostRequest) GetHost() *Host {
   472  	if m != nil {
   473  		return m.Host
   474  	}
   475  	return nil
   476  }
   477  
   478  func (m *AddHostRequest) GetHostedBy() HostID {
   479  	if m != nil {
   480  		return m.HostedBy
   481  	}
   482  	return ""
   483  }
   484  
   485  type AddHostResponse struct {
   486  }
   487  
   488  func (m *AddHostResponse) Reset()         { *m = AddHostResponse{} }
   489  func (m *AddHostResponse) String() string { return proto.CompactTextString(m) }
   490  func (*AddHostResponse) ProtoMessage()    {}
   491  func (*AddHostResponse) Descriptor() ([]byte, []int) {
   492  	return fileDescriptor_032be33f3739b3f8, []int{8}
   493  }
   494  func (m *AddHostResponse) XXX_Unmarshal(b []byte) error {
   495  	return m.Unmarshal(b)
   496  }
   497  func (m *AddHostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   498  	if deterministic {
   499  		return xxx_messageInfo_AddHostResponse.Marshal(b, m, deterministic)
   500  	} else {
   501  		b = b[:cap(b)]
   502  		n, err := m.MarshalToSizedBuffer(b)
   503  		if err != nil {
   504  			return nil, err
   505  		}
   506  		return b[:n], nil
   507  	}
   508  }
   509  func (m *AddHostResponse) XXX_Merge(src proto.Message) {
   510  	xxx_messageInfo_AddHostResponse.Merge(m, src)
   511  }
   512  func (m *AddHostResponse) XXX_Size() int {
   513  	return m.Size()
   514  }
   515  func (m *AddHostResponse) XXX_DiscardUnknown() {
   516  	xxx_messageInfo_AddHostResponse.DiscardUnknown(m)
   517  }
   518  
   519  var xxx_messageInfo_AddHostResponse proto.InternalMessageInfo
   520  
   521  type RemoveHostRequest struct {
   522  	ID HostID `protobuf:"bytes,1,opt,name=id,proto3,casttype=HostID" json:"id,omitempty"`
   523  }
   524  
   525  func (m *RemoveHostRequest) Reset()         { *m = RemoveHostRequest{} }
   526  func (m *RemoveHostRequest) String() string { return proto.CompactTextString(m) }
   527  func (*RemoveHostRequest) ProtoMessage()    {}
   528  func (*RemoveHostRequest) Descriptor() ([]byte, []int) {
   529  	return fileDescriptor_032be33f3739b3f8, []int{9}
   530  }
   531  func (m *RemoveHostRequest) XXX_Unmarshal(b []byte) error {
   532  	return m.Unmarshal(b)
   533  }
   534  func (m *RemoveHostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   535  	if deterministic {
   536  		return xxx_messageInfo_RemoveHostRequest.Marshal(b, m, deterministic)
   537  	} else {
   538  		b = b[:cap(b)]
   539  		n, err := m.MarshalToSizedBuffer(b)
   540  		if err != nil {
   541  			return nil, err
   542  		}
   543  		return b[:n], nil
   544  	}
   545  }
   546  func (m *RemoveHostRequest) XXX_Merge(src proto.Message) {
   547  	xxx_messageInfo_RemoveHostRequest.Merge(m, src)
   548  }
   549  func (m *RemoveHostRequest) XXX_Size() int {
   550  	return m.Size()
   551  }
   552  func (m *RemoveHostRequest) XXX_DiscardUnknown() {
   553  	xxx_messageInfo_RemoveHostRequest.DiscardUnknown(m)
   554  }
   555  
   556  var xxx_messageInfo_RemoveHostRequest proto.InternalMessageInfo
   557  
   558  func (m *RemoveHostRequest) GetID() HostID {
   559  	if m != nil {
   560  		return m.ID
   561  	}
   562  	return ""
   563  }
   564  
   565  type RemoveHostResponse struct {
   566  }
   567  
   568  func (m *RemoveHostResponse) Reset()         { *m = RemoveHostResponse{} }
   569  func (m *RemoveHostResponse) String() string { return proto.CompactTextString(m) }
   570  func (*RemoveHostResponse) ProtoMessage()    {}
   571  func (*RemoveHostResponse) Descriptor() ([]byte, []int) {
   572  	return fileDescriptor_032be33f3739b3f8, []int{10}
   573  }
   574  func (m *RemoveHostResponse) XXX_Unmarshal(b []byte) error {
   575  	return m.Unmarshal(b)
   576  }
   577  func (m *RemoveHostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   578  	if deterministic {
   579  		return xxx_messageInfo_RemoveHostResponse.Marshal(b, m, deterministic)
   580  	} else {
   581  		b = b[:cap(b)]
   582  		n, err := m.MarshalToSizedBuffer(b)
   583  		if err != nil {
   584  			return nil, err
   585  		}
   586  		return b[:n], nil
   587  	}
   588  }
   589  func (m *RemoveHostResponse) XXX_Merge(src proto.Message) {
   590  	xxx_messageInfo_RemoveHostResponse.Merge(m, src)
   591  }
   592  func (m *RemoveHostResponse) XXX_Size() int {
   593  	return m.Size()
   594  }
   595  func (m *RemoveHostResponse) XXX_DiscardUnknown() {
   596  	xxx_messageInfo_RemoveHostResponse.DiscardUnknown(m)
   597  }
   598  
   599  var xxx_messageInfo_RemoveHostResponse proto.InternalMessageInfo
   600  
   601  type EmitARPsRequest struct {
   602  	ID          HostID   `protobuf:"bytes,1,opt,name=id,proto3,casttype=HostID" json:"id,omitempty"`
   603  	MacAddress  string   `protobuf:"bytes,2,opt,name=mac_address,json=macAddress,proto3" json:"mac_address,omitempty"`
   604  	IpAddresses []string `protobuf:"bytes,3,rep,name=ip_addresses,json=ipAddresses,proto3" json:"ip_addresses,omitempty"`
   605  }
   606  
   607  func (m *EmitARPsRequest) Reset()         { *m = EmitARPsRequest{} }
   608  func (m *EmitARPsRequest) String() string { return proto.CompactTextString(m) }
   609  func (*EmitARPsRequest) ProtoMessage()    {}
   610  func (*EmitARPsRequest) Descriptor() ([]byte, []int) {
   611  	return fileDescriptor_032be33f3739b3f8, []int{11}
   612  }
   613  func (m *EmitARPsRequest) XXX_Unmarshal(b []byte) error {
   614  	return m.Unmarshal(b)
   615  }
   616  func (m *EmitARPsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   617  	if deterministic {
   618  		return xxx_messageInfo_EmitARPsRequest.Marshal(b, m, deterministic)
   619  	} else {
   620  		b = b[:cap(b)]
   621  		n, err := m.MarshalToSizedBuffer(b)
   622  		if err != nil {
   623  			return nil, err
   624  		}
   625  		return b[:n], nil
   626  	}
   627  }
   628  func (m *EmitARPsRequest) XXX_Merge(src proto.Message) {
   629  	xxx_messageInfo_EmitARPsRequest.Merge(m, src)
   630  }
   631  func (m *EmitARPsRequest) XXX_Size() int {
   632  	return m.Size()
   633  }
   634  func (m *EmitARPsRequest) XXX_DiscardUnknown() {
   635  	xxx_messageInfo_EmitARPsRequest.DiscardUnknown(m)
   636  }
   637  
   638  var xxx_messageInfo_EmitARPsRequest proto.InternalMessageInfo
   639  
   640  func (m *EmitARPsRequest) GetID() HostID {
   641  	if m != nil {
   642  		return m.ID
   643  	}
   644  	return ""
   645  }
   646  
   647  func (m *EmitARPsRequest) GetMacAddress() string {
   648  	if m != nil {
   649  		return m.MacAddress
   650  	}
   651  	return ""
   652  }
   653  
   654  func (m *EmitARPsRequest) GetIpAddresses() []string {
   655  	if m != nil {
   656  		return m.IpAddresses
   657  	}
   658  	return nil
   659  }
   660  
   661  type EmitARPsResponse struct {
   662  }
   663  
   664  func (m *EmitARPsResponse) Reset()         { *m = EmitARPsResponse{} }
   665  func (m *EmitARPsResponse) String() string { return proto.CompactTextString(m) }
   666  func (*EmitARPsResponse) ProtoMessage()    {}
   667  func (*EmitARPsResponse) Descriptor() ([]byte, []int) {
   668  	return fileDescriptor_032be33f3739b3f8, []int{12}
   669  }
   670  func (m *EmitARPsResponse) XXX_Unmarshal(b []byte) error {
   671  	return m.Unmarshal(b)
   672  }
   673  func (m *EmitARPsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   674  	if deterministic {
   675  		return xxx_messageInfo_EmitARPsResponse.Marshal(b, m, deterministic)
   676  	} else {
   677  		b = b[:cap(b)]
   678  		n, err := m.MarshalToSizedBuffer(b)
   679  		if err != nil {
   680  			return nil, err
   681  		}
   682  		return b[:n], nil
   683  	}
   684  }
   685  func (m *EmitARPsResponse) XXX_Merge(src proto.Message) {
   686  	xxx_messageInfo_EmitARPsResponse.Merge(m, src)
   687  }
   688  func (m *EmitARPsResponse) XXX_Size() int {
   689  	return m.Size()
   690  }
   691  func (m *EmitARPsResponse) XXX_DiscardUnknown() {
   692  	xxx_messageInfo_EmitARPsResponse.DiscardUnknown(m)
   693  }
   694  
   695  var xxx_messageInfo_EmitARPsResponse proto.InternalMessageInfo
   696  
   697  func init() {
   698  	proto.RegisterEnum("onos.fabricsim.HostType", HostType_name, HostType_value)
   699  	proto.RegisterType((*Host)(nil), "onos.fabricsim.Host")
   700  	proto.RegisterType((*NetworkInterface)(nil), "onos.fabricsim.NetworkInterface")
   701  	proto.RegisterType((*NetworkInterfaceBehavior)(nil), "onos.fabricsim.NetworkInterfaceBehavior")
   702  	proto.RegisterType((*GetHostsRequest)(nil), "onos.fabricsim.GetHostsRequest")
   703  	proto.RegisterType((*GetHostsResponse)(nil), "onos.fabricsim.GetHostsResponse")
   704  	proto.RegisterType((*GetHostRequest)(nil), "onos.fabricsim.GetHostRequest")
   705  	proto.RegisterType((*GetHostResponse)(nil), "onos.fabricsim.GetHostResponse")
   706  	proto.RegisterType((*AddHostRequest)(nil), "onos.fabricsim.AddHostRequest")
   707  	proto.RegisterType((*AddHostResponse)(nil), "onos.fabricsim.AddHostResponse")
   708  	proto.RegisterType((*RemoveHostRequest)(nil), "onos.fabricsim.RemoveHostRequest")
   709  	proto.RegisterType((*RemoveHostResponse)(nil), "onos.fabricsim.RemoveHostResponse")
   710  	proto.RegisterType((*EmitARPsRequest)(nil), "onos.fabricsim.EmitARPsRequest")
   711  	proto.RegisterType((*EmitARPsResponse)(nil), "onos.fabricsim.EmitARPsResponse")
   712  }
   713  
   714  func init() { proto.RegisterFile("onos/fabricsim/hosts.proto", fileDescriptor_032be33f3739b3f8) }
   715  
   716  var fileDescriptor_032be33f3739b3f8 = []byte{
   717  	// 656 bytes of a gzipped FileDescriptorProto
   718  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x6f, 0xd3, 0x40,
   719  	0x10, 0x8d, 0x13, 0xb7, 0x4d, 0x26, 0x90, 0xa6, 0xab, 0x48, 0x58, 0x11, 0x38, 0xae, 0x2f, 0x35,
   720  	0x15, 0x4a, 0xa5, 0x20, 0xb8, 0x20, 0x21, 0x6c, 0xb5, 0x2a, 0x41, 0x6d, 0x55, 0x6d, 0x4b, 0xaf,
   721  	0x95, 0x63, 0x6f, 0xdb, 0x15, 0x24, 0x6b, 0xbc, 0x26, 0x55, 0xfe, 0x05, 0x47, 0x7e, 0x12, 0xc7,
   722  	0x1e, 0x39, 0x55, 0x28, 0xf9, 0x01, 0xdc, 0xe1, 0x82, 0x76, 0xfd, 0x91, 0xd4, 0x21, 0xa4, 0x5c,
   723  	0xda, 0x68, 0xe6, 0xbd, 0x37, 0xb3, 0x6f, 0x5e, 0x14, 0x68, 0xb2, 0x01, 0xe3, 0x3b, 0x17, 0x6e,
   724  	0x2f, 0xa4, 0x1e, 0xa7, 0xfd, 0x9d, 0x2b, 0xc6, 0x23, 0xde, 0x0e, 0x42, 0x16, 0x31, 0x54, 0x13,
   725  	0xbd, 0x76, 0xd6, 0x6b, 0x36, 0x2e, 0xd9, 0x25, 0x93, 0xad, 0x1d, 0xf1, 0x29, 0x46, 0x35, 0x1b,
   726  	0x52, 0xa1, 0x4f, 0xb9, 0x27, 0xff, 0xc4, 0x55, 0xf3, 0xa7, 0x02, 0xea, 0x5b, 0xc6, 0x23, 0x64,
   727  	0x40, 0x91, 0xfa, 0x9a, 0x62, 0x28, 0x56, 0xc5, 0xa9, 0x8f, 0x6f, 0x5b, 0xc5, 0xee, 0xee, 0xaf,
   728  	0xdb, 0xd6, 0xaa, 0xe8, 0x75, 0x77, 0x71, 0x91, 0xfa, 0xe8, 0x19, 0xa8, 0xd1, 0x28, 0x20, 0x9a,
   729  	0x6a, 0x28, 0x56, 0xad, 0xa3, 0xb5, 0xef, 0x4e, 0x6d, 0x0b, 0xe4, 0xe9, 0x28, 0x20, 0x58, 0xa2,
   730  	0xd0, 0x1b, 0x00, 0x3a, 0x88, 0x48, 0x78, 0xe1, 0x7a, 0x84, 0x6b, 0x45, 0xa3, 0x64, 0x55, 0x3b,
   731  	0x46, 0x9e, 0x73, 0x44, 0xa2, 0x6b, 0x16, 0x7e, 0xe8, 0xa6, 0x40, 0x3c, 0xc3, 0x41, 0x4f, 0xa1,
   732  	0x14, 0x30, 0xae, 0x95, 0x0c, 0xc5, 0xaa, 0x76, 0x1e, 0xc5, 0x54, 0xb9, 0xf9, 0x7e, 0x48, 0xfd,
   733  	0x63, 0xc6, 0x69, 0x44, 0xd9, 0x00, 0x0b, 0x0c, 0xda, 0x86, 0x15, 0x69, 0x88, 0xb6, 0x22, 0xe7,
   734  	0x34, 0xfe, 0xb6, 0x1b, 0x8e, 0x21, 0xe6, 0x6f, 0x05, 0xea, 0xf9, 0xb9, 0x8b, 0x5e, 0x7f, 0xcc,
   735  	0xc2, 0xf4, 0xf5, 0x2d, 0xa8, 0xf6, 0x5d, 0xef, 0xdc, 0xf5, 0xfd, 0x90, 0x70, 0xf1, 0x20, 0xc5,
   736  	0xaa, 0x60, 0xe8, 0xbb, 0x9e, 0x1d, 0x57, 0xd0, 0x63, 0x50, 0x87, 0x1f, 0xdd, 0x81, 0xb6, 0x6a,
   737  	0x28, 0xd6, 0x43, 0xa7, 0x3c, 0xbe, 0x6d, 0xa9, 0x67, 0x07, 0xf6, 0x11, 0x96, 0x55, 0xf4, 0x04,
   738  	0x80, 0x06, 0x19, 0xbb, 0x24, 0xd9, 0x15, 0x1a, 0xa4, 0xe4, 0x4d, 0x78, 0x40, 0x83, 0xe1, 0xcb,
   739  	0x0c, 0xa0, 0x4a, 0x40, 0x55, 0xd4, 0x52, 0xc8, 0x2e, 0x94, 0x7b, 0xe4, 0xca, 0x1d, 0x52, 0x16,
   740  	0x6a, 0x2b, 0xd2, 0x13, 0x6b, 0x99, 0x9d, 0x4e, 0x82, 0xc7, 0x19, 0xd3, 0x6c, 0x82, 0xb6, 0x08,
   741  	0x65, 0x6e, 0xc0, 0xfa, 0x3e, 0x89, 0x84, 0x57, 0x1c, 0x93, 0x4f, 0x9f, 0x09, 0x8f, 0xcc, 0xd7,
   742  	0x50, 0x9f, 0x96, 0x78, 0xc0, 0x06, 0x9c, 0x4c, 0xcd, 0x56, 0x96, 0x9b, 0xdd, 0x81, 0x5a, 0xc2,
   743  	0x4f, 0x14, 0x97, 0xe7, 0xcc, 0x7c, 0x95, 0xad, 0x91, 0x8d, 0xb4, 0x40, 0x15, 0x7a, 0x92, 0xb6,
   744  	0x68, 0xa2, 0x44, 0x98, 0x1e, 0xd4, 0x6c, 0xdf, 0x9f, 0x1d, 0x78, 0x6f, 0x2e, 0xda, 0x82, 0x8a,
   745  	0xf8, 0x4f, 0xfc, 0xf3, 0xde, 0x28, 0x3e, 0xb0, 0x03, 0x33, 0xbb, 0x95, 0xe3, 0xa6, 0x33, 0x12,
   746  	0x46, 0x65, 0x43, 0xe2, 0x0d, 0xcd, 0x17, 0xb0, 0x81, 0x49, 0x9f, 0x0d, 0xc9, 0xff, 0xbd, 0xb5,
   747  	0x01, 0x68, 0x96, 0x96, 0x88, 0x5d, 0xc3, 0xfa, 0x5e, 0x9f, 0x46, 0x36, 0x3e, 0xe6, 0xf7, 0x96,
   748  	0x5a, 0x1e, 0x50, 0x99, 0xb1, 0xb4, 0x4f, 0x44, 0x08, 0x4b, 0x71, 0xc6, 0xec, 0xb4, 0x64, 0x22,
   749  	0xa8, 0x4f, 0x07, 0xc7, 0xcb, 0x6c, 0x6f, 0x41, 0x39, 0xfd, 0x6a, 0xa3, 0x1a, 0x80, 0x63, 0xe3,
   750  	0xbd, 0xf3, 0xc3, 0xbd, 0x53, 0xfb, 0xa0, 0x5e, 0x40, 0x55, 0x58, 0x3b, 0xeb, 0xe2, 0xd3, 0xf7,
   751  	0xf6, 0x41, 0x5d, 0xe9, 0x7c, 0x2d, 0x41, 0x55, 0x20, 0x4f, 0x48, 0x38, 0xa4, 0x1e, 0x41, 0x87,
   752  	0x50, 0x4e, 0xb3, 0x83, 0x5a, 0x79, 0xdb, 0x73, 0x41, 0x6b, 0x1a, 0x8b, 0x01, 0x49, 0x06, 0xde,
   753  	0xc1, 0x5a, 0x52, 0x43, 0xfa, 0x02, 0x70, 0x2a, 0xd6, 0x5a, 0xd8, 0x9f, 0x6a, 0x25, 0x07, 0x9c,
   754  	0xd7, 0xba, 0x1b, 0x9f, 0x79, 0xad, 0xdc, 0xe5, 0xd1, 0x09, 0xc0, 0xf4, 0x84, 0x68, 0x33, 0x0f,
   755  	0x9f, 0x4b, 0x45, 0xd3, 0xfc, 0x17, 0x24, 0x11, 0x3d, 0x84, 0x72, 0x7a, 0x88, 0x79, 0xef, 0x72,
   756  	0xd9, 0x98, 0xf7, 0x2e, 0x7f, 0x43, 0x47, 0xfb, 0x36, 0xd6, 0x95, 0x9b, 0xb1, 0xae, 0xfc, 0x18,
   757  	0xeb, 0xca, 0x97, 0x89, 0x5e, 0xb8, 0x99, 0xe8, 0x85, 0xef, 0x13, 0xbd, 0xd0, 0x5b, 0x95, 0x3f,
   758  	0x03, 0xcf, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xef, 0x19, 0x27, 0x14, 0x60, 0x06, 0x00, 0x00,
   759  }
   760  
   761  // Reference imports to suppress errors if they are not otherwise used.
   762  var _ context.Context
   763  var _ grpc.ClientConn
   764  
   765  // This is a compile-time assertion to ensure that this generated file
   766  // is compatible with the grpc package it is being compiled against.
   767  const _ = grpc.SupportPackageIsVersion4
   768  
   769  // HostServiceClient is the client API for HostService service.
   770  //
   771  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   772  type HostServiceClient interface {
   773  	// GetHosts gets a list of all simulated hosts
   774  	GetHosts(ctx context.Context, in *GetHostsRequest, opts ...grpc.CallOption) (*GetHostsResponse, error)
   775  	// GetHost gets a specific host entry
   776  	GetHost(ctx context.Context, in *GetHostRequest, opts ...grpc.CallOption) (*GetHostResponse, error)
   777  	// AddHost adds a new simulated host
   778  	AddHost(ctx context.Context, in *AddHostRequest, opts ...grpc.CallOption) (*AddHostResponse, error)
   779  	// RemoveHost removes a simulated host
   780  	RemoveHost(ctx context.Context, in *RemoveHostRequest, opts ...grpc.CallOption) (*RemoveHostResponse, error)
   781  	// EmitARPs triggers the specified host NIC to send ARP requests for a set of IP addresses
   782  	EmitARPs(ctx context.Context, in *EmitARPsRequest, opts ...grpc.CallOption) (*EmitARPsResponse, error)
   783  }
   784  
   785  type hostServiceClient struct {
   786  	cc *grpc.ClientConn
   787  }
   788  
   789  func NewHostServiceClient(cc *grpc.ClientConn) HostServiceClient {
   790  	return &hostServiceClient{cc}
   791  }
   792  
   793  func (c *hostServiceClient) GetHosts(ctx context.Context, in *GetHostsRequest, opts ...grpc.CallOption) (*GetHostsResponse, error) {
   794  	out := new(GetHostsResponse)
   795  	err := c.cc.Invoke(ctx, "/onos.fabricsim.HostService/GetHosts", in, out, opts...)
   796  	if err != nil {
   797  		return nil, err
   798  	}
   799  	return out, nil
   800  }
   801  
   802  func (c *hostServiceClient) GetHost(ctx context.Context, in *GetHostRequest, opts ...grpc.CallOption) (*GetHostResponse, error) {
   803  	out := new(GetHostResponse)
   804  	err := c.cc.Invoke(ctx, "/onos.fabricsim.HostService/GetHost", in, out, opts...)
   805  	if err != nil {
   806  		return nil, err
   807  	}
   808  	return out, nil
   809  }
   810  
   811  func (c *hostServiceClient) AddHost(ctx context.Context, in *AddHostRequest, opts ...grpc.CallOption) (*AddHostResponse, error) {
   812  	out := new(AddHostResponse)
   813  	err := c.cc.Invoke(ctx, "/onos.fabricsim.HostService/AddHost", in, out, opts...)
   814  	if err != nil {
   815  		return nil, err
   816  	}
   817  	return out, nil
   818  }
   819  
   820  func (c *hostServiceClient) RemoveHost(ctx context.Context, in *RemoveHostRequest, opts ...grpc.CallOption) (*RemoveHostResponse, error) {
   821  	out := new(RemoveHostResponse)
   822  	err := c.cc.Invoke(ctx, "/onos.fabricsim.HostService/RemoveHost", in, out, opts...)
   823  	if err != nil {
   824  		return nil, err
   825  	}
   826  	return out, nil
   827  }
   828  
   829  func (c *hostServiceClient) EmitARPs(ctx context.Context, in *EmitARPsRequest, opts ...grpc.CallOption) (*EmitARPsResponse, error) {
   830  	out := new(EmitARPsResponse)
   831  	err := c.cc.Invoke(ctx, "/onos.fabricsim.HostService/EmitARPs", in, out, opts...)
   832  	if err != nil {
   833  		return nil, err
   834  	}
   835  	return out, nil
   836  }
   837  
   838  // HostServiceServer is the server API for HostService service.
   839  type HostServiceServer interface {
   840  	// GetHosts gets a list of all simulated hosts
   841  	GetHosts(context.Context, *GetHostsRequest) (*GetHostsResponse, error)
   842  	// GetHost gets a specific host entry
   843  	GetHost(context.Context, *GetHostRequest) (*GetHostResponse, error)
   844  	// AddHost adds a new simulated host
   845  	AddHost(context.Context, *AddHostRequest) (*AddHostResponse, error)
   846  	// RemoveHost removes a simulated host
   847  	RemoveHost(context.Context, *RemoveHostRequest) (*RemoveHostResponse, error)
   848  	// EmitARPs triggers the specified host NIC to send ARP requests for a set of IP addresses
   849  	EmitARPs(context.Context, *EmitARPsRequest) (*EmitARPsResponse, error)
   850  }
   851  
   852  // UnimplementedHostServiceServer can be embedded to have forward compatible implementations.
   853  type UnimplementedHostServiceServer struct {
   854  }
   855  
   856  func (*UnimplementedHostServiceServer) GetHosts(ctx context.Context, req *GetHostsRequest) (*GetHostsResponse, error) {
   857  	return nil, status.Errorf(codes.Unimplemented, "method GetHosts not implemented")
   858  }
   859  func (*UnimplementedHostServiceServer) GetHost(ctx context.Context, req *GetHostRequest) (*GetHostResponse, error) {
   860  	return nil, status.Errorf(codes.Unimplemented, "method GetHost not implemented")
   861  }
   862  func (*UnimplementedHostServiceServer) AddHost(ctx context.Context, req *AddHostRequest) (*AddHostResponse, error) {
   863  	return nil, status.Errorf(codes.Unimplemented, "method AddHost not implemented")
   864  }
   865  func (*UnimplementedHostServiceServer) RemoveHost(ctx context.Context, req *RemoveHostRequest) (*RemoveHostResponse, error) {
   866  	return nil, status.Errorf(codes.Unimplemented, "method RemoveHost not implemented")
   867  }
   868  func (*UnimplementedHostServiceServer) EmitARPs(ctx context.Context, req *EmitARPsRequest) (*EmitARPsResponse, error) {
   869  	return nil, status.Errorf(codes.Unimplemented, "method EmitARPs not implemented")
   870  }
   871  
   872  func RegisterHostServiceServer(s *grpc.Server, srv HostServiceServer) {
   873  	s.RegisterService(&_HostService_serviceDesc, srv)
   874  }
   875  
   876  func _HostService_GetHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   877  	in := new(GetHostsRequest)
   878  	if err := dec(in); err != nil {
   879  		return nil, err
   880  	}
   881  	if interceptor == nil {
   882  		return srv.(HostServiceServer).GetHosts(ctx, in)
   883  	}
   884  	info := &grpc.UnaryServerInfo{
   885  		Server:     srv,
   886  		FullMethod: "/onos.fabricsim.HostService/GetHosts",
   887  	}
   888  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   889  		return srv.(HostServiceServer).GetHosts(ctx, req.(*GetHostsRequest))
   890  	}
   891  	return interceptor(ctx, in, info, handler)
   892  }
   893  
   894  func _HostService_GetHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   895  	in := new(GetHostRequest)
   896  	if err := dec(in); err != nil {
   897  		return nil, err
   898  	}
   899  	if interceptor == nil {
   900  		return srv.(HostServiceServer).GetHost(ctx, in)
   901  	}
   902  	info := &grpc.UnaryServerInfo{
   903  		Server:     srv,
   904  		FullMethod: "/onos.fabricsim.HostService/GetHost",
   905  	}
   906  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   907  		return srv.(HostServiceServer).GetHost(ctx, req.(*GetHostRequest))
   908  	}
   909  	return interceptor(ctx, in, info, handler)
   910  }
   911  
   912  func _HostService_AddHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   913  	in := new(AddHostRequest)
   914  	if err := dec(in); err != nil {
   915  		return nil, err
   916  	}
   917  	if interceptor == nil {
   918  		return srv.(HostServiceServer).AddHost(ctx, in)
   919  	}
   920  	info := &grpc.UnaryServerInfo{
   921  		Server:     srv,
   922  		FullMethod: "/onos.fabricsim.HostService/AddHost",
   923  	}
   924  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   925  		return srv.(HostServiceServer).AddHost(ctx, req.(*AddHostRequest))
   926  	}
   927  	return interceptor(ctx, in, info, handler)
   928  }
   929  
   930  func _HostService_RemoveHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   931  	in := new(RemoveHostRequest)
   932  	if err := dec(in); err != nil {
   933  		return nil, err
   934  	}
   935  	if interceptor == nil {
   936  		return srv.(HostServiceServer).RemoveHost(ctx, in)
   937  	}
   938  	info := &grpc.UnaryServerInfo{
   939  		Server:     srv,
   940  		FullMethod: "/onos.fabricsim.HostService/RemoveHost",
   941  	}
   942  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   943  		return srv.(HostServiceServer).RemoveHost(ctx, req.(*RemoveHostRequest))
   944  	}
   945  	return interceptor(ctx, in, info, handler)
   946  }
   947  
   948  func _HostService_EmitARPs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   949  	in := new(EmitARPsRequest)
   950  	if err := dec(in); err != nil {
   951  		return nil, err
   952  	}
   953  	if interceptor == nil {
   954  		return srv.(HostServiceServer).EmitARPs(ctx, in)
   955  	}
   956  	info := &grpc.UnaryServerInfo{
   957  		Server:     srv,
   958  		FullMethod: "/onos.fabricsim.HostService/EmitARPs",
   959  	}
   960  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   961  		return srv.(HostServiceServer).EmitARPs(ctx, req.(*EmitARPsRequest))
   962  	}
   963  	return interceptor(ctx, in, info, handler)
   964  }
   965  
   966  var _HostService_serviceDesc = grpc.ServiceDesc{
   967  	ServiceName: "onos.fabricsim.HostService",
   968  	HandlerType: (*HostServiceServer)(nil),
   969  	Methods: []grpc.MethodDesc{
   970  		{
   971  			MethodName: "GetHosts",
   972  			Handler:    _HostService_GetHosts_Handler,
   973  		},
   974  		{
   975  			MethodName: "GetHost",
   976  			Handler:    _HostService_GetHost_Handler,
   977  		},
   978  		{
   979  			MethodName: "AddHost",
   980  			Handler:    _HostService_AddHost_Handler,
   981  		},
   982  		{
   983  			MethodName: "RemoveHost",
   984  			Handler:    _HostService_RemoveHost_Handler,
   985  		},
   986  		{
   987  			MethodName: "EmitARPs",
   988  			Handler:    _HostService_EmitARPs_Handler,
   989  		},
   990  	},
   991  	Streams:  []grpc.StreamDesc{},
   992  	Metadata: "onos/fabricsim/hosts.proto",
   993  }
   994  
   995  func (m *Host) Marshal() (dAtA []byte, err error) {
   996  	size := m.Size()
   997  	dAtA = make([]byte, size)
   998  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   999  	if err != nil {
  1000  		return nil, err
  1001  	}
  1002  	return dAtA[:n], nil
  1003  }
  1004  
  1005  func (m *Host) MarshalTo(dAtA []byte) (int, error) {
  1006  	size := m.Size()
  1007  	return m.MarshalToSizedBuffer(dAtA[:size])
  1008  }
  1009  
  1010  func (m *Host) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1011  	i := len(dAtA)
  1012  	_ = i
  1013  	var l int
  1014  	_ = l
  1015  	if len(m.Hosts) > 0 {
  1016  		for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- {
  1017  			{
  1018  				size, err := m.Hosts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1019  				if err != nil {
  1020  					return 0, err
  1021  				}
  1022  				i -= size
  1023  				i = encodeVarintHosts(dAtA, i, uint64(size))
  1024  			}
  1025  			i--
  1026  			dAtA[i] = 0x2a
  1027  		}
  1028  	}
  1029  	if m.Type != 0 {
  1030  		i = encodeVarintHosts(dAtA, i, uint64(m.Type))
  1031  		i--
  1032  		dAtA[i] = 0x20
  1033  	}
  1034  	if m.Pos != nil {
  1035  		{
  1036  			size, err := m.Pos.MarshalToSizedBuffer(dAtA[:i])
  1037  			if err != nil {
  1038  				return 0, err
  1039  			}
  1040  			i -= size
  1041  			i = encodeVarintHosts(dAtA, i, uint64(size))
  1042  		}
  1043  		i--
  1044  		dAtA[i] = 0x1a
  1045  	}
  1046  	if len(m.Interfaces) > 0 {
  1047  		for iNdEx := len(m.Interfaces) - 1; iNdEx >= 0; iNdEx-- {
  1048  			{
  1049  				size, err := m.Interfaces[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1050  				if err != nil {
  1051  					return 0, err
  1052  				}
  1053  				i -= size
  1054  				i = encodeVarintHosts(dAtA, i, uint64(size))
  1055  			}
  1056  			i--
  1057  			dAtA[i] = 0x12
  1058  		}
  1059  	}
  1060  	if len(m.ID) > 0 {
  1061  		i -= len(m.ID)
  1062  		copy(dAtA[i:], m.ID)
  1063  		i = encodeVarintHosts(dAtA, i, uint64(len(m.ID)))
  1064  		i--
  1065  		dAtA[i] = 0xa
  1066  	}
  1067  	return len(dAtA) - i, nil
  1068  }
  1069  
  1070  func (m *NetworkInterface) Marshal() (dAtA []byte, err error) {
  1071  	size := m.Size()
  1072  	dAtA = make([]byte, size)
  1073  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1074  	if err != nil {
  1075  		return nil, err
  1076  	}
  1077  	return dAtA[:n], nil
  1078  }
  1079  
  1080  func (m *NetworkInterface) MarshalTo(dAtA []byte) (int, error) {
  1081  	size := m.Size()
  1082  	return m.MarshalToSizedBuffer(dAtA[:size])
  1083  }
  1084  
  1085  func (m *NetworkInterface) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1086  	i := len(dAtA)
  1087  	_ = i
  1088  	var l int
  1089  	_ = l
  1090  	if m.VLAN != 0 {
  1091  		i = encodeVarintHosts(dAtA, i, uint64(m.VLAN))
  1092  		i--
  1093  		dAtA[i] = 0x30
  1094  	}
  1095  	if m.Behavior != nil {
  1096  		{
  1097  			size, err := m.Behavior.MarshalToSizedBuffer(dAtA[:i])
  1098  			if err != nil {
  1099  				return 0, err
  1100  			}
  1101  			i -= size
  1102  			i = encodeVarintHosts(dAtA, i, uint64(size))
  1103  		}
  1104  		i--
  1105  		dAtA[i] = 0x2a
  1106  	}
  1107  	if len(m.Ipv6Address) > 0 {
  1108  		i -= len(m.Ipv6Address)
  1109  		copy(dAtA[i:], m.Ipv6Address)
  1110  		i = encodeVarintHosts(dAtA, i, uint64(len(m.Ipv6Address)))
  1111  		i--
  1112  		dAtA[i] = 0x22
  1113  	}
  1114  	if len(m.IpAddress) > 0 {
  1115  		i -= len(m.IpAddress)
  1116  		copy(dAtA[i:], m.IpAddress)
  1117  		i = encodeVarintHosts(dAtA, i, uint64(len(m.IpAddress)))
  1118  		i--
  1119  		dAtA[i] = 0x1a
  1120  	}
  1121  	if len(m.MacAddress) > 0 {
  1122  		i -= len(m.MacAddress)
  1123  		copy(dAtA[i:], m.MacAddress)
  1124  		i = encodeVarintHosts(dAtA, i, uint64(len(m.MacAddress)))
  1125  		i--
  1126  		dAtA[i] = 0x12
  1127  	}
  1128  	if len(m.ID) > 0 {
  1129  		i -= len(m.ID)
  1130  		copy(dAtA[i:], m.ID)
  1131  		i = encodeVarintHosts(dAtA, i, uint64(len(m.ID)))
  1132  		i--
  1133  		dAtA[i] = 0xa
  1134  	}
  1135  	return len(dAtA) - i, nil
  1136  }
  1137  
  1138  func (m *NetworkInterfaceBehavior) Marshal() (dAtA []byte, err error) {
  1139  	size := m.Size()
  1140  	dAtA = make([]byte, size)
  1141  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1142  	if err != nil {
  1143  		return nil, err
  1144  	}
  1145  	return dAtA[:n], nil
  1146  }
  1147  
  1148  func (m *NetworkInterfaceBehavior) MarshalTo(dAtA []byte) (int, error) {
  1149  	size := m.Size()
  1150  	return m.MarshalToSizedBuffer(dAtA[:size])
  1151  }
  1152  
  1153  func (m *NetworkInterfaceBehavior) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1154  	i := len(dAtA)
  1155  	_ = i
  1156  	var l int
  1157  	_ = l
  1158  	return len(dAtA) - i, nil
  1159  }
  1160  
  1161  func (m *GetHostsRequest) Marshal() (dAtA []byte, err error) {
  1162  	size := m.Size()
  1163  	dAtA = make([]byte, size)
  1164  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1165  	if err != nil {
  1166  		return nil, err
  1167  	}
  1168  	return dAtA[:n], nil
  1169  }
  1170  
  1171  func (m *GetHostsRequest) MarshalTo(dAtA []byte) (int, error) {
  1172  	size := m.Size()
  1173  	return m.MarshalToSizedBuffer(dAtA[:size])
  1174  }
  1175  
  1176  func (m *GetHostsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1177  	i := len(dAtA)
  1178  	_ = i
  1179  	var l int
  1180  	_ = l
  1181  	return len(dAtA) - i, nil
  1182  }
  1183  
  1184  func (m *GetHostsResponse) Marshal() (dAtA []byte, err error) {
  1185  	size := m.Size()
  1186  	dAtA = make([]byte, size)
  1187  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1188  	if err != nil {
  1189  		return nil, err
  1190  	}
  1191  	return dAtA[:n], nil
  1192  }
  1193  
  1194  func (m *GetHostsResponse) MarshalTo(dAtA []byte) (int, error) {
  1195  	size := m.Size()
  1196  	return m.MarshalToSizedBuffer(dAtA[:size])
  1197  }
  1198  
  1199  func (m *GetHostsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1200  	i := len(dAtA)
  1201  	_ = i
  1202  	var l int
  1203  	_ = l
  1204  	if len(m.Hosts) > 0 {
  1205  		for iNdEx := len(m.Hosts) - 1; iNdEx >= 0; iNdEx-- {
  1206  			{
  1207  				size, err := m.Hosts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1208  				if err != nil {
  1209  					return 0, err
  1210  				}
  1211  				i -= size
  1212  				i = encodeVarintHosts(dAtA, i, uint64(size))
  1213  			}
  1214  			i--
  1215  			dAtA[i] = 0xa
  1216  		}
  1217  	}
  1218  	return len(dAtA) - i, nil
  1219  }
  1220  
  1221  func (m *GetHostRequest) Marshal() (dAtA []byte, err error) {
  1222  	size := m.Size()
  1223  	dAtA = make([]byte, size)
  1224  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1225  	if err != nil {
  1226  		return nil, err
  1227  	}
  1228  	return dAtA[:n], nil
  1229  }
  1230  
  1231  func (m *GetHostRequest) MarshalTo(dAtA []byte) (int, error) {
  1232  	size := m.Size()
  1233  	return m.MarshalToSizedBuffer(dAtA[:size])
  1234  }
  1235  
  1236  func (m *GetHostRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1237  	i := len(dAtA)
  1238  	_ = i
  1239  	var l int
  1240  	_ = l
  1241  	if len(m.ID) > 0 {
  1242  		i -= len(m.ID)
  1243  		copy(dAtA[i:], m.ID)
  1244  		i = encodeVarintHosts(dAtA, i, uint64(len(m.ID)))
  1245  		i--
  1246  		dAtA[i] = 0xa
  1247  	}
  1248  	return len(dAtA) - i, nil
  1249  }
  1250  
  1251  func (m *GetHostResponse) Marshal() (dAtA []byte, err error) {
  1252  	size := m.Size()
  1253  	dAtA = make([]byte, size)
  1254  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1255  	if err != nil {
  1256  		return nil, err
  1257  	}
  1258  	return dAtA[:n], nil
  1259  }
  1260  
  1261  func (m *GetHostResponse) MarshalTo(dAtA []byte) (int, error) {
  1262  	size := m.Size()
  1263  	return m.MarshalToSizedBuffer(dAtA[:size])
  1264  }
  1265  
  1266  func (m *GetHostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1267  	i := len(dAtA)
  1268  	_ = i
  1269  	var l int
  1270  	_ = l
  1271  	if m.Host != nil {
  1272  		{
  1273  			size, err := m.Host.MarshalToSizedBuffer(dAtA[:i])
  1274  			if err != nil {
  1275  				return 0, err
  1276  			}
  1277  			i -= size
  1278  			i = encodeVarintHosts(dAtA, i, uint64(size))
  1279  		}
  1280  		i--
  1281  		dAtA[i] = 0xa
  1282  	}
  1283  	return len(dAtA) - i, nil
  1284  }
  1285  
  1286  func (m *AddHostRequest) Marshal() (dAtA []byte, err error) {
  1287  	size := m.Size()
  1288  	dAtA = make([]byte, size)
  1289  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1290  	if err != nil {
  1291  		return nil, err
  1292  	}
  1293  	return dAtA[:n], nil
  1294  }
  1295  
  1296  func (m *AddHostRequest) MarshalTo(dAtA []byte) (int, error) {
  1297  	size := m.Size()
  1298  	return m.MarshalToSizedBuffer(dAtA[:size])
  1299  }
  1300  
  1301  func (m *AddHostRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1302  	i := len(dAtA)
  1303  	_ = i
  1304  	var l int
  1305  	_ = l
  1306  	if len(m.HostedBy) > 0 {
  1307  		i -= len(m.HostedBy)
  1308  		copy(dAtA[i:], m.HostedBy)
  1309  		i = encodeVarintHosts(dAtA, i, uint64(len(m.HostedBy)))
  1310  		i--
  1311  		dAtA[i] = 0x12
  1312  	}
  1313  	if m.Host != nil {
  1314  		{
  1315  			size, err := m.Host.MarshalToSizedBuffer(dAtA[:i])
  1316  			if err != nil {
  1317  				return 0, err
  1318  			}
  1319  			i -= size
  1320  			i = encodeVarintHosts(dAtA, i, uint64(size))
  1321  		}
  1322  		i--
  1323  		dAtA[i] = 0xa
  1324  	}
  1325  	return len(dAtA) - i, nil
  1326  }
  1327  
  1328  func (m *AddHostResponse) Marshal() (dAtA []byte, err error) {
  1329  	size := m.Size()
  1330  	dAtA = make([]byte, size)
  1331  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1332  	if err != nil {
  1333  		return nil, err
  1334  	}
  1335  	return dAtA[:n], nil
  1336  }
  1337  
  1338  func (m *AddHostResponse) MarshalTo(dAtA []byte) (int, error) {
  1339  	size := m.Size()
  1340  	return m.MarshalToSizedBuffer(dAtA[:size])
  1341  }
  1342  
  1343  func (m *AddHostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1344  	i := len(dAtA)
  1345  	_ = i
  1346  	var l int
  1347  	_ = l
  1348  	return len(dAtA) - i, nil
  1349  }
  1350  
  1351  func (m *RemoveHostRequest) Marshal() (dAtA []byte, err error) {
  1352  	size := m.Size()
  1353  	dAtA = make([]byte, size)
  1354  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1355  	if err != nil {
  1356  		return nil, err
  1357  	}
  1358  	return dAtA[:n], nil
  1359  }
  1360  
  1361  func (m *RemoveHostRequest) MarshalTo(dAtA []byte) (int, error) {
  1362  	size := m.Size()
  1363  	return m.MarshalToSizedBuffer(dAtA[:size])
  1364  }
  1365  
  1366  func (m *RemoveHostRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1367  	i := len(dAtA)
  1368  	_ = i
  1369  	var l int
  1370  	_ = l
  1371  	if len(m.ID) > 0 {
  1372  		i -= len(m.ID)
  1373  		copy(dAtA[i:], m.ID)
  1374  		i = encodeVarintHosts(dAtA, i, uint64(len(m.ID)))
  1375  		i--
  1376  		dAtA[i] = 0xa
  1377  	}
  1378  	return len(dAtA) - i, nil
  1379  }
  1380  
  1381  func (m *RemoveHostResponse) Marshal() (dAtA []byte, err error) {
  1382  	size := m.Size()
  1383  	dAtA = make([]byte, size)
  1384  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1385  	if err != nil {
  1386  		return nil, err
  1387  	}
  1388  	return dAtA[:n], nil
  1389  }
  1390  
  1391  func (m *RemoveHostResponse) MarshalTo(dAtA []byte) (int, error) {
  1392  	size := m.Size()
  1393  	return m.MarshalToSizedBuffer(dAtA[:size])
  1394  }
  1395  
  1396  func (m *RemoveHostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1397  	i := len(dAtA)
  1398  	_ = i
  1399  	var l int
  1400  	_ = l
  1401  	return len(dAtA) - i, nil
  1402  }
  1403  
  1404  func (m *EmitARPsRequest) Marshal() (dAtA []byte, err error) {
  1405  	size := m.Size()
  1406  	dAtA = make([]byte, size)
  1407  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1408  	if err != nil {
  1409  		return nil, err
  1410  	}
  1411  	return dAtA[:n], nil
  1412  }
  1413  
  1414  func (m *EmitARPsRequest) MarshalTo(dAtA []byte) (int, error) {
  1415  	size := m.Size()
  1416  	return m.MarshalToSizedBuffer(dAtA[:size])
  1417  }
  1418  
  1419  func (m *EmitARPsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1420  	i := len(dAtA)
  1421  	_ = i
  1422  	var l int
  1423  	_ = l
  1424  	if len(m.IpAddresses) > 0 {
  1425  		for iNdEx := len(m.IpAddresses) - 1; iNdEx >= 0; iNdEx-- {
  1426  			i -= len(m.IpAddresses[iNdEx])
  1427  			copy(dAtA[i:], m.IpAddresses[iNdEx])
  1428  			i = encodeVarintHosts(dAtA, i, uint64(len(m.IpAddresses[iNdEx])))
  1429  			i--
  1430  			dAtA[i] = 0x1a
  1431  		}
  1432  	}
  1433  	if len(m.MacAddress) > 0 {
  1434  		i -= len(m.MacAddress)
  1435  		copy(dAtA[i:], m.MacAddress)
  1436  		i = encodeVarintHosts(dAtA, i, uint64(len(m.MacAddress)))
  1437  		i--
  1438  		dAtA[i] = 0x12
  1439  	}
  1440  	if len(m.ID) > 0 {
  1441  		i -= len(m.ID)
  1442  		copy(dAtA[i:], m.ID)
  1443  		i = encodeVarintHosts(dAtA, i, uint64(len(m.ID)))
  1444  		i--
  1445  		dAtA[i] = 0xa
  1446  	}
  1447  	return len(dAtA) - i, nil
  1448  }
  1449  
  1450  func (m *EmitARPsResponse) Marshal() (dAtA []byte, err error) {
  1451  	size := m.Size()
  1452  	dAtA = make([]byte, size)
  1453  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1454  	if err != nil {
  1455  		return nil, err
  1456  	}
  1457  	return dAtA[:n], nil
  1458  }
  1459  
  1460  func (m *EmitARPsResponse) MarshalTo(dAtA []byte) (int, error) {
  1461  	size := m.Size()
  1462  	return m.MarshalToSizedBuffer(dAtA[:size])
  1463  }
  1464  
  1465  func (m *EmitARPsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1466  	i := len(dAtA)
  1467  	_ = i
  1468  	var l int
  1469  	_ = l
  1470  	return len(dAtA) - i, nil
  1471  }
  1472  
  1473  func encodeVarintHosts(dAtA []byte, offset int, v uint64) int {
  1474  	offset -= sovHosts(v)
  1475  	base := offset
  1476  	for v >= 1<<7 {
  1477  		dAtA[offset] = uint8(v&0x7f | 0x80)
  1478  		v >>= 7
  1479  		offset++
  1480  	}
  1481  	dAtA[offset] = uint8(v)
  1482  	return base
  1483  }
  1484  func (m *Host) Size() (n int) {
  1485  	if m == nil {
  1486  		return 0
  1487  	}
  1488  	var l int
  1489  	_ = l
  1490  	l = len(m.ID)
  1491  	if l > 0 {
  1492  		n += 1 + l + sovHosts(uint64(l))
  1493  	}
  1494  	if len(m.Interfaces) > 0 {
  1495  		for _, e := range m.Interfaces {
  1496  			l = e.Size()
  1497  			n += 1 + l + sovHosts(uint64(l))
  1498  		}
  1499  	}
  1500  	if m.Pos != nil {
  1501  		l = m.Pos.Size()
  1502  		n += 1 + l + sovHosts(uint64(l))
  1503  	}
  1504  	if m.Type != 0 {
  1505  		n += 1 + sovHosts(uint64(m.Type))
  1506  	}
  1507  	if len(m.Hosts) > 0 {
  1508  		for _, e := range m.Hosts {
  1509  			l = e.Size()
  1510  			n += 1 + l + sovHosts(uint64(l))
  1511  		}
  1512  	}
  1513  	return n
  1514  }
  1515  
  1516  func (m *NetworkInterface) Size() (n int) {
  1517  	if m == nil {
  1518  		return 0
  1519  	}
  1520  	var l int
  1521  	_ = l
  1522  	l = len(m.ID)
  1523  	if l > 0 {
  1524  		n += 1 + l + sovHosts(uint64(l))
  1525  	}
  1526  	l = len(m.MacAddress)
  1527  	if l > 0 {
  1528  		n += 1 + l + sovHosts(uint64(l))
  1529  	}
  1530  	l = len(m.IpAddress)
  1531  	if l > 0 {
  1532  		n += 1 + l + sovHosts(uint64(l))
  1533  	}
  1534  	l = len(m.Ipv6Address)
  1535  	if l > 0 {
  1536  		n += 1 + l + sovHosts(uint64(l))
  1537  	}
  1538  	if m.Behavior != nil {
  1539  		l = m.Behavior.Size()
  1540  		n += 1 + l + sovHosts(uint64(l))
  1541  	}
  1542  	if m.VLAN != 0 {
  1543  		n += 1 + sovHosts(uint64(m.VLAN))
  1544  	}
  1545  	return n
  1546  }
  1547  
  1548  func (m *NetworkInterfaceBehavior) Size() (n int) {
  1549  	if m == nil {
  1550  		return 0
  1551  	}
  1552  	var l int
  1553  	_ = l
  1554  	return n
  1555  }
  1556  
  1557  func (m *GetHostsRequest) Size() (n int) {
  1558  	if m == nil {
  1559  		return 0
  1560  	}
  1561  	var l int
  1562  	_ = l
  1563  	return n
  1564  }
  1565  
  1566  func (m *GetHostsResponse) Size() (n int) {
  1567  	if m == nil {
  1568  		return 0
  1569  	}
  1570  	var l int
  1571  	_ = l
  1572  	if len(m.Hosts) > 0 {
  1573  		for _, e := range m.Hosts {
  1574  			l = e.Size()
  1575  			n += 1 + l + sovHosts(uint64(l))
  1576  		}
  1577  	}
  1578  	return n
  1579  }
  1580  
  1581  func (m *GetHostRequest) Size() (n int) {
  1582  	if m == nil {
  1583  		return 0
  1584  	}
  1585  	var l int
  1586  	_ = l
  1587  	l = len(m.ID)
  1588  	if l > 0 {
  1589  		n += 1 + l + sovHosts(uint64(l))
  1590  	}
  1591  	return n
  1592  }
  1593  
  1594  func (m *GetHostResponse) Size() (n int) {
  1595  	if m == nil {
  1596  		return 0
  1597  	}
  1598  	var l int
  1599  	_ = l
  1600  	if m.Host != nil {
  1601  		l = m.Host.Size()
  1602  		n += 1 + l + sovHosts(uint64(l))
  1603  	}
  1604  	return n
  1605  }
  1606  
  1607  func (m *AddHostRequest) Size() (n int) {
  1608  	if m == nil {
  1609  		return 0
  1610  	}
  1611  	var l int
  1612  	_ = l
  1613  	if m.Host != nil {
  1614  		l = m.Host.Size()
  1615  		n += 1 + l + sovHosts(uint64(l))
  1616  	}
  1617  	l = len(m.HostedBy)
  1618  	if l > 0 {
  1619  		n += 1 + l + sovHosts(uint64(l))
  1620  	}
  1621  	return n
  1622  }
  1623  
  1624  func (m *AddHostResponse) Size() (n int) {
  1625  	if m == nil {
  1626  		return 0
  1627  	}
  1628  	var l int
  1629  	_ = l
  1630  	return n
  1631  }
  1632  
  1633  func (m *RemoveHostRequest) Size() (n int) {
  1634  	if m == nil {
  1635  		return 0
  1636  	}
  1637  	var l int
  1638  	_ = l
  1639  	l = len(m.ID)
  1640  	if l > 0 {
  1641  		n += 1 + l + sovHosts(uint64(l))
  1642  	}
  1643  	return n
  1644  }
  1645  
  1646  func (m *RemoveHostResponse) Size() (n int) {
  1647  	if m == nil {
  1648  		return 0
  1649  	}
  1650  	var l int
  1651  	_ = l
  1652  	return n
  1653  }
  1654  
  1655  func (m *EmitARPsRequest) Size() (n int) {
  1656  	if m == nil {
  1657  		return 0
  1658  	}
  1659  	var l int
  1660  	_ = l
  1661  	l = len(m.ID)
  1662  	if l > 0 {
  1663  		n += 1 + l + sovHosts(uint64(l))
  1664  	}
  1665  	l = len(m.MacAddress)
  1666  	if l > 0 {
  1667  		n += 1 + l + sovHosts(uint64(l))
  1668  	}
  1669  	if len(m.IpAddresses) > 0 {
  1670  		for _, s := range m.IpAddresses {
  1671  			l = len(s)
  1672  			n += 1 + l + sovHosts(uint64(l))
  1673  		}
  1674  	}
  1675  	return n
  1676  }
  1677  
  1678  func (m *EmitARPsResponse) Size() (n int) {
  1679  	if m == nil {
  1680  		return 0
  1681  	}
  1682  	var l int
  1683  	_ = l
  1684  	return n
  1685  }
  1686  
  1687  func sovHosts(x uint64) (n int) {
  1688  	return (math_bits.Len64(x|1) + 6) / 7
  1689  }
  1690  func sozHosts(x uint64) (n int) {
  1691  	return sovHosts(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1692  }
  1693  func (m *Host) Unmarshal(dAtA []byte) error {
  1694  	l := len(dAtA)
  1695  	iNdEx := 0
  1696  	for iNdEx < l {
  1697  		preIndex := iNdEx
  1698  		var wire uint64
  1699  		for shift := uint(0); ; shift += 7 {
  1700  			if shift >= 64 {
  1701  				return ErrIntOverflowHosts
  1702  			}
  1703  			if iNdEx >= l {
  1704  				return io.ErrUnexpectedEOF
  1705  			}
  1706  			b := dAtA[iNdEx]
  1707  			iNdEx++
  1708  			wire |= uint64(b&0x7F) << shift
  1709  			if b < 0x80 {
  1710  				break
  1711  			}
  1712  		}
  1713  		fieldNum := int32(wire >> 3)
  1714  		wireType := int(wire & 0x7)
  1715  		if wireType == 4 {
  1716  			return fmt.Errorf("proto: Host: wiretype end group for non-group")
  1717  		}
  1718  		if fieldNum <= 0 {
  1719  			return fmt.Errorf("proto: Host: illegal tag %d (wire type %d)", fieldNum, wire)
  1720  		}
  1721  		switch fieldNum {
  1722  		case 1:
  1723  			if wireType != 2 {
  1724  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1725  			}
  1726  			var stringLen uint64
  1727  			for shift := uint(0); ; shift += 7 {
  1728  				if shift >= 64 {
  1729  					return ErrIntOverflowHosts
  1730  				}
  1731  				if iNdEx >= l {
  1732  					return io.ErrUnexpectedEOF
  1733  				}
  1734  				b := dAtA[iNdEx]
  1735  				iNdEx++
  1736  				stringLen |= uint64(b&0x7F) << shift
  1737  				if b < 0x80 {
  1738  					break
  1739  				}
  1740  			}
  1741  			intStringLen := int(stringLen)
  1742  			if intStringLen < 0 {
  1743  				return ErrInvalidLengthHosts
  1744  			}
  1745  			postIndex := iNdEx + intStringLen
  1746  			if postIndex < 0 {
  1747  				return ErrInvalidLengthHosts
  1748  			}
  1749  			if postIndex > l {
  1750  				return io.ErrUnexpectedEOF
  1751  			}
  1752  			m.ID = HostID(dAtA[iNdEx:postIndex])
  1753  			iNdEx = postIndex
  1754  		case 2:
  1755  			if wireType != 2 {
  1756  				return fmt.Errorf("proto: wrong wireType = %d for field Interfaces", wireType)
  1757  			}
  1758  			var msglen int
  1759  			for shift := uint(0); ; shift += 7 {
  1760  				if shift >= 64 {
  1761  					return ErrIntOverflowHosts
  1762  				}
  1763  				if iNdEx >= l {
  1764  					return io.ErrUnexpectedEOF
  1765  				}
  1766  				b := dAtA[iNdEx]
  1767  				iNdEx++
  1768  				msglen |= int(b&0x7F) << shift
  1769  				if b < 0x80 {
  1770  					break
  1771  				}
  1772  			}
  1773  			if msglen < 0 {
  1774  				return ErrInvalidLengthHosts
  1775  			}
  1776  			postIndex := iNdEx + msglen
  1777  			if postIndex < 0 {
  1778  				return ErrInvalidLengthHosts
  1779  			}
  1780  			if postIndex > l {
  1781  				return io.ErrUnexpectedEOF
  1782  			}
  1783  			m.Interfaces = append(m.Interfaces, &NetworkInterface{})
  1784  			if err := m.Interfaces[len(m.Interfaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1785  				return err
  1786  			}
  1787  			iNdEx = postIndex
  1788  		case 3:
  1789  			if wireType != 2 {
  1790  				return fmt.Errorf("proto: wrong wireType = %d for field Pos", wireType)
  1791  			}
  1792  			var msglen int
  1793  			for shift := uint(0); ; shift += 7 {
  1794  				if shift >= 64 {
  1795  					return ErrIntOverflowHosts
  1796  				}
  1797  				if iNdEx >= l {
  1798  					return io.ErrUnexpectedEOF
  1799  				}
  1800  				b := dAtA[iNdEx]
  1801  				iNdEx++
  1802  				msglen |= int(b&0x7F) << shift
  1803  				if b < 0x80 {
  1804  					break
  1805  				}
  1806  			}
  1807  			if msglen < 0 {
  1808  				return ErrInvalidLengthHosts
  1809  			}
  1810  			postIndex := iNdEx + msglen
  1811  			if postIndex < 0 {
  1812  				return ErrInvalidLengthHosts
  1813  			}
  1814  			if postIndex > l {
  1815  				return io.ErrUnexpectedEOF
  1816  			}
  1817  			if m.Pos == nil {
  1818  				m.Pos = &misc.GridPosition{}
  1819  			}
  1820  			if err := m.Pos.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1821  				return err
  1822  			}
  1823  			iNdEx = postIndex
  1824  		case 4:
  1825  			if wireType != 0 {
  1826  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1827  			}
  1828  			m.Type = 0
  1829  			for shift := uint(0); ; shift += 7 {
  1830  				if shift >= 64 {
  1831  					return ErrIntOverflowHosts
  1832  				}
  1833  				if iNdEx >= l {
  1834  					return io.ErrUnexpectedEOF
  1835  				}
  1836  				b := dAtA[iNdEx]
  1837  				iNdEx++
  1838  				m.Type |= HostType(b&0x7F) << shift
  1839  				if b < 0x80 {
  1840  					break
  1841  				}
  1842  			}
  1843  		case 5:
  1844  			if wireType != 2 {
  1845  				return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType)
  1846  			}
  1847  			var msglen int
  1848  			for shift := uint(0); ; shift += 7 {
  1849  				if shift >= 64 {
  1850  					return ErrIntOverflowHosts
  1851  				}
  1852  				if iNdEx >= l {
  1853  					return io.ErrUnexpectedEOF
  1854  				}
  1855  				b := dAtA[iNdEx]
  1856  				iNdEx++
  1857  				msglen |= int(b&0x7F) << shift
  1858  				if b < 0x80 {
  1859  					break
  1860  				}
  1861  			}
  1862  			if msglen < 0 {
  1863  				return ErrInvalidLengthHosts
  1864  			}
  1865  			postIndex := iNdEx + msglen
  1866  			if postIndex < 0 {
  1867  				return ErrInvalidLengthHosts
  1868  			}
  1869  			if postIndex > l {
  1870  				return io.ErrUnexpectedEOF
  1871  			}
  1872  			m.Hosts = append(m.Hosts, &Host{})
  1873  			if err := m.Hosts[len(m.Hosts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1874  				return err
  1875  			}
  1876  			iNdEx = postIndex
  1877  		default:
  1878  			iNdEx = preIndex
  1879  			skippy, err := skipHosts(dAtA[iNdEx:])
  1880  			if err != nil {
  1881  				return err
  1882  			}
  1883  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1884  				return ErrInvalidLengthHosts
  1885  			}
  1886  			if (iNdEx + skippy) > l {
  1887  				return io.ErrUnexpectedEOF
  1888  			}
  1889  			iNdEx += skippy
  1890  		}
  1891  	}
  1892  
  1893  	if iNdEx > l {
  1894  		return io.ErrUnexpectedEOF
  1895  	}
  1896  	return nil
  1897  }
  1898  func (m *NetworkInterface) Unmarshal(dAtA []byte) error {
  1899  	l := len(dAtA)
  1900  	iNdEx := 0
  1901  	for iNdEx < l {
  1902  		preIndex := iNdEx
  1903  		var wire uint64
  1904  		for shift := uint(0); ; shift += 7 {
  1905  			if shift >= 64 {
  1906  				return ErrIntOverflowHosts
  1907  			}
  1908  			if iNdEx >= l {
  1909  				return io.ErrUnexpectedEOF
  1910  			}
  1911  			b := dAtA[iNdEx]
  1912  			iNdEx++
  1913  			wire |= uint64(b&0x7F) << shift
  1914  			if b < 0x80 {
  1915  				break
  1916  			}
  1917  		}
  1918  		fieldNum := int32(wire >> 3)
  1919  		wireType := int(wire & 0x7)
  1920  		if wireType == 4 {
  1921  			return fmt.Errorf("proto: NetworkInterface: wiretype end group for non-group")
  1922  		}
  1923  		if fieldNum <= 0 {
  1924  			return fmt.Errorf("proto: NetworkInterface: illegal tag %d (wire type %d)", fieldNum, wire)
  1925  		}
  1926  		switch fieldNum {
  1927  		case 1:
  1928  			if wireType != 2 {
  1929  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1930  			}
  1931  			var stringLen uint64
  1932  			for shift := uint(0); ; shift += 7 {
  1933  				if shift >= 64 {
  1934  					return ErrIntOverflowHosts
  1935  				}
  1936  				if iNdEx >= l {
  1937  					return io.ErrUnexpectedEOF
  1938  				}
  1939  				b := dAtA[iNdEx]
  1940  				iNdEx++
  1941  				stringLen |= uint64(b&0x7F) << shift
  1942  				if b < 0x80 {
  1943  					break
  1944  				}
  1945  			}
  1946  			intStringLen := int(stringLen)
  1947  			if intStringLen < 0 {
  1948  				return ErrInvalidLengthHosts
  1949  			}
  1950  			postIndex := iNdEx + intStringLen
  1951  			if postIndex < 0 {
  1952  				return ErrInvalidLengthHosts
  1953  			}
  1954  			if postIndex > l {
  1955  				return io.ErrUnexpectedEOF
  1956  			}
  1957  			m.ID = PortID(dAtA[iNdEx:postIndex])
  1958  			iNdEx = postIndex
  1959  		case 2:
  1960  			if wireType != 2 {
  1961  				return fmt.Errorf("proto: wrong wireType = %d for field MacAddress", wireType)
  1962  			}
  1963  			var stringLen uint64
  1964  			for shift := uint(0); ; shift += 7 {
  1965  				if shift >= 64 {
  1966  					return ErrIntOverflowHosts
  1967  				}
  1968  				if iNdEx >= l {
  1969  					return io.ErrUnexpectedEOF
  1970  				}
  1971  				b := dAtA[iNdEx]
  1972  				iNdEx++
  1973  				stringLen |= uint64(b&0x7F) << shift
  1974  				if b < 0x80 {
  1975  					break
  1976  				}
  1977  			}
  1978  			intStringLen := int(stringLen)
  1979  			if intStringLen < 0 {
  1980  				return ErrInvalidLengthHosts
  1981  			}
  1982  			postIndex := iNdEx + intStringLen
  1983  			if postIndex < 0 {
  1984  				return ErrInvalidLengthHosts
  1985  			}
  1986  			if postIndex > l {
  1987  				return io.ErrUnexpectedEOF
  1988  			}
  1989  			m.MacAddress = string(dAtA[iNdEx:postIndex])
  1990  			iNdEx = postIndex
  1991  		case 3:
  1992  			if wireType != 2 {
  1993  				return fmt.Errorf("proto: wrong wireType = %d for field IpAddress", wireType)
  1994  			}
  1995  			var stringLen uint64
  1996  			for shift := uint(0); ; shift += 7 {
  1997  				if shift >= 64 {
  1998  					return ErrIntOverflowHosts
  1999  				}
  2000  				if iNdEx >= l {
  2001  					return io.ErrUnexpectedEOF
  2002  				}
  2003  				b := dAtA[iNdEx]
  2004  				iNdEx++
  2005  				stringLen |= uint64(b&0x7F) << shift
  2006  				if b < 0x80 {
  2007  					break
  2008  				}
  2009  			}
  2010  			intStringLen := int(stringLen)
  2011  			if intStringLen < 0 {
  2012  				return ErrInvalidLengthHosts
  2013  			}
  2014  			postIndex := iNdEx + intStringLen
  2015  			if postIndex < 0 {
  2016  				return ErrInvalidLengthHosts
  2017  			}
  2018  			if postIndex > l {
  2019  				return io.ErrUnexpectedEOF
  2020  			}
  2021  			m.IpAddress = string(dAtA[iNdEx:postIndex])
  2022  			iNdEx = postIndex
  2023  		case 4:
  2024  			if wireType != 2 {
  2025  				return fmt.Errorf("proto: wrong wireType = %d for field Ipv6Address", wireType)
  2026  			}
  2027  			var stringLen uint64
  2028  			for shift := uint(0); ; shift += 7 {
  2029  				if shift >= 64 {
  2030  					return ErrIntOverflowHosts
  2031  				}
  2032  				if iNdEx >= l {
  2033  					return io.ErrUnexpectedEOF
  2034  				}
  2035  				b := dAtA[iNdEx]
  2036  				iNdEx++
  2037  				stringLen |= uint64(b&0x7F) << shift
  2038  				if b < 0x80 {
  2039  					break
  2040  				}
  2041  			}
  2042  			intStringLen := int(stringLen)
  2043  			if intStringLen < 0 {
  2044  				return ErrInvalidLengthHosts
  2045  			}
  2046  			postIndex := iNdEx + intStringLen
  2047  			if postIndex < 0 {
  2048  				return ErrInvalidLengthHosts
  2049  			}
  2050  			if postIndex > l {
  2051  				return io.ErrUnexpectedEOF
  2052  			}
  2053  			m.Ipv6Address = string(dAtA[iNdEx:postIndex])
  2054  			iNdEx = postIndex
  2055  		case 5:
  2056  			if wireType != 2 {
  2057  				return fmt.Errorf("proto: wrong wireType = %d for field Behavior", wireType)
  2058  			}
  2059  			var msglen int
  2060  			for shift := uint(0); ; shift += 7 {
  2061  				if shift >= 64 {
  2062  					return ErrIntOverflowHosts
  2063  				}
  2064  				if iNdEx >= l {
  2065  					return io.ErrUnexpectedEOF
  2066  				}
  2067  				b := dAtA[iNdEx]
  2068  				iNdEx++
  2069  				msglen |= int(b&0x7F) << shift
  2070  				if b < 0x80 {
  2071  					break
  2072  				}
  2073  			}
  2074  			if msglen < 0 {
  2075  				return ErrInvalidLengthHosts
  2076  			}
  2077  			postIndex := iNdEx + msglen
  2078  			if postIndex < 0 {
  2079  				return ErrInvalidLengthHosts
  2080  			}
  2081  			if postIndex > l {
  2082  				return io.ErrUnexpectedEOF
  2083  			}
  2084  			if m.Behavior == nil {
  2085  				m.Behavior = &NetworkInterfaceBehavior{}
  2086  			}
  2087  			if err := m.Behavior.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2088  				return err
  2089  			}
  2090  			iNdEx = postIndex
  2091  		case 6:
  2092  			if wireType != 0 {
  2093  				return fmt.Errorf("proto: wrong wireType = %d for field VLAN", wireType)
  2094  			}
  2095  			m.VLAN = 0
  2096  			for shift := uint(0); ; shift += 7 {
  2097  				if shift >= 64 {
  2098  					return ErrIntOverflowHosts
  2099  				}
  2100  				if iNdEx >= l {
  2101  					return io.ErrUnexpectedEOF
  2102  				}
  2103  				b := dAtA[iNdEx]
  2104  				iNdEx++
  2105  				m.VLAN |= uint32(b&0x7F) << shift
  2106  				if b < 0x80 {
  2107  					break
  2108  				}
  2109  			}
  2110  		default:
  2111  			iNdEx = preIndex
  2112  			skippy, err := skipHosts(dAtA[iNdEx:])
  2113  			if err != nil {
  2114  				return err
  2115  			}
  2116  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2117  				return ErrInvalidLengthHosts
  2118  			}
  2119  			if (iNdEx + skippy) > l {
  2120  				return io.ErrUnexpectedEOF
  2121  			}
  2122  			iNdEx += skippy
  2123  		}
  2124  	}
  2125  
  2126  	if iNdEx > l {
  2127  		return io.ErrUnexpectedEOF
  2128  	}
  2129  	return nil
  2130  }
  2131  func (m *NetworkInterfaceBehavior) Unmarshal(dAtA []byte) error {
  2132  	l := len(dAtA)
  2133  	iNdEx := 0
  2134  	for iNdEx < l {
  2135  		preIndex := iNdEx
  2136  		var wire uint64
  2137  		for shift := uint(0); ; shift += 7 {
  2138  			if shift >= 64 {
  2139  				return ErrIntOverflowHosts
  2140  			}
  2141  			if iNdEx >= l {
  2142  				return io.ErrUnexpectedEOF
  2143  			}
  2144  			b := dAtA[iNdEx]
  2145  			iNdEx++
  2146  			wire |= uint64(b&0x7F) << shift
  2147  			if b < 0x80 {
  2148  				break
  2149  			}
  2150  		}
  2151  		fieldNum := int32(wire >> 3)
  2152  		wireType := int(wire & 0x7)
  2153  		if wireType == 4 {
  2154  			return fmt.Errorf("proto: NetworkInterfaceBehavior: wiretype end group for non-group")
  2155  		}
  2156  		if fieldNum <= 0 {
  2157  			return fmt.Errorf("proto: NetworkInterfaceBehavior: illegal tag %d (wire type %d)", fieldNum, wire)
  2158  		}
  2159  		switch fieldNum {
  2160  		default:
  2161  			iNdEx = preIndex
  2162  			skippy, err := skipHosts(dAtA[iNdEx:])
  2163  			if err != nil {
  2164  				return err
  2165  			}
  2166  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2167  				return ErrInvalidLengthHosts
  2168  			}
  2169  			if (iNdEx + skippy) > l {
  2170  				return io.ErrUnexpectedEOF
  2171  			}
  2172  			iNdEx += skippy
  2173  		}
  2174  	}
  2175  
  2176  	if iNdEx > l {
  2177  		return io.ErrUnexpectedEOF
  2178  	}
  2179  	return nil
  2180  }
  2181  func (m *GetHostsRequest) Unmarshal(dAtA []byte) error {
  2182  	l := len(dAtA)
  2183  	iNdEx := 0
  2184  	for iNdEx < l {
  2185  		preIndex := iNdEx
  2186  		var wire uint64
  2187  		for shift := uint(0); ; shift += 7 {
  2188  			if shift >= 64 {
  2189  				return ErrIntOverflowHosts
  2190  			}
  2191  			if iNdEx >= l {
  2192  				return io.ErrUnexpectedEOF
  2193  			}
  2194  			b := dAtA[iNdEx]
  2195  			iNdEx++
  2196  			wire |= uint64(b&0x7F) << shift
  2197  			if b < 0x80 {
  2198  				break
  2199  			}
  2200  		}
  2201  		fieldNum := int32(wire >> 3)
  2202  		wireType := int(wire & 0x7)
  2203  		if wireType == 4 {
  2204  			return fmt.Errorf("proto: GetHostsRequest: wiretype end group for non-group")
  2205  		}
  2206  		if fieldNum <= 0 {
  2207  			return fmt.Errorf("proto: GetHostsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2208  		}
  2209  		switch fieldNum {
  2210  		default:
  2211  			iNdEx = preIndex
  2212  			skippy, err := skipHosts(dAtA[iNdEx:])
  2213  			if err != nil {
  2214  				return err
  2215  			}
  2216  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2217  				return ErrInvalidLengthHosts
  2218  			}
  2219  			if (iNdEx + skippy) > l {
  2220  				return io.ErrUnexpectedEOF
  2221  			}
  2222  			iNdEx += skippy
  2223  		}
  2224  	}
  2225  
  2226  	if iNdEx > l {
  2227  		return io.ErrUnexpectedEOF
  2228  	}
  2229  	return nil
  2230  }
  2231  func (m *GetHostsResponse) Unmarshal(dAtA []byte) error {
  2232  	l := len(dAtA)
  2233  	iNdEx := 0
  2234  	for iNdEx < l {
  2235  		preIndex := iNdEx
  2236  		var wire uint64
  2237  		for shift := uint(0); ; shift += 7 {
  2238  			if shift >= 64 {
  2239  				return ErrIntOverflowHosts
  2240  			}
  2241  			if iNdEx >= l {
  2242  				return io.ErrUnexpectedEOF
  2243  			}
  2244  			b := dAtA[iNdEx]
  2245  			iNdEx++
  2246  			wire |= uint64(b&0x7F) << shift
  2247  			if b < 0x80 {
  2248  				break
  2249  			}
  2250  		}
  2251  		fieldNum := int32(wire >> 3)
  2252  		wireType := int(wire & 0x7)
  2253  		if wireType == 4 {
  2254  			return fmt.Errorf("proto: GetHostsResponse: wiretype end group for non-group")
  2255  		}
  2256  		if fieldNum <= 0 {
  2257  			return fmt.Errorf("proto: GetHostsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2258  		}
  2259  		switch fieldNum {
  2260  		case 1:
  2261  			if wireType != 2 {
  2262  				return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType)
  2263  			}
  2264  			var msglen int
  2265  			for shift := uint(0); ; shift += 7 {
  2266  				if shift >= 64 {
  2267  					return ErrIntOverflowHosts
  2268  				}
  2269  				if iNdEx >= l {
  2270  					return io.ErrUnexpectedEOF
  2271  				}
  2272  				b := dAtA[iNdEx]
  2273  				iNdEx++
  2274  				msglen |= int(b&0x7F) << shift
  2275  				if b < 0x80 {
  2276  					break
  2277  				}
  2278  			}
  2279  			if msglen < 0 {
  2280  				return ErrInvalidLengthHosts
  2281  			}
  2282  			postIndex := iNdEx + msglen
  2283  			if postIndex < 0 {
  2284  				return ErrInvalidLengthHosts
  2285  			}
  2286  			if postIndex > l {
  2287  				return io.ErrUnexpectedEOF
  2288  			}
  2289  			m.Hosts = append(m.Hosts, &Host{})
  2290  			if err := m.Hosts[len(m.Hosts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2291  				return err
  2292  			}
  2293  			iNdEx = postIndex
  2294  		default:
  2295  			iNdEx = preIndex
  2296  			skippy, err := skipHosts(dAtA[iNdEx:])
  2297  			if err != nil {
  2298  				return err
  2299  			}
  2300  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2301  				return ErrInvalidLengthHosts
  2302  			}
  2303  			if (iNdEx + skippy) > l {
  2304  				return io.ErrUnexpectedEOF
  2305  			}
  2306  			iNdEx += skippy
  2307  		}
  2308  	}
  2309  
  2310  	if iNdEx > l {
  2311  		return io.ErrUnexpectedEOF
  2312  	}
  2313  	return nil
  2314  }
  2315  func (m *GetHostRequest) Unmarshal(dAtA []byte) error {
  2316  	l := len(dAtA)
  2317  	iNdEx := 0
  2318  	for iNdEx < l {
  2319  		preIndex := iNdEx
  2320  		var wire uint64
  2321  		for shift := uint(0); ; shift += 7 {
  2322  			if shift >= 64 {
  2323  				return ErrIntOverflowHosts
  2324  			}
  2325  			if iNdEx >= l {
  2326  				return io.ErrUnexpectedEOF
  2327  			}
  2328  			b := dAtA[iNdEx]
  2329  			iNdEx++
  2330  			wire |= uint64(b&0x7F) << shift
  2331  			if b < 0x80 {
  2332  				break
  2333  			}
  2334  		}
  2335  		fieldNum := int32(wire >> 3)
  2336  		wireType := int(wire & 0x7)
  2337  		if wireType == 4 {
  2338  			return fmt.Errorf("proto: GetHostRequest: wiretype end group for non-group")
  2339  		}
  2340  		if fieldNum <= 0 {
  2341  			return fmt.Errorf("proto: GetHostRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2342  		}
  2343  		switch fieldNum {
  2344  		case 1:
  2345  			if wireType != 2 {
  2346  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2347  			}
  2348  			var stringLen uint64
  2349  			for shift := uint(0); ; shift += 7 {
  2350  				if shift >= 64 {
  2351  					return ErrIntOverflowHosts
  2352  				}
  2353  				if iNdEx >= l {
  2354  					return io.ErrUnexpectedEOF
  2355  				}
  2356  				b := dAtA[iNdEx]
  2357  				iNdEx++
  2358  				stringLen |= uint64(b&0x7F) << shift
  2359  				if b < 0x80 {
  2360  					break
  2361  				}
  2362  			}
  2363  			intStringLen := int(stringLen)
  2364  			if intStringLen < 0 {
  2365  				return ErrInvalidLengthHosts
  2366  			}
  2367  			postIndex := iNdEx + intStringLen
  2368  			if postIndex < 0 {
  2369  				return ErrInvalidLengthHosts
  2370  			}
  2371  			if postIndex > l {
  2372  				return io.ErrUnexpectedEOF
  2373  			}
  2374  			m.ID = HostID(dAtA[iNdEx:postIndex])
  2375  			iNdEx = postIndex
  2376  		default:
  2377  			iNdEx = preIndex
  2378  			skippy, err := skipHosts(dAtA[iNdEx:])
  2379  			if err != nil {
  2380  				return err
  2381  			}
  2382  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2383  				return ErrInvalidLengthHosts
  2384  			}
  2385  			if (iNdEx + skippy) > l {
  2386  				return io.ErrUnexpectedEOF
  2387  			}
  2388  			iNdEx += skippy
  2389  		}
  2390  	}
  2391  
  2392  	if iNdEx > l {
  2393  		return io.ErrUnexpectedEOF
  2394  	}
  2395  	return nil
  2396  }
  2397  func (m *GetHostResponse) Unmarshal(dAtA []byte) error {
  2398  	l := len(dAtA)
  2399  	iNdEx := 0
  2400  	for iNdEx < l {
  2401  		preIndex := iNdEx
  2402  		var wire uint64
  2403  		for shift := uint(0); ; shift += 7 {
  2404  			if shift >= 64 {
  2405  				return ErrIntOverflowHosts
  2406  			}
  2407  			if iNdEx >= l {
  2408  				return io.ErrUnexpectedEOF
  2409  			}
  2410  			b := dAtA[iNdEx]
  2411  			iNdEx++
  2412  			wire |= uint64(b&0x7F) << shift
  2413  			if b < 0x80 {
  2414  				break
  2415  			}
  2416  		}
  2417  		fieldNum := int32(wire >> 3)
  2418  		wireType := int(wire & 0x7)
  2419  		if wireType == 4 {
  2420  			return fmt.Errorf("proto: GetHostResponse: wiretype end group for non-group")
  2421  		}
  2422  		if fieldNum <= 0 {
  2423  			return fmt.Errorf("proto: GetHostResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2424  		}
  2425  		switch fieldNum {
  2426  		case 1:
  2427  			if wireType != 2 {
  2428  				return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
  2429  			}
  2430  			var msglen int
  2431  			for shift := uint(0); ; shift += 7 {
  2432  				if shift >= 64 {
  2433  					return ErrIntOverflowHosts
  2434  				}
  2435  				if iNdEx >= l {
  2436  					return io.ErrUnexpectedEOF
  2437  				}
  2438  				b := dAtA[iNdEx]
  2439  				iNdEx++
  2440  				msglen |= int(b&0x7F) << shift
  2441  				if b < 0x80 {
  2442  					break
  2443  				}
  2444  			}
  2445  			if msglen < 0 {
  2446  				return ErrInvalidLengthHosts
  2447  			}
  2448  			postIndex := iNdEx + msglen
  2449  			if postIndex < 0 {
  2450  				return ErrInvalidLengthHosts
  2451  			}
  2452  			if postIndex > l {
  2453  				return io.ErrUnexpectedEOF
  2454  			}
  2455  			if m.Host == nil {
  2456  				m.Host = &Host{}
  2457  			}
  2458  			if err := m.Host.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2459  				return err
  2460  			}
  2461  			iNdEx = postIndex
  2462  		default:
  2463  			iNdEx = preIndex
  2464  			skippy, err := skipHosts(dAtA[iNdEx:])
  2465  			if err != nil {
  2466  				return err
  2467  			}
  2468  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2469  				return ErrInvalidLengthHosts
  2470  			}
  2471  			if (iNdEx + skippy) > l {
  2472  				return io.ErrUnexpectedEOF
  2473  			}
  2474  			iNdEx += skippy
  2475  		}
  2476  	}
  2477  
  2478  	if iNdEx > l {
  2479  		return io.ErrUnexpectedEOF
  2480  	}
  2481  	return nil
  2482  }
  2483  func (m *AddHostRequest) Unmarshal(dAtA []byte) error {
  2484  	l := len(dAtA)
  2485  	iNdEx := 0
  2486  	for iNdEx < l {
  2487  		preIndex := iNdEx
  2488  		var wire uint64
  2489  		for shift := uint(0); ; shift += 7 {
  2490  			if shift >= 64 {
  2491  				return ErrIntOverflowHosts
  2492  			}
  2493  			if iNdEx >= l {
  2494  				return io.ErrUnexpectedEOF
  2495  			}
  2496  			b := dAtA[iNdEx]
  2497  			iNdEx++
  2498  			wire |= uint64(b&0x7F) << shift
  2499  			if b < 0x80 {
  2500  				break
  2501  			}
  2502  		}
  2503  		fieldNum := int32(wire >> 3)
  2504  		wireType := int(wire & 0x7)
  2505  		if wireType == 4 {
  2506  			return fmt.Errorf("proto: AddHostRequest: wiretype end group for non-group")
  2507  		}
  2508  		if fieldNum <= 0 {
  2509  			return fmt.Errorf("proto: AddHostRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2510  		}
  2511  		switch fieldNum {
  2512  		case 1:
  2513  			if wireType != 2 {
  2514  				return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType)
  2515  			}
  2516  			var msglen int
  2517  			for shift := uint(0); ; shift += 7 {
  2518  				if shift >= 64 {
  2519  					return ErrIntOverflowHosts
  2520  				}
  2521  				if iNdEx >= l {
  2522  					return io.ErrUnexpectedEOF
  2523  				}
  2524  				b := dAtA[iNdEx]
  2525  				iNdEx++
  2526  				msglen |= int(b&0x7F) << shift
  2527  				if b < 0x80 {
  2528  					break
  2529  				}
  2530  			}
  2531  			if msglen < 0 {
  2532  				return ErrInvalidLengthHosts
  2533  			}
  2534  			postIndex := iNdEx + msglen
  2535  			if postIndex < 0 {
  2536  				return ErrInvalidLengthHosts
  2537  			}
  2538  			if postIndex > l {
  2539  				return io.ErrUnexpectedEOF
  2540  			}
  2541  			if m.Host == nil {
  2542  				m.Host = &Host{}
  2543  			}
  2544  			if err := m.Host.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2545  				return err
  2546  			}
  2547  			iNdEx = postIndex
  2548  		case 2:
  2549  			if wireType != 2 {
  2550  				return fmt.Errorf("proto: wrong wireType = %d for field HostedBy", wireType)
  2551  			}
  2552  			var stringLen uint64
  2553  			for shift := uint(0); ; shift += 7 {
  2554  				if shift >= 64 {
  2555  					return ErrIntOverflowHosts
  2556  				}
  2557  				if iNdEx >= l {
  2558  					return io.ErrUnexpectedEOF
  2559  				}
  2560  				b := dAtA[iNdEx]
  2561  				iNdEx++
  2562  				stringLen |= uint64(b&0x7F) << shift
  2563  				if b < 0x80 {
  2564  					break
  2565  				}
  2566  			}
  2567  			intStringLen := int(stringLen)
  2568  			if intStringLen < 0 {
  2569  				return ErrInvalidLengthHosts
  2570  			}
  2571  			postIndex := iNdEx + intStringLen
  2572  			if postIndex < 0 {
  2573  				return ErrInvalidLengthHosts
  2574  			}
  2575  			if postIndex > l {
  2576  				return io.ErrUnexpectedEOF
  2577  			}
  2578  			m.HostedBy = HostID(dAtA[iNdEx:postIndex])
  2579  			iNdEx = postIndex
  2580  		default:
  2581  			iNdEx = preIndex
  2582  			skippy, err := skipHosts(dAtA[iNdEx:])
  2583  			if err != nil {
  2584  				return err
  2585  			}
  2586  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2587  				return ErrInvalidLengthHosts
  2588  			}
  2589  			if (iNdEx + skippy) > l {
  2590  				return io.ErrUnexpectedEOF
  2591  			}
  2592  			iNdEx += skippy
  2593  		}
  2594  	}
  2595  
  2596  	if iNdEx > l {
  2597  		return io.ErrUnexpectedEOF
  2598  	}
  2599  	return nil
  2600  }
  2601  func (m *AddHostResponse) Unmarshal(dAtA []byte) error {
  2602  	l := len(dAtA)
  2603  	iNdEx := 0
  2604  	for iNdEx < l {
  2605  		preIndex := iNdEx
  2606  		var wire uint64
  2607  		for shift := uint(0); ; shift += 7 {
  2608  			if shift >= 64 {
  2609  				return ErrIntOverflowHosts
  2610  			}
  2611  			if iNdEx >= l {
  2612  				return io.ErrUnexpectedEOF
  2613  			}
  2614  			b := dAtA[iNdEx]
  2615  			iNdEx++
  2616  			wire |= uint64(b&0x7F) << shift
  2617  			if b < 0x80 {
  2618  				break
  2619  			}
  2620  		}
  2621  		fieldNum := int32(wire >> 3)
  2622  		wireType := int(wire & 0x7)
  2623  		if wireType == 4 {
  2624  			return fmt.Errorf("proto: AddHostResponse: wiretype end group for non-group")
  2625  		}
  2626  		if fieldNum <= 0 {
  2627  			return fmt.Errorf("proto: AddHostResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2628  		}
  2629  		switch fieldNum {
  2630  		default:
  2631  			iNdEx = preIndex
  2632  			skippy, err := skipHosts(dAtA[iNdEx:])
  2633  			if err != nil {
  2634  				return err
  2635  			}
  2636  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2637  				return ErrInvalidLengthHosts
  2638  			}
  2639  			if (iNdEx + skippy) > l {
  2640  				return io.ErrUnexpectedEOF
  2641  			}
  2642  			iNdEx += skippy
  2643  		}
  2644  	}
  2645  
  2646  	if iNdEx > l {
  2647  		return io.ErrUnexpectedEOF
  2648  	}
  2649  	return nil
  2650  }
  2651  func (m *RemoveHostRequest) Unmarshal(dAtA []byte) error {
  2652  	l := len(dAtA)
  2653  	iNdEx := 0
  2654  	for iNdEx < l {
  2655  		preIndex := iNdEx
  2656  		var wire uint64
  2657  		for shift := uint(0); ; shift += 7 {
  2658  			if shift >= 64 {
  2659  				return ErrIntOverflowHosts
  2660  			}
  2661  			if iNdEx >= l {
  2662  				return io.ErrUnexpectedEOF
  2663  			}
  2664  			b := dAtA[iNdEx]
  2665  			iNdEx++
  2666  			wire |= uint64(b&0x7F) << shift
  2667  			if b < 0x80 {
  2668  				break
  2669  			}
  2670  		}
  2671  		fieldNum := int32(wire >> 3)
  2672  		wireType := int(wire & 0x7)
  2673  		if wireType == 4 {
  2674  			return fmt.Errorf("proto: RemoveHostRequest: wiretype end group for non-group")
  2675  		}
  2676  		if fieldNum <= 0 {
  2677  			return fmt.Errorf("proto: RemoveHostRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2678  		}
  2679  		switch fieldNum {
  2680  		case 1:
  2681  			if wireType != 2 {
  2682  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2683  			}
  2684  			var stringLen uint64
  2685  			for shift := uint(0); ; shift += 7 {
  2686  				if shift >= 64 {
  2687  					return ErrIntOverflowHosts
  2688  				}
  2689  				if iNdEx >= l {
  2690  					return io.ErrUnexpectedEOF
  2691  				}
  2692  				b := dAtA[iNdEx]
  2693  				iNdEx++
  2694  				stringLen |= uint64(b&0x7F) << shift
  2695  				if b < 0x80 {
  2696  					break
  2697  				}
  2698  			}
  2699  			intStringLen := int(stringLen)
  2700  			if intStringLen < 0 {
  2701  				return ErrInvalidLengthHosts
  2702  			}
  2703  			postIndex := iNdEx + intStringLen
  2704  			if postIndex < 0 {
  2705  				return ErrInvalidLengthHosts
  2706  			}
  2707  			if postIndex > l {
  2708  				return io.ErrUnexpectedEOF
  2709  			}
  2710  			m.ID = HostID(dAtA[iNdEx:postIndex])
  2711  			iNdEx = postIndex
  2712  		default:
  2713  			iNdEx = preIndex
  2714  			skippy, err := skipHosts(dAtA[iNdEx:])
  2715  			if err != nil {
  2716  				return err
  2717  			}
  2718  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2719  				return ErrInvalidLengthHosts
  2720  			}
  2721  			if (iNdEx + skippy) > l {
  2722  				return io.ErrUnexpectedEOF
  2723  			}
  2724  			iNdEx += skippy
  2725  		}
  2726  	}
  2727  
  2728  	if iNdEx > l {
  2729  		return io.ErrUnexpectedEOF
  2730  	}
  2731  	return nil
  2732  }
  2733  func (m *RemoveHostResponse) Unmarshal(dAtA []byte) error {
  2734  	l := len(dAtA)
  2735  	iNdEx := 0
  2736  	for iNdEx < l {
  2737  		preIndex := iNdEx
  2738  		var wire uint64
  2739  		for shift := uint(0); ; shift += 7 {
  2740  			if shift >= 64 {
  2741  				return ErrIntOverflowHosts
  2742  			}
  2743  			if iNdEx >= l {
  2744  				return io.ErrUnexpectedEOF
  2745  			}
  2746  			b := dAtA[iNdEx]
  2747  			iNdEx++
  2748  			wire |= uint64(b&0x7F) << shift
  2749  			if b < 0x80 {
  2750  				break
  2751  			}
  2752  		}
  2753  		fieldNum := int32(wire >> 3)
  2754  		wireType := int(wire & 0x7)
  2755  		if wireType == 4 {
  2756  			return fmt.Errorf("proto: RemoveHostResponse: wiretype end group for non-group")
  2757  		}
  2758  		if fieldNum <= 0 {
  2759  			return fmt.Errorf("proto: RemoveHostResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2760  		}
  2761  		switch fieldNum {
  2762  		default:
  2763  			iNdEx = preIndex
  2764  			skippy, err := skipHosts(dAtA[iNdEx:])
  2765  			if err != nil {
  2766  				return err
  2767  			}
  2768  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2769  				return ErrInvalidLengthHosts
  2770  			}
  2771  			if (iNdEx + skippy) > l {
  2772  				return io.ErrUnexpectedEOF
  2773  			}
  2774  			iNdEx += skippy
  2775  		}
  2776  	}
  2777  
  2778  	if iNdEx > l {
  2779  		return io.ErrUnexpectedEOF
  2780  	}
  2781  	return nil
  2782  }
  2783  func (m *EmitARPsRequest) Unmarshal(dAtA []byte) error {
  2784  	l := len(dAtA)
  2785  	iNdEx := 0
  2786  	for iNdEx < l {
  2787  		preIndex := iNdEx
  2788  		var wire uint64
  2789  		for shift := uint(0); ; shift += 7 {
  2790  			if shift >= 64 {
  2791  				return ErrIntOverflowHosts
  2792  			}
  2793  			if iNdEx >= l {
  2794  				return io.ErrUnexpectedEOF
  2795  			}
  2796  			b := dAtA[iNdEx]
  2797  			iNdEx++
  2798  			wire |= uint64(b&0x7F) << shift
  2799  			if b < 0x80 {
  2800  				break
  2801  			}
  2802  		}
  2803  		fieldNum := int32(wire >> 3)
  2804  		wireType := int(wire & 0x7)
  2805  		if wireType == 4 {
  2806  			return fmt.Errorf("proto: EmitARPsRequest: wiretype end group for non-group")
  2807  		}
  2808  		if fieldNum <= 0 {
  2809  			return fmt.Errorf("proto: EmitARPsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  2810  		}
  2811  		switch fieldNum {
  2812  		case 1:
  2813  			if wireType != 2 {
  2814  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2815  			}
  2816  			var stringLen uint64
  2817  			for shift := uint(0); ; shift += 7 {
  2818  				if shift >= 64 {
  2819  					return ErrIntOverflowHosts
  2820  				}
  2821  				if iNdEx >= l {
  2822  					return io.ErrUnexpectedEOF
  2823  				}
  2824  				b := dAtA[iNdEx]
  2825  				iNdEx++
  2826  				stringLen |= uint64(b&0x7F) << shift
  2827  				if b < 0x80 {
  2828  					break
  2829  				}
  2830  			}
  2831  			intStringLen := int(stringLen)
  2832  			if intStringLen < 0 {
  2833  				return ErrInvalidLengthHosts
  2834  			}
  2835  			postIndex := iNdEx + intStringLen
  2836  			if postIndex < 0 {
  2837  				return ErrInvalidLengthHosts
  2838  			}
  2839  			if postIndex > l {
  2840  				return io.ErrUnexpectedEOF
  2841  			}
  2842  			m.ID = HostID(dAtA[iNdEx:postIndex])
  2843  			iNdEx = postIndex
  2844  		case 2:
  2845  			if wireType != 2 {
  2846  				return fmt.Errorf("proto: wrong wireType = %d for field MacAddress", wireType)
  2847  			}
  2848  			var stringLen uint64
  2849  			for shift := uint(0); ; shift += 7 {
  2850  				if shift >= 64 {
  2851  					return ErrIntOverflowHosts
  2852  				}
  2853  				if iNdEx >= l {
  2854  					return io.ErrUnexpectedEOF
  2855  				}
  2856  				b := dAtA[iNdEx]
  2857  				iNdEx++
  2858  				stringLen |= uint64(b&0x7F) << shift
  2859  				if b < 0x80 {
  2860  					break
  2861  				}
  2862  			}
  2863  			intStringLen := int(stringLen)
  2864  			if intStringLen < 0 {
  2865  				return ErrInvalidLengthHosts
  2866  			}
  2867  			postIndex := iNdEx + intStringLen
  2868  			if postIndex < 0 {
  2869  				return ErrInvalidLengthHosts
  2870  			}
  2871  			if postIndex > l {
  2872  				return io.ErrUnexpectedEOF
  2873  			}
  2874  			m.MacAddress = string(dAtA[iNdEx:postIndex])
  2875  			iNdEx = postIndex
  2876  		case 3:
  2877  			if wireType != 2 {
  2878  				return fmt.Errorf("proto: wrong wireType = %d for field IpAddresses", wireType)
  2879  			}
  2880  			var stringLen uint64
  2881  			for shift := uint(0); ; shift += 7 {
  2882  				if shift >= 64 {
  2883  					return ErrIntOverflowHosts
  2884  				}
  2885  				if iNdEx >= l {
  2886  					return io.ErrUnexpectedEOF
  2887  				}
  2888  				b := dAtA[iNdEx]
  2889  				iNdEx++
  2890  				stringLen |= uint64(b&0x7F) << shift
  2891  				if b < 0x80 {
  2892  					break
  2893  				}
  2894  			}
  2895  			intStringLen := int(stringLen)
  2896  			if intStringLen < 0 {
  2897  				return ErrInvalidLengthHosts
  2898  			}
  2899  			postIndex := iNdEx + intStringLen
  2900  			if postIndex < 0 {
  2901  				return ErrInvalidLengthHosts
  2902  			}
  2903  			if postIndex > l {
  2904  				return io.ErrUnexpectedEOF
  2905  			}
  2906  			m.IpAddresses = append(m.IpAddresses, string(dAtA[iNdEx:postIndex]))
  2907  			iNdEx = postIndex
  2908  		default:
  2909  			iNdEx = preIndex
  2910  			skippy, err := skipHosts(dAtA[iNdEx:])
  2911  			if err != nil {
  2912  				return err
  2913  			}
  2914  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2915  				return ErrInvalidLengthHosts
  2916  			}
  2917  			if (iNdEx + skippy) > l {
  2918  				return io.ErrUnexpectedEOF
  2919  			}
  2920  			iNdEx += skippy
  2921  		}
  2922  	}
  2923  
  2924  	if iNdEx > l {
  2925  		return io.ErrUnexpectedEOF
  2926  	}
  2927  	return nil
  2928  }
  2929  func (m *EmitARPsResponse) Unmarshal(dAtA []byte) error {
  2930  	l := len(dAtA)
  2931  	iNdEx := 0
  2932  	for iNdEx < l {
  2933  		preIndex := iNdEx
  2934  		var wire uint64
  2935  		for shift := uint(0); ; shift += 7 {
  2936  			if shift >= 64 {
  2937  				return ErrIntOverflowHosts
  2938  			}
  2939  			if iNdEx >= l {
  2940  				return io.ErrUnexpectedEOF
  2941  			}
  2942  			b := dAtA[iNdEx]
  2943  			iNdEx++
  2944  			wire |= uint64(b&0x7F) << shift
  2945  			if b < 0x80 {
  2946  				break
  2947  			}
  2948  		}
  2949  		fieldNum := int32(wire >> 3)
  2950  		wireType := int(wire & 0x7)
  2951  		if wireType == 4 {
  2952  			return fmt.Errorf("proto: EmitARPsResponse: wiretype end group for non-group")
  2953  		}
  2954  		if fieldNum <= 0 {
  2955  			return fmt.Errorf("proto: EmitARPsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  2956  		}
  2957  		switch fieldNum {
  2958  		default:
  2959  			iNdEx = preIndex
  2960  			skippy, err := skipHosts(dAtA[iNdEx:])
  2961  			if err != nil {
  2962  				return err
  2963  			}
  2964  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2965  				return ErrInvalidLengthHosts
  2966  			}
  2967  			if (iNdEx + skippy) > l {
  2968  				return io.ErrUnexpectedEOF
  2969  			}
  2970  			iNdEx += skippy
  2971  		}
  2972  	}
  2973  
  2974  	if iNdEx > l {
  2975  		return io.ErrUnexpectedEOF
  2976  	}
  2977  	return nil
  2978  }
  2979  func skipHosts(dAtA []byte) (n int, err error) {
  2980  	l := len(dAtA)
  2981  	iNdEx := 0
  2982  	depth := 0
  2983  	for iNdEx < l {
  2984  		var wire uint64
  2985  		for shift := uint(0); ; shift += 7 {
  2986  			if shift >= 64 {
  2987  				return 0, ErrIntOverflowHosts
  2988  			}
  2989  			if iNdEx >= l {
  2990  				return 0, io.ErrUnexpectedEOF
  2991  			}
  2992  			b := dAtA[iNdEx]
  2993  			iNdEx++
  2994  			wire |= (uint64(b) & 0x7F) << shift
  2995  			if b < 0x80 {
  2996  				break
  2997  			}
  2998  		}
  2999  		wireType := int(wire & 0x7)
  3000  		switch wireType {
  3001  		case 0:
  3002  			for shift := uint(0); ; shift += 7 {
  3003  				if shift >= 64 {
  3004  					return 0, ErrIntOverflowHosts
  3005  				}
  3006  				if iNdEx >= l {
  3007  					return 0, io.ErrUnexpectedEOF
  3008  				}
  3009  				iNdEx++
  3010  				if dAtA[iNdEx-1] < 0x80 {
  3011  					break
  3012  				}
  3013  			}
  3014  		case 1:
  3015  			iNdEx += 8
  3016  		case 2:
  3017  			var length int
  3018  			for shift := uint(0); ; shift += 7 {
  3019  				if shift >= 64 {
  3020  					return 0, ErrIntOverflowHosts
  3021  				}
  3022  				if iNdEx >= l {
  3023  					return 0, io.ErrUnexpectedEOF
  3024  				}
  3025  				b := dAtA[iNdEx]
  3026  				iNdEx++
  3027  				length |= (int(b) & 0x7F) << shift
  3028  				if b < 0x80 {
  3029  					break
  3030  				}
  3031  			}
  3032  			if length < 0 {
  3033  				return 0, ErrInvalidLengthHosts
  3034  			}
  3035  			iNdEx += length
  3036  		case 3:
  3037  			depth++
  3038  		case 4:
  3039  			if depth == 0 {
  3040  				return 0, ErrUnexpectedEndOfGroupHosts
  3041  			}
  3042  			depth--
  3043  		case 5:
  3044  			iNdEx += 4
  3045  		default:
  3046  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  3047  		}
  3048  		if iNdEx < 0 {
  3049  			return 0, ErrInvalidLengthHosts
  3050  		}
  3051  		if depth == 0 {
  3052  			return iNdEx, nil
  3053  		}
  3054  	}
  3055  	return 0, io.ErrUnexpectedEOF
  3056  }
  3057  
  3058  var (
  3059  	ErrInvalidLengthHosts        = fmt.Errorf("proto: negative length found during unmarshaling")
  3060  	ErrIntOverflowHosts          = fmt.Errorf("proto: integer overflow")
  3061  	ErrUnexpectedEndOfGroupHosts = fmt.Errorf("proto: unexpected end of group")
  3062  )