VPPAPIGEN: Add union and enum support and IP4/IP6 address type. 10/12410/4
authorOle Troan <ot@cisco.com>
Tue, 24 Apr 2018 04:02:37 +0000 (00:02 -0400)
committerFlorin Coras <florin.coras@gmail.com>
Wed, 23 May 2018 16:29:47 +0000 (16:29 +0000)
commit2c2feab7d89239c92df4622c96e853230393deb9
tree132f56800f7c78f236fc41f025f53ba2f4835df6
parent886bb1ae9b7cfef181e279f3f3b48586ea8d9ad0
VPPAPIGEN: Add union and enum support and IP4/IP6 address type.

Note: The Python, Java and C/C++ bindings must be updated before ip/ip_types.api can be used.

ip_types.api:

typedef ip4_address {
  u8 address[4];
};

typedef ip6_address {
  u8 address[16];
};

enum address_family {
  ADDRESS_IP4 = 0,
  ADDRESS_IP6,
};

union address_union {
  vl_api_ip4_address_t ip4;
  vl_api_ip6_address_t ip6;
};

typedef address {
  vl_api_address_family_t af;
  vl_api_address_union_t un;
};

Change-Id: I22f67092f24db5bd650a03c6f446a84cd9fd1074
Signed-off-by: Ole Troan <ot@cisco.com>
src/tools/vppapigen/C.py
src/tools/vppapigen/JSON.py
src/tools/vppapigen/vppapigen.py
src/vnet/ip/ip_types.api [new file with mode: 0644]