pppoe: make pppoe plugin work with dot1q subinterfaces
[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 option version = "2.0.0";
17 import "vnet/interface_types.api";
18 import "vnet/ethernet/ethernet_types.api";
19 import "vnet/ip/ip_types.api";
20
21 /** \brief Set or delete an PPPOE session
22     @param client_index - opaque cookie to identify the sender
23     @param context - sender context, to match reply w/ request
24     @param is_add - add address if non-zero, else delete
25     @param session_id - PPPoE session ID
26     @param client_ip - PPPOE session's client address.
27     @param decap_vrf_id - the vrf index for pppoe decaped packet
28     @param client_mac - the client ethernet address
29 */
30 define pppoe_add_del_session
31 {
32   u32 client_index;
33   u32 context;
34   bool is_add;
35   u16 session_id;
36   vl_api_address_t client_ip;
37   u32 decap_vrf_id;
38   vl_api_mac_address_t client_mac;
39   option vat_help = "client-addr <client-addr> session-id <nn> [encap-if-index <nn>] [decap-next [ip4|ip6|node <name>]] local-mac <local-mac> client-mac <client-mac> [del]";
40 };
41
42 /** \brief reply for set or delete an PPPOE session
43     @param context - sender context, to match reply w/ request
44     @param retval - return code
45     @param sw_if_index - software index of the interface
46 */
47 define pppoe_add_del_session_reply
48 {
49   u32 context;
50   i32 retval;
51   vl_api_interface_index_t sw_if_index;
52 };
53
54 /** \brief Dump PPPOE session
55     @param client_index - opaque cookie to identify the sender
56     @param context - sender context, to match reply w/ request
57     @param sw_if_index - software index of the interface
58 */
59 define pppoe_session_dump
60 {
61   u32 client_index;
62   u32 context;
63   vl_api_interface_index_t sw_if_index;
64   option vat_help = "[<intfc> | sw_if_index <nn>]";
65 };
66
67 /** \brief dump details of an PPPOE session
68     @param context - sender context, to match reply w/ request
69     @param sw_if_index - software index of the interface
70     @param session_id - PPPoE session ID
71     @param client_ip - PPPOE session's client address.
72     @param encap_if_index - the index of tx interface for pppoe encaped packet
73     @param decap_vrf_id - the vrf index for pppoe decaped packet
74     @param local_mac - the local ethernet address
75     @param client_mac - the client ethernet address
76 */
77 define pppoe_session_details
78 {
79   u32 context;
80   vl_api_interface_index_t sw_if_index;
81   u16 session_id;
82   vl_api_address_t client_ip;
83   vl_api_interface_index_t encap_if_index;
84   u32 decap_vrf_id;
85   vl_api_mac_address_t local_mac;
86   vl_api_mac_address_t client_mac;
87 };
88
89 /** \brief Create PPPOE control plane interface
90     @param client_index - opaque cookie to identify the sender 
91     @param context - sender context, to match reply w/ request
92     @param sw_if_index - software index of the interface
93     @param is_add - to create or to delete 
94 */
95 define pppoe_add_del_cp
96 {
97   u32 client_index;
98   u32 context;
99   vl_api_interface_index_t sw_if_index;
100   u8 is_add;
101   option vat_help = "[ sw_if_index <intfc> is_add <bool> ]";
102 };
103
104 /** \brief reply for create PPPOE control plane interface
105     @param retval - return code
106 */
107 define pppoe_add_del_cp_reply
108 {
109   u32 context;
110   i32 retval;
111 };
112
113 /*
114  * Local Variables:
115  * eval: (c-set-style "gnu")
116  * End:
117  */