aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/map/map.api
blob: d68f13f0bc9d4f76b4481ece19cffcbf3f651eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/*
 * Copyright (c) 2016 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


/** \brief Add MAP domains
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param ip6_prefix - Rule IPv6 prefix
    @param ip4_prefix - Rule IPv4 prefix
    @param ip6_src - MAP domain IPv6 BR address / Tunnel source
    @param ip6_prefix_len - Rule IPv6 prefix length
    @param ip4_prefix_len - Rule IPv4 prefix length
    @param ea_bits_len - Embedded Address bits length
    @param psid_offset - Port Set Identifider (PSID) offset
    @param psid_length - PSID length
    @param is_translation - MAP-E / MAP-T
    @param mtu - MTU
*/
define map_add_domain
{
  u32 client_index;
  u32 context;
  u8 ip6_prefix[16];
  u8 ip4_prefix[4];
  u8 ip6_src[16];
  u8 ip6_prefix_len;
  u8 ip4_prefix_len;
  u8 ip6_src_prefix_len;
  u8 ea_bits_len;
  u8 psid_offset;
  u8 psid_length;
  u8 is_translation;
  u16 mtu;
};

/** \brief Reply for MAP domain add
    @param context - returned sender context, to match reply w/ request
    @param index - MAP domain index
    @param retval - return code
*/
define map_add_domain_reply
{
  u32 context;
  u32 index;
  i32 retval;
};

/** \brief Delete MAP domain
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param index - MAP Domain index
*/
autoreply define map_del_domain
{
  u32 client_index;
  u32 context;
  u32 index;
};


/** \brief Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber)
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param index - MAP Domain index
    @param is_add - If 1 add rule, if 0 delete rule
    @param ip6_dst - MAP CE IPv6 address
    @param psid - Rule PSID
*/
autoreply define map_add_del_rule
{
  u32 client_index;
  u32 context;
  u32 index;
  u32 is_add;
  u8 ip6_dst[16];
  u16 psid;
};


/** \brief Get list of map domains
    @param client_index - opaque cookie to identify the sender
*/
define map_domain_dump
{
  u32 client_index;
  u32 context;
};

define map_domain_details
{
  u32 context;
  u32 domain_index;
  u8 ip6_prefix[16];
  u8 ip4_prefix[4];
  u8 ip6_src[16];
  u8 ip6_prefix_len;
  u8 ip4_prefix_len;
  u8 ip6_src_len;
  u8 ea_bits_len;
  u8 psid_offset;
  u8 psid_length;
  u8 flags;
  u16 mtu;
  u8 is_translation;
};

define map_rule_dump
{
  u32 client_index;
  u32 context;
  u32 domain_index;
};

define map_rule_details
{
  u32 context;
  u8 ip6_dst[16];
  u16 psid;
};

/** \brief Request for a single block of summary stats
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
*/
define map_summary_stats
{
  u32 client_index;
  u32 context;
};

/** \brief Reply for map_summary_stats request
    @param context - sender context, to match reply w/ request
    @param retval - return code for request
    @param total_bindings -
    @param total_pkts -
    @param total_ip4_fragments -
    @param total_security_check -
*/
define map_summary_stats_reply
{
  u32 context;
  i32 retval;
  u64 total_bindings;
  u64 total_pkts[2];
  u64 total_bytes[2];
  u64 total_ip4_fragments;
  u64 total_security_check[2];
};