2023-02-08 13:17:09 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2005-11-24 16:15:17 +01:00
|
|
|
/*
|
|
|
|
* Exported kernel_socket functions, exported only for convenience of
|
|
|
|
* sysctl methods.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ZEBRA_KERNEL_SOCKET_H
|
|
|
|
#define __ZEBRA_KERNEL_SOCKET_H
|
|
|
|
|
2019-03-25 15:11:55 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-12-12 18:16:21 +01:00
|
|
|
/* Error codes of zebra. */
|
|
|
|
#define ZEBRA_ERR_NOERROR 0
|
|
|
|
#define ZEBRA_ERR_RTEXIST -1
|
|
|
|
#define ZEBRA_ERR_RTUNREACH -2
|
|
|
|
#define ZEBRA_ERR_EPERM -3
|
|
|
|
#define ZEBRA_ERR_RTNOEXIST -4
|
|
|
|
#define ZEBRA_ERR_KERNEL -5
|
|
|
|
|
2005-11-24 16:15:17 +01:00
|
|
|
extern void rtm_read(struct rt_msghdr *);
|
|
|
|
extern int ifam_read(struct ifa_msghdr *);
|
|
|
|
extern int ifm_read(struct if_msghdr *);
|
|
|
|
extern int rtm_write(int, union sockunion *, union sockunion *,
|
2010-02-05 04:31:56 +01:00
|
|
|
union sockunion *, union sockunion *, unsigned int,
|
|
|
|
enum blackhole_type, int);
|
2008-08-14 18:59:25 +02:00
|
|
|
extern const struct message rtm_type_str[];
|
2005-11-24 16:15:17 +01:00
|
|
|
|
2019-03-25 15:11:55 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-11-24 16:15:17 +01:00
|
|
|
#endif /* __ZEBRA_KERNEL_SOCKET_H */
|