All,

Here is an update on API progress.

In the long process of making types in the API language more explicit I have a 
few changes merged and a few in the pipeline:

- Type aliases. Previously any new user defined type had to be a structure. 
With type aliasing one can do
  e.g.
 typedef u32 interface_index
 instead of:
 typedef {
    u32 index;
 } interface_index;

This is merged in 53fffa1d

I have a similar change for the relatively new ip4_address and ip6_address 
types, so instead of:
typedef {
  u32 address[4];
} ip4_address;

That is now: typedef u32 ip4_address[4];

That’s awaiting some fixes in the Java binding before it can be merged:
https://gerrit.fd.io/r/c/16217/

- New string type

 {
   u32 client_index;
   u32 context;
-  u32 length;
-  u8 cmd[length];
+  string cmd;
 };

The language did not distinguish between byte strings and text strings.
That made it hard for some language bindings and autogenerating code for 
printing strings.
This patch is in
https://gerrit.fd.io/r/c/16326/
and awaiting changes in Java binding.

- Bool type
There is also a separate bool type that is intended to replace the use of “u8 
is_ip6”, I have merged that for one component so far.

I will try to update the API definitions with new type as I get the chance. 
bool and type aliases are backwards compatible (in that they require no change 
on the VPP side).
Depending on language binding they might be hidden for the application.

I have also created a new mailing list: vpp-api-...@lists.fd.io.
It can be used for discussion if we don’t want to disturb the main list.
The main idea was for it to be used to receive notifications on API updates. 
Both automatically triggered by gerrit (we’re setting this up now for any 
change to a .api file) or for “manually” triggered alerts to API users.
Please subscribe.


Any other changes you’d like in the API language?
And please let me know if you have comments on the above.

(And yes it’s on my list to document the language, just procrastination monster 
has so far prohibited that from happening).

Cheers,
Ole

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11496): https://lists.fd.io/g/vpp-dev/message/11496
Mute This Topic: https://lists.fd.io/mt/28610110/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to