e8cd989f41b0a69ff40b4bc0e845e843a4f1a2bd
[vpp.git] / src / plugins / pppoe / pppoe.api
1 /*
2  * Copyright (c) 2017 Intel and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 /** \brief Set or delete an PPPOE session
17     @param client_index - opaque cookie to identify the sender
18     @param context - sender context, to match reply w/ request
19     @param is_add - add address if non-zero, else delete
20     @param is_ipv6 - client_ip and dst_address is ipv6 or not
21     @param session_id - PPPoE session ID
22     @param client_ip - PPPOE session's client address.
23     @param decap_vrf_id - the vrf index for pppoe decaped packet
24     @param client_mac - the client ethernet address
25 */
26 define pppoe_add_del_session
27 {
28   u32 client_index;
29   u32 context;
30   u8 is_add;
31   u8 is_ipv6;
32   u16 session_id;
33   u8 client_ip[16];
34   u32 decap_vrf_id;
35   u8 client_mac[6];
36 };
37
38 /** \brief reply for set or delete an PPPOE session
39     @param context - sender context, to match reply w/ request
40     @param retval - return code
41     @param sw_if_index - software index of the interface
42 */
43 define pppoe_add_del_session_reply
44 {
45   u32 context;
46   i32 retval;
47   u32 sw_if_index;
48 };
49
50 /** \brief Dump PPPOE session
51     @param client_index - opaque cookie to identify the sender
52     @param context - sender context, to match reply w/ request
53     @param sw_if_index - software index of the interface
54 */
55 define pppoe_session_dump
56 {
57   u32 client_index;
58   u32 context;
59   u32 sw_if_index;
60 };
61
62 /** \brief dump details of an PPPOE session
63     @param context - sender context, to match reply w/ request
64     @param sw_if_index - software index of the interface
65     @param is_ipv6 - client_ip and dst_address is ipv6 or not
66     @param session_id - PPPoE session ID
67     @param client_ip - PPPOE session's client address.
68     @param encap_if_index - the index of tx interface for pppoe encaped packet
69     @param decap_vrf_id - the vrf index for pppoe decaped packet
70     @param local_mac - the local ethernet address
71     @param client_mac - the client ethernet address
72 */
73 define pppoe_session_details
74 {
75   u32 context;
76   u32 sw_if_index;
77   u8 is_ipv6;
78   u16 session_id;
79   u8 client_ip[16];
80   u32 encap_if_index;
81   u32 decap_vrf_id;
82   u8 local_mac[6];
83   u8 client_mac[6];
84 };
85
86 /*
87  * Local Variables:
88  * eval: (c-set-style "gnu")
89  * End:
90  */