Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-1322

Add support for unions in Java API

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Medium Medium
    • 18.07
    • None
    • Java API binding
    • None

      VPP unions were added to VPP API language by:

      https://gerrit.fd.io/r/#/c/12410/

      Here is example from 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;
      };
      

       

            mgradzki Marek Gradzki
            mgradzki Marek Gradzki
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: