Network Service
The Network Service is a gRPC & Go based network configuration service. The network settings of the Edge Devices are configured through this service.
Table of Contents
Top
Network.proto
Interface
Interface type holds settings for a Network Interface.
Field
Type
Label
Description
GatewayInterface
bool
if true, route metric will be set to 1. Otherwise route metric is -1. Similarly, when the interface is requested,return value will be true if route metric is 1.
MacAddress
string
"20:87:56:b5:ed:e0"
DHCP
string
values can be 'enabled' or 'disabled'. for compatiblity reasons it is not boolean.
Static
Interface.StaticConf
Static field is StaticConf type instance.
DNSConfig
Interface.Dns
DNSConfig is dns type instance.
L2Conf
Interface.L2
InterfaceName
string
Network interface name e.g: "enp2s0"
Label
string
Label for the interface e.g: "X1"
Interface.Dns
Type that contains Primary and Secondary DNS.
Field
Type
Label
Description
PrimaryDNS
string
e.g: "1.1.1.2"
SecondaryDNS
string
e.g: "1.1.1.1"
Interface.L2
Field
Type
Label
Description
StartingAddressIPv4
string
e.g: 192.168.0.2
NetMask
string
e.g: 255.255.255.0
Range
string
e.g: 16
Gateway
string
e.g: 192.168.2.1
AuxiliaryAddresses
Interface.L2.AuxiliaryAddressesEntry
repeated
Preserved addresses for other devices. These addresses won't be assigned to containers. e.g my_plc, 192.168.0.5
Interface.L2.AuxiliaryAddressesEntry
Interface.StaticConf
StaticConf type holds IP Netmask and Gateway information
Field
Type
Label
Description
IPv4
string
e.g: 192.168.0.2
NetMask
string
e.g: 255.255.255.0
Gateway
string
e.g: 192.168.0.1
NetworkInterfaceRequest
Contains MAC address, used for retrieving specified Network Interface settings.
Field
Type
Label
Description
mac
string
NetworkInterfaceRequestWithLabel
Returns an Network Interface with
Field
Type
Label
Description
label
string
NetworkSettings
Contains multiple network interface settings. It can be used to apply or get the settings.
Field
Type
Label
Description
Interfaces
Interface
repeated
Network settings contains an array of Interfaces.Applying new settings or receiving current settings is supported for multiple ethernet typed network interfaces supported.
LabelMap
NetworkSettings.LabelMapEntry
repeated
LabelMap contains port label and corresponding interface-name. e.g key : x1 value: enp2s0
NetworkSettings.LabelMapEntry
NetworkService
Network service ,uses a UNIX Domain Socket "/var/run/devicemodel/network.sock" for GRPC communication.
protoc generates both client and server instance for this Service.
GRPC Status codes : https://developers.google.com/maps-booking/reference/grpc-api/status_codes .
Scalar Value Types
.proto Type
Notes
C++
Java
Python
Go
C#
PHP
Ruby
double
double
double
float
float64
double
float
Float
float
float
float
float
float32
float
float
Float
int32
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
int64
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.
int64
long
int/long
int64
long
integer/string
Bignum
uint32
Uses variable-length encoding.
uint32
int
int/long
uint32
uint
integer
Bignum or Fixnum (as required)
uint64
Uses variable-length encoding.
uint64
long
int/long
uint64
ulong
integer/string
Bignum or Fixnum (as required)
sint32
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
sint64
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.
int64
long
int/long
int64
long
integer/string
Bignum
fixed32
Always four bytes. More efficient than uint32 if values are often greater than 2^28.
uint32
int
int
uint32
uint
integer
Bignum or Fixnum (as required)
fixed64
Always eight bytes. More efficient than uint64 if values are often greater than 2^56.
uint64
long
int/long
uint64
ulong
integer/string
Bignum
sfixed32
Always four bytes.
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
sfixed64
Always eight bytes.
int64
long
int/long
int64
long
integer/string
Bignum
bool
bool
boolean
boolean
bool
bool
boolean
TrueClass/FalseClass
string
A string must always contain UTF-8 encoded or 7-bit ASCII text.
string
String
str/unicode
string
string
string
String (UTF-8)
bytes
May contain any arbitrary sequence of bytes.
string
ByteString
str
[]byte
ByteString
string
String (ASCII-8BIT)