]> git.proxmox.com Git - mirror_frr.git/blob - ospf6d/ospf6_network.h
Merge pull request #12248 from pguibert6WIND/bgpasdot
[mirror_frr.git] / ospf6d / ospf6_network.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (C) 2003 Yasuhiro Ohara
4 */
5
6 #ifndef OSPF6_NETWORK_H
7 #define OSPF6_NETWORK_H
8
9 extern struct in6_addr allspfrouters6;
10 extern struct in6_addr alldrouters6;
11
12 extern int ospf6_serv_sock(struct ospf6 *ospf6);
13 extern void ospf6_serv_close(int *ospf6_sock);
14 extern int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option,
15 int sockfd);
16
17 extern int ospf6_sendmsg(struct in6_addr *src, struct in6_addr *dst,
18 ifindex_t ifindex, struct iovec *message,
19 int ospf6_sock);
20 extern int ospf6_recvmsg(struct in6_addr *src, struct in6_addr *dst,
21 ifindex_t *ifindex, struct iovec *message,
22 int ospf6_sock);
23
24 #define OSPF6_MESSAGE_WRITE_ON(oi) \
25 do { \
26 bool list_was_empty = \
27 list_isempty(oi->area->ospf6->oi_write_q); \
28 if ((oi)->on_write_q == 0) { \
29 listnode_add(oi->area->ospf6->oi_write_q, (oi)); \
30 (oi)->on_write_q = 1; \
31 } \
32 if (list_was_empty \
33 && !list_isempty(oi->area->ospf6->oi_write_q)) \
34 thread_add_write(master, ospf6_write, oi->area->ospf6, \
35 oi->area->ospf6->fd, \
36 &oi->area->ospf6->t_write); \
37 } while (0)
38
39 #endif /* OSPF6_NETWORK_H */