summaryrefslogtreecommitdiffstats
path: root/nsh-plugin/nsh/nsh.api
diff options
context:
space:
mode:
Diffstat (limited to 'nsh-plugin/nsh/nsh.api')
-rw-r--r--nsh-plugin/nsh/nsh.api75
1 files changed, 75 insertions, 0 deletions
diff --git a/nsh-plugin/nsh/nsh.api b/nsh-plugin/nsh/nsh.api
new file mode 100644
index 0000000..67d04e2
--- /dev/null
+++ b/nsh-plugin/nsh/nsh.api
@@ -0,0 +1,75 @@
+
+
+/** \brief /** \brief Set or delete an NSH header entry keyed by NSP/NSI
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param is_add - add address if non-zero, else delete
+ @param nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI
+ @param md_type - metadata type [1|2] - only MDType1 supported today
+ @param ver_o_c - version, O-bit and C-bit (see nsh_packet.h)
+ @param length - header length in n x 32bits, should be 6 for MDtype1
+ @param next_protocol - next protocol encapsulated behind NSH header: 1=Ethernet, 2=IP4, 3=IP6
+ @param c1 - 32bit Metadata type1 field (context1)
+ @param c2 - 32bit Metadata type1 field (context2)
+ @param c3 - 32bit Metadata type1 field (context3)
+ @param c4 - 32bit Metadata type1 field (context4)
+ @param tlvs - Metadata Type 2 only, Type Length Value metadata. Not currently supported
+*/
+define nsh_add_del_entry {
+ u32 client_index;
+ u32 context;
+ u8 is_add;
+ u32 nsp_nsi;
+ u8 md_type;
+ u8 ver_o_c;
+ u8 length;
+ u8 next_protocol;
+ u32 c1;
+ u32 c2;
+ u32 c3;
+ u32 c4;
+ u32 tlvs[0];
+};
+
+/** \brief Reply from adding NSH entry (nsh_add_del_entry)
+ @param context - sender context, to match reply w/ request
+ @param retval - 0 means all ok
+*/
+define nsh_add_del_entry_reply {
+ u32 context;
+ i32 retval;
+};
+
+/** \brief Set or delete a mapping from one NSH header to another and its egress (decap to inner packet, encap NSH with outer header)
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param is_add - add address if non-zero, else delete
+ @param nsh_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI
+ @param mapped_nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI this may be ~0
+ if next action is to decap to NSH next protocol
+ Note the following heuristic:
+ - if nsp_nsi == mapped_nsp_nsi then use-case is like SFC SFF
+ - if nsp_nsi != mapped_nsp_nsi then use-case is like SFC SF
+ Note: these are heuristics. Rules about NSI decrement are out of scope
+ @param sw_if_index - index number of outer encap for NSH egress
+ @param next_node - explicitly which node to send to
+ Note the above parameters are instantiated by "encap-gre-intf <x>" means sw_if_index x, next_node gre-input
+*/
+define nsh_add_del_map {
+ u32 client_index;
+ u32 context;
+ u8 is_add;
+ u32 nsp_nsi;
+ u32 mapped_nsp_nsi;
+ u32 sw_if_index;
+ u32 next_node;
+};
+
+/** \brief Reply from adding NSH map (nsh_add_del_map)
+ @param context - sender context, to match reply w/ request
+ @param retval - 0 means all ok
+*/
+define nsh_add_del_map_reply {
+ u32 context;
+ i32 retval;
+}; \ No newline at end of file