nsh.api revision b8812f17
1
2
3/** \brief /** \brief Set or delete an NSH header entry keyed by NSP/NSI
4    @param client_index - opaque cookie to identify the sender
5    @param context - sender context, to match reply w/ request
6    @param is_add - add address if non-zero, else delete
7    @param nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI 
8    @param md_type - metadata type [1|2] - only MDType1 supported today
9    @param ver_o_c - version, O-bit and C-bit (see nsh_packet.h)
10    @param length - header length in n x 32bits, should be 6 for MDtype1
11    @param next_protocol - next protocol encapsulated behind NSH header: 1=Ethernet, 2=IP4, 3=IP6
12    @param c1 - 32bit Metadata type1 field (context1)
13    @param c2 - 32bit Metadata type1 field (context2)
14    @param c3 - 32bit Metadata type1 field (context3)
15    @param c4 - 32bit Metadata type1 field (context4)
16    @param tlvs - Metadata Type 2 only, Type Length Value metadata. Not currently supported
17*/
18define nsh_add_del_entry {
19    u32 client_index;
20    u32 context;
21    u8 is_add;
22    u32 nsp_nsi;
23    u8 md_type;
24    u8 ver_o_c;
25    u8 length;
26    u8 next_protocol;
27    u32 c1; 
28    u32 c2;
29    u32 c3; 
30    u32 c4;
31    u32 tlvs[0];
32};
33
34/** \brief Reply from adding NSH entry (nsh_add_del_entry)
35    @param context - sender context, to match reply w/ request
36    @param retval - 0 means all ok
37*/
38define nsh_add_del_entry_reply {
39    u32 context;
40    i32 retval;
41};
42
43
44define nsh_entry_dump {
45    u32 client_index;
46    u32 context;
47};
48
49define nsh_entry_details {
50    u32 context;
51    u32 nsp_nsi;
52    u8 md_type;
53    u8 ver_o_c;
54    u8 length;
55    u8 next_protocol;
56    u32 c1; 
57    u32 c2;
58    u32 c3; 
59    u32 c4;
60    u32 tlvs[0];
61};
62
63/** \brief Set or delete a mapping from one NSH header to another and its egress (decap to inner packet, encap NSH with outer header)
64    @param client_index - opaque cookie to identify the sender
65    @param context - sender context, to match reply w/ request
66    @param is_add - add address if non-zero, else delete
67    @param nsh_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI 
68    @param mapped_nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI this may be ~0 
69       if next action is to decap to NSH next protocol
70       Note the following heuristic:
71       	    - if nsp_nsi == mapped_nsp_nsi then use-case is like SFC SFF
72    	    - if nsp_nsi != mapped_nsp_nsi then use-case is like SFC SF
73       Note: these are heuristics. Rules about NSI decrement are out of scope
74    @param sw_if_index - index number of outer encap for NSH egress
75    @param next_node - explicitly which node to send to
76      Note the above parameters are instantiated by "encap-gre-intf <x>" means sw_if_index x, next_node gre-input
77*/
78define nsh_add_del_map {
79    u32 client_index;
80    u32 context;
81    u8 is_add;
82    u32 nsp_nsi;
83    u32 mapped_nsp_nsi;
84    u32 sw_if_index;
85    u32 next_node;
86};
87
88/** \brief Reply from adding NSH map (nsh_add_del_map)
89    @param context - sender context, to match reply w/ request
90    @param retval - 0 means all ok
91*/
92define nsh_add_del_map_reply {
93    u32 context;
94    i32 retval;
95};