-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheigrp_network.h
60 lines (49 loc) · 1.27 KB
/
eigrp_network.h
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
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* EIGRP Network Related Functions.
* Copyright (C) 2013-2014
* Authors:
* Donnie Savage
* Jan Janovic
* Matej Perina
* Peter Orsag
* Peter Paluch
*
*/
#ifndef _ZEBRA_EIGRP_NETWORK_H
#define _ZEBRA_EIGRP_NETWORK_H
#include "lib/table.h"
#include "lib/sockopt.h"
/* Static inline functions */
/* IPv4/IPv6 prefix and address management functions
* might move to eigrp_addr.h if this grows
*/
static inline const char *
eigrp_print_prefix(struct prefix *network)
{
return inet_ntoa(network->u.prefix4);
}
static inline const char *
eigrp_print_addr(eigrp_addr_t *addr)
{
return inet_ntoa(addr->ip.v4);
}
static inline const char *
eigrp_print_routerid(struct in_addr ipv4)
{
return inet_ntoa(ipv4);
}
static inline const char *
eigrp_print_ifname(struct eigrp_interface *ei)
{
if (!ei)
return "inactive";
return ei->ifp->name;
}
/* Prototypes */
extern int eigrp_sock_init(struct vrf *vrf);
extern int eigrp_network_set(eigrp_instance_t *eigrp, struct prefix *p);
extern int eigrp_network_unset(eigrp_instance_t *eigrp, struct prefix *p);
extern void eigrp_adjust_sndbuflen(eigrp_instance_t *, unsigned int);
extern void eigrp_external_routes_refresh(eigrp_instance_t *, int);
#endif /* EIGRP_NETWORK_H_ */