blob: d794eff634094e6a29693e94a0ddb74f3cf8b248 [file] [log] [blame]
Florin Corase127a7e2016-02-18 22:20:01 +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#ifndef VNET_LISP_GPE_LISP_MSG_BUILDER_H_
17#define VNET_LISP_GPE_LISP_MSG_BUILDER_H_
18
19#include <vnet/vnet.h>
20#include <vnet/lisp-cp/lisp_cp_messages.h>
21#include <vnet/lisp-cp/control.h>
22
Florin Corasa2157cf2016-08-16 21:09:14 +020023void *lisp_msg_put_mreq (lisp_cp_main_t * lcm, vlib_buffer_t * b,
24 gid_address_t * seid, gid_address_t * deid,
25 gid_address_t * rlocs, u8 is_smr_invoked,
Filip Tehlar397fd7d2016-10-26 14:31:24 +020026 u8 rloc_probe_set, u64 * nonce);
27
28void *lisp_msg_put_map_register (vlib_buffer_t * b, mapping_t * records,
29 u8 want_map_notify, u16 auth_data_len,
30 u64 * nonce, u32 * msg_len);
Florin Corase127a7e2016-02-18 22:20:01 +010031
Florin Corasa2157cf2016-08-16 21:09:14 +020032void *lisp_msg_push_ecm (vlib_main_t * vm, vlib_buffer_t * b, int lp, int rp,
33 gid_address_t * la, gid_address_t * ra);
Florin Corase127a7e2016-02-18 22:20:01 +010034
Filip Tehlar397fd7d2016-10-26 14:31:24 +020035void *lisp_msg_put_map_reply (vlib_buffer_t * b, mapping_t * record,
36 u64 nonce, u8 probe_bit);
37
Florin Corase127a7e2016-02-18 22:20:01 +010038u32
39lisp_msg_parse_mapping_record (vlib_buffer_t * b, gid_address_t * eid,
40 locator_t ** locs, locator_t * probed_);
41
Florin Corasa2157cf2016-08-16 21:09:14 +020042u32 lisp_msg_parse_addr (vlib_buffer_t * b, gid_address_t * eid);
Florin Corase127a7e2016-02-18 22:20:01 +010043
Florin Corasa2157cf2016-08-16 21:09:14 +020044u32 lisp_msg_parse_eid_rec (vlib_buffer_t * b, gid_address_t * eid);
Florin Corase127a7e2016-02-18 22:20:01 +010045
46u32
47lisp_msg_parse_itr_rlocs (vlib_buffer_t * b, gid_address_t ** rlocs,
48 u8 rloc_count);
49
50#endif /* VNET_LISP_GPE_LISP_MSG_BUILDER_H_ */
Florin Corasa2157cf2016-08-16 21:09:14 +020051
52/*
53 * fd.io coding-style-patch-verification: ON
54 *
55 * Local Variables:
56 * eval: (c-set-style "gnu")
57 * End:
58 */