diff --git a/go.mod b/go.mod index 274ece95f3..b9a1ffe5c7 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/jsonschema v0.0.0-20200217214135-7152f22193c9 github.com/common-nighthawk/go-figure v0.0.0-20200609044655-c4b36f998cf2 github.com/coreos/go-iptables v0.5.0 - github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017 + github.com/docker/cli v24.0.2+incompatible github.com/docker/docker v20.10.12+incompatible github.com/fsouza/go-dockerclient v1.6.6 github.com/ghodss/yaml v1.0.0 @@ -21,16 +21,16 @@ require ( github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe github.com/mitchellh/go-ps v1.0.0 github.com/mitchellh/mapstructure v1.1.2 - github.com/moby/term v0.0.0-20200429084858-129dac9f73f6 + github.com/moby/term v0.5.0 github.com/namsral/flag v1.7.4-pre - github.com/olekukonko/tablewriter v0.0.4 + github.com/olekukonko/tablewriter v0.0.5 github.com/onsi/gomega v1.24.1 github.com/pkg/errors v0.9.1 github.com/pkg/profile v1.5.0 github.com/prometheus/client_golang v1.11.1 github.com/segmentio/textio v1.2.0 github.com/sirupsen/logrus v1.9.0 - github.com/spf13/cobra v1.5.0 + github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.0 github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d @@ -38,22 +38,22 @@ require ( github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 github.com/xeipuuv/gojsonschema v1.1.0 go.etcd.io/etcd/client/v3 v3.5.7 - go.fd.io/govpp v0.7.0 + go.fd.io/govpp v0.8.0 go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20230804085813-a0697d53e2c2 - golang.org/x/sys v0.3.0 + golang.org/x/sys v0.5.0 google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) require ( - github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/DataDog/zstd v1.3.5 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/Microsoft/hcsshim v0.9.3 // indirect github.com/Shopify/sarama v1.20.1 // indirect github.com/alicebob/miniredis v2.5.0+incompatible // indirect github.com/armon/go-metrics v0.3.9 // indirect - github.com/bennyscetbun/jsongo v1.1.0 // indirect + github.com/bennyscetbun/jsongo v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect github.com/bsm/sarama-cluster v2.1.15+incompatible // indirect @@ -63,7 +63,6 @@ require ( github.com/containerd/continuity v0.3.0 // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd/v22 v22.3.2 // indirect - github.com/creack/pty v1.1.11 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect @@ -94,11 +93,11 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/serf v0.9.6 // indirect github.com/howeyc/crc16 v0.0.0-20171223171357-2b2a61e366a6 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/magiconair/properties v1.8.1 // indirect github.com/mattn/go-colorable v0.1.8 // indirect github.com/mattn/go-isatty v0.0.12 // indirect - github.com/mattn/go-runewidth v0.0.7 // indirect + github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/moby/sys/mount v0.1.0 // indirect @@ -130,8 +129,8 @@ require ( go.uber.org/zap v1.17.0 // indirect golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect - golang.org/x/net v0.4.0 // indirect - golang.org/x/text v0.5.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/genproto v0.0.0-20220607223854-30acc4cbd2aa // indirect diff --git a/go.sum b/go.sum index 17254f0c29..115b788c3a 100644 --- a/go.sum +++ b/go.sum @@ -26,8 +26,9 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= @@ -97,8 +98,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/bennyscetbun/jsongo v1.1.0 h1:ZDSks3aLP13jhY139lWaUqZaU8G0tELMohzumut/KDM= -github.com/bennyscetbun/jsongo v1.1.0/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U= +github.com/bennyscetbun/jsongo v1.1.1 h1:ZlYkrwGtF5lKUOQh8t2Bn8XjCvwFI5Qdl6eBqZOtddE= +github.com/bennyscetbun/jsongo v1.1.1/go.mod h1:j5mIRkqjZ4eEoIKQyfVPQpv56ZX0rn+jPETkD/2dRqA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -270,8 +271,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= @@ -286,8 +286,9 @@ github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017 h1:2HQmlpI3yI9deH18Q6xiSOIjXD4sLI55Y/gfpa8/558= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v24.0.2+incompatible h1:QdqR7znue1mtkXIJ+ruQMGQhpw2JzMJLRXp6zpzF6tM= +github.com/docker/cli v24.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= @@ -563,8 +564,9 @@ github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.10.1 h1:iH+UZfsbRE6vpyZH7asAjTPWJf7RJbpZ9j/N3lDlKs0= @@ -633,8 +635,8 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.7 h1:Ei8KR0497xHyKJPAv59M1dkC+rOZCMBJ+t3fZ+twI54= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -673,8 +675,9 @@ github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vyg github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20200429084858-129dac9f73f6 h1:3Y9aosU6S5Bo8GYH0s+t1ej4m30GuUKvQ3c9ZLqdL28= github.com/moby/term v0.0.0-20200429084858-129dac9f73f6/go.mod h1:or9wGItza1sRcM4Wd3dIv8DsFHYQuFsMHEdxUIlUxms= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -701,8 +704,8 @@ github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -859,8 +862,8 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -955,8 +958,8 @@ go.etcd.io/etcd/client/v3 v3.5.7/go.mod h1:sOWmj9DZUMyAngS7QQwCyAXXAL6WhgTOPLNS/ go.etcd.io/etcd/pkg/v3 v3.5.7 h1:obOzeVwerFwZ9trMWapU/VjDcYUJb5OfgC1zqEGWO/0= go.etcd.io/etcd/raft/v3 v3.5.7 h1:aN79qxLmV3SvIq84aNTliYGmjwsW6NqJSnqmI1HLJKc= go.etcd.io/etcd/server/v3 v3.5.7 h1:BTBD8IJUV7YFgsczZMHhMTS67XuA4KpRquL0MFOJGRk= -go.fd.io/govpp v0.7.0 h1:8qideC7G0xPeYz2sjwni8GKWWbNk45Ev73oR1igKDYY= -go.fd.io/govpp v0.7.0/go.mod h1:VxUPq8HGQH6/9IL9saMURL3UcHsUuN8XmETuao5HA7o= +go.fd.io/govpp v0.8.0 h1:eUzJCM34Y528+gfcNxAzKu4cw3MdEk5z59wxVuI4+ck= +go.fd.io/govpp v0.8.0/go.mod h1:nuMKRRm5/uknVTKrRDhncrNJu0F+1AjMxLuC/+g+Z1k= go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20230804085813-a0697d53e2c2 h1:b2uFc9liC41+ezFGdVK+p105Tv92WemChQwUrlQxPRw= go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20230804085813-a0697d53e2c2/go.mod h1:1PFw7xC/TK/EBFwXul3ao3rHkTB00Va8PkQN9Rne70s= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= @@ -1080,8 +1083,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1178,16 +1181,17 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1196,8 +1200,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/plugins/vpp/binapi/vpp2202/ethernet_types/ethernet_types.ba.go b/plugins/vpp/binapi/vpp2202/ethernet_types/ethernet_types.ba.go index 6ef385b9ea..73f5a45af5 100644 --- a/plugins/vpp/binapi/vpp2202/ethernet_types/ethernet_types.ba.go +++ b/plugins/vpp/binapi/vpp2202/ethernet_types/ethernet_types.ba.go @@ -27,6 +27,12 @@ const ( // MacAddress defines alias 'mac_address'. type MacAddress [6]uint8 +func NewMacAddress(mac net.HardwareAddr) MacAddress { + var macaddr MacAddress + copy(macaddr[:], mac[:]) + return macaddr +} + func ParseMacAddress(s string) (MacAddress, error) { var macaddr MacAddress mac, err := net.ParseMAC(s) diff --git a/plugins/vpp/binapi/vpp2202/interface/interface_rpc.ba.go b/plugins/vpp/binapi/vpp2202/interface/interface_rpc.ba.go index d93675edf6..04f1f9666b 100644 --- a/plugins/vpp/binapi/vpp2202/interface/interface_rpc.ba.go +++ b/plugins/vpp/binapi/vpp2202/interface/interface_rpc.ba.go @@ -424,11 +424,12 @@ func (c *serviceClient_SwInterfaceTxPlacementGetClient) Recv() (*SwInterfaceTxPl return m, nil, nil case *SwInterfaceTxPlacementGetReply: if err := api.RetvalToVPPApiError(m.Retval); err != nil { - return nil, nil, err + c.Stream.Close() + return nil, m, err } err = c.Stream.Close() if err != nil { - return nil, nil, err + return nil, m, err } return nil, m, io.EOF default: diff --git a/plugins/vpp/binapi/vpp2202/ip/ip_rpc.ba.go b/plugins/vpp/binapi/vpp2202/ip/ip_rpc.ba.go index d29638abf7..a198b9732b 100644 --- a/plugins/vpp/binapi/vpp2202/ip/ip_rpc.ba.go +++ b/plugins/vpp/binapi/vpp2202/ip/ip_rpc.ba.go @@ -357,11 +357,12 @@ func (c *serviceClient_IPPathMtuGetClient) Recv() (*IPPathMtuDetails, *IPPathMtu return m, nil, nil case *IPPathMtuGetReply: if err := api.RetvalToVPPApiError(m.Retval); err != nil { - return nil, nil, err + c.Stream.Close() + return nil, m, err } err = c.Stream.Close() if err != nil { - return nil, nil, err + return nil, m, err } return nil, m, io.EOF default: diff --git a/plugins/vpp/binapi/vpp2202/ip_types/ip_types.ba.go b/plugins/vpp/binapi/vpp2202/ip_types/ip_types.ba.go index dd36d88ec2..7b694efc11 100644 --- a/plugins/vpp/binapi/vpp2202/ip_types/ip_types.ba.go +++ b/plugins/vpp/binapi/vpp2202/ip_types/ip_types.ba.go @@ -274,6 +274,11 @@ func (x IPProto) String() string { // AddressWithPrefix defines alias 'address_with_prefix'. type AddressWithPrefix Prefix +func NewAddressWithPrefix(network net.IPNet) AddressWithPrefix { + prefix := NewPrefix(network) + return AddressWithPrefix(prefix) +} + func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) { prefix, err := ParsePrefix(s) if err != nil { @@ -282,6 +287,10 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) { return AddressWithPrefix(prefix), nil } +func (x AddressWithPrefix) ToIPNet() *net.IPNet { + return Prefix(x).ToIPNet() +} + func (x AddressWithPrefix) String() string { return Prefix(x).String() } @@ -302,10 +311,16 @@ func (x *AddressWithPrefix) UnmarshalText(text []byte) error { // IP4Address defines alias 'ip4_address'. type IP4Address [4]uint8 +func NewIP4Address(ip net.IP) IP4Address { + var ipaddr IP4Address + copy(ipaddr[:], ip.To4()) + return ipaddr +} + func ParseIP4Address(s string) (IP4Address, error) { ip := net.ParseIP(s).To4() if ip == nil { - return IP4Address{}, fmt.Errorf("invalid IP address: %s", s) + return IP4Address{}, fmt.Errorf("invalid IP4 address: %s", s) } var ipaddr IP4Address copy(ipaddr[:], ip.To4()) @@ -339,10 +354,16 @@ type IP4AddressWithPrefix IP4Prefix // IP6Address defines alias 'ip6_address'. type IP6Address [16]uint8 +func NewIP6Address(ip net.IP) IP6Address { + var ipaddr IP6Address + copy(ipaddr[:], ip.To16()) + return ipaddr +} + func ParseIP6Address(s string) (IP6Address, error) { ip := net.ParseIP(s).To16() if ip == nil { - return IP6Address{}, fmt.Errorf("invalid IP address: %s", s) + return IP6Address{}, fmt.Errorf("invalid IP6 address: %s", s) } var ipaddr IP6Address copy(ipaddr[:], ip.To16()) @@ -379,15 +400,7 @@ type Address struct { Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"` } -func ParseAddress(s string) (Address, error) { - ip := net.ParseIP(s) - if ip == nil { - return Address{}, fmt.Errorf("invalid address: %s", s) - } - return AddressFromIP(ip), nil -} - -func AddressFromIP(ip net.IP) Address { +func NewAddress(ip net.IP) Address { var addr Address if ip.To4() == nil { addr.Af = ADDRESS_IP6 @@ -403,6 +416,14 @@ func AddressFromIP(ip net.IP) Address { return addr } +func ParseAddress(s string) (Address, error) { + ip := net.ParseIP(s) + if ip == nil { + return Address{}, fmt.Errorf("invalid IP address: %s", s) + } + return NewAddress(ip), nil +} + func (x Address) ToIP() net.IP { if x.Af == ADDRESS_IP6 { ip6 := x.Un.GetIP6() @@ -442,18 +463,26 @@ type IP4Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewIP4Prefix(network net.IPNet) IP4Prefix { + var prefix IP4Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewIP4Address(network.IP) + return prefix +} + func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) { hasPrefix := strings.Contains(s, "/") if hasPrefix { ip, network, err := net.ParseCIDR(s) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } maskSize, _ := network.Mask.Size() prefix.Len = byte(maskSize) prefix.Address, err = ParseIP4Address(ip.String()) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } } else { ip := net.ParseIP(s) @@ -464,7 +493,7 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) { prefix.Len = byte(defaultMaskSize) prefix.Address, err = ParseIP4Address(ip.String()) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } } return prefix, nil @@ -506,18 +535,26 @@ type IP6Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewIP6Prefix(network net.IPNet) IP6Prefix { + var prefix IP6Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewIP6Address(network.IP) + return prefix +} + func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) { hasPrefix := strings.Contains(s, "/") if hasPrefix { ip, network, err := net.ParseCIDR(s) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } maskSize, _ := network.Mask.Size() prefix.Len = byte(maskSize) prefix.Address, err = ParseIP6Address(ip.String()) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } } else { ip := net.ParseIP(s) @@ -528,7 +565,7 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) { prefix.Len = byte(defaultMaskSize) prefix.Address, err = ParseIP6Address(ip.String()) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } } return prefix, nil @@ -572,6 +609,14 @@ type Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewPrefix(network net.IPNet) Prefix { + var prefix Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewAddress(network.IP) + return prefix +} + func ParsePrefix(ip string) (prefix Prefix, err error) { hasPrefix := strings.Contains(ip, "/") if hasPrefix { diff --git a/plugins/vpp/binapi/vpp2202/ipfix_export/ipfix_export_rpc.ba.go b/plugins/vpp/binapi/vpp2202/ipfix_export/ipfix_export_rpc.ba.go index 0f93003f50..7fe90f45b0 100644 --- a/plugins/vpp/binapi/vpp2202/ipfix_export/ipfix_export_rpc.ba.go +++ b/plugins/vpp/binapi/vpp2202/ipfix_export/ipfix_export_rpc.ba.go @@ -63,11 +63,12 @@ func (c *serviceClient_IpfixAllExporterGetClient) Recv() (*IpfixAllExporterDetai return m, nil, nil case *IpfixAllExporterGetReply: if err := api.RetvalToVPPApiError(m.Retval); err != nil { - return nil, nil, err + c.Stream.Close() + return nil, m, err } err = c.Stream.Close() if err != nil { - return nil, nil, err + return nil, m, err } return nil, m, io.EOF default: diff --git a/plugins/vpp/binapi/vpp2202/vpp2202.go b/plugins/vpp/binapi/vpp2202/vpp2202.go index 8ae7ffb93a..1bc34dbdcd 100644 --- a/plugins/vpp/binapi/vpp2202/vpp2202.go +++ b/plugins/vpp/binapi/vpp2202/vpp2202.go @@ -108,41 +108,5 @@ func init() { } //go:generate -command binapigen binapi-generator --no-version-info --output-dir=. -//go:generate binapigen --input-file=$VPP_API_DIR/core/af_packet.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/arp.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/bond.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/gre.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/interface.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ip.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ip6_nd.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ip_neighbor.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ipfix_export.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ipip.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ipsec.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/l2.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/memclnt.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/punt.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/rd_cp.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/span.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/sr.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/tapv2.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/teib.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vlib.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vpe.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vxlan.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vxlan_gpe.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/abf.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/acl.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/dhcp.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/dns.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/flowprobe.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/gtpu.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/l3xc.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/memif.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/nat44_ed.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/nat44_ei.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/rdma.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/stn.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/vmxnet3.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/wireguard.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/vrrp.api.json +//go:generate binapigen --input=$VPP_API_DIR/core/ +//go:generate binapigen --input=$VPP_API_DIR/plugins/ diff --git a/plugins/vpp/binapi/vpp2210/ethernet_types/ethernet_types.ba.go b/plugins/vpp/binapi/vpp2210/ethernet_types/ethernet_types.ba.go index 6ef385b9ea..73f5a45af5 100644 --- a/plugins/vpp/binapi/vpp2210/ethernet_types/ethernet_types.ba.go +++ b/plugins/vpp/binapi/vpp2210/ethernet_types/ethernet_types.ba.go @@ -27,6 +27,12 @@ const ( // MacAddress defines alias 'mac_address'. type MacAddress [6]uint8 +func NewMacAddress(mac net.HardwareAddr) MacAddress { + var macaddr MacAddress + copy(macaddr[:], mac[:]) + return macaddr +} + func ParseMacAddress(s string) (MacAddress, error) { var macaddr MacAddress mac, err := net.ParseMAC(s) diff --git a/plugins/vpp/binapi/vpp2210/interface/interface_rpc.ba.go b/plugins/vpp/binapi/vpp2210/interface/interface_rpc.ba.go index bbfff7e8ee..7a07507829 100644 --- a/plugins/vpp/binapi/vpp2210/interface/interface_rpc.ba.go +++ b/plugins/vpp/binapi/vpp2210/interface/interface_rpc.ba.go @@ -424,11 +424,12 @@ func (c *serviceClient_SwInterfaceTxPlacementGetClient) Recv() (*SwInterfaceTxPl return m, nil, nil case *SwInterfaceTxPlacementGetReply: if err := api.RetvalToVPPApiError(m.Retval); err != nil { - return nil, nil, err + c.Stream.Close() + return nil, m, err } err = c.Stream.Close() if err != nil { - return nil, nil, err + return nil, m, err } return nil, m, io.EOF default: diff --git a/plugins/vpp/binapi/vpp2210/ip/ip_rpc.ba.go b/plugins/vpp/binapi/vpp2210/ip/ip_rpc.ba.go index 1e5ff8d5f0..d23dbe4128 100644 --- a/plugins/vpp/binapi/vpp2210/ip/ip_rpc.ba.go +++ b/plugins/vpp/binapi/vpp2210/ip/ip_rpc.ba.go @@ -377,11 +377,12 @@ func (c *serviceClient_IPPathMtuGetClient) Recv() (*IPPathMtuDetails, *IPPathMtu return m, nil, nil case *IPPathMtuGetReply: if err := api.RetvalToVPPApiError(m.Retval); err != nil { - return nil, nil, err + c.Stream.Close() + return nil, m, err } err = c.Stream.Close() if err != nil { - return nil, nil, err + return nil, m, err } return nil, m, io.EOF default: diff --git a/plugins/vpp/binapi/vpp2210/ip_types/ip_types.ba.go b/plugins/vpp/binapi/vpp2210/ip_types/ip_types.ba.go index dd36d88ec2..7b694efc11 100644 --- a/plugins/vpp/binapi/vpp2210/ip_types/ip_types.ba.go +++ b/plugins/vpp/binapi/vpp2210/ip_types/ip_types.ba.go @@ -274,6 +274,11 @@ func (x IPProto) String() string { // AddressWithPrefix defines alias 'address_with_prefix'. type AddressWithPrefix Prefix +func NewAddressWithPrefix(network net.IPNet) AddressWithPrefix { + prefix := NewPrefix(network) + return AddressWithPrefix(prefix) +} + func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) { prefix, err := ParsePrefix(s) if err != nil { @@ -282,6 +287,10 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) { return AddressWithPrefix(prefix), nil } +func (x AddressWithPrefix) ToIPNet() *net.IPNet { + return Prefix(x).ToIPNet() +} + func (x AddressWithPrefix) String() string { return Prefix(x).String() } @@ -302,10 +311,16 @@ func (x *AddressWithPrefix) UnmarshalText(text []byte) error { // IP4Address defines alias 'ip4_address'. type IP4Address [4]uint8 +func NewIP4Address(ip net.IP) IP4Address { + var ipaddr IP4Address + copy(ipaddr[:], ip.To4()) + return ipaddr +} + func ParseIP4Address(s string) (IP4Address, error) { ip := net.ParseIP(s).To4() if ip == nil { - return IP4Address{}, fmt.Errorf("invalid IP address: %s", s) + return IP4Address{}, fmt.Errorf("invalid IP4 address: %s", s) } var ipaddr IP4Address copy(ipaddr[:], ip.To4()) @@ -339,10 +354,16 @@ type IP4AddressWithPrefix IP4Prefix // IP6Address defines alias 'ip6_address'. type IP6Address [16]uint8 +func NewIP6Address(ip net.IP) IP6Address { + var ipaddr IP6Address + copy(ipaddr[:], ip.To16()) + return ipaddr +} + func ParseIP6Address(s string) (IP6Address, error) { ip := net.ParseIP(s).To16() if ip == nil { - return IP6Address{}, fmt.Errorf("invalid IP address: %s", s) + return IP6Address{}, fmt.Errorf("invalid IP6 address: %s", s) } var ipaddr IP6Address copy(ipaddr[:], ip.To16()) @@ -379,15 +400,7 @@ type Address struct { Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"` } -func ParseAddress(s string) (Address, error) { - ip := net.ParseIP(s) - if ip == nil { - return Address{}, fmt.Errorf("invalid address: %s", s) - } - return AddressFromIP(ip), nil -} - -func AddressFromIP(ip net.IP) Address { +func NewAddress(ip net.IP) Address { var addr Address if ip.To4() == nil { addr.Af = ADDRESS_IP6 @@ -403,6 +416,14 @@ func AddressFromIP(ip net.IP) Address { return addr } +func ParseAddress(s string) (Address, error) { + ip := net.ParseIP(s) + if ip == nil { + return Address{}, fmt.Errorf("invalid IP address: %s", s) + } + return NewAddress(ip), nil +} + func (x Address) ToIP() net.IP { if x.Af == ADDRESS_IP6 { ip6 := x.Un.GetIP6() @@ -442,18 +463,26 @@ type IP4Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewIP4Prefix(network net.IPNet) IP4Prefix { + var prefix IP4Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewIP4Address(network.IP) + return prefix +} + func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) { hasPrefix := strings.Contains(s, "/") if hasPrefix { ip, network, err := net.ParseCIDR(s) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } maskSize, _ := network.Mask.Size() prefix.Len = byte(maskSize) prefix.Address, err = ParseIP4Address(ip.String()) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } } else { ip := net.ParseIP(s) @@ -464,7 +493,7 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) { prefix.Len = byte(defaultMaskSize) prefix.Address, err = ParseIP4Address(ip.String()) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } } return prefix, nil @@ -506,18 +535,26 @@ type IP6Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewIP6Prefix(network net.IPNet) IP6Prefix { + var prefix IP6Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewIP6Address(network.IP) + return prefix +} + func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) { hasPrefix := strings.Contains(s, "/") if hasPrefix { ip, network, err := net.ParseCIDR(s) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } maskSize, _ := network.Mask.Size() prefix.Len = byte(maskSize) prefix.Address, err = ParseIP6Address(ip.String()) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } } else { ip := net.ParseIP(s) @@ -528,7 +565,7 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) { prefix.Len = byte(defaultMaskSize) prefix.Address, err = ParseIP6Address(ip.String()) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } } return prefix, nil @@ -572,6 +609,14 @@ type Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewPrefix(network net.IPNet) Prefix { + var prefix Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewAddress(network.IP) + return prefix +} + func ParsePrefix(ip string) (prefix Prefix, err error) { hasPrefix := strings.Contains(ip, "/") if hasPrefix { diff --git a/plugins/vpp/binapi/vpp2210/ipfix_export/ipfix_export_rpc.ba.go b/plugins/vpp/binapi/vpp2210/ipfix_export/ipfix_export_rpc.ba.go index f81e371d0d..f88236c83b 100644 --- a/plugins/vpp/binapi/vpp2210/ipfix_export/ipfix_export_rpc.ba.go +++ b/plugins/vpp/binapi/vpp2210/ipfix_export/ipfix_export_rpc.ba.go @@ -63,11 +63,12 @@ func (c *serviceClient_IpfixAllExporterGetClient) Recv() (*IpfixAllExporterDetai return m, nil, nil case *IpfixAllExporterGetReply: if err := api.RetvalToVPPApiError(m.Retval); err != nil { - return nil, nil, err + c.Stream.Close() + return nil, m, err } err = c.Stream.Close() if err != nil { - return nil, nil, err + return nil, m, err } return nil, m, io.EOF default: diff --git a/plugins/vpp/binapi/vpp2210/vpp2210.go b/plugins/vpp/binapi/vpp2210/vpp2210.go index 561c779d44..7d92640613 100644 --- a/plugins/vpp/binapi/vpp2210/vpp2210.go +++ b/plugins/vpp/binapi/vpp2210/vpp2210.go @@ -108,41 +108,5 @@ func init() { } //go:generate -command binapigen binapi-generator --no-version-info --output-dir=. -//go:generate binapigen --input-file=$VPP_API_DIR/core/af_packet.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/arp.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/bond.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/gre.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/interface.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ip.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ip6_nd.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ip_neighbor.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ipfix_export.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ipip.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ipsec.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/l2.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/memclnt.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/punt.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/rd_cp.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/span.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/sr.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/tapv2.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/teib.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vlib.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vpe.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vxlan.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vxlan_gpe.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/abf.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/acl.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/dhcp.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/dns.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/flowprobe.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/gtpu.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/l3xc.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/memif.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/nat44_ed.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/nat44_ei.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/rdma.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/stn.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/vmxnet3.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/wireguard.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/vrrp.api.json +//go:generate binapigen --input=$VPP_API_DIR/core +//go:generate binapigen --input=$VPP_API_DIR/plugins diff --git a/plugins/vpp/binapi/vpp2306/arp/arp.ba.go b/plugins/vpp/binapi/vpp2306/arp/arp.ba.go index 7924f6dc16..80746af1d1 100644 --- a/plugins/vpp/binapi/vpp2306/arp/arp.ba.go +++ b/plugins/vpp/binapi/vpp2306/arp/arp.ba.go @@ -34,6 +34,10 @@ type ProxyArp struct { Hi ip_types.IP4Address `binapi:"ip4_address,name=hi" json:"hi,omitempty"` } +// Proxy ARP add / del request +// - is_add - 1 if adding the Proxy ARP range, 0 if deleting +// - proxy - Proxy configuration +// // ProxyArpAddDel defines message 'proxy_arp_add_del'. type ProxyArpAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -110,6 +114,9 @@ func (m *ProxyArpAddDelReply) Unmarshal(b []byte) error { return nil } +// Proxy ARP dump details reply +// - - proxy - Same data as used to configure +// // ProxyArpDetails defines message 'proxy_arp_details'. type ProxyArpDetails struct { Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"` @@ -149,6 +156,7 @@ func (m *ProxyArpDetails) Unmarshal(b []byte) error { return nil } +// Proxy ARP dump request // ProxyArpDump defines message 'proxy_arp_dump'. type ProxyArpDump struct{} @@ -176,6 +184,9 @@ func (m *ProxyArpDump) Unmarshal(b []byte) error { return nil } +// Proxy ARP interface dump details reply +// - - sw_if_index The interface on which ARP proxy is enabled. +// // ProxyArpIntfcDetails defines message 'proxy_arp_intfc_details'. type ProxyArpIntfcDetails struct { SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -209,6 +220,7 @@ func (m *ProxyArpIntfcDetails) Unmarshal(b []byte) error { return nil } +// Proxy ARP interface dump request // ProxyArpIntfcDump defines message 'proxy_arp_intfc_dump'. type ProxyArpIntfcDump struct{} @@ -236,6 +248,10 @@ func (m *ProxyArpIntfcDump) Unmarshal(b []byte) error { return nil } +// Proxy ARP add / del interface request +// - sw_if_index - Which interface to enable / disable Proxy Arp on +// - enable - 1 to enable Proxy ARP on interface, 0 to disable +// // ProxyArpIntfcEnableDisable defines message 'proxy_arp_intfc_enable_disable'. type ProxyArpIntfcEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/bond/bond.ba.go b/plugins/vpp/binapi/vpp2306/bond/bond.ba.go index 1234d70cd2..0dd735c7aa 100644 --- a/plugins/vpp/binapi/vpp2306/bond/bond.ba.go +++ b/plugins/vpp/binapi/vpp2306/bond/bond.ba.go @@ -103,6 +103,12 @@ func (x BondMode) String() string { return "BondMode(" + strconv.Itoa(int(x)) + ")" } +// Initialize a new bond interface with the given paramters +// - sw_if_index - member sw_if_index +// - bond_sw_if_index - bond sw_if_index +// - is_passive - interface does not initiate the lacp protocol, remote must be active speaker +// - is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout +// // BondAddMember defines message 'bond_add_member'. type BondAddMember struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -148,6 +154,9 @@ func (m *BondAddMember) Unmarshal(b []byte) error { return nil } +// Reply for bond add_member reply +// - retval - return code +// // BondAddMemberReply defines message 'bond_add_member_reply'. type BondAddMemberReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -181,6 +190,14 @@ func (m *BondAddMemberReply) Unmarshal(b []byte) error { return nil } +// Initialize a new bond interface with the given paramters +// - id - if non-~0, specifies a custom interface ID +// - use_custom_mac - if set, mac_address is valid +// - mac_address - mac addr to assign to the interface if use_custom_mac is set +// - mode - mode, required (1=round-robin, 2=active-backup, 3=xor, 4=broadcast, 5=lacp) +// - lb - load balance, optional (0=l2, 1=l34, 2=l23) valid for xor and lacp modes. Otherwise ignored +// - numa_only - if numa_only is set, pkts will be transmitted by LAG members on local numa node only if have at least one, otherwise it works as usual. +// // BondCreate defines message 'bond_create'. // Deprecated: the message will be removed in the future versions type BondCreate struct { @@ -235,6 +252,15 @@ func (m *BondCreate) Unmarshal(b []byte) error { return nil } +// Initialize a new bond interface with the given paramters +// - mode - mode, required (1=round-robin, 2=active-backup, 3=xor, 4=broadcast, 5=lacp) +// - lb - load balance, optional (0=l2, 1=l34, 2=l23) valid for xor and lacp modes. Otherwise ignored (default=l2) +// - numa_only - if numa_only is set, pkts will be transmitted by LAG members on local numa node only if have at least one, otherwise it works as usual. +// - enable_gso - enable gso support (default 0) +// - use_custom_mac - if set, mac_address is valid +// - mac_address - mac addr to assign to the interface if use_custom_mac is set +// - id - if non-~0, specifies a custom interface ID (default=0xFFFFFFFF) +// // BondCreate2 defines message 'bond_create2'. type BondCreate2 struct { Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"` @@ -292,6 +318,10 @@ func (m *BondCreate2) Unmarshal(b []byte) error { return nil } +// Reply for bond create2 reply +// - retval - return code +// - sw_if_index - software index allocated for the new tap interface +// // BondCreate2Reply defines message 'bond_create2_reply'. type BondCreate2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -329,6 +359,10 @@ func (m *BondCreate2Reply) Unmarshal(b []byte) error { return nil } +// Reply for bond create reply +// - retval - return code +// - sw_if_index - software index allocated for the new tap interface +// // BondCreateReply defines message 'bond_create_reply'. type BondCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -366,6 +400,9 @@ func (m *BondCreateReply) Unmarshal(b []byte) error { return nil } +// Delete bond interface +// - sw_if_index - interface index of member interface +// // BondDelete defines message 'bond_delete'. type BondDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -432,6 +469,9 @@ func (m *BondDeleteReply) Unmarshal(b []byte) error { return nil } +// bond detach member +// - sw_if_index - interface index of member interface +// // BondDetachMember defines message 'bond_detach_member'. type BondDetachMember struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -498,6 +538,9 @@ func (m *BondDetachMemberReply) Unmarshal(b []byte) error { return nil } +// bond detach slave +// - sw_if_index - interface index of member interface +// // BondDetachSlave defines message 'bond_detach_slave'. // Deprecated: the message will be removed in the future versions type BondDetachSlave struct { @@ -566,6 +609,12 @@ func (m *BondDetachSlaveReply) Unmarshal(b []byte) error { return nil } +// Initialize a new bond interface with the given paramters +// - sw_if_index - slave sw_if_index +// - bond_sw_if_index - bond sw_if_index +// - is_passive - interface does not initiate the lacp protocol, remote must be active speaker +// - is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout +// // BondEnslave defines message 'bond_enslave'. // Deprecated: the message will be removed in the future versions type BondEnslave struct { @@ -612,6 +661,9 @@ func (m *BondEnslave) Unmarshal(b []byte) error { return nil } +// Reply for bond enslave reply +// - retval - return code +// // BondEnslaveReply defines message 'bond_enslave_reply'. type BondEnslaveReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -645,6 +697,16 @@ func (m *BondEnslaveReply) Unmarshal(b []byte) error { return nil } +// Reply for bond dump request +// - sw_if_index - software index of bond interface +// - id - ID of interface +// - mode - bonding mode +// - lb - load balance algo +// - numa_only - enable local numa TX for lacp mode +// - active_members - active members count +// - members - config member count +// - interface_name - name of interface +// // SwBondInterfaceDetails defines message 'sw_bond_interface_details'. type SwBondInterfaceDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -706,6 +768,7 @@ func (m *SwBondInterfaceDetails) Unmarshal(b []byte) error { return nil } +// Dump bond interfaces request // SwBondInterfaceDump defines message 'sw_bond_interface_dump'. type SwBondInterfaceDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -739,6 +802,16 @@ func (m *SwBondInterfaceDump) Unmarshal(b []byte) error { return nil } +// Reply for bond dump request +// - sw_if_index - software index of bond interface +// - id - ID of interface +// - interface_name - name of interface +// - mode - bonding mode +// - lb - load balance algo +// - numa_only - enable local numa TX for lacp mode +// - active_slaves - active member count +// - slaves - config member count +// // SwInterfaceBondDetails defines message 'sw_interface_bond_details'. type SwInterfaceBondDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -800,6 +873,7 @@ func (m *SwInterfaceBondDetails) Unmarshal(b []byte) error { return nil } +// Dump bond interfaces request // SwInterfaceBondDump defines message 'sw_interface_bond_dump'. // Deprecated: the message will be removed in the future versions type SwInterfaceBondDump struct{} @@ -828,6 +902,10 @@ func (m *SwInterfaceBondDump) Unmarshal(b []byte) error { return nil } +// Interface set bond weight +// - sw_if_index - member interface for which to set the weight +// - weight - weight value to be set for the member interface +// // SwInterfaceSetBondWeight defines message 'sw_interface_set_bond_weight'. type SwInterfaceSetBondWeight struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -900,6 +978,14 @@ func (m *SwInterfaceSetBondWeightReply) Unmarshal(b []byte) error { return nil } +// Reply for slave dump request +// - sw_if_index - software index of slave interface +// - interface_name - name of interface +// - is_passve - interface does not initiate the lacp protocol, remote must be active speaker +// - is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout +// - is_local_numa - the slave interface is local numa +// - weight - the weight for the slave interface (active-backup mode only) +// // SwInterfaceSlaveDetails defines message 'sw_interface_slave_details'. type SwInterfaceSlaveDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -953,6 +1039,9 @@ func (m *SwInterfaceSlaveDetails) Unmarshal(b []byte) error { return nil } +// bond slave dump +// - sw_if_index - interface index of bond interface +// // SwInterfaceSlaveDump defines message 'sw_interface_slave_dump'. // Deprecated: the message will be removed in the future versions type SwInterfaceSlaveDump struct { @@ -987,6 +1076,14 @@ func (m *SwInterfaceSlaveDump) Unmarshal(b []byte) error { return nil } +// Reply for member dump request +// - sw_if_index - software index of member interface +// - interface_name - name of interface +// - is_passve - interface does not initiate the lacp protocol, remote must be active speaker +// - is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout +// - is_local_numa - the member interface is local numa +// - weight - the weight for the member interface (active-backup mode only) +// // SwMemberInterfaceDetails defines message 'sw_member_interface_details'. type SwMemberInterfaceDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1040,6 +1137,9 @@ func (m *SwMemberInterfaceDetails) Unmarshal(b []byte) error { return nil } +// bond member dump +// - sw_if_index - interface index of bond interface +// // SwMemberInterfaceDump defines message 'sw_member_interface_dump'. type SwMemberInterfaceDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/ethernet_types/ethernet_types.ba.go b/plugins/vpp/binapi/vpp2306/ethernet_types/ethernet_types.ba.go index 6ef385b9ea..73f5a45af5 100644 --- a/plugins/vpp/binapi/vpp2306/ethernet_types/ethernet_types.ba.go +++ b/plugins/vpp/binapi/vpp2306/ethernet_types/ethernet_types.ba.go @@ -27,6 +27,12 @@ const ( // MacAddress defines alias 'mac_address'. type MacAddress [6]uint8 +func NewMacAddress(mac net.HardwareAddr) MacAddress { + var macaddr MacAddress + copy(macaddr[:], mac[:]) + return macaddr +} + func ParseMacAddress(s string) (MacAddress, error) { var macaddr MacAddress mac, err := net.ParseMAC(s) diff --git a/plugins/vpp/binapi/vpp2306/interface/interface.ba.go b/plugins/vpp/binapi/vpp2306/interface/interface.ba.go index 8a863e85e6..42119946c2 100644 --- a/plugins/vpp/binapi/vpp2306/interface/interface.ba.go +++ b/plugins/vpp/binapi/vpp2306/interface/interface.ba.go @@ -26,6 +26,11 @@ const ( VersionCrc = 0x49616418 ) +// Enable or disable detailed interface stats +// - sw_if_index - The interface to collect detail stats on. ~0 implies +// all interfaces. +// - enable_disable - set to 1 to enable, 0 to disable detailed stats +// // CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'. type CollectDetailedInterfaceStats struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -100,6 +105,9 @@ func (m *CollectDetailedInterfaceStatsReply) Unmarshal(b []byte) error { return nil } +// Create loopback interface request +// - mac_address - mac addr to assign to the interface if none-zero +// // CreateLoopback defines message 'create_loopback'. type CreateLoopback struct { MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"` @@ -133,6 +141,11 @@ func (m *CreateLoopback) Unmarshal(b []byte) error { return nil } +// Create loopback interface instance request +// - mac_address - mac addr to assign to the interface if none-zero +// - is_specified - if non-0, a specific user_instance is being requested +// - user_instance - requested instance, ~0 => dynamically allocate +// // CreateLoopbackInstance defines message 'create_loopback_instance'. type CreateLoopbackInstance struct { MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"` @@ -174,6 +187,10 @@ func (m *CreateLoopbackInstance) Unmarshal(b []byte) error { return nil } +// Create loopback interface instance response +// - sw_if_index - sw index of the interface that was created +// - retval - return code for the request +// // CreateLoopbackInstanceReply defines message 'create_loopback_instance_reply'. type CreateLoopbackInstanceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -211,6 +228,10 @@ func (m *CreateLoopbackInstanceReply) Unmarshal(b []byte) error { return nil } +// Create loopback interface response +// - sw_if_index - sw index of the interface that was created +// - retval - return code for the request +// // CreateLoopbackReply defines message 'create_loopback_reply'. type CreateLoopbackReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -334,6 +355,10 @@ func (m *CreateSubifReply) Unmarshal(b []byte) error { return nil } +// Create a new subinterface with the given vlan id +// - sw_if_index - software index of the new vlan's parent interface +// - vlan_id - vlan tag of the new interface +// // CreateVlanSubif defines message 'create_vlan_subif'. type CreateVlanSubif struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -371,6 +396,10 @@ func (m *CreateVlanSubif) Unmarshal(b []byte) error { return nil } +// Reply for the vlan subinterface create request +// - retval - return code +// - sw_if_index - software index allocated for the new subinterface +// // CreateVlanSubifReply defines message 'create_vlan_subif_reply'. type CreateVlanSubifReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -408,6 +437,9 @@ func (m *CreateVlanSubifReply) Unmarshal(b []byte) error { return nil } +// Delete loopback interface request +// - sw_if_index - sw index of the interface that was created +// // DeleteLoopback defines message 'delete_loopback'. type DeleteLoopback struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -474,6 +506,9 @@ func (m *DeleteLoopbackReply) Unmarshal(b []byte) error { return nil } +// Delete sub interface request +// - sw_if_index - sw index of the interface that was created by create_subif +// // DeleteSubif defines message 'delete_subif'. type DeleteSubif struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -540,6 +575,10 @@ func (m *DeleteSubifReply) Unmarshal(b []byte) error { return nil } +// Set interface physical MTU +// - sw_if_index - index of the interface to set MTU on +// - mtu - MTU +// // HwInterfaceSetMtu defines message 'hw_interface_set_mtu'. type HwInterfaceSetMtu struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -610,6 +649,7 @@ func (m *HwInterfaceSetMtuReply) Unmarshal(b []byte) error { return nil } +// /* Gross kludge, DGMS // InterfaceNameRenumber defines message 'interface_name_renumber'. type InterfaceNameRenumber struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -740,6 +780,20 @@ func (m *PcapTraceOffReply) Unmarshal(b []byte) error { return nil } +// pcap_trace_on +// - capture_rx - capture received packets +// - capture_tx - capture transmitted packets +// - capture_drop - capture dropped packets +// - filter - is a filter is being used on this capture +// - preallocate_data - preallocate the data buffer +// - free_data - free the data buffer +// - max_packets - depth of local buffer +// - max_bytes_per_packet - maximum number of bytes to capture +// for each packet +// - sw_if_index - specify a given interface, or 0 for any +// - error - filter packets based on a specific error. +// - filename - output filename, will be placed in /tmp +// // PcapTraceOn defines message 'pcap_trace_on'. type PcapTraceOn struct { CaptureRx bool `binapi:"bool,name=capture_rx" json:"capture_rx,omitempty"` @@ -846,6 +900,12 @@ func (m *PcapTraceOnReply) Unmarshal(b []byte) error { return nil } +// Set or delete one or all ip addresses on a specified interface +// - sw_if_index - index of the interface to add/del addresses +// - is_add - add address if non-zero, else delete +// - del_all - if non-zero delete all addresses on the interface +// - prefix - address + a prefix length for the implied connected route +// // SwInterfaceAddDelAddress defines message 'sw_interface_add_del_address'. type SwInterfaceAddDelAddress struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -932,6 +992,11 @@ func (m *SwInterfaceAddDelAddressReply) Unmarshal(b []byte) error { return nil } +// Add or delete a secondary MAC address on an interface +// - sw_if_index - the interface whose MAC will be set +// - mac_addr - the new MAC address +// - is_add - 0 to delete, != 0 to add +// // SwInterfaceAddDelMacAddress defines message 'sw_interface_add_del_mac_address'. type SwInterfaceAddDelMacAddress struct { SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1010,6 +1075,21 @@ func (m *SwInterfaceAddDelMacAddressReply) Unmarshal(b []byte) error { return nil } +// IP interface address replace begin +// +// The use-case is that, for some unspecified reason, the control plane +// has a different set of interface addresses than VPP +// currently has. The CP would thus like to 'replace' VPP's set +// only by specifying what the new set shall be, i.e. it is not +// going to delete anything that already eixts, rather, is wants any +// unspecified interface addresses to be deleted implicitly. +// The CP declares the start of this procedure with this replace_begin +// API Call, and when it has populated all addresses it wants, it calls +// the below replace_end API. From this point on it is of course free +// to add and delete interface addresses as usual. +// The underlying mechanism by which VPP implements this replace is +// intentionally left unspecified. +// // SwInterfaceAddressReplaceBegin defines message 'sw_interface_address_replace_begin'. type SwInterfaceAddressReplaceBegin struct{} @@ -1074,6 +1154,10 @@ func (m *SwInterfaceAddressReplaceBeginReply) Unmarshal(b []byte) error { return nil } +// IP interface address replace end +// +// see ip_interface_address_replace_begin description. +// // SwInterfaceAddressReplaceEnd defines message 'sw_interface_address_replace_end'. type SwInterfaceAddressReplaceEnd struct{} @@ -1138,6 +1222,9 @@ func (m *SwInterfaceAddressReplaceEndReply) Unmarshal(b []byte) error { return nil } +// Clear interface statistics +// - sw_if_index - index of the interface to clear statistics +// // SwInterfaceClearStats defines message 'sw_interface_clear_stats'. type SwInterfaceClearStats struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1204,6 +1291,33 @@ func (m *SwInterfaceClearStatsReply) Unmarshal(b []byte) error { return nil } +// Interface details structure (fix this) +// - sw_if_index - index of the interface +// - sup_sw_if_index - index of parent interface if any, else same as sw_if_index +// - l2_address - the interface's l2 address +// - flags - interface_status flags +// - type - interface type +// - link_duplex - 1 if half duplex, 2 if full duplex +// - link_speed - value in kbps +// - link_MTU - max. transmission unit +// - sub_id - A number 0-N to uniquely identify this subif on super if +// - sub_number_of_tags - Number of tags (0 - 2) +// - sub_outer_vlan_id +// - sub_inner_vlan_id +// - sub_if_flags - sub interface flags +// - vtr_op - vlan tag rewrite operation +// - vtr_push_dot1q +// - vtr_tag1 +// - vtr_tag2 +// - pbb_outer_tag - translate pbb s-tag +// - pbb_b_dmac[6] - B-tag remote mac address +// - pbb_b_smac[6] - B-tag local mac address +// - pbb_b_vlanid - B-tag vlanid +// - pbb_i_sid - I-tag service id +// - interface_name - name of the interface +// - interface_dev_type - device type of the interface +// - tag - an ascii tag +// // SwInterfaceDetails defines message 'sw_interface_details'. type SwInterfaceDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1346,6 +1460,13 @@ func (m *SwInterfaceDetails) Unmarshal(b []byte) error { return nil } +// Request all or filtered subset of sw_interface_details +// - sw_if_index - index of the interface to dump info on, 0 or ~0 if on all +// TODO: Support selecting only index==0 when CSIT is ready. +// - name_filter_valid - 1 if requesting a filtered subset of records else 0 +// if name filter is set as valid, sw_if_index value is ignored and all interfaces are examined +// - name_filter - interface name substring filter. Eg. loop1 returns [loop1, loop10] +// // SwInterfaceDump defines message 'sw_interface_dump'. type SwInterfaceDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -1387,6 +1508,12 @@ func (m *SwInterfaceDump) Unmarshal(b []byte) error { return nil } +// Interface Event generated by want_interface_events +// - pid - client pid registered to receive notification +// - sw_if_index - index of the interface of the event +// - flags - interface_status flags +// - deleted - interface was deleted +// // SwInterfaceEvent defines message 'sw_interface_event'. type SwInterfaceEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -1432,6 +1559,9 @@ func (m *SwInterfaceEvent) Unmarshal(b []byte) error { return nil } +// Get interface's MAC address +// - sw_if_index - the interface whose MAC will be returned +// // SwInterfaceGetMacAddress defines message 'sw_interface_get_mac_address'. type SwInterfaceGetMacAddress struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1465,6 +1595,10 @@ func (m *SwInterfaceGetMacAddress) Unmarshal(b []byte) error { return nil } +// Reply for get interface's MAC address request +// - retval - return code +// - mac_addr - returned interface's MAC address +// // SwInterfaceGetMacAddressReply defines message 'sw_interface_get_mac_address_reply'. type SwInterfaceGetMacAddressReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1504,6 +1638,9 @@ func (m *SwInterfaceGetMacAddressReply) Unmarshal(b []byte) error { return nil } +// Get VRF id assigned to interface +// - sw_if_index - index of the interface +// // SwInterfaceGetTable defines message 'sw_interface_get_table'. type SwInterfaceGetTable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1541,6 +1678,9 @@ func (m *SwInterfaceGetTable) Unmarshal(b []byte) error { return nil } +// Reply to get_sw_interface_vrf +// - vrf_id - VRF id assigned to the interface +// // SwInterfaceGetTableReply defines message 'sw_interface_get_table_reply'. type SwInterfaceGetTableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1578,6 +1718,20 @@ func (m *SwInterfaceGetTableReply) Unmarshal(b []byte) error { return nil } +// show the interface's queue - thread placement +// +// This api is used to display the interface and queue worker +// thread placement. One message per rx-queue per interface will +// be sent to client. +// Each message will contain information about rx-queue id of an +// interface, interface index, thread on which this rx-queue is +// placed and mode of rx-queue. +// - sw_if_index - the interface whose rx-placement will be dumped +// - queue_id - the queue id +// - worker_id - the worker id on which queue_id is placed, +// worker_id = 0 means main thread. +// - mode - polling=1, interrupt=2, adaptive=3 +// // SwInterfaceRxPlacementDetails defines message 'sw_interface_rx_placement_details'. type SwInterfaceRxPlacementDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1625,6 +1779,12 @@ func (m *SwInterfaceRxPlacementDetails) Unmarshal(b []byte) error { return nil } +// dump the rx queue placement of interface(s) +// - sw_if_index - optional interface index for which queue placement to +// be requested. sw_if_index = ~0 will dump placement information for all +// interfaces. It will not dump information related to sub-interfaces, p2p +// and pipe interfaces. +// // SwInterfaceRxPlacementDump defines message 'sw_interface_rx_placement_dump'. type SwInterfaceRxPlacementDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1658,6 +1818,11 @@ func (m *SwInterfaceRxPlacementDump) Unmarshal(b []byte) error { return nil } +// Set flags on the interface +// - sw_if_index - index of the interface to set flags on +// - flags - interface_status flags +// (only IF_STATUS_API_FLAG_ADMIN_UP used in config) +// // SwInterfaceSetFlags defines message 'sw_interface_set_flags'. type SwInterfaceSetFlags struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1728,6 +1893,13 @@ func (m *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error { return nil } +// Set custom interface name +// +// Set custom interface name for the interface. +// - sw_if_index - the interface whose name will be set +// - name - the custom interface name to be set +// +// k // SwInterfaceSetInterfaceName defines message 'sw_interface_set_interface_name'. type SwInterfaceSetInterfaceName struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1800,6 +1972,13 @@ func (m *SwInterfaceSetInterfaceNameReply) Unmarshal(b []byte) error { return nil } +// Set IP4 directed broadcast +// +// The directed broadcast enabled a packet sent to the interface's +// subnet address will be broadcast on the interface +// - sw_if_index +// - enable +// // SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'. type SwInterfaceSetIPDirectedBroadcast struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1876,6 +2055,10 @@ func (m *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(b []byte) error { return nil } +// Set an interface's MAC address +// - sw_if_index - the interface whose MAC will be set +// - mac_addr - the new MAC address +// // SwInterfaceSetMacAddress defines message 'sw_interface_set_mac_address'. type SwInterfaceSetMacAddress struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1948,6 +2131,7 @@ func (m *SwInterfaceSetMacAddressReply) Unmarshal(b []byte) error { return nil } +// Set interface L3 MTU // SwInterfaceSetMtu defines message 'sw_interface_set_mtu'. type SwInterfaceSetMtu struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2027,6 +2211,10 @@ func (m *SwInterfaceSetMtuReply) Unmarshal(b []byte) error { return nil } +// Set interface promiscuous mode +// - sw_if_index - index of the interface to set flags on +// - promisc_on - promiscuous mode is on ? +// // SwInterfaceSetPromisc defines message 'sw_interface_set_promisc'. type SwInterfaceSetPromisc struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2097,6 +2285,14 @@ func (m *SwInterfaceSetPromiscReply) Unmarshal(b []byte) error { return nil } +// Set an interface's rx-mode +// - sw_if_index - the interface whose rx-mode will be set +// - queue_id_valid - 1 = the queue_id field is valid. 0 means all +// queue_id's +// - queue_id - the queue number whose rx-mode will be set. Only valid +// if queue_id_valid is 1 +// - mode - polling=1, interrupt=2, adaptive=3 +// // SwInterfaceSetRxMode defines message 'sw_interface_set_rx_mode'. type SwInterfaceSetRxMode struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2175,6 +2371,16 @@ func (m *SwInterfaceSetRxModeReply) Unmarshal(b []byte) error { return nil } +// Set an interface's rx-placement +// +// Rx-Queue placement on specific thread is operational for only hardware +// interface. It will not set queue - thread placement for sub-interfaces, +// p2p and pipe interfaces. +// - sw_if_index - the interface whose rx-placement will be set +// - queue_id - the queue number whose rx-placement will be set. +// - worker_id - the worker number whom rx-placement will be at. +// - is_main - flag to set rx-placement to main thread +// // SwInterfaceSetRxPlacement defines message 'sw_interface_set_rx_placement'. type SwInterfaceSetRxPlacement struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2255,6 +2461,11 @@ func (m *SwInterfaceSetRxPlacementReply) Unmarshal(b []byte) error { return nil } +// Associate the specified interface with a fib table +// - sw_if_index - index of the interface +// - is_ipv6 - if non-zero ipv6, else ipv4 +// - vrf_id - fib table/vrf id to associate the interface with +// // SwInterfaceSetTable defines message 'sw_interface_set_table'. type SwInterfaceSetTable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2329,6 +2540,17 @@ func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error { return nil } +// Set an interface's tx-placement +// +// Tx-Queue placement on specific thread is operational for only hardware +// interface. It will not set queue - thread placement for sub-interfaces, +// p2p and pipe interfaces. +// - sw_if_index - the interface whose tx-placement will be set +// - queue_id - the queue number whose tx-placement will be set. +// - array_size - the size of the thread indexes array +// - threads - the thread indexes of main and worker(s) threads +// whom tx-placement will be at. +// // SwInterfaceSetTxPlacement defines message 'sw_interface_set_tx_placement'. type SwInterfaceSetTxPlacement struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2418,6 +2640,11 @@ func (m *SwInterfaceSetTxPlacementReply) Unmarshal(b []byte) error { return nil } +// Set unnumbered interface add / del request +// - sw_if_index - interface with an IP address +// - unnumbered_sw_if_index - interface which will use the address +// - is_add - if non-zero set the association, else unset it +// // SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'. type SwInterfaceSetUnnumbered struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2494,6 +2721,11 @@ func (m *SwInterfaceSetUnnumberedReply) Unmarshal(b []byte) error { return nil } +// Set / clear software interface tag +// - sw_if_index - the interface +// - add_del - 1 = add, 0 = delete +// - tag - an ascii tag +// // SwInterfaceTagAddDel defines message 'sw_interface_tag_add_del'. type SwInterfaceTagAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -2568,6 +2800,20 @@ func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error { return nil } +// show the interface's queue - thread placement +// +// This api is used to display the interface and queue worker +// thread placement. One message per tx-queue per interface will +// be sent to client. +// Each message will contain information about tx-queue id of an +// interface, interface index, thread on which this tx-queue is +// placed and mode of tx-queue. +// - sw_if_index - the interface whose tx-placement will be dumped +// - queue_id - the queue id +// - shared - the queue is shared on other threads +// - array_size - the size of the threads array +// - threads - the main and worker(s) thread index(es) whom tx-placement are at. +// // SwInterfaceTxPlacementDetails defines message 'sw_interface_tx_placement_details'. type SwInterfaceTxPlacementDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2628,6 +2874,13 @@ func (m *SwInterfaceTxPlacementDetails) Unmarshal(b []byte) error { return nil } +// get the tx queue placement of interface(s) +// - cursor - optional, it allows client to continue a dump +// - sw_if_index - optional interface index for which queue placement to +// be requested. sw_if_index = ~0 will get the placement information for all +// interfaces. It will not get information related to sub-interfaces, p2p +// and pipe interfaces. +// // SwInterfaceTxPlacementGet defines message 'sw_interface_tx_placement_get'. type SwInterfaceTxPlacementGet struct { Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` @@ -2704,6 +2957,10 @@ func (m *SwInterfaceTxPlacementGetReply) Unmarshal(b []byte) error { return nil } +// Register for interface events +// - enable_disable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// // WantInterfaceEvents defines message 'want_interface_events'. type WantInterfaceEvents struct { EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/interface/interface_rpc.ba.go b/plugins/vpp/binapi/vpp2306/interface/interface_rpc.ba.go index ba74ba67e2..bfa2db558e 100644 --- a/plugins/vpp/binapi/vpp2306/interface/interface_rpc.ba.go +++ b/plugins/vpp/binapi/vpp2306/interface/interface_rpc.ba.go @@ -444,11 +444,12 @@ func (c *serviceClient_SwInterfaceTxPlacementGetClient) Recv() (*SwInterfaceTxPl return m, nil, nil case *SwInterfaceTxPlacementGetReply: if err := api.RetvalToVPPApiError(m.Retval); err != nil { - return nil, nil, err + c.Stream.Close() + return nil, m, err } err = c.Stream.Close() if err != nil { - return nil, nil, err + return nil, m, err } return nil, m, io.EOF default: diff --git a/plugins/vpp/binapi/vpp2306/ip/ip.ba.go b/plugins/vpp/binapi/vpp2306/ip/ip.ba.go index 4499266b6d..aefb4d0875 100644 --- a/plugins/vpp/binapi/vpp2306/ip/ip.ba.go +++ b/plugins/vpp/binapi/vpp2306/ip/ip.ba.go @@ -250,6 +250,10 @@ type PuntRedirectV2 struct { Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` } +// Add IP punt redirect rule +// - punt - punt definition +// - is_add - 1 to add punt_redirect rule, 0 to delete +// // AddDelIPPuntRedirectV2 defines message 'add_del_ip_punt_redirect_v2'. type AddDelIPPuntRedirectV2 struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -401,6 +405,9 @@ func (m *AddDelIPPuntRedirectV2Reply) Unmarshal(b []byte) error { return nil } +// iOAM disable +// - index - MAP Domain index +// // IoamDisable defines message 'ioam_disable'. type IoamDisable struct { ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` @@ -467,6 +474,13 @@ func (m *IoamDisableReply) Unmarshal(b []byte) error { return nil } +// IOAM enable : Enable in-band OAM +// - id - profile id +// - seqno - To enable Seqno Processing +// - analyse - Enabling analysis of iOAM at decap node +// - pow_enable - Proof of Work enabled or not flag +// - trace_enable - iOAM Trace enabled or not flag +// // IoamEnable defines message 'ioam_enable'. type IoamEnable struct { ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` @@ -855,6 +869,7 @@ func (m *IPDump) Unmarshal(b []byte) error { return nil } +// enable/disable full reassembly of packets aimed at our addresses // IPLocalReassEnableDisable defines message 'ip_local_reass_enable_disable'. type IPLocalReassEnableDisable struct { EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"` @@ -927,6 +942,7 @@ func (m *IPLocalReassEnableDisableReply) Unmarshal(b []byte) error { return nil } +// get status of local reassembly // IPLocalReassGet defines message 'ip_local_reass_get'. type IPLocalReassGet struct{} @@ -995,6 +1011,28 @@ func (m *IPLocalReassGetReply) Unmarshal(b []byte) error { return nil } +// Add / del route request +// +// Adds a route, consisting both of the MFIB entry to match packets +// (which may already exist) and a path to send those packets down. +// Routes can be entered repeatedly to add multiple paths. Deletions are +// per-path. +// - table_id - fib table /vrf associated with the route +// - is_add - true if adding a route; false if deleting one +// - is_ipv6 - true iff all the addresses are v6 +// - entry_flags - see fib_entry_flag_t +// - itf_flags - see mfib_entry_flags_t +// - next_hop_afi - see dpo_proto_t; the type of destination description +// - src_address - the source of the packet +// - grp_address - the group the packet is destined to +// - nh_address - the nexthop to forward the packet to +// - next_hop_sw_if_index - interface to emit packet on +// BIER AFIs use the BIER imposition ID. v4 and v6 AFIs use either the +// interface or the nexthop address. +// Note that if the route is source-specific (S is supplied, not all 0s), +// the prefix match is treated as exact (prefixlen /32 or /128). +// FIXME not complete yet +// // IPMrouteAddDel defines message 'ip_mroute_add_del'. type IPMrouteAddDel struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -1170,6 +1208,9 @@ func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error { return nil } +// IP Multicast Route Details +// - route - Details of the route +// // IPMrouteDetails defines message 'ip_mroute_details'. type IPMrouteDetails struct { Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"` @@ -1300,6 +1341,9 @@ func (m *IPMrouteDetails) Unmarshal(b []byte) error { return nil } +// Dump IP multicast fib table +// - table - The table from which to dump routes (ony ID an AF are needed) +// // IPMrouteDump defines message 'ip_mroute_dump'. type IPMrouteDump struct { Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` @@ -1378,6 +1422,7 @@ func (m *IPMtableDetails) Unmarshal(b []byte) error { return nil } +// Dump IP multicast fib table // IPMtableDump defines message 'ip_mtable_dump'. type IPMtableDump struct{} @@ -1643,6 +1688,14 @@ func (m *IPPathMtuReplaceEndReply) Unmarshal(b []byte) error { return nil } +// @brief Set a Path MTU value. i.e. a MTU value for a given neighbour. +// +// The neighbour can be described as attached (w/ interface and next-hop) +// or remote (w/ table_id and next-hop); +// - table_id - table-ID for next-hop +// - nh - Next hop +// - path_mtu - value to set, 0 is disable. +// // IPPathMtuUpdate defines message 'ip_path_mtu_update'. type IPPathMtuUpdate struct { Pmtu IPPathMtu `binapi:"ip_path_mtu,name=pmtu" json:"pmtu,omitempty"` @@ -1724,6 +1777,11 @@ func (m *IPPathMtuUpdateReply) Unmarshal(b []byte) error { return nil } +// IP punt policer +// - is_add - 1 to add neighbor, 0 to delete +// - is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4 +// - policer_index - Index of policer to use +// // IPPuntPolice defines message 'ip_punt_police'. type IPPuntPolice struct { PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` @@ -1798,6 +1856,10 @@ func (m *IPPuntPoliceReply) Unmarshal(b []byte) error { return nil } +// IP punt redirect +// - punt - punt definition +// - is_add - 1 to add neighbor, 0 to delete +// // IPPuntRedirect defines message 'ip_punt_redirect'. // Deprecated: the message will be removed in the future versions type IPPuntRedirect struct { @@ -2107,6 +2169,11 @@ func (m *IPPuntRedirectV2Dump) Unmarshal(b []byte) error { return nil } +// Enable/disable reassembly feature +// - sw_if_index - interface to enable/disable feature on +// - enable_ip4 - enable ip4 reassembly if non-zero, disable if 0 +// - enable_ip6 - enable ip6 reassembly if non-zero, disable if 0 +// // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'. type IPReassemblyEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2363,6 +2430,13 @@ func (m *IPReassemblySetReply) Unmarshal(b []byte) error { return nil } +// Add / del route request +// - is_multipath - Set to 1 if these paths will be added/removed +// to/from the existing set, or 0 to replace +// the existing set. +// is_add=0 & is_multipath=0 implies delete all paths +// - is_add - Are the paths being added or removed +// // IPRouteAddDel defines message 'ip_route_add_del'. type IPRouteAddDel struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -2700,6 +2774,9 @@ func (m *IPRouteAddDelV2Reply) Unmarshal(b []byte) error { return nil } +// IP FIB table entry response +// - route The route entry in the table +// // IPRouteDetails defines message 'ip_route_details'. type IPRouteDetails struct { Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"` @@ -2821,6 +2898,11 @@ func (m *IPRouteDetails) Unmarshal(b []byte) error { return nil } +// Dump IP routes from a table +// - src The entity adding the route. either 0 for default +// or a value returned from fib_source_sdd. +// - table - The table from which to dump routes (ony ID an AF are needed) +// // IPRouteDump defines message 'ip_route_dump'. type IPRouteDump struct { Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` @@ -2860,6 +2942,11 @@ func (m *IPRouteDump) Unmarshal(b []byte) error { return nil } +// Lookup IP route from a table +// - table_id - The IP table to look the route up in +// - exact - 0 for normal route lookup, 1 for exact match only +// - prefix - The prefix (or host) for route lookup. +// // IPRouteLookup defines message 'ip_route_lookup'. type IPRouteLookup struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` @@ -2907,6 +2994,10 @@ func (m *IPRouteLookup) Unmarshal(b []byte) error { return nil } +// IP FIB table lookup response +// - retval - return code of the lookup +// - route - The route entry in the table if found +// // IPRouteLookupReply defines message 'ip_route_lookup_reply'. type IPRouteLookupReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -3378,6 +3469,16 @@ func (m *IPRouteV2Dump) Unmarshal(b []byte) error { return nil } +// Configure IP source and L4 port-range check +// - is_ip6 - 1 if source address type is IPv6 +// - is_add - 1 if add, 0 if delete +// - ip - prefix to match +// - number_of_ranges - length of low_port and high_port arrays (must match) +// - low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry) +// - high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry) +// - vrf_id - fib table/vrf id to associate the source and port-range check with +// @note To specify a single port set low_port and high_port entry the same +// // IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'. type IPSourceAndPortRangeCheckAddDel struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -3492,6 +3593,11 @@ func (m *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error { return nil } +// Set interface source and L4 port-range request +// - interface_id - interface index +// - tcp_vrf_id - VRF associated with source and TCP port-range check +// - udp_vrf_id - VRF associated with source and TCP port-range check +// // IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'. type IPSourceAndPortRangeCheckInterfaceAddDel struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -3586,6 +3692,10 @@ func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) erro return nil } +// Add / del table request +// +// A table can be added multiple times, but need be deleted only once. +// // IPTableAddDel defines message 'ip_table_add_del'. type IPTableAddDel struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -3662,6 +3772,18 @@ func (m *IPTableAddDelReply) Unmarshal(b []byte) error { return nil } +// Allocate an unused table +// +// A table can be added multiple times. +// If a large number of tables are in use (millions), this API might +// fail to find a free ID with very low probability, and will return +// EAGAIN. A subsequent attempt may be successful. +// - table - if table.table_id == ~0, vpp allocates an unused table_id and +// proceeds as in ip_table_add_del with is_add = true +// if table.table_id != ~0, vpp uses the table.table_id and +// proceeds as in ip_table_add_del with is_add = true +// table.table_id should never be 0 +// // IPTableAllocate defines message 'ip_table_allocate'. type IPTableAllocate struct { Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` @@ -3744,6 +3866,9 @@ func (m *IPTableAllocateReply) Unmarshal(b []byte) error { return nil } +// IP FIB table response +// - table - description of the table +// // IPTableDetails defines message 'ip_table_details'. type IPTableDetails struct { Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` @@ -3783,6 +3908,7 @@ func (m *IPTableDetails) Unmarshal(b []byte) error { return nil } +// Dump IP all fib tables // IPTableDump defines message 'ip_table_dump'. type IPTableDump struct{} @@ -3810,6 +3936,11 @@ func (m *IPTableDump) Unmarshal(b []byte) error { return nil } +// IP table flush +// +// Flush a table of all routes +// - table - The table to flush +// // IPTableFlush defines message 'ip_table_flush'. type IPTableFlush struct { Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` @@ -3882,6 +4013,21 @@ func (m *IPTableFlushReply) Unmarshal(b []byte) error { return nil } +// IP table replace being +// +// The use-case is that, for some unspecified reason, the control plane +// has a very different set of entries it wants in the table than VPP +// currently has. The CP would thus like to 'replace' VPP's current table +// only by specifying what the new set of entries shall be, i.e. it is not +// going to delete anything that already exists. +// the CP declares the start of this procedure with this begin_replace +// API Call, and when it has populated all the entries it wants, it calls +// the below end_replace API. From this point on it is of course free +// to add and delete entries as usual. +// The underlying mechanism by which VPP implements this replace is +// purposefully left unspecified. +// - table - The table to resync +// // IPTableReplaceBegin defines message 'ip_table_replace_begin'. type IPTableReplaceBegin struct { Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` @@ -3954,6 +4100,11 @@ func (m *IPTableReplaceBeginReply) Unmarshal(b []byte) error { return nil } +// IP table replace end +// +// see replace start/ +// - table - The table that has converged +// // IPTableReplaceEnd defines message 'ip_table_replace_end'. type IPTableReplaceEnd struct { Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` @@ -4026,6 +4177,10 @@ func (m *IPTableReplaceEndReply) Unmarshal(b []byte) error { return nil } +// IP unnumbered configurations +// - sw_if_index The interface that has unnumbered configuration +// - ip_sw_if_index The IP interface that it is unnumbered to +// // IPUnnumberedDetails defines message 'ip_unnumbered_details'. type IPUnnumberedDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -4063,6 +4218,9 @@ func (m *IPUnnumberedDetails) Unmarshal(b []byte) error { return nil } +// Dump IP unnumbered configurations +// - sw_if_index ~0 for all interfaces, else the interface desired +// // IPUnnumberedDump defines message 'ip_unnumbered_dump'. type IPUnnumberedDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -4182,6 +4340,17 @@ func (m *MfibSignalDump) Unmarshal(b []byte) error { return nil } +// Set the ip flow hash config for a fib request +// - vrf_id - vrf/fib id +// - is_ipv6 - if non-zero the fib is ip6, else ip4 +// - src - if non-zero include src in flow hash +// - dst - if non-zero include dst in flow hash +// - sport - if non-zero include sport in flow hash +// - dport - if non-zero include dport in flow hash +// - proto -if non-zero include proto in flow hash +// - reverse - if non-zero include reverse in flow hash +// - symmetric - if non-zero include symmetry in flow hash +// // SetIPFlowHash defines message 'set_ip_flow_hash'. // Deprecated: the message will be removed in the future versions type SetIPFlowHash struct { @@ -4282,6 +4451,11 @@ func (m *SetIPFlowHashReply) Unmarshal(b []byte) error { return nil } +// Set the ip flow hash router ID +// - router_id - The ID of the router. Mixed into the hash. +// Used to prevent polarisation across a network, +// since each router is assumed to have a different ID +// // SetIPFlowHashRouterID defines message 'set_ip_flow_hash_router_id'. type SetIPFlowHashRouterID struct { RouterID uint32 `binapi:"u32,name=router_id" json:"router_id,omitempty"` @@ -4348,6 +4522,16 @@ func (m *SetIPFlowHashRouterIDReply) Unmarshal(b []byte) error { return nil } +// @brief flow hash settings for an IP table +// - src - include src in flow hash +// - dst - include dst in flow hash +// - sport - include sport in flow hash +// - dport - include dport in flow hash +// - proto - include proto in flow hash +// - reverse - include reverse in flow hash +// - symmetric - include symmetry in flow hash +// - flowlabel - include flowlabel in flow hash +// // SetIPFlowHashV2 defines message 'set_ip_flow_hash_v2'. type SetIPFlowHashV2 struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` @@ -4422,6 +4606,17 @@ func (m *SetIPFlowHashV2Reply) Unmarshal(b []byte) error { return nil } +// @brief flow hash settings for an IP table +// - src - include src in flow hash +// - dst - include dst in flow hash +// - sport - include sport in flow hash +// - dport - include dport in flow hash +// - proto - include proto in flow hash +// - reverse - include reverse in flow hash +// - symmetric - include symmetry in flow hash +// - flowlabel - include flowlabel in flow hash +// - gtpv1teid - include gtpv1teid in flow hash +// // SetIPFlowHashV3 defines message 'set_ip_flow_hash_v3'. // InProgress: the message form may change in the future versions type SetIPFlowHashV3 struct { @@ -4498,6 +4693,10 @@ func (m *SetIPFlowHashV3Reply) Unmarshal(b []byte) error { return nil } +// IPv6 interface enable / disable request +// - sw_if_index - interface used to reach neighbor +// - enable - if non-zero enable ip6 on interface, else disable +// // SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'. type SwInterfaceIP6EnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -4570,6 +4769,9 @@ func (m *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error { return nil } +// IPv6 get link local address on interface request +// - sw_if_index - interface to set link local on +// // SwInterfaceIP6GetLinkLocalAddress defines message 'sw_interface_ip6_get_link_local_address'. type SwInterfaceIP6GetLinkLocalAddress struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -4605,6 +4807,9 @@ func (m *SwInterfaceIP6GetLinkLocalAddress) Unmarshal(b []byte) error { return nil } +// IPv6 link local address detail +// - ip - the link local address +// // SwInterfaceIP6GetLinkLocalAddressReply defines message 'sw_interface_ip6_get_link_local_address_reply'. type SwInterfaceIP6GetLinkLocalAddressReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -4646,6 +4851,10 @@ func (m *SwInterfaceIP6GetLinkLocalAddressReply) Unmarshal(b []byte) error { return nil } +// IPv6 set link local address on interface request +// - sw_if_index - interface to set link local on +// - ip - the new link local address +// // SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'. type SwInterfaceIP6SetLinkLocalAddress struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/ip/ip_rpc.ba.go b/plugins/vpp/binapi/vpp2306/ip/ip_rpc.ba.go index 712203618c..268bce6ea6 100644 --- a/plugins/vpp/binapi/vpp2306/ip/ip_rpc.ba.go +++ b/plugins/vpp/binapi/vpp2306/ip/ip_rpc.ba.go @@ -378,11 +378,12 @@ func (c *serviceClient_IPPathMtuGetClient) Recv() (*IPPathMtuDetails, *IPPathMtu return m, nil, nil case *IPPathMtuGetReply: if err := api.RetvalToVPPApiError(m.Retval); err != nil { - return nil, nil, err + c.Stream.Close() + return nil, m, err } err = c.Stream.Close() if err != nil { - return nil, nil, err + return nil, m, err } return nil, m, io.EOF default: diff --git a/plugins/vpp/binapi/vpp2306/ip6_nd/ip6_nd.ba.go b/plugins/vpp/binapi/vpp2306/ip6_nd/ip6_nd.ba.go index 78db9c191c..c8db22111c 100644 --- a/plugins/vpp/binapi/vpp2306/ip6_nd/ip6_nd.ba.go +++ b/plugins/vpp/binapi/vpp2306/ip6_nd/ip6_nd.ba.go @@ -47,6 +47,18 @@ type IP6ndRaPrefix struct { NoAdvertise bool `binapi:"bool,name=no_advertise" json:"no_advertise,omitempty"` } +// Tell client about a router advertisement event +// - pid - client pid registered to receive notification +// - current_hop_limit - RA current hop limit +// - flags - RA flags +// - router_lifetime_in_sec - RA lifetime in seconds +// - router_addr - The router's address +// - neighbor_reachable_time_in_msec - RA neighbor reachable time in msec +// - time_in_msec_between_retransmitted_neighbor_solicitations - +// time in msec between retransmitted neighbor solicitations +// - n_prefixes - +// - prefixes - +// // IP6RaEvent defines message 'ip6_ra_event'. type IP6RaEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -147,6 +159,11 @@ func (m *IP6RaEvent) Unmarshal(b []byte) error { return nil } +// IPv6 ND proxy config +// - sw_if_index - The interface the host is on +// - ip - The address of the host for which to proxy for +// - is_add - Adding or deleting +// // IP6ndProxyAddDel defines message 'ip6nd_proxy_add_del'. type IP6ndProxyAddDel struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -221,6 +238,10 @@ func (m *IP6ndProxyAddDelReply) Unmarshal(b []byte) error { return nil } +// IPv6 ND proxy details returned after request +// - sw_if_index - The interface the host is on +// - ip - The address of the host for which to proxy for +// // IP6ndProxyDetails defines message 'ip6nd_proxy_details'. type IP6ndProxyDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -258,6 +279,7 @@ func (m *IP6ndProxyDetails) Unmarshal(b []byte) error { return nil } +// IPv6 ND proxy dump request // IP6ndProxyDump defines message 'ip6nd_proxy_dump'. type IP6ndProxyDump struct{} @@ -285,6 +307,10 @@ func (m *IP6ndProxyDump) Unmarshal(b []byte) error { return nil } +// IPv6 ND (mirror) proxy +// - sw_if_index - The interface the host is on +// - is_enable - enable or disable +// // IP6ndProxyEnableDisable defines message 'ip6nd_proxy_enable_disable'. type IP6ndProxyEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -357,6 +383,16 @@ func (m *IP6ndProxyEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Start / stop sending router solicitation +// - irt - initial retransmission time +// - mrt - maximum retransmission time +// - mrc - maximum retransmission count +// - mrd - maximum retransmission duration +// - sw_if_index - software interface index of interface +// for sending router solicitation +// - stop - if non-zero then stop sending router solicitation, +// otherwise start sending router solicitation +// // IP6ndSendRouterSolicitation defines message 'ip6nd_send_router_solicitation'. type IP6ndSendRouterSolicitation struct { Irt uint32 `binapi:"u32,name=irt" json:"irt,omitempty"` @@ -445,6 +481,21 @@ func (m *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error { return nil } +// IPv6 router advertisement config request +// - suppress - +// - managed - +// - other - +// - ll_option - +// - send_unicast - +// - cease - +// - is_no - +// - default_router - +// - max_interval - +// - min_interval - +// - lifetime - +// - initial_count - +// - initial_interval - +// // SwInterfaceIP6ndRaConfig defines message 'sw_interface_ip6nd_ra_config'. type SwInterfaceIP6ndRaConfig struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -565,6 +616,53 @@ func (m *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error { return nil } +// Details on IPv6 Router Advertisements for a single interface +// - sw_if_index - interface index the details are belong to +// - cur_hop_limit - current hop limit +// - adv_managed_flag - if true, enable DHCP for address +// - adv_other_flag - if true, Enable DHCP for other information +// - adv_router_lifetime - lifetime associated with the default router in +// seconds (zero indicates that the router is not +// a default router) +// - adv_neighbor_reachable_time - number of milliseconds within which a +// neighbor is assumed to be reachable +// (zero means unspecified) +// - adv_retransmit_interval - number of milliseconds between +// retransmitted Neighbor Solicitation +// messages (zero means unspecified) +// - adv_link_mtu - MTU that all the nodes on a link use +// - send_radv - if true, send periodic Router Advertisements +// - cease_radv - if true, cease to send periodic Router Advertisements +// - send_unicast - if true, destination address of a Router +// Advertisement message will use the source address of +// the Router Solicitation message (when available). +// Otherwise, multicast address will be used +// - adv_link_layer_address - if true, add link layer address option +// - max_radv_interval - maximum time in seconds allowed between sending +// unsolicited multicast Router Advertisements +// - min_radv_interval - minimum time in seconds allowed between sending +// unsolicited multicast Router Advertisements +// - last_radv_time - number of seconds since the last time a solicited +// Router Advertisement message was sent (zero means +// never) +// - last_multicast_time - number of seconds since the last time a +// multicast Router Advertisements message was +// sent (zero means never) +// - next_multicast_time - number of seconds within which next time a +// multicast Router Advertisement message will be +// sent (zero means never) +// - initial_adverts_count - number of initial Router Advertisement +// messages to send +// - initial_adverts_interval - number of seconds between initial Router +// Advertisement messages +// - initial_adverts_sent - if true, all initial Router Advertisement +// messages were sent +// - n_advertisements_sent - number of Router Advertisements sent +// - n_solicitations_rcvd - number of Router Solicitations received +// - n_solicitations_dropped - number of Router Solicitations dropped +// - n_prefixes - number of prefix entries +// - prefixes - array of prefix entries +// // SwInterfaceIP6ndRaDetails defines message 'sw_interface_ip6nd_ra_details'. // InProgress: the message form may change in the future versions type SwInterfaceIP6ndRaDetails struct { @@ -741,6 +839,10 @@ func (m *SwInterfaceIP6ndRaDetails) Unmarshal(b []byte) error { return nil } +// Dump IPv6 Router Advertisements details on a per-interface basis +// - sw_if_index - interface index to use as a filter (0xffffffff +// represents all interfaces) +// // SwInterfaceIP6ndRaDump defines message 'sw_interface_ip6nd_ra_dump'. // InProgress: the message form may change in the future versions type SwInterfaceIP6ndRaDump struct { @@ -775,6 +877,32 @@ func (m *SwInterfaceIP6ndRaDump) Unmarshal(b []byte) error { return nil } +// IPv6 router advertisement prefix config request +// - sw_if_index - The interface the RA prefix information is for +// - prefix - The prefix to advertise +// - use_default - Revert to default settings +// - no_advertise - Do not advertise this prefix +// - off_link - The prefix is off link (it is not configured on the interface) +// Configures the L-flag, When set, indicates that this +// prefix can be used for on-link determination. +// - no_autoconfig - Setting for the A-flag. When +// set indicates that this prefix can be used for +// stateless address configuration. +// - no_onlink - The prefix is not on link. Make sure this is consistent +// with the off_link parameter else YMMV +// - is_no - add/delete +// - val_lifetime - The length of time in +// seconds (relative to the time the packet is sent) +// that the prefix is valid for the purpose of on-link +// determination. A value of all one bits +// (0xffffffff) represents infinity +// - pref_lifetime - The length of time in +// seconds (relative to the time the packet is sent) +// that addresses generated from the prefix via +// stateless address autoconfiguration remain +// preferred [ADDRCONF]. A value of all one bits +// (0xffffffff) represents infinity. +// // SwInterfaceIP6ndRaPrefix defines message 'sw_interface_ip6nd_ra_prefix'. type SwInterfaceIP6ndRaPrefix struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -885,6 +1013,10 @@ func (m *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error { return nil } +// Register for ip6 router advertisement events +// - enable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// // WantIP6RaEvents defines message 'want_ip6_ra_events'. type WantIP6RaEvents struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/ip_neighbor/ip_neighbor.ba.go b/plugins/vpp/binapi/vpp2306/ip_neighbor/ip_neighbor.ba.go index 63d5b676a8..376e212751 100644 --- a/plugins/vpp/binapi/vpp2306/ip_neighbor/ip_neighbor.ba.go +++ b/plugins/vpp/binapi/vpp2306/ip_neighbor/ip_neighbor.ba.go @@ -133,6 +133,10 @@ type IPNeighbor struct { IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"` } +// IP neighbor add / del request +// - is_add - 1 to add neighbor, 0 to delete +// - neighbor - the neighbor to add/remove +// // IPNeighborAddDel defines message 'ip_neighbor_add_del'. type IPNeighborAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -182,6 +186,10 @@ func (m *IPNeighborAddDel) Unmarshal(b []byte) error { return nil } +// IP neighbor add / del reply +// - retval - return value +// - stats_index - the index to use for this neighbor in the stats segment +// // IPNeighborAddDelReply defines message 'ip_neighbor_add_del_reply'. type IPNeighborAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -219,6 +227,16 @@ func (m *IPNeighborAddDelReply) Unmarshal(b []byte) error { return nil } +// Enable/disable periodic IP neighbor scan +// - af - Address family v4/v6 +// - max_number - The maximum number of neighbours that will be created. +// default 50k +// - max_age - The maximum age (in seconds) before an inactive neighbour +// is flushed +// default 0 => never +// - recycle - If max_number of neighbours is reached and new ones need +// to be created should the oldest neighbour be 'recycled'. +// // IPNeighborConfig defines message 'ip_neighbor_config'. type IPNeighborConfig struct { Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` @@ -297,6 +315,10 @@ func (m *IPNeighborConfigReply) Unmarshal(b []byte) error { return nil } +// IP neighbors dump response +// - age - time between last update and sending this message, in seconds +// - neighbour - the neighbor +// // IPNeighborDetails defines message 'ip_neighbor_details'. type IPNeighborDetails struct { Age float64 `binapi:"f64,name=age" json:"age,omitempty"` @@ -346,6 +368,10 @@ func (m *IPNeighborDetails) Unmarshal(b []byte) error { return nil } +// Dump IP neighbors +// - sw_if_index - the interface to dump neighbors, ~0 == all +// - af - address family is ipv[6|4] +// // IPNeighborDump defines message 'ip_neighbor_dump'. type IPNeighborDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -383,6 +409,12 @@ func (m *IPNeighborDump) Unmarshal(b []byte) error { return nil } +// Tell client about an IP4 ARP resolution event or +// +// MAC/IP info from ARP requests in L2 BDs +// - pid - client pid registered to receive notification +// - neighbor - new neighbor created +// // IPNeighborEvent defines message 'ip_neighbor_event'. // Deprecated: the message will be removed in the future versions type IPNeighborEvent struct { @@ -433,6 +465,13 @@ func (m *IPNeighborEvent) Unmarshal(b []byte) error { return nil } +// Tell client about an IP4 ARP resolution event or +// +// MAC/IP info from ARP requests in L2 BDs +// - pid - client pid registered to receive notification +// - flags - Flags +// - neighbor - neighbor +// // IPNeighborEventV2 defines message 'ip_neighbor_event_v2'. type IPNeighborEventV2 struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -486,6 +525,12 @@ func (m *IPNeighborEventV2) Unmarshal(b []byte) error { return nil } +// IP neighbor flush request - removes *all* neighbours. +// +// dynamic and static from API/CLI and dynamic from data-plane. +// - af - Flush neighbours of this address family +// - sw_if_index - Flush on this interface (~0 => all interfaces) +// // IPNeighborFlush defines message 'ip_neighbor_flush'. type IPNeighborFlush struct { Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` @@ -556,6 +601,21 @@ func (m *IPNeighborFlushReply) Unmarshal(b []byte) error { return nil } +// IP neighbour replace begin +// +// The use-case is that, for some unspecified reason, the control plane +// has a different set of neighbours it than VPP +// currently has. The CP would thus like to 'replace' VPP's set +// only by specifying what the new set shall be, i.e. it is not +// going to delete anything that already exists, rather, it wants any +// unspecified neighbors deleted implicitly. +// The CP declares the start of this procedure with this replace_begin +// API Call, and when it has populated all neighbours it wants, it calls +// the below replace_end API. From this point on it is of course free +// to add and delete neighbours as usual. +// The underlying mechanism by which VPP implements this replace is +// intentionally left unspecified. +// // IPNeighborReplaceBegin defines message 'ip_neighbor_replace_begin'. type IPNeighborReplaceBegin struct{} @@ -616,6 +676,10 @@ func (m *IPNeighborReplaceBeginReply) Unmarshal(b []byte) error { return nil } +// IP neighbour replace end +// +// see ip_neighbor_replace_begin description. +// // IPNeighborReplaceEnd defines message 'ip_neighbor_replace_end'. type IPNeighborReplaceEnd struct{} @@ -676,6 +740,12 @@ func (m *IPNeighborReplaceEndReply) Unmarshal(b []byte) error { return nil } +// Register for IP neighbour events creation +// - enable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// - ip - exact IP address of interested neighbor resolution event +// - sw_if_index - interface on which the IP address is present. +// // WantIPNeighborEvents defines message 'want_ip_neighbor_events'. // Deprecated: the message will be removed in the future versions type WantIPNeighborEvents struct { @@ -759,6 +829,12 @@ func (m *WantIPNeighborEventsReply) Unmarshal(b []byte) error { return nil } +// Register for IP neighbour events (creation or deletion) +// - enable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// - ip - exact IP address of interested neighbor resolution event +// - sw_if_index - interface on which the IP address is present. +// // WantIPNeighborEventsV2 defines message 'want_ip_neighbor_events_v2'. type WantIPNeighborEventsV2 struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/ip_types/ip_types.ba.go b/plugins/vpp/binapi/vpp2306/ip_types/ip_types.ba.go index dd36d88ec2..7b694efc11 100644 --- a/plugins/vpp/binapi/vpp2306/ip_types/ip_types.ba.go +++ b/plugins/vpp/binapi/vpp2306/ip_types/ip_types.ba.go @@ -274,6 +274,11 @@ func (x IPProto) String() string { // AddressWithPrefix defines alias 'address_with_prefix'. type AddressWithPrefix Prefix +func NewAddressWithPrefix(network net.IPNet) AddressWithPrefix { + prefix := NewPrefix(network) + return AddressWithPrefix(prefix) +} + func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) { prefix, err := ParsePrefix(s) if err != nil { @@ -282,6 +287,10 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) { return AddressWithPrefix(prefix), nil } +func (x AddressWithPrefix) ToIPNet() *net.IPNet { + return Prefix(x).ToIPNet() +} + func (x AddressWithPrefix) String() string { return Prefix(x).String() } @@ -302,10 +311,16 @@ func (x *AddressWithPrefix) UnmarshalText(text []byte) error { // IP4Address defines alias 'ip4_address'. type IP4Address [4]uint8 +func NewIP4Address(ip net.IP) IP4Address { + var ipaddr IP4Address + copy(ipaddr[:], ip.To4()) + return ipaddr +} + func ParseIP4Address(s string) (IP4Address, error) { ip := net.ParseIP(s).To4() if ip == nil { - return IP4Address{}, fmt.Errorf("invalid IP address: %s", s) + return IP4Address{}, fmt.Errorf("invalid IP4 address: %s", s) } var ipaddr IP4Address copy(ipaddr[:], ip.To4()) @@ -339,10 +354,16 @@ type IP4AddressWithPrefix IP4Prefix // IP6Address defines alias 'ip6_address'. type IP6Address [16]uint8 +func NewIP6Address(ip net.IP) IP6Address { + var ipaddr IP6Address + copy(ipaddr[:], ip.To16()) + return ipaddr +} + func ParseIP6Address(s string) (IP6Address, error) { ip := net.ParseIP(s).To16() if ip == nil { - return IP6Address{}, fmt.Errorf("invalid IP address: %s", s) + return IP6Address{}, fmt.Errorf("invalid IP6 address: %s", s) } var ipaddr IP6Address copy(ipaddr[:], ip.To16()) @@ -379,15 +400,7 @@ type Address struct { Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"` } -func ParseAddress(s string) (Address, error) { - ip := net.ParseIP(s) - if ip == nil { - return Address{}, fmt.Errorf("invalid address: %s", s) - } - return AddressFromIP(ip), nil -} - -func AddressFromIP(ip net.IP) Address { +func NewAddress(ip net.IP) Address { var addr Address if ip.To4() == nil { addr.Af = ADDRESS_IP6 @@ -403,6 +416,14 @@ func AddressFromIP(ip net.IP) Address { return addr } +func ParseAddress(s string) (Address, error) { + ip := net.ParseIP(s) + if ip == nil { + return Address{}, fmt.Errorf("invalid IP address: %s", s) + } + return NewAddress(ip), nil +} + func (x Address) ToIP() net.IP { if x.Af == ADDRESS_IP6 { ip6 := x.Un.GetIP6() @@ -442,18 +463,26 @@ type IP4Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewIP4Prefix(network net.IPNet) IP4Prefix { + var prefix IP4Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewIP4Address(network.IP) + return prefix +} + func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) { hasPrefix := strings.Contains(s, "/") if hasPrefix { ip, network, err := net.ParseCIDR(s) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } maskSize, _ := network.Mask.Size() prefix.Len = byte(maskSize) prefix.Address, err = ParseIP4Address(ip.String()) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } } else { ip := net.ParseIP(s) @@ -464,7 +493,7 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) { prefix.Len = byte(defaultMaskSize) prefix.Address, err = ParseIP4Address(ip.String()) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } } return prefix, nil @@ -506,18 +535,26 @@ type IP6Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewIP6Prefix(network net.IPNet) IP6Prefix { + var prefix IP6Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewIP6Address(network.IP) + return prefix +} + func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) { hasPrefix := strings.Contains(s, "/") if hasPrefix { ip, network, err := net.ParseCIDR(s) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } maskSize, _ := network.Mask.Size() prefix.Len = byte(maskSize) prefix.Address, err = ParseIP6Address(ip.String()) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } } else { ip := net.ParseIP(s) @@ -528,7 +565,7 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) { prefix.Len = byte(defaultMaskSize) prefix.Address, err = ParseIP6Address(ip.String()) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } } return prefix, nil @@ -572,6 +609,14 @@ type Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewPrefix(network net.IPNet) Prefix { + var prefix Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewAddress(network.IP) + return prefix +} + func ParsePrefix(ip string) (prefix Prefix, err error) { hasPrefix := strings.Contains(ip, "/") if hasPrefix { diff --git a/plugins/vpp/binapi/vpp2306/ipfix_export/ipfix_export.ba.go b/plugins/vpp/binapi/vpp2306/ipfix_export/ipfix_export.ba.go index 3a43cfc8de..2c504f59dc 100644 --- a/plugins/vpp/binapi/vpp2306/ipfix_export/ipfix_export.ba.go +++ b/plugins/vpp/binapi/vpp2306/ipfix_export/ipfix_export.ba.go @@ -24,6 +24,9 @@ const ( VersionCrc = 0x63e0810a ) +// Ipfix meter details in response to the get_meters command +// - name The name of the ipfix meter +// // IpfixAllExporterDetails defines message 'ipfix_all_exporter_details'. type IpfixAllExporterDetails struct { CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"` @@ -157,6 +160,10 @@ func (m *IpfixAllExporterGetReply) Unmarshal(b []byte) error { return nil } +// Reply to IPFIX classify stream dump request +// - domain_id - domain ID reported in IPFIX messages for classify stream +// - src_port - source port of UDP session for classify stream +// // IpfixClassifyStreamDetails defines message 'ipfix_classify_stream_details'. type IpfixClassifyStreamDetails struct { DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"` @@ -194,6 +201,7 @@ func (m *IpfixClassifyStreamDetails) Unmarshal(b []byte) error { return nil } +// IPFIX classify stream dump request // IpfixClassifyStreamDump defines message 'ipfix_classify_stream_dump'. type IpfixClassifyStreamDump struct{} @@ -221,6 +229,11 @@ func (m *IpfixClassifyStreamDump) Unmarshal(b []byte) error { return nil } +// IPFIX add or delete classifier table request +// - table_id - classifier table ID +// - ip_version - version of IP used in the classifier table +// - transport_protocol - transport protocol used in the classifier table or 255 for unspecified +// // IpfixClassifyTableAddDel defines message 'ipfix_classify_table_add_del'. type IpfixClassifyTableAddDel struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` @@ -301,6 +314,11 @@ func (m *IpfixClassifyTableAddDelReply) Unmarshal(b []byte) error { return nil } +// Reply to IPFIX classify tables dump request +// - table_id - classifier table ID +// - ip_version - version of IP used in the classifier table +// - transport_protocol - transport protocol used in the classifier table or 255 for unspecified +// // IpfixClassifyTableDetails defines message 'ipfix_classify_table_details'. type IpfixClassifyTableDetails struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` @@ -342,6 +360,7 @@ func (m *IpfixClassifyTableDetails) Unmarshal(b []byte) error { return nil } +// IPFIX classify tables dump request // IpfixClassifyTableDump defines message 'ipfix_classify_table_dump'. type IpfixClassifyTableDump struct{} @@ -369,6 +388,23 @@ func (m *IpfixClassifyTableDump) Unmarshal(b []byte) error { return nil } +// Configure IPFIX exporter within the exporting process. +// +// The exporting process can contain multiple independent exporters, +// each of which have their own state. The collector_address is the key +// field that identifies a unique exporter. The already existing API +// 'set_ipfix_exporter' is used to modify a single exporter (which will +// always have stat index 0). If more than one exporter is required then +// they can be created and deleted using this API. +// - is_create - True for create, False for delete +// - collector_address - address of IPFIX collector +// - collector_port - port of IPFIX collector +// - src_address - address of IPFIX exporter +// - vrf_id - VRF / fib table ID +// - path_mtu - Path MTU between exporter and collector +// - template_interval - number of seconds after which to resend template +// - udp_checksum - UDP checksum calculation enable flag +// // IpfixExporterCreateDelete defines message 'ipfix_exporter_create_delete'. type IpfixExporterCreateDelete struct { IsCreate bool `binapi:"bool,name=is_create" json:"is_create,omitempty"` @@ -475,6 +511,15 @@ func (m *IpfixExporterCreateDeleteReply) Unmarshal(b []byte) error { return nil } +// Reply to IPFIX exporter dump request +// - collector_address - address of IPFIX collector +// - collector_port - port of IPFIX collector +// - src_address - address of IPFIX exporter +// - fib_index - fib table index +// - path_mtu - Path MTU between exporter and collector +// - template_interval - number of seconds after which to resend template +// - udp_checksum - UDP checksum calculation enable flag +// // IpfixExporterDetails defines message 'ipfix_exporter_details'. type IpfixExporterDetails struct { CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"` @@ -538,6 +583,7 @@ func (m *IpfixExporterDetails) Unmarshal(b []byte) error { return nil } +// IPFIX exporter dump request // IpfixExporterDump defines message 'ipfix_exporter_dump'. type IpfixExporterDump struct{} @@ -625,6 +671,10 @@ func (m *IpfixFlushReply) Unmarshal(b []byte) error { return nil } +// IPFIX classify stream configure request +// - domain_id - domain ID reported in IPFIX messages for classify stream +// - src_port - source port of UDP session for classify stream +// // SetIpfixClassifyStream defines message 'set_ipfix_classify_stream'. type SetIpfixClassifyStream struct { DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"` @@ -695,6 +745,15 @@ func (m *SetIpfixClassifyStreamReply) Unmarshal(b []byte) error { return nil } +// Configure IPFIX exporter process request +// - collector_address - address of IPFIX collector +// - collector_port - port of IPFIX collector +// - src_address - address of IPFIX exporter +// - vrf_id - VRF / fib table ID +// - path_mtu - Path MTU between exporter and collector +// - template_interval - number of seconds after which to resend template +// - udp_checksum - UDP checksum calculation enable flag +// // SetIpfixExporter defines message 'set_ipfix_exporter'. type SetIpfixExporter struct { CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/ipfix_export/ipfix_export_rpc.ba.go b/plugins/vpp/binapi/vpp2306/ipfix_export/ipfix_export_rpc.ba.go index 63a825cc73..7bdc5b54d5 100644 --- a/plugins/vpp/binapi/vpp2306/ipfix_export/ipfix_export_rpc.ba.go +++ b/plugins/vpp/binapi/vpp2306/ipfix_export/ipfix_export_rpc.ba.go @@ -63,11 +63,12 @@ func (c *serviceClient_IpfixAllExporterGetClient) Recv() (*IpfixAllExporterDetai return m, nil, nil case *IpfixAllExporterGetReply: if err := api.RetvalToVPPApiError(m.Retval); err != nil { - return nil, nil, err + c.Stream.Close() + return nil, m, err } err = c.Stream.Close() if err != nil { - return nil, nil, err + return nil, m, err } return nil, m, io.EOF default: diff --git a/plugins/vpp/binapi/vpp2306/ipip/ipip.ba.go b/plugins/vpp/binapi/vpp2306/ipip/ipip.ba.go index a3e3bd0456..14d7d3d1ce 100644 --- a/plugins/vpp/binapi/vpp2306/ipip/ipip.ba.go +++ b/plugins/vpp/binapi/vpp2306/ipip/ipip.ba.go @@ -39,6 +39,7 @@ type IpipTunnel struct { Dscp ip_types.IPDscp `binapi:"ip_dscp,name=dscp" json:"dscp,omitempty"` } +// * Create an IPv4 over IPv6 automatic tunnel (6RD) // Ipip6rdAddTunnel defines message 'ipip_6rd_add_tunnel'. type Ipip6rdAddTunnel struct { IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"` @@ -139,6 +140,7 @@ func (m *Ipip6rdAddTunnelReply) Unmarshal(b []byte) error { return nil } +// * Delete an IPv4 over IPv6 automatic tunnel (6RD) // Ipip6rdDelTunnel defines message 'ipip_6rd_del_tunnel'. type Ipip6rdDelTunnel struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -205,6 +207,7 @@ func (m *Ipip6rdDelTunnelReply) Unmarshal(b []byte) error { return nil } +// * Create an IP{v4,v6} over IP{v4,v6} tunnel. // IpipAddTunnel defines message 'ipip_add_tunnel'. type IpipAddTunnel struct { Tunnel IpipTunnel `binapi:"ipip_tunnel,name=tunnel" json:"tunnel,omitempty"` @@ -302,6 +305,7 @@ func (m *IpipAddTunnelReply) Unmarshal(b []byte) error { return nil } +// * Delete an IP{v4,v6} over IP{v4,v6} tunnel. // IpipDelTunnel defines message 'ipip_del_tunnel'. type IpipDelTunnel struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -428,6 +432,7 @@ func (m *IpipTunnelDetails) Unmarshal(b []byte) error { return nil } +// * List all IPIP tunnels // IpipTunnelDump defines message 'ipip_tunnel_dump'. type IpipTunnelDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/ipsec/ipsec.ba.go b/plugins/vpp/binapi/vpp2306/ipsec/ipsec.ba.go index f9163b8362..5b16301b9f 100644 --- a/plugins/vpp/binapi/vpp2306/ipsec/ipsec.ba.go +++ b/plugins/vpp/binapi/vpp2306/ipsec/ipsec.ba.go @@ -44,6 +44,12 @@ type IpsecTunnelProtect struct { SaIn []uint32 `binapi:"u32[n_sa_in],name=sa_in" json:"sa_in,omitempty"` } +// IPsec backend details +// - name - name of the backend +// - protocol - IPsec protocol (value from ipsec_protocol_t) +// - index - backend index +// - active - set to 1 if the backend is active, otherwise 0 +// // IpsecBackendDetails defines message 'ipsec_backend_details'. type IpsecBackendDetails struct { Name string `binapi:"string[128],name=name" json:"name,omitempty"` @@ -89,6 +95,7 @@ func (m *IpsecBackendDetails) Unmarshal(b []byte) error { return nil } +// Dump IPsec backends // IpsecBackendDump defines message 'ipsec_backend_dump'. type IpsecBackendDump struct{} @@ -116,6 +123,11 @@ func (m *IpsecBackendDump) Unmarshal(b []byte) error { return nil } +// IPsec: Add/delete SPD from interface +// - is_add - add security mode if non-zero, else delete +// - sw_if_index - index of the interface +// - spd_id - SPD instance id to use for lookups +// // IpsecInterfaceAddDelSpd defines message 'ipsec_interface_add_del_spd'. type IpsecInterfaceAddDelSpd struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -192,6 +204,7 @@ func (m *IpsecInterfaceAddDelSpdReply) Unmarshal(b []byte) error { return nil } +// Create an IPSec interface // IpsecItfCreate defines message 'ipsec_itf_create'. type IpsecItfCreate struct { Itf IpsecItf `binapi:"ipsec_itf,name=itf" json:"itf,omitempty"` @@ -231,6 +244,10 @@ func (m *IpsecItfCreate) Unmarshal(b []byte) error { return nil } +// Add IPsec interface interface response +// - retval - return status +// - sw_if_index - sw_if_index of new interface (for successful add) +// // IpsecItfCreateReply defines message 'ipsec_itf_create_reply'. type IpsecItfCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -406,6 +423,17 @@ func (m *IpsecItfDump) Unmarshal(b []byte) error { return nil } +// IPsec security association database response +// - entry - The SA details +// - sw_if_index - sw_if_index of tunnel interface, policy-based SAs = ~0 +// - salt - 4 byte salt +// - seq - current sequence number for outbound +// - seq_hi - high 32 bits of ESN for outbound +// - last_seq - highest sequence number received inbound +// - last_seq_hi - high 32 bits of highest ESN received inbound +// - replay_window - bit map of seq nums received relative to last_seq if using anti-replay +// - stat_index - index for the SA in the stats segment @ /net/ipsec/sa +// // IpsecSaDetails defines message 'ipsec_sa_details'. // Deprecated: the message will be removed in the future versions type IpsecSaDetails struct { @@ -517,6 +545,9 @@ func (m *IpsecSaDetails) Unmarshal(b []byte) error { return nil } +// Dump IPsec security association +// - sa_id - optional ID of an SA to dump, if ~0 dump all SAs in SAD +// // IpsecSaDump defines message 'ipsec_sa_dump'. // Deprecated: the message will be removed in the future versions type IpsecSaDump struct { @@ -967,6 +998,9 @@ func (m *IpsecSadEntryAdd) Unmarshal(b []byte) error { return nil } +// IPsec: Add/delete Security Association Database entry +// - entry - Entry to add or delete +// // IpsecSadEntryAddDel defines message 'ipsec_sad_entry_add_del'. // Deprecated: the message will be removed in the future versions type IpsecSadEntryAddDel struct { @@ -1480,6 +1514,15 @@ func (m *IpsecSadEntryDelReply) Unmarshal(b []byte) error { return nil } +// An API to update the tunnel parameters and the ports associated with an SA +// +// Used in the NAT-T case when the NAT data changes +// - sa_id - the id of the SA to update +// - is_tun - update the tunnel if non-zero, else update only the ports +// - tunnel - sender context, to match reply w/ request +// - udp_src_port - new src port for NAT-T. Used if different from 0xffff +// - udp_dst_port - new dst port for NAT-T. Used if different from 0xffff +// // IpsecSadEntryUpdate defines message 'ipsec_sad_entry_update'. type IpsecSadEntryUpdate struct { SadID uint32 `binapi:"u32,name=sad_id" json:"sad_id,omitempty"` @@ -1595,6 +1638,10 @@ func (m *IpsecSadEntryUpdateReply) Unmarshal(b []byte) error { return nil } +// Select IPsec backend +// - protocol - IPsec protocol (value from ipsec_protocol_t) +// - index - backend index +// // IpsecSelectBackend defines message 'ipsec_select_backend'. type IpsecSelectBackend struct { Protocol ipsec_types.IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"` @@ -1665,6 +1712,9 @@ func (m *IpsecSelectBackendReply) Unmarshal(b []byte) error { return nil } +// IPsec Set Async mode +// - async_enable - ipsec async mode on or off +// // IpsecSetAsyncMode defines message 'ipsec_set_async_mode'. type IpsecSetAsyncMode struct { AsyncEnable bool `binapi:"bool,name=async_enable" json:"async_enable,omitempty"` @@ -1731,6 +1781,10 @@ func (m *IpsecSetAsyncModeReply) Unmarshal(b []byte) error { return nil } +// IPsec: Add/delete Security Policy Database +// - is_add - add SPD if non-zero, else delete +// - spd_id - SPD instance id (control plane allocated) +// // IpsecSpdAddDel defines message 'ipsec_spd_add_del'. type IpsecSpdAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -1801,6 +1855,12 @@ func (m *IpsecSpdAddDelReply) Unmarshal(b []byte) error { return nil } +// IPsec policy database response +// +// €param entry - The SPD entry. +// - bytes - byte count of packets matching this policy +// - packets - count of packets matching this policy +// // IpsecSpdDetails defines message 'ipsec_spd_details'. type IpsecSpdDetails struct { Entry ipsec_types.IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"` @@ -1885,6 +1945,10 @@ func (m *IpsecSpdDetails) Unmarshal(b []byte) error { return nil } +// Dump ipsec policy database data +// - spd_id - SPD instance id +// - sa_id - SA id, optional, set to ~0 to see all policies in SPD +// // IpsecSpdDump defines message 'ipsec_spd_dump'. type IpsecSpdDump struct { SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"` @@ -1922,6 +1986,10 @@ func (m *IpsecSpdDump) Unmarshal(b []byte) error { return nil } +// IPsec: Add/delete Security Policy Database entry +// - is_add - add SPD if non-zero, else delete +// - entry - Description of the entry to add/dell +// // IpsecSpdEntryAddDel defines message 'ipsec_spd_entry_add_del'. // Deprecated: the message will be removed in the future versions type IpsecSpdEntryAddDel struct { @@ -2011,6 +2079,10 @@ func (m *IpsecSpdEntryAddDel) Unmarshal(b []byte) error { return nil } +// IPsec: Reply Add/delete Security Policy Database entry +// - retval - success/fail rutrun code +// - stat_index - An index for the policy in the stats segment @ /net/ipec/policy +// // IpsecSpdEntryAddDelReply defines message 'ipsec_spd_entry_add_del_reply'. // Deprecated: the message will be removed in the future versions type IpsecSpdEntryAddDelReply struct { @@ -2049,6 +2121,10 @@ func (m *IpsecSpdEntryAddDelReply) Unmarshal(b []byte) error { return nil } +// IPsec: Add/delete Security Policy Database entry v2 +// - is_add - add SPD if non-zero, else delete +// - entry - Description of the entry to add/dell +// // IpsecSpdEntryAddDelV2 defines message 'ipsec_spd_entry_add_del_v2'. type IpsecSpdEntryAddDelV2 struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -2137,6 +2213,10 @@ func (m *IpsecSpdEntryAddDelV2) Unmarshal(b []byte) error { return nil } +// IPsec: Reply Add/delete Security Policy Database entry v2 +// - retval - success/fail rutrun code +// - stat_index - An index for the policy in the stats segment @ /net/ipec/policy +// // IpsecSpdEntryAddDelV2Reply defines message 'ipsec_spd_entry_add_del_v2_reply'. type IpsecSpdEntryAddDelV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -2174,6 +2254,10 @@ func (m *IpsecSpdEntryAddDelV2Reply) Unmarshal(b []byte) error { return nil } +// IPsec: SPD interface response +// - spd_index - SPD index +// - sw_if_index - index of the interface +// // IpsecSpdInterfaceDetails defines message 'ipsec_spd_interface_details'. type IpsecSpdInterfaceDetails struct { SpdIndex uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"` @@ -2211,6 +2295,11 @@ func (m *IpsecSpdInterfaceDetails) Unmarshal(b []byte) error { return nil } +// IPsec: Get SPD interfaces +// - spd_index - SPD index +// - spd_index_valid - if 1 spd_index is used to filter +// spd_index's, if 0 no filtering is done +// // IpsecSpdInterfaceDump defines message 'ipsec_spd_interface_dump'. type IpsecSpdInterfaceDump struct { SpdIndex uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"` @@ -2248,6 +2337,10 @@ func (m *IpsecSpdInterfaceDump) Unmarshal(b []byte) error { return nil } +// Dump IPsec all SPD IDs response +// - spd_id - SPD instance id (control plane allocated) +// - npolicies - number of policies in SPD +// // IpsecSpdsDetails defines message 'ipsec_spds_details'. type IpsecSpdsDetails struct { SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"` @@ -2285,6 +2378,7 @@ func (m *IpsecSpdsDetails) Unmarshal(b []byte) error { return nil } +// Dump IPsec all SPD IDs // IpsecSpdsDump defines message 'ipsec_spds_dump'. type IpsecSpdsDump struct{} @@ -2442,6 +2536,7 @@ func (m *IpsecTunnelProtectDetails) Unmarshal(b []byte) error { return nil } +// * @brief Dump all tunnel protections // IpsecTunnelProtectDump defines message 'ipsec_tunnel_protect_dump'. type IpsecTunnelProtectDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2475,6 +2570,43 @@ func (m *IpsecTunnelProtectDump) Unmarshal(b []byte) error { return nil } +// Add or Update Protection for a tunnel with IPSEC +// +// Tunnel protection directly associates an SA with all packets +// ingress and egress on the tunnel. This could also be achieved by +// assigning an SPD to the tunnel, but that would incur an unnessccary +// SPD entry lookup. +// For tunnels the ESP acts on the post-encapsulated packet. So if this +// packet: +// +---------+------+ +// | Payload | O-IP | +// +---------+------+ +// where O-IP is the overlay IP addrees that was routed into the tunnel, +// the resulting encapsulated packet will be: +// +---------+------+------+ +// | Payload | O-IP | T-IP | +// +---------+------+------+ +// where T-IP is the tunnel's src.dst IP addresses. +// If the SAs used for protection are in transport mode then the ESP is +// inserted before T-IP, i.e.: +// +---------+------+-----+------+ +// | Payload | O-IP | ESP | T-IP | +// +---------+------+-----+------+ +// If the SAs used for protection are in tunnel mode then another +// encapsulation occurs, i.e.: +// +---------+------+------+-----+------+ +// | Payload | O-IP | T-IP | ESP | C-IP | +// +---------+------+------+-----+------+ +// where C-IP are the crypto endpoint IP addresses defined as the tunnel +// endpoints in the SA. +// The mode for the inbound and outbound SA must be the same. +// - sw_id_index - Tunnel interface to protect +// - nh - The peer/next-hop on the tunnel to which the traffic +// should be protected. For a P2P interface set this to the +// all 0s address. +// - sa_in - The ID [set] of inbound SAs +// - sa_out - The ID of outbound SA +// // IpsecTunnelProtectUpdate defines message 'ipsec_tunnel_protect_update'. type IpsecTunnelProtectUpdate struct { Tunnel IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tunnel" json:"tunnel,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/l2/l2.ba.go b/plugins/vpp/binapi/vpp2306/l2/l2.ba.go index 48f314e041..084585b028 100644 --- a/plugins/vpp/binapi/vpp2306/l2/l2.ba.go +++ b/plugins/vpp/binapi/vpp2306/l2/l2.ba.go @@ -173,6 +173,12 @@ type MacEntry struct { Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"` } +// Set bridge domain ip to mac entry request +// - bd_id - the bridge domain to set the flags for +// - is_add - if non-zero, add the entry, else clear it +// - ip - ipv4 or ipv6 address +// - mac - MAC address +// // BdIPMacAddDel defines message 'bd_ip_mac_add_del'. type BdIPMacAddDel struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -252,6 +258,12 @@ func (m *BdIPMacAddDelReply) Unmarshal(b []byte) error { return nil } +// bridge domain IP to MAC entry details structure +// - bd_id - bridge domain table id +// - is_ipv6 - if non-zero, ipv6 address, else ipv4 address +// - ip_address - ipv4 or ipv6 address +// - mac_address - MAC address +// // BdIPMacDetails defines message 'bd_ip_mac_details'. type BdIPMacDetails struct { Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"` @@ -294,6 +306,9 @@ func (m *BdIPMacDetails) Unmarshal(b []byte) error { return nil } +// Dump bridge domain IP to MAC entries +// - bd_id - bridge domain identifier +// // BdIPMacDump defines message 'bd_ip_mac_dump'. type BdIPMacDump struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -327,6 +342,9 @@ func (m *BdIPMacDump) Unmarshal(b []byte) error { return nil } +// Flush bridge domain IP to MAC entries +// - bd_id - bridge domain identifier +// // BdIPMacFlush defines message 'bd_ip_mac_flush'. type BdIPMacFlush struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -393,6 +411,17 @@ func (m *BdIPMacFlushReply) Unmarshal(b []byte) error { return nil } +// L2 bridge domain add or delete request - will be deprecated +// - bd_id - the bridge domain to create +// - flood - enable/disable bcast/mcast flooding in the bd +// - uu_flood - enable/disable unknown unicast flood in the bd +// - forward - enable/disable forwarding on all interfaces in the bd +// - learn - enable/disable learning on all interfaces in the bd +// - arp_term - enable/disable arp termination in the bd +// - arp_ufwd - enable/disable arp unicast forwarding in the bd +// - mac_age - mac aging time in min, 0 for disabled +// - is_add - add or delete flag +// // BridgeDomainAddDel defines message 'bridge_domain_add_del'. // Deprecated: the message will be removed in the future versions type BridgeDomainAddDel struct { @@ -497,6 +526,18 @@ func (m *BridgeDomainAddDelReply) Unmarshal(b []byte) error { return nil } +// L2 bridge domain add delete request version 2 +// - bd_id - if the id == ~0 creates a bridge domain with an unused id +// if the id != ~0 the id of the bridge domain to create/delete +// - flood - enable/disable bcast/mcast flooding in the bd +// - uu_flood - enable/disable unknown unicast flood in the bd +// - forward - enable/disable forwarding on all interfaces in the bd +// - learn - enable/disable learning on all interfaces in the bd +// - arp_term - enable/disable arp termination in the bd +// - arp_ufwd - enable/disable arp unicast forwarding in the bd +// - mac_age - mac aging time in min, 0 for disabled +// - is_add - add or delete flag +// // BridgeDomainAddDelV2 defines message 'bridge_domain_add_del_v2'. type BridgeDomainAddDelV2 struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -566,6 +607,10 @@ func (m *BridgeDomainAddDelV2) Unmarshal(b []byte) error { return nil } +// L2 bridge domain add delete version 2 response +// - retval - return code for the set bridge flags request +// - resulting_id - the id for the new bridge domain +// // BridgeDomainAddDelV2Reply defines message 'bridge_domain_add_del_v2_reply'. type BridgeDomainAddDelV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -603,6 +648,18 @@ func (m *BridgeDomainAddDelV2Reply) Unmarshal(b []byte) error { return nil } +// L2 bridge domain operational state response +// - bd_id - the bridge domain id +// - flood - bcast/mcast flooding state on all interfaces in the bd +// - uu_flood - unknown unicast flooding state on all interfaces in the bd +// - forward - forwarding state on all interfaces in the bd +// - learn - learning state on all interfaces in the bd +// - arp_term - arp termination state on all interfaces in the bd +// - arp_ufwd - arp unicast forwarding state on all interfaces in the bd +// - mac_age - mac aging time in min, 0 for disabled +// - bd_tag - optional textual tag for the bridge domain +// - n_sw_ifs - number of sw_if_index's in the domain +// // BridgeDomainDetails defines message 'bridge_domain_details'. type BridgeDomainDetails struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -706,6 +763,10 @@ func (m *BridgeDomainDetails) Unmarshal(b []byte) error { return nil } +// L2 bridge domain request operational state details +// - bd_id - the bridge domain id desired or ~0 to request all bds +// - sw_if_index - filter by sw_if_index UNIMPLEMENTED +// // BridgeDomainDump defines message 'bridge_domain_dump'. type BridgeDomainDump struct { BdID uint32 `binapi:"u32,name=bd_id,default=4294967295" json:"bd_id,omitempty"` @@ -743,6 +804,9 @@ func (m *BridgeDomainDump) Unmarshal(b []byte) error { return nil } +// L2 bridge domain set default learn limit +// - learn limit - maximum number of entries by default for bridge domains +// // BridgeDomainSetDefaultLearnLimit defines message 'bridge_domain_set_default_learn_limit'. type BridgeDomainSetDefaultLearnLimit struct { LearnLimit uint32 `binapi:"u32,name=learn_limit" json:"learn_limit,omitempty"` @@ -813,6 +877,10 @@ func (m *BridgeDomainSetDefaultLearnLimitReply) Unmarshal(b []byte) error { return nil } +// L2 bridge domain set learn limit +// - bd_id - the bridge domain idenntifier +// - learn limit - maximum number of entries for this bd +// // BridgeDomainSetLearnLimit defines message 'bridge_domain_set_learn_limit'. type BridgeDomainSetLearnLimit struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -885,6 +953,10 @@ func (m *BridgeDomainSetLearnLimitReply) Unmarshal(b []byte) error { return nil } +// L2 bridge domain set mac age +// - bd_id - the bridge domain to create +// - mac_age - mac aging time in min, 0 for disabled +// // BridgeDomainSetMacAge defines message 'bridge_domain_set_mac_age'. type BridgeDomainSetMacAge struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -955,6 +1027,11 @@ func (m *BridgeDomainSetMacAgeReply) Unmarshal(b []byte) error { return nil } +// Set bridge flags request +// - bd_id - the bridge domain to set the flags for +// - is_set - if non-zero, set the flags, else clear them +// - flags - flags that are non-zero to set or clear +// // BridgeFlags defines message 'bridge_flags'. type BridgeFlags struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -996,6 +1073,10 @@ func (m *BridgeFlags) Unmarshal(b []byte) error { return nil } +// Set bridge flags response +// - retval - return code for the set bridge flags request +// - resulting_feature_bitmap - the internal L2 feature bitmap after the request is implemented +// // BridgeFlagsReply defines message 'bridge_flags_reply'. type BridgeFlagsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1033,6 +1114,10 @@ func (m *BridgeFlagsReply) Unmarshal(b []byte) error { return nil } +// Create BVI interface instance request +// - mac_address - mac addr to assign to the interface if none-zero +// - user_instance - requested instance, ~0 => dynamically allocate +// // BviCreate defines message 'bvi_create'. type BviCreate struct { Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"` @@ -1070,6 +1155,10 @@ func (m *BviCreate) Unmarshal(b []byte) error { return nil } +// Create BVI interface instance response +// - sw_if_index - sw index of the interface that was created +// - retval - return code for the request +// // BviCreateReply defines message 'bvi_create_reply'. type BviCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1107,6 +1196,9 @@ func (m *BviCreateReply) Unmarshal(b []byte) error { return nil } +// Delete BVI interface request +// - sw_if_index - sw index of the interface that was created +// // BviDelete defines message 'bvi_delete'. type BviDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1173,6 +1265,14 @@ func (m *BviDeleteReply) Unmarshal(b []byte) error { return nil } +// Tell client about an IP4 ARP resolution event or +// +// MAC/IP info from ARP requests in L2 BDs +// - pid - client pid registered to receive notification +// - ip - IP address of new ARP term entry +// - sw_if_index - interface of new ARP term entry +// - mac - MAC address of new ARP term entry +// // L2ArpTermEvent defines message 'l2_arp_term_event'. type L2ArpTermEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -1221,6 +1321,7 @@ func (m *L2ArpTermEvent) Unmarshal(b []byte) error { return nil } +// L2 fib clear table request, clear all mac entries in the l2 fib // L2FibClearTable defines message 'l2_fib_clear_table'. type L2FibClearTable struct{} @@ -1281,6 +1382,14 @@ func (m *L2FibClearTableReply) Unmarshal(b []byte) error { return nil } +// l2 fib table details structure +// - bd_id - the l2 fib / bridge domain table id +// - mac - the entry's mac address +// - sw_if_index - index of the interface +// - static_mac - the entry is statically configured. +// - filter_mac - the entry is a mac filter entry. +// - bvi_mac - the mac address is a bridge virtual interface +// // L2FibTableDetails defines message 'l2_fib_table_details'. type L2FibTableDetails struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -1334,6 +1443,9 @@ func (m *L2FibTableDetails) Unmarshal(b []byte) error { return nil } +// Dump l2 fib (aka bridge domain) table +// - bd_id - the l2 fib / bridge domain table identifier +// // L2FibTableDump defines message 'l2_fib_table_dump'. type L2FibTableDump struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -1367,6 +1479,16 @@ func (m *L2FibTableDump) Unmarshal(b []byte) error { return nil } +// Set interface L2 flags (such as L2_LEARN, L2_FWD, +// +// L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits). This can be used +// to disable one or more of the features represented by the +// flag bits on an interface to override what is set as default +// for all interfaces in the bridge domain +// - sw_if_index - interface +// - is_set - if non-zero, set the bits, else clear them +// - feature_bitmap - non-zero bits (as above) to set or clear +// // L2Flags defines message 'l2_flags'. type L2Flags struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1408,6 +1530,10 @@ func (m *L2Flags) Unmarshal(b []byte) error { return nil } +// Set interface L2 flags response +// - retval - return code for the set l2 bits request +// - resulting_feature_bitmap - the internal l2 feature bitmap after the request is implemented +// // L2FlagsReply defines message 'l2_flags_reply'. type L2FlagsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1445,6 +1571,10 @@ func (m *L2FlagsReply) Unmarshal(b []byte) error { return nil } +// L2 interface ethernet flow point filtering enable/disable request +// - sw_if_index - interface to enable/disable filtering on +// - enable_disable - if non-zero enable filtering, else disable +// // L2InterfaceEfpFilter defines message 'l2_interface_efp_filter'. type L2InterfaceEfpFilter struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1515,6 +1645,16 @@ func (m *L2InterfaceEfpFilterReply) Unmarshal(b []byte) error { return nil } +// L2 interface pbb tag rewrite configure request +// - sw_if_index - interface the operation is applied to +// - vtr_op - Choose from l2_vtr_op_t enum values +// - inner_tag - needed for translate_qinq vtr op only +// - outer_tag - needed for translate_qinq vtr op only +// - b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op +// - b_smac - B-tag local mac address, needed for any push or translate qinq vtr op +// - b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op +// - i_sid - I-tag service id, needed for any push or translate qinq vtr op +// // L2InterfacePbbTagRewrite defines message 'l2_interface_pbb_tag_rewrite'. type L2InterfacePbbTagRewrite struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1607,6 +1747,13 @@ func (m *L2InterfacePbbTagRewriteReply) Unmarshal(b []byte) error { return nil } +// L2 interface vlan tag rewrite configure request +// - sw_if_index - interface the operation is applied to +// - vtr_op - Choose from l2_vtr_op_t enum values +// - push_dot1q - first pushed flag dot1q id set, else dot1ad +// - tag1 - Needed for any push or translate vtr op +// - tag2 - Needed for any push 2 or translate x-2 vtr ops +// // L2InterfaceVlanTagRewrite defines message 'l2_interface_vlan_tag_rewrite'. type L2InterfaceVlanTagRewrite struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1691,6 +1838,11 @@ func (m *L2InterfaceVlanTagRewriteReply) Unmarshal(b []byte) error { return nil } +// L2 MAC event for a list of learned or aged MACs +// - pid - client pid registered to receive notification +// - n_macs - number of learned/aged MAC entries +// - mac - array of learned/aged MAC entries +// // L2MacsEvent defines message 'l2_macs_event'. type L2MacsEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -1757,6 +1909,11 @@ func (m *L2MacsEvent) Unmarshal(b []byte) error { return nil } +// L2 interface patch add / del request +// - rx_sw_if_index - receive side interface +// - tx_sw_if_index - transmit side interface +// - is_add - if non-zero set up the interface patch, else remove it +// // L2PatchAddDel defines message 'l2_patch_add_del'. type L2PatchAddDel struct { RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` @@ -1831,6 +1988,10 @@ func (m *L2PatchAddDelReply) Unmarshal(b []byte) error { return nil } +// Reply to l2_xconnect_dump +// - rx_sw_if_index - Receive interface index +// - tx_sw_if_index - Transmit interface index +// // L2XconnectDetails defines message 'l2_xconnect_details'. type L2XconnectDetails struct { RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` @@ -1868,6 +2029,7 @@ func (m *L2XconnectDetails) Unmarshal(b []byte) error { return nil } +// Dump L2 XConnects // L2XconnectDump defines message 'l2_xconnect_dump'. type L2XconnectDump struct{} @@ -1895,6 +2057,15 @@ func (m *L2XconnectDump) Unmarshal(b []byte) error { return nil } +// L2 FIB add entry request +// - mac - the entry's mac address +// - bd_id - the entry's bridge domain id +// - sw_if_index - the interface +// - is_add - If non zero add the entry, else delete it +// - static_mac - +// - filter_mac - +// - bvi_mac - +// // L2fibAddDel defines message 'l2fib_add_del'. type L2fibAddDel struct { Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"` @@ -1985,6 +2156,7 @@ func (m *L2fibAddDelReply) Unmarshal(b []byte) error { return nil } +// L2 FIB flush all entries // L2fibFlushAll defines message 'l2fib_flush_all'. type L2fibFlushAll struct{} @@ -2045,6 +2217,9 @@ func (m *L2fibFlushAllReply) Unmarshal(b []byte) error { return nil } +// L2 FIB flush bridge domain entries +// - bd_id - the entry's bridge domain id +// // L2fibFlushBd defines message 'l2fib_flush_bd'. type L2fibFlushBd struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -2111,6 +2286,9 @@ func (m *L2fibFlushBdReply) Unmarshal(b []byte) error { return nil } +// L2 FIB flush interface entries +// - bd_id - the entry's bridge domain id +// // L2fibFlushInt defines message 'l2fib_flush_int'. type L2fibFlushInt struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2177,6 +2355,9 @@ func (m *L2fibFlushIntReply) Unmarshal(b []byte) error { return nil } +// set l2 table scan delay +// - scan_delay - event scan delay in 10 msec unit +// // L2fibSetScanDelay defines message 'l2fib_set_scan_delay'. type L2fibSetScanDelay struct { ScanDelay uint16 `binapi:"u16,name=scan_delay,default=10" json:"scan_delay,omitempty"` @@ -2243,6 +2424,13 @@ func (m *L2fibSetScanDelayReply) Unmarshal(b []byte) error { return nil } +// Interface bridge mode request +// - rx_sw_if_index - the interface +// - bd_id - bridge domain id +// - port_type - port_mode, see #l2_port_type +// - shg - Split horizon group, for bridge mode only +// - enable - Enable beige mode if not 0, else set to L3 mode +// // SwInterfaceSetL2Bridge defines message 'sw_interface_set_l2_bridge'. type SwInterfaceSetL2Bridge struct { RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` @@ -2327,6 +2515,11 @@ func (m *SwInterfaceSetL2BridgeReply) Unmarshal(b []byte) error { return nil } +// Set L2 XConnect between two interfaces request +// - rx_sw_if_index - Receive interface index +// - tx_sw_if_index - Transmit interface index +// - enable - enable xconnect if not 0, else set to L3 mode +// // SwInterfaceSetL2Xconnect defines message 'sw_interface_set_l2_xconnect'. type SwInterfaceSetL2Xconnect struct { RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` @@ -2403,6 +2596,10 @@ func (m *SwInterfaceSetL2XconnectReply) Unmarshal(b []byte) error { return nil } +// Interface set vpath request +// - sw_if_index - interface used to reach neighbor +// - enable - if non-zero enable, else disable +// // SwInterfaceSetVpath defines message 'sw_interface_set_vpath'. type SwInterfaceSetVpath struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2473,6 +2670,12 @@ func (m *SwInterfaceSetVpathReply) Unmarshal(b []byte) error { return nil } +// Register for IP4 ARP resolution event on receiving ARP reply or +// +// MAC/IP info from ARP requests in L2 BDs +// - enable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// // WantL2ArpTermEvents defines message 'want_l2_arp_term_events'. type WantL2ArpTermEvents struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` @@ -2543,6 +2746,13 @@ func (m *WantL2ArpTermEventsReply) Unmarshal(b []byte) error { return nil } +// Register to receive L2 MAC events for learned and aged MAC +// - learn_limit - MAC learn limit +// - scan_delay - event scan delay in 10 msec unit +// - max_macs_in_event - in units of 10 mac entries +// - enable_disable - 1 => register for MAC events, 0 => cancel registration +// - pid - sender's pid +// // WantL2MacsEvents defines message 'want_l2_macs_events'. // Deprecated: the message will be removed in the future versions type WantL2MacsEvents struct { @@ -2593,6 +2803,11 @@ func (m *WantL2MacsEvents) Unmarshal(b []byte) error { return nil } +// Register to receive L2 MAC events for learned and aged MAC +// - max_macs_in_event - in units of 10 mac entries +// - enable_disable - 1 => register for MAC events, 0 => cancel registration +// - pid - sender's pid +// // WantL2MacsEvents2 defines message 'want_l2_macs_events2'. type WantL2MacsEvents2 struct { MaxMacsInEvent uint8 `binapi:"u8,name=max_macs_in_event,default=10" json:"max_macs_in_event,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/memclnt/memclnt.ba.go b/plugins/vpp/binapi/vpp2306/memclnt/memclnt.ba.go index 528da20e2d..87f4755313 100644 --- a/plugins/vpp/binapi/vpp2306/memclnt/memclnt.ba.go +++ b/plugins/vpp/binapi/vpp2306/memclnt/memclnt.ba.go @@ -38,6 +38,9 @@ type ModuleVersion struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` } +// /* +// - Get API version table (includes built-in and plugins) +// // APIVersions defines message 'api_versions'. type APIVersions struct{} @@ -131,6 +134,7 @@ func (m *APIVersionsReply) Unmarshal(b []byte) error { return nil } +// Control ping from client to api server request // ControlPing defines message 'control_ping'. type ControlPing struct{} @@ -158,6 +162,10 @@ func (m *ControlPing) Unmarshal(b []byte) error { return nil } +// Control ping from the client to the server response +// - retval - return code for the request +// - vpe_pid - the pid of the vpe, returned by the server +// // ControlPingReply defines message 'control_ping_reply'. type ControlPingReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -199,6 +207,9 @@ func (m *ControlPingReply) Unmarshal(b []byte) error { return nil } +// /* +// - Lookup message-ID base by name +// // GetFirstMsgID defines message 'get_first_msg_id'. type GetFirstMsgID struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` @@ -269,6 +280,9 @@ func (m *GetFirstMsgIDReply) Unmarshal(b []byte) error { return nil } +// /* +// - Create a client registration +// // MemclntCreate defines message 'memclnt_create'. type MemclntCreate struct { CtxQuota int32 `binapi:"i32,name=ctx_quota" json:"ctx_quota,omitempty"` @@ -471,6 +485,9 @@ func (m *MemclntCreateV2Reply) Unmarshal(b []byte) error { return nil } +// /* +// - Delete a client registration +// // MemclntDelete defines message 'memclnt_delete'. type MemclntDelete struct { Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` @@ -549,6 +566,10 @@ func (m *MemclntDeleteReply) Unmarshal(b []byte) error { return nil } +// /* +// - Memory client ping / response +// - Only sent on inactive connections +// // MemclntKeepalive defines message 'memclnt_keepalive'. type MemclntKeepalive struct{} @@ -609,6 +630,9 @@ func (m *MemclntKeepaliveReply) Unmarshal(b []byte) error { return nil } +// /* +// - Client read timeout +// // MemclntReadTimeout defines message 'memclnt_read_timeout'. type MemclntReadTimeout struct { Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` @@ -642,6 +666,9 @@ func (m *MemclntReadTimeout) Unmarshal(b []byte) error { return nil } +// /* +// - Client RX thread suspend +// // MemclntRxThreadSuspend defines message 'memclnt_rx_thread_suspend'. type MemclntRxThreadSuspend struct { Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` @@ -675,6 +702,9 @@ func (m *MemclntRxThreadSuspend) Unmarshal(b []byte) error { return nil } +// /* +// - RPC +// // RPCCall defines message 'rpc_call'. type RPCCall struct { Function uint64 `binapi:"u64,name=function" json:"function,omitempty"` @@ -762,6 +792,9 @@ func (m *RPCCallReply) Unmarshal(b []byte) error { return nil } +// /* +// - Client RX thread exit +// // RxThreadExit defines message 'rx_thread_exit'. type RxThreadExit struct { Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` @@ -795,6 +828,9 @@ func (m *RxThreadExit) Unmarshal(b []byte) error { return nil } +// /* +// - Initialize shm api over socket api +// // SockInitShm defines message 'sock_init_shm'. type SockInitShm struct { RequestedSize uint32 `binapi:"u32,name=requested_size" json:"requested_size,omitempty"` @@ -878,6 +914,9 @@ func (m *SockInitShmReply) Unmarshal(b []byte) error { return nil } +// /* +// - Create a socket client registration. +// // SockclntCreate defines message 'sockclnt_create'. type SockclntCreate struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` @@ -975,6 +1014,9 @@ func (m *SockclntCreateReply) Unmarshal(b []byte) error { return nil } +// /* +// - Delete a client registration +// // SockclntDelete defines message 'sockclnt_delete'. type SockclntDelete struct { Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` @@ -1041,6 +1083,11 @@ func (m *SockclntDeleteReply) Unmarshal(b []byte) error { return nil } +// /* +// - Trace the plugin message-id allocator +// - so we stand a chance of dealing with different sets of plugins +// - at api trace replay time +// // TracePluginMsgIds defines message 'trace_plugin_msg_ids'. type TracePluginMsgIds struct { PluginName string `binapi:"string[128],name=plugin_name" json:"plugin_name,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/punt/punt.ba.go b/plugins/vpp/binapi/vpp2306/punt/punt.ba.go index 6da9a9178c..062af26842 100644 --- a/plugins/vpp/binapi/vpp2306/punt/punt.ba.go +++ b/plugins/vpp/binapi/vpp2306/punt/punt.ba.go @@ -182,6 +182,9 @@ func (m *PuntReasonDetails) Unmarshal(b []byte) error { return nil } +// Dump all or one of the exception punt reasons +// * - - If the string is not set punt dump all reasons +// * else dump only the one specified // PuntReasonDump defines message 'punt_reason_dump'. type PuntReasonDump struct { Reason PuntReason `binapi:"punt_reason,name=reason" json:"reason,omitempty"` @@ -360,6 +363,10 @@ func (m *PuntSocketDump) Unmarshal(b []byte) error { return nil } +// Punt traffic to the host via socket +// - header_version - expected meta data header version (currently 1) +// - punt - punt definition +// // PuntSocketRegister defines message 'punt_socket_register'. type PuntSocketRegister struct { HeaderVersion uint32 `binapi:"u32,name=header_version" json:"header_version,omitempty"` @@ -441,6 +448,10 @@ func (m *PuntSocketRegisterReply) Unmarshal(b []byte) error { return nil } +// Punt traffic to the host +// - is_add - add punt if non-zero, else delete +// - punt - punt definition, only UDP (0x11) is supported +// // SetPunt defines message 'set_punt'. type SetPunt struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/rd_cp/rd_cp.ba.go b/plugins/vpp/binapi/vpp2306/rd_cp/rd_cp.ba.go index c443d77d6f..eaafb94555 100644 --- a/plugins/vpp/binapi/vpp2306/rd_cp/rd_cp.ba.go +++ b/plugins/vpp/binapi/vpp2306/rd_cp/rd_cp.ba.go @@ -24,6 +24,16 @@ const ( VersionCrc = 0x871c3bee ) +// Enable/disable IPv6 ND address autoconfiguration +// +// and setting up default routes +// - sw_if_index - interface to enable the autoconfigutation on +// - enable - 1 to enable address autoconfiguration, 0 to disable +// - install_default_routes - 1 to enable installing defaut routes, +// 0 to disable installing defaut routes, +// the value is ignored (and taken as 0) +// when enable param is set to 0 +// // IP6NdAddressAutoconfig defines message 'ip6_nd_address_autoconfig'. type IP6NdAddressAutoconfig struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/span/span.ba.go b/plugins/vpp/binapi/vpp2306/span/span.ba.go index 5898c43d89..68dc688665 100644 --- a/plugins/vpp/binapi/vpp2306/span/span.ba.go +++ b/plugins/vpp/binapi/vpp2306/span/span.ba.go @@ -60,6 +60,12 @@ func (x SpanState) String() string { return "SpanState(" + strconv.Itoa(int(x)) + ")" } +// Reply to SPAN dump request +// - sw_if_index_from - mirrored interface +// - sw_if_index_to - interface where the traffic is mirrored +// - state - 0 = disabled, 1 = rx enabled, 2 = tx enabled, 3 tx & rx enabled +// - is_l2 - 0 = mirrored at hw device level, 1 = mirrored at l2 +// // SwInterfaceSpanDetails defines message 'sw_interface_span_details'. type SwInterfaceSpanDetails struct { SwIfIndexFrom interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index_from" json:"sw_if_index_from,omitempty"` @@ -105,6 +111,9 @@ func (m *SwInterfaceSpanDetails) Unmarshal(b []byte) error { return nil } +// SPAN dump request +// - is_l2 - 0 = hw device level, 1 = L2 +// // SwInterfaceSpanDump defines message 'sw_interface_span_dump'. type SwInterfaceSpanDump struct { IsL2 bool `binapi:"bool,name=is_l2" json:"is_l2,omitempty"` @@ -138,6 +147,12 @@ func (m *SwInterfaceSpanDump) Unmarshal(b []byte) error { return nil } +// Enable/Disable span to mirror traffic from one interface to another +// - sw_if_index_from - interface to be mirrored +// - sw_if_index_to - interface where the traffic is mirrored +// - state - 0 = disabled, 1 = rx enabled, 2 = tx enabled, 3 tx & rx enabled +// - is_l2 - 0 = mirror at hw device level, 1 = mirror at L2 +// // SwInterfaceSpanEnableDisable defines message 'sw_interface_span_enable_disable'. type SwInterfaceSpanEnableDisable struct { SwIfIndexFrom interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index_from" json:"sw_if_index_from,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/sr/sr.ba.go b/plugins/vpp/binapi/vpp2306/sr/sr.ba.go index bc1ab207a3..b986c5663f 100644 --- a/plugins/vpp/binapi/vpp2306/sr/sr.ba.go +++ b/plugins/vpp/binapi/vpp2306/sr/sr.ba.go @@ -75,6 +75,17 @@ type Srv6SidListWithSlIndex struct { Sids [16]ip_types.IP6Address `binapi:"ip6_address[16],name=sids" json:"sids,omitempty"` } +// IPv6 SR LocalSID add/del request +// - is_del Boolean of whether its a delete instruction +// - localsid_addr IPv6 address of the localsid +// - end_psp Boolean of whether decapsulation is allowed in this function +// - behavior Type of behavior (function) for this localsid +// - sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the +// fib_table. Default:0xffffffff +// - vlan_index Only for L2 xconnect. Outgoing VLAN tag. +// - fib_table FIB table in which we should install the localsid entry +// - nh_addr Next Hop IPv46 address. Only for L2/L3 xconnect. +// // SrLocalsidAddDel defines message 'sr_localsid_add_del'. type SrLocalsidAddDel struct { IsDel bool `binapi:"bool,name=is_del,default=false" json:"is_del,omitempty"` @@ -232,6 +243,7 @@ func (m *SrLocalsidsDetails) Unmarshal(b []byte) error { return nil } +// Dump the list of SR LocalSIDs // SrLocalsidsDump defines message 'sr_localsids_dump'. type SrLocalsidsDump struct{} @@ -338,6 +350,7 @@ func (m *SrLocalsidsWithPacketStatsDetails) Unmarshal(b []byte) error { return nil } +// Dump the list of SR LocalSIDs along with packet statistics // SrLocalsidsWithPacketStatsDump defines message 'sr_localsids_with_packet_stats_dump'. // InProgress: the message form may change in the future versions type SrLocalsidsWithPacketStatsDump struct{} @@ -449,6 +462,7 @@ func (m *SrPoliciesDetails) Unmarshal(b []byte) error { return nil } +// Dump the list of SR policies // SrPoliciesDump defines message 'sr_policies_dump'. type SrPoliciesDump struct{} @@ -562,6 +576,7 @@ func (m *SrPoliciesV2Details) Unmarshal(b []byte) error { return nil } +// Dump the list of SR policies v2 // SrPoliciesV2Dump defines message 'sr_policies_v2_dump'. type SrPoliciesV2Dump struct{} @@ -676,6 +691,7 @@ func (m *SrPoliciesWithSlIndexDetails) Unmarshal(b []byte) error { return nil } +// Dump the list of SR policies along with actual segment list index on VPP // SrPoliciesWithSlIndexDump defines message 'sr_policies_with_sl_index_dump'. // InProgress: the message form may change in the future versions type SrPoliciesWithSlIndexDump struct{} @@ -704,6 +720,14 @@ func (m *SrPoliciesWithSlIndexDump) Unmarshal(b []byte) error { return nil } +// IPv6 SR policy add +// - bsid is the bindingSID of the SR Policy +// - weight is the weight of the sid list. optional. +// - is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation) +// - is_spray is the type of the SR policy. (0.Default // 1.Spray) +// - fib_table is the VRF where to install the FIB entry for the BSID +// - sids is a srv6_sid_list object +// // SrPolicyAdd defines message 'sr_policy_add'. type SrPolicyAdd struct { BsidAddr ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"` @@ -802,6 +826,15 @@ func (m *SrPolicyAddReply) Unmarshal(b []byte) error { return nil } +// IPv6 SR policy add +// - bsid is the bindingSID of the SR Policy +// - weight is the weight of the sid list. optional. +// - is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation) +// - type is the SR policy param. (0.Default // 1.Spray // 2.Tef) +// - fib_table is the VRF where to install the FIB entry for the BSID +// - sids is a srv6_sid_list object +// - encap_src is a encaps IPv6 source addr. optional. +// // SrPolicyAddV2 defines message 'sr_policy_add_v2'. // InProgress: the message form may change in the future versions type SrPolicyAddV2 struct { @@ -906,6 +939,10 @@ func (m *SrPolicyAddV2Reply) Unmarshal(b []byte) error { return nil } +// IPv6 SR policy deletion +// - bsid is the bindingSID of the SR Policy +// - index is the index of the SR policy +// // SrPolicyDel defines message 'sr_policy_del'. type SrPolicyDel struct { BsidAddr ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"` @@ -976,6 +1013,15 @@ func (m *SrPolicyDelReply) Unmarshal(b []byte) error { return nil } +// IPv6 SR policy modification +// - bsid is the bindingSID of the SR Policy +// - sr_policy_index is the index of the SR policy +// - fib_table is the VRF where to install the FIB entry for the BSID +// - operation is the operation to perform (among the top ones) +// - sl_index is the index of the Segment List to modify/delete +// - weight is the weight of the sid list. optional. +// - sids is a srv6_sid_list object +// // SrPolicyMod defines message 'sr_policy_mod'. type SrPolicyMod struct { BsidAddr ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"` @@ -1078,6 +1124,16 @@ func (m *SrPolicyModReply) Unmarshal(b []byte) error { return nil } +// IPv6 SR policy modification +// - bsid is the bindingSID of the SR Policy +// - sr_policy_index is the index of the SR policy +// - fib_table is the VRF where to install the FIB entry for the BSID +// - operation is the operation to perform (among the top ones) +// - sl_index is the index of the Segment List to modify/delete +// - weight is the weight of the sid list. optional. +// - sids is a srv6_sid_list object +// - encap_src is a encaps IPv6 source addr. optional. +// // SrPolicyModV2 defines message 'sr_policy_mod_v2'. // InProgress: the message form may change in the future versions type SrPolicyModV2 struct { @@ -1186,6 +1242,9 @@ func (m *SrPolicyModV2Reply) Unmarshal(b []byte) error { return nil } +// IPv6 SR Set SRv6 encapsulation hop-limit +// - hop_limit is the hop-limit value to set +// // SrSetEncapHopLimit defines message 'sr_set_encap_hop_limit'. type SrSetEncapHopLimit struct { HopLimit uint8 `binapi:"u8,name=hop_limit" json:"hop_limit,omitempty"` @@ -1252,6 +1311,10 @@ func (m *SrSetEncapHopLimitReply) Unmarshal(b []byte) error { return nil } +// IPv6 SR Set SRv6 encapsulation source +// - bsid is the bindingSID of the SR Policy +// - index is the index of the SR policy +// // SrSetEncapSource defines message 'sr_set_encap_source'. type SrSetEncapSource struct { EncapsSource ip_types.IP6Address `binapi:"ip6_address,name=encaps_source" json:"encaps_source,omitempty"` @@ -1318,6 +1381,16 @@ func (m *SrSetEncapSourceReply) Unmarshal(b []byte) error { return nil } +// IPv6 SR steering add/del +// - is_del +// - bsid is the bindingSID of the SR Policy (alt to sr_policy_index) +// - sr_policy is the index of the SR Policy (alt to bsid) +// - table_id is the VRF where to install the FIB entry for the BSID +// - prefix is the IPv4/v6 address for L3 traffic type +// - mask_width is the mask for L3 traffic type +// - sw_if_index is the incoming interface for L2 traffic +// - traffic_type describes the type of traffic +// // SrSteeringAddDel defines message 'sr_steering_add_del'. type SrSteeringAddDel struct { IsDel bool `binapi:"bool,name=is_del,default=false" json:"is_del,omitempty"` @@ -1469,6 +1542,7 @@ func (m *SrSteeringPolDetails) Unmarshal(b []byte) error { return nil } +// Dump the steering policies // SrSteeringPolDump defines message 'sr_steering_pol_dump'. type SrSteeringPolDump struct{} diff --git a/plugins/vpp/binapi/vpp2306/tapv2/tapv2.ba.go b/plugins/vpp/binapi/vpp2306/tapv2/tapv2.ba.go index 35c01cce34..63340f2b76 100644 --- a/plugins/vpp/binapi/vpp2306/tapv2/tapv2.ba.go +++ b/plugins/vpp/binapi/vpp2306/tapv2/tapv2.ba.go @@ -93,6 +93,21 @@ func (x TapFlags) String() string { return s } +// Reply for tap dump request +// - sw_if_index - software index of tap interface +// - id - interface id +// - tx_ring_sz - the number of entries of TX ring +// - rx_ring_sz - the number of entries of RX ring +// - host_mtu_size - host mtu size +// - host_mac_addr - mac address assigned to the host side of the interface +// - host_ip4_prefix - host IPv4 ip address +// - host_ip6_prefix - host IPv6 ip address +// - tap_flags - flags for the TAP interface creation +// - dev_name - Linux tap device name +// - host_if_name - host side interface name +// - host_namespace - host namespace the interface is attached into +// - host_bridge - host bridge the interface is attached into +// // SwInterfaceTapV2Details defines message 'sw_interface_tap_v2_details'. type SwInterfaceTapV2Details struct { SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -180,6 +195,9 @@ func (m *SwInterfaceTapV2Details) Unmarshal(b []byte) error { return nil } +// Dump tap interfaces request +// - sw_if_index - filter by sw_if_index +// // SwInterfaceTapV2Dump defines message 'sw_interface_tap_v2_dump'. type SwInterfaceTapV2Dump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -213,6 +231,34 @@ func (m *SwInterfaceTapV2Dump) Unmarshal(b []byte) error { return nil } +// Initialize a new tap interface with the given parameters +// - id - interface id, 0xffffffff means auto +// - use_random_mac - let the system generate a unique mac address +// - mac_address - mac addr to assign to the interface if use_random not set +// - num_rx_queues - number of rx queues +// - tx_ring_sz - the number of entries of TX ring, optional, default is 256 entries, must be power of 2 +// - rx_ring_sz - the number of entries of RX ring, optional, default is 256 entries, must be power of 2 +// - host_mtu_set - host MTU should be set +// - host_mtu_size - host MTU size +// - host_mac_addr_set - host side interface mac address should be set +// - host_mac_addr - host side interface mac address +// - host_ip4_prefix_set - host IPv4 ip address should be set +// - host_ip4_prefix - host IPv4 ip address +// - host_ip6_prefix_set - host IPv6 ip address should be set +// - host_ip6_prefix - host IPv6 ip address +// - host_ip4_gw_set - host IPv4 default gateway should be set +// - host_ip4_gw - host IPv4 default gateway +// - host_ip6_gw_set - host IPv6 default gateway should be set +// - host_ip6_gw - host IPv6 default gateway +// - tap_flags - flags for the TAP interface creation +// - host_if_name_set - host side interface name should be set +// - host_if_name - host side interface name +// - host_namespace_set - host namespace should be set +// - host_namespace - host namespace to attach interface to +// - host_bridge_set - host bridge should be set +// - host_bridge - host bridge to attach interface to +// - tag - tag +// // TapCreateV2 defines message 'tap_create_v2'. type TapCreateV2 struct { ID uint32 `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"` @@ -352,6 +398,10 @@ func (m *TapCreateV2) Unmarshal(b []byte) error { return nil } +// Reply for tap create reply +// - retval - return code +// - sw_if_index - software index allocated for the new tap interface +// // TapCreateV2Reply defines message 'tap_create_v2_reply'. type TapCreateV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -389,6 +439,35 @@ func (m *TapCreateV2Reply) Unmarshal(b []byte) error { return nil } +// Initialize a new tap interface with the given parameters +// - id - interface id, 0xffffffff means auto +// - use_random_mac - let the system generate a unique mac address +// - mac_address - mac addr to assign to the interface if use_random not set +// - num_rx_queues - number of rx queues +// - num_tx_queues - number of tx queues +// - tx_ring_sz - the number of entries of TX ring, optional, default is 256 entries, must be power of 2 +// - rx_ring_sz - the number of entries of RX ring, optional, default is 256 entries, must be power of 2 +// - host_mtu_set - host MTU should be set +// - host_mtu_size - host MTU size +// - host_mac_addr_set - host side interface mac address should be set +// - host_mac_addr - host side interface mac address +// - host_ip4_prefix_set - host IPv4 ip address should be set +// - host_ip4_prefix - host IPv4 ip address +// - host_ip6_prefix_set - host IPv6 ip address should be set +// - host_ip6_prefix - host IPv6 ip address +// - host_ip4_gw_set - host IPv4 default gateway should be set +// - host_ip4_gw - host IPv4 default gateway +// - host_ip6_gw_set - host IPv6 default gateway should be set +// - host_ip6_gw - host IPv6 default gateway +// - tap_flags - flags for the TAP interface creation +// - host_if_name_set - host side interface name should be set +// - host_if_name - host side interface name +// - host_namespace_set - host namespace should be set +// - host_namespace - host namespace to attach interface to +// - host_bridge_set - host bridge should be set +// - host_bridge - host bridge to attach interface to +// - tag - tag +// // TapCreateV3 defines message 'tap_create_v3'. type TapCreateV3 struct { ID uint32 `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"` @@ -532,6 +611,10 @@ func (m *TapCreateV3) Unmarshal(b []byte) error { return nil } +// Reply for tap create reply +// - retval - return code +// - sw_if_index - software index allocated for the new tap interface +// // TapCreateV3Reply defines message 'tap_create_v3_reply'. type TapCreateV3Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -569,6 +652,9 @@ func (m *TapCreateV3Reply) Unmarshal(b []byte) error { return nil } +// Delete tap interface +// - sw_if_index - interface index of existing tap interface +// // TapDeleteV2 defines message 'tap_delete_v2'. type TapDeleteV2 struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/teib/teib.ba.go b/plugins/vpp/binapi/vpp2306/teib/teib.ba.go index f13566590a..d6f3b78b2d 100644 --- a/plugins/vpp/binapi/vpp2306/teib/teib.ba.go +++ b/plugins/vpp/binapi/vpp2306/teib/teib.ba.go @@ -109,6 +109,9 @@ func (m *TeibDump) Unmarshal(b []byte) error { return nil } +// TEIB Entry +// - sw_if_index +// // TeibEntryAddDel defines message 'teib_entry_add_del'. type TeibEntryAddDel struct { IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/vlib/vlib.ba.go b/plugins/vpp/binapi/vpp2306/vlib/vlib.ba.go index 2f8e2c7a09..64574e4612 100644 --- a/plugins/vpp/binapi/vpp2306/vlib/vlib.ba.go +++ b/plugins/vpp/binapi/vpp2306/vlib/vlib.ba.go @@ -35,6 +35,10 @@ type ThreadData struct { CPUSocket uint32 `binapi:"u32,name=cpu_socket" json:"cpu_socket,omitempty"` } +// Set the next node for a given node request +// - node_name[] - node to add the next node to +// - next_name[] - node to add as the next node +// // AddNodeNext defines message 'add_node_next'. type AddNodeNext struct { NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"` @@ -72,6 +76,10 @@ func (m *AddNodeNext) Unmarshal(b []byte) error { return nil } +// IP Set the next node for a given node response +// - retval - return code for the add next node request +// - next_index - the index of the next node if success, else ~0 +// // AddNodeNextReply defines message 'add_node_next_reply'. type AddNodeNextReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -109,6 +117,9 @@ func (m *AddNodeNextReply) Unmarshal(b []byte) error { return nil } +// Process a vpe parser cli string request +// - cmd_in_shmem - pointer to cli command string +// // Cli defines message 'cli'. type Cli struct { CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"` @@ -212,6 +223,10 @@ func (m *CliInbandReply) Unmarshal(b []byte) error { return nil } +// vpe parser cli string response +// - retval - return code for request +// - reply_in_shmem - Reply string from cli processing if any +// // CliReply defines message 'cli_reply'. type CliReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -249,6 +264,9 @@ func (m *CliReply) Unmarshal(b []byte) error { return nil } +// f64 types are not standardized across the wire. Sense wire format in each direction by sending the f64 value 1.0. +// - f64_one - The constant of 1.0. If you send a different value, expect an rv=VNET_API_ERROR_API_ENDIAN_FAILED. +// // GetF64EndianValue defines message 'get_f64_endian_value'. type GetF64EndianValue struct { F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"` @@ -282,6 +300,10 @@ func (m *GetF64EndianValue) Unmarshal(b []byte) error { return nil } +// get_f64_endian_value reply message +// - retval - return value - VNET_API_ERROR_API_ENDIAN_FAILED if f64_one != 1.0 +// - f64_one_result - The value of 'f64 1.0' +// // GetF64EndianValueReply defines message 'get_f64_endian_value_reply'. type GetF64EndianValueReply struct { Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"` @@ -319,6 +341,9 @@ func (m *GetF64EndianValueReply) Unmarshal(b []byte) error { return nil } +// Verify f64 wire format by sending a value and receiving the value + 1.0 +// - f64_value - The value you want to test. Default: 1.0. +// // GetF64IncrementByOne defines message 'get_f64_increment_by_one'. type GetF64IncrementByOne struct { F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"` @@ -352,6 +377,9 @@ func (m *GetF64IncrementByOne) Unmarshal(b []byte) error { return nil } +// get_f64_increment_by_one reply +// - f64_value - The input f64_value incremented by 1.0. +// // GetF64IncrementByOneReply defines message 'get_f64_increment_by_one_reply'. type GetF64IncrementByOneReply struct { Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"` @@ -389,6 +417,10 @@ func (m *GetF64IncrementByOneReply) Unmarshal(b []byte) error { return nil } +// Query relative index via node names +// - node_name - name of node to find relative index from +// - next_name - next node from node_name to find relative index of +// // GetNextIndex defines message 'get_next_index'. type GetNextIndex struct { NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"` @@ -426,6 +458,10 @@ func (m *GetNextIndex) Unmarshal(b []byte) error { return nil } +// Reply for get next node index +// - retval - return value +// - next_index - index of the next_node +// // GetNextIndexReply defines message 'get_next_index_reply'. type GetNextIndexReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -490,6 +526,12 @@ func (m *GetNodeGraph) Unmarshal(b []byte) error { return nil } +// get_node_graph_reply +// - retval - return code +// - reply_in_shmem - result from vlib_node_serialize, in shared +// memory. Process with vlib_node_unserialize, remember to switch +// heaps and free the result. +// // GetNodeGraphReply defines message 'get_node_graph_reply'. type GetNodeGraphReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -527,6 +569,9 @@ func (m *GetNodeGraphReply) Unmarshal(b []byte) error { return nil } +// Get node index using name request +// - node_name[] - name of the node +// // GetNodeIndex defines message 'get_node_index'. type GetNodeIndex struct { NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"` @@ -560,6 +605,10 @@ func (m *GetNodeIndex) Unmarshal(b []byte) error { return nil } +// Get node index using name request +// - retval - return code for the request +// - node_index - index of the desired node if found, else ~0 +// // GetNodeIndexReply defines message 'get_node_index_reply'. type GetNodeIndexReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -597,6 +646,11 @@ func (m *GetNodeIndexReply) Unmarshal(b []byte) error { return nil } +// show_threads display the information about vpp +// +// threads running on system along with their process id, +// cpu id, physical core and cpu socket. +// // ShowThreads defines message 'show_threads'. type ShowThreads struct{} @@ -624,6 +678,11 @@ func (m *ShowThreads) Unmarshal(b []byte) error { return nil } +// show_threads_reply +// - retval - return code +// - count - number of threads in thread_data array +// - thread_data - array of thread data +// // ShowThreadsReply defines message 'show_threads_reply'. type ShowThreadsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/vpe/vpe.ba.go b/plugins/vpp/binapi/vpp2306/vpe/vpe.ba.go index c6b3e0cc97..ff8e738c3d 100644 --- a/plugins/vpp/binapi/vpp2306/vpe/vpe.ba.go +++ b/plugins/vpp/binapi/vpp2306/vpe/vpe.ba.go @@ -102,6 +102,7 @@ func (m *LogDump) Unmarshal(b []byte) error { return nil } +// show version // ShowVersion defines message 'show_version'. type ShowVersion struct{} @@ -129,6 +130,12 @@ func (m *ShowVersion) Unmarshal(b []byte) error { return nil } +// show version response +// - retval - return code for the request +// - program - name of the program (vpe) +// - version - version of the program +// - build_directory - root of the workspace where the program was built +// // ShowVersionReply defines message 'show_version_reply'. type ShowVersionReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -178,6 +185,7 @@ func (m *ShowVersionReply) Unmarshal(b []byte) error { return nil } +// Show the current system timestamp. // ShowVpeSystemTime defines message 'show_vpe_system_time'. type ShowVpeSystemTime struct{} @@ -205,6 +213,10 @@ func (m *ShowVpeSystemTime) Unmarshal(b []byte) error { return nil } +// Reply for show vpe system time. +// - retval - return value +// - vpe_system_time - the time in seconds since epoch of the host system. +// // ShowVpeSystemTimeReply defines message 'show_vpe_system_time_reply'. type ShowVpeSystemTimeReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/plugins/vpp/binapi/vpp2306/vpp2306.go b/plugins/vpp/binapi/vpp2306/vpp2306.go index 3c1336b8b8..3952a58b9a 100644 --- a/plugins/vpp/binapi/vpp2306/vpp2306.go +++ b/plugins/vpp/binapi/vpp2306/vpp2306.go @@ -108,41 +108,5 @@ func init() { } //go:generate -command binapigen binapi-generator --no-version-info --output-dir=. -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/af_packet.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/arp.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/bond.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/gre.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/interface.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ip.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ip6_nd.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ip_neighbor.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ipfix_export.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ipip.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/ipsec.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/l2.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/memclnt.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/punt.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/rd_cp.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/span.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/sr.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/tapv2.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/teib.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vlib.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vpe.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/vxlan.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/core/vxlan_gpe.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/abf.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/acl.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/dhcp.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/dns.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/flowprobe.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/gtpu.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/l3xc.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/memif.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/nat44_ed.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/nat44_ei.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/rdma.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/stn.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/vmxnet3.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/wireguard.api.json -//go:generate binapigen --input-file=$VPP_API_DIR/plugins/vrrp.api.json +//go:generate binapigen --input=$VPP_API_DIR/core +//go:generate binapigen --input=$VPP_API_DIR/plugins diff --git a/plugins/vpp/binapi/vpp2306/vxlan_gpe/vxlan_gpe.ba.go b/plugins/vpp/binapi/vpp2306/vxlan_gpe/vxlan_gpe.ba.go index 017b500b70..1b2815467e 100644 --- a/plugins/vpp/binapi/vpp2306/vxlan_gpe/vxlan_gpe.ba.go +++ b/plugins/vpp/binapi/vpp2306/vxlan_gpe/vxlan_gpe.ba.go @@ -25,6 +25,11 @@ const ( VersionCrc = 0x3bc06278 ) +// Interface set vxlan-gpe-bypass request +// - sw_if_index - interface used to reach neighbor +// - is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass +// - enable - if non-zero enable, else disable +// // SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'. type SwInterfaceSetVxlanGpeBypass struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -103,6 +108,20 @@ func (m *SwInterfaceSetVxlanGpeBypassReply) Unmarshal(b []byte) error { return nil } +// /* +// - Copyright (c) 2015-2016 Cisco and/or its affiliates. +// - Licensed under the Apache License, Version 2.0 (the "License"); +// - you may not use this file except in compliance with the License. +// - You may obtain a copy of the License at: +// * +// - http://www.apache.org/licenses/LICENSE-2.0 +// * +// - Unless required by applicable law or agreed to in writing, software +// - distributed under the License is distributed on an "AS IS" BASIS, +// - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// - See the License for the specific language governing permissions and +// - limitations under the License. +// // VxlanGpeAddDelTunnel defines message 'vxlan_gpe_add_del_tunnel'. type VxlanGpeAddDelTunnel struct { Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"` @@ -207,6 +226,18 @@ func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error { return nil } +// Create or delete a VXLAN-GPE tunnel +// - local - Source IP address +// - remote - Destination IP address, can be multicast +// - local_port - Source UDP port. It is not included in sent packets. Used only for port registration +// - remote_port - Destination UDP port +// - mcast_sw_if_index - Interface for multicast destination +// - encap_vrf_id - Encap route table FIB index +// - decap_vrf_id - Decap route table FIB index +// - protocol - Encapsulated protocol +// - vni - The VXLAN Network Identifier, uint24 +// - is_add - Use 1 to create the tunnel, 0 to remove it +// // VxlanGpeAddDelTunnelV2 defines message 'vxlan_gpe_add_del_tunnel_v2'. type VxlanGpeAddDelTunnelV2 struct { Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"`