]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
12e41d03 | 2 | /* |
896014f4 DL |
3 | * PIM for Quagga |
4 | * Copyright (C) 2008 Everton da Silva Marques | |
896014f4 | 5 | */ |
12e41d03 DL |
6 | |
7 | #ifndef PIM_STR_H | |
8 | #define PIM_STR_H | |
9 | ||
10 | #include <sys/types.h> | |
11 | #include <sys/socket.h> | |
12 | #include <arpa/inet.h> | |
13 | ||
6fff2cc6 DL |
14 | #include "prefix.h" |
15 | #include "pim_addr.h" | |
99064df9 | 16 | |
4d69e1ca | 17 | #if PIM_IPV == 4 |
8bfb8b67 | 18 | /* |
9deed2ad | 19 | * Longest possible length of a IPV4 (S,G) string is 34 bytes |
8bfb8b67 DS |
20 | * 123.123.123.123 = 16 * 2 |
21 | * (,) = 3 | |
22 | * NULL Character at end = 1 | |
9deed2ad | 23 | * (123.123.123.123,123.123.123.123) |
8bfb8b67 | 24 | */ |
c6b6b53b | 25 | #define PIM_SG_LEN PREFIX_SG_STR_LEN |
4d69e1ca SP |
26 | #else |
27 | /* | |
28 | * Longest possible length of a IPV6 (S,G) string is 94 bytes | |
29 | * INET6_ADDRSTRLEN * 2 = 46 * 2 | |
30 | * (,) = 3 | |
31 | * NULL Character at end = 1 | |
32 | */ | |
33 | #define PIM_SG_LEN 96 | |
34 | #endif | |
9deed2ad | 35 | |
c6b6b53b | 36 | #define pim_inet4_dump prefix_mcast_inet4_dump |
6fff2cc6 | 37 | |
d62a17ae | 38 | void pim_addr_dump(const char *onfail, struct prefix *p, char *buf, |
39 | int buf_size); | |
40 | void pim_inet4_dump(const char *onfail, struct in_addr addr, char *buf, | |
41 | int buf_size); | |
12e41d03 DL |
42 | |
43 | #endif |