]> git.proxmox.com Git - mirror_frr.git/blob - zebra/kernel_socket.h
lib: msg: refactor common connection code from mgmtd
[mirror_frr.git] / zebra / kernel_socket.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Exported kernel_socket functions, exported only for convenience of
4 * sysctl methods.
5 */
6
7 #ifndef __ZEBRA_KERNEL_SOCKET_H
8 #define __ZEBRA_KERNEL_SOCKET_H
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 /* Error codes of zebra. */
15 #define ZEBRA_ERR_NOERROR 0
16 #define ZEBRA_ERR_RTEXIST -1
17 #define ZEBRA_ERR_RTUNREACH -2
18 #define ZEBRA_ERR_EPERM -3
19 #define ZEBRA_ERR_RTNOEXIST -4
20 #define ZEBRA_ERR_KERNEL -5
21
22 extern void rtm_read(struct rt_msghdr *);
23 extern int ifam_read(struct ifa_msghdr *);
24 extern int ifm_read(struct if_msghdr *);
25 extern int rtm_write(int, union sockunion *, union sockunion *,
26 union sockunion *, union sockunion *, unsigned int,
27 enum blackhole_type, int);
28 extern const struct message rtm_type_str[];
29
30 #ifdef __cplusplus
31 }
32 #endif
33
34 #endif /* __ZEBRA_KERNEL_SOCKET_H */