]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
718e3744 | 2 | /* |
508e53e2 | 3 | * Copyright (C) 2003 Yasuhiro Ohara |
718e3744 | 4 | */ |
5 | ||
6 | #ifndef OSPF6_NETWORK_H | |
7 | #define OSPF6_NETWORK_H | |
8 | ||
508e53e2 | 9 | extern struct in6_addr allspfrouters6; |
10 | extern struct in6_addr alldrouters6; | |
11 | ||
7df1f362 K |
12 | extern int ospf6_serv_sock(struct ospf6 *ospf6); |
13 | extern void ospf6_serv_close(int *ospf6_sock); | |
beadc736 | 14 | extern int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option, |
15 | int sockfd); | |
6ac29a51 | 16 | |
01d8acff | 17 | extern int ospf6_sendmsg(struct in6_addr *src, struct in6_addr *dst, |
b66ec22c | 18 | ifindex_t ifindex, struct iovec *message, |
01d8acff DS |
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); | |
718e3744 | 23 | |
d6a39b53 | 24 | #define OSPF6_MESSAGE_WRITE_ON(oi) \ |
3d968031 PR |
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 | } \ | |
907a2395 DS |
32 | if (list_was_empty && \ |
33 | !list_isempty(oi->area->ospf6->oi_write_q)) \ | |
34 | event_add_write(master, ospf6_write, oi->area->ospf6, \ | |
35 | oi->area->ospf6->fd, \ | |
36 | &oi->area->ospf6->t_write); \ | |
3d968031 PR |
37 | } while (0) |
38 | ||
718e3744 | 39 | #endif /* OSPF6_NETWORK_H */ |