2 * Licensed under the Apache License, Version 2.0 (the "License");
3 * you may not use this file except in compliance with the License.
4 * You may obtain a copy of the License at:
6 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
19 #include "lib/packets.h"
21 struct nbrec_logical_router_port;
24 ovs_be32 addr; /* 192.168.10.123 */
25 ovs_be32 mask; /* 255.255.255.0 */
26 ovs_be32 network; /* 192.168.10.0 */
27 unsigned int plen; /* CIDR Prefix: 24. */
29 char *addr_s; /* "192.168.10.123" */
30 char *network_s; /* "192.168.10.0" */
31 char *bcast_s; /* "192.168.10.255" */
35 struct in6_addr addr; /* fc00::1 */
36 struct in6_addr mask; /* ffff:ffff:ffff:ffff:: */
37 struct in6_addr network; /* fc00:: */
38 unsigned int plen; /* CIDR Prefix: 64 */
40 char *addr_s; /* "fc00::1" */
41 char *network_s; /* "fc00::" */
44 struct lport_addresses {
48 struct ipv4_netaddr *ipv4_addrs;
50 struct ipv6_netaddr *ipv6_addrs;
54 bool extract_lsp_addresses(char *address, struct lport_addresses *);
55 bool extract_lrp_networks(const struct nbrec_logical_router_port *,
56 struct lport_addresses *);
57 void destroy_lport_addresses(struct lport_addresses *);
59 char *alloc_nat_zone_key(const char *key, const char *type);