...

Text file src/github.com/Microsoft/hcsshim/pkg/ncproxy/ncproxygrpc/v1/networkconfigproxy.proto

Documentation: github.com/Microsoft/hcsshim/pkg/ncproxy/ncproxygrpc/v1

     1syntax = "proto3";
     2
     3package ncproxygrpc.v1;
     4option go_package = "github.com/Microsoft/hcsshim/pkg/ncproxy/ncproxygrpc/v1";
     5
     6service NetworkConfigProxy {
     7    rpc AddNIC(AddNICRequest) returns (AddNICResponse) {}
     8    rpc ModifyNIC(ModifyNICRequest) returns (ModifyNICResponse) {}
     9    rpc DeleteNIC(DeleteNICRequest) returns (DeleteNICResponse) {}
    10
    11    rpc CreateNetwork(CreateNetworkRequest) returns (CreateNetworkResponse) {}
    12    rpc CreateEndpoint(CreateEndpointRequest) returns (CreateEndpointResponse) {}
    13    rpc AddEndpoint(AddEndpointRequest) returns (AddEndpointResponse) {}
    14    rpc DeleteEndpoint(DeleteEndpointRequest) returns (DeleteEndpointResponse) {}
    15    rpc DeleteNetwork(DeleteNetworkRequest) returns (DeleteNetworkResponse) {}
    16    rpc GetEndpoint(GetEndpointRequest) returns (GetEndpointResponse) {}
    17    rpc GetNetwork(GetNetworkRequest) returns (GetNetworkResponse) {}
    18    rpc GetEndpoints(GetEndpointsRequest) returns (GetEndpointsResponse) {}
    19    rpc GetNetworks(GetNetworksRequest) returns (GetNetworksResponse) {}
    20}
    21
    22message AddNICRequest {
    23    string container_id = 1;
    24    string nic_id = 2;
    25    string endpoint_name = 3;
    26    EndpointSettings endpoint_settings = 4;
    27}
    28
    29message AddNICResponse {}
    30
    31message ModifyNICRequest {
    32    string container_id = 1;
    33    string nic_id = 2;
    34    string endpoint_name = 3;
    35    EndpointSettings endpoint_settings = 4;
    36}
    37
    38message ModifyNICResponse {}
    39
    40message DeleteNICRequest {
    41    string container_id = 1;
    42    string nic_id = 2;
    43    string endpoint_name = 3;
    44}
    45
    46message DeleteNICResponse {}
    47
    48message CreateNetworkRequest {
    49    Network network = 1;
    50}
    51
    52message Network {
    53    oneof settings {
    54        HostComputeNetworkSettings hcn_network = 1;
    55        NCProxyNetworkSettings ncproxy_network = 2;
    56    }
    57}
    58
    59message NCProxyNetworkSettings {
    60    string name = 1;
    61}
    62
    63message HostComputeNetworkSettings {
    64    enum NetworkMode
    65    {
    66        Transparent = 0;
    67        NAT = 1;
    68    }
    69    enum IpamType
    70    {
    71        Static = 0;
    72        DHCP = 1;
    73    }
    74
    75    string name = 1;
    76    NetworkMode mode = 2;
    77    string switch_name = 3;
    78    IpamType ipam_type = 4;
    79    repeated string subnet_ipaddress_prefix = 5;
    80    string default_gateway = 6;
    81    repeated string subnet_ipaddress_prefix_ipv6 = 7;
    82    string default_gateway_ipv6 = 8;
    83}
    84
    85message CreateNetworkResponse{
    86    string id = 1;
    87}
    88
    89message PortNameEndpointPolicySetting {
    90    string port_name = 1;
    91}
    92
    93message IovEndpointPolicySetting {
    94    uint32 iov_offload_weight = 1;
    95    uint32 queue_pairs_requested = 2;
    96    uint32 interrupt_moderation = 3;
    97}
    98
    99message DnsSetting {
   100    repeated string server_ip_addrs = 1;
   101    string domain = 2;
   102    repeated string search = 3;
   103}
   104
   105message CreateEndpointRequest {
   106    EndpointSettings endpoint_settings = 1;
   107}
   108
   109message EndpointSettings {
   110    oneof settings {
   111        HcnEndpointSettings hcn_endpoint = 1;
   112        NCProxyEndpointSettings ncproxy_endpoint = 2;
   113    }
   114}
   115
   116message HcnEndpointResponse {
   117    string namespace = 1;
   118    string id = 2;
   119    HcnEndpointSettings settings = 3;
   120}
   121
   122message HcnEndpointSettings {
   123    string name = 1;
   124    string macaddress = 2;
   125    string ipaddress = 3;
   126    uint32 ipaddress_prefixlength = 4;
   127    string network_name = 5;
   128    HcnEndpointPolicies policies = 6;
   129    DnsSetting dns_setting = 7;
   130    string ipv6address = 8;
   131    uint32 ipv6address_prefixlength = 9;
   132}
   133
   134message HcnEndpointPolicies {
   135    reserved 3 to 7;
   136    PortNameEndpointPolicySetting portname_policy_setting = 1;
   137    IovEndpointPolicySetting iov_policy_settings = 2;
   138}
   139
   140message NCProxyEndpointSettings {
   141    string name = 1;
   142    string macaddress = 2;
   143    string ipaddress = 3;
   144    uint32 ipaddress_prefixlength = 4;
   145    string network_name = 5;
   146    string default_gateway = 6;
   147    oneof device_details {
   148        PCIDeviceDetails pci_device_details = 7;
   149    }
   150    string ipv6address = 8;
   151    string ipv6address_prefixlength = 9;
   152}
   153
   154message PCIDeviceDetails {
   155    string device_id = 1;
   156    uint32 virtual_function_index = 2;
   157}
   158
   159message CreateEndpointResponse{
   160    string id = 1;
   161}
   162
   163message AddEndpointRequest {
   164    string name = 1;
   165    string namespace_id = 2;
   166    bool attach_to_host = 3;
   167}
   168
   169message AddEndpointResponse{}
   170
   171message DeleteEndpointRequest {
   172    string name = 1;
   173}
   174
   175message DeleteEndpointResponse{}
   176
   177message DeleteNetworkRequest{
   178    string name = 1;
   179}
   180
   181message DeleteNetworkResponse{}
   182
   183message GetEndpointRequest{
   184    string name = 1;
   185}
   186
   187message GetEndpointResponse{
   188    string namespace = 1;
   189    string id = 2;
   190    EndpointSettings endpoint = 3;
   191}
   192
   193message GetNetworkRequest{
   194    string name = 1;
   195}
   196
   197message GetNetworkResponse{
   198    string id = 1;
   199    Network network = 2;
   200    MacRange macRange = 3;
   201}
   202
   203message MacRange {
   204    string startMacAddress = 1;
   205    string endMacAddress = 2;
   206}
   207
   208message GetEndpointsRequest{}
   209
   210message GetEndpointsResponse{
   211    repeated GetEndpointResponse endpoints = 1;
   212}
   213
   214message GetNetworksRequest{}
   215
   216message GetNetworksResponse{
   217    repeated GetNetworkResponse networks = 1;
   218}

View as plain text