blob: 4b142c8fb4ac23b6a474491396d7c645064d1cf6 [file] [log] [blame]
Ole Troanf0c90e22016-12-06 12:50:08 +01001/*
2 * Copyright (c) 2016 Cisco 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
17/** \brief Add MAP domains
18 @param client_index - opaque cookie to identify the sender
19 @param context - sender context, to match reply w/ request
20 @param ip6_prefix - Rule IPv6 prefix
21 @param ip4_prefix - Rule IPv4 prefix
22 @param ip6_src - MAP domain IPv6 BR address / Tunnel source
23 @param ip6_prefix_len - Rule IPv6 prefix length
24 @param ip4_prefix_len - Rule IPv4 prefix length
25 @param ea_bits_len - Embedded Address bits length
26 @param psid_offset - Port Set Identifider (PSID) offset
27 @param psid_length - PSID length
28 @param is_translation - MAP-E / MAP-T
29 @param mtu - MTU
30*/
31define map_add_domain
32{
33 u32 client_index;
34 u32 context;
35 u8 ip6_prefix[16];
36 u8 ip4_prefix[4];
37 u8 ip6_src[16];
38 u8 ip6_prefix_len;
39 u8 ip4_prefix_len;
40 u8 ip6_src_prefix_len;
41 u8 ea_bits_len;
42 u8 psid_offset;
43 u8 psid_length;
44 u8 is_translation;
45 u16 mtu;
46};
47
48/** \brief Reply for MAP domain add
49 @param context - returned sender context, to match reply w/ request
50 @param index - MAP domain index
51 @param retval - return code
52*/
53define map_add_domain_reply
54{
55 u32 context;
56 u32 index;
57 i32 retval;
58};
59
60/** \brief Delete MAP domain
61 @param client_index - opaque cookie to identify the sender
62 @param context - sender context, to match reply w/ request
63 @param index - MAP Domain index
64*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040065autoreply define map_del_domain
Ole Troanf0c90e22016-12-06 12:50:08 +010066{
67 u32 client_index;
68 u32 context;
69 u32 index;
70};
71
Ole Troanf0c90e22016-12-06 12:50:08 +010072
73/** \brief Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
74 @param client_index - opaque cookie to identify the sender
75 @param context - sender context, to match reply w/ request
76 @param index - MAP Domain index
77 @param is_add - If 1 add rule, if 0 delete rule
78 @param ip6_dst - MAP CE IPv6 address
79 @param psid - Rule PSID
80*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040081autoreply define map_add_del_rule
Ole Troanf0c90e22016-12-06 12:50:08 +010082{
83 u32 client_index;
84 u32 context;
85 u32 index;
Ole Troan026c0362017-06-14 13:12:33 +020086 u8 is_add;
Ole Troanf0c90e22016-12-06 12:50:08 +010087 u8 ip6_dst[16];
88 u16 psid;
89};
90
Ole Troanf0c90e22016-12-06 12:50:08 +010091
92/** \brief Get list of map domains
93 @param client_index - opaque cookie to identify the sender
94*/
95define map_domain_dump
96{
97 u32 client_index;
98 u32 context;
99};
100
101define map_domain_details
102{
103 u32 context;
104 u32 domain_index;
105 u8 ip6_prefix[16];
106 u8 ip4_prefix[4];
107 u8 ip6_src[16];
108 u8 ip6_prefix_len;
109 u8 ip4_prefix_len;
110 u8 ip6_src_len;
111 u8 ea_bits_len;
112 u8 psid_offset;
113 u8 psid_length;
114 u8 flags;
115 u16 mtu;
116 u8 is_translation;
117};
118
119define map_rule_dump
120{
121 u32 client_index;
122 u32 context;
123 u32 domain_index;
124};
125
126define map_rule_details
127{
128 u32 context;
129 u8 ip6_dst[16];
130 u16 psid;
131};
132
133/** \brief Request for a single block of summary stats
134 @param client_index - opaque cookie to identify the sender
135 @param context - sender context, to match reply w/ request
136*/
137define map_summary_stats
138{
139 u32 client_index;
140 u32 context;
141};
142
143/** \brief Reply for map_summary_stats request
144 @param context - sender context, to match reply w/ request
145 @param retval - return code for request
146 @param total_bindings -
147 @param total_pkts -
148 @param total_ip4_fragments -
149 @param total_security_check -
150*/
151define map_summary_stats_reply
152{
153 u32 context;
154 i32 retval;
155 u64 total_bindings;
156 u64 total_pkts[2];
157 u64 total_bytes[2];
158 u64 total_ip4_fragments;
159 u64 total_security_check[2];
160};