]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
7a8f6325 LP |
2 | #pragma once |
3 | ||
7a8f6325 LP |
4 | #include <inttypes.h> |
5 | ||
6 | #include "sd-event.h" | |
7 | #include "sd-netlink.h" | |
71d35b6b | 8 | |
7a8f6325 | 9 | #include "in-addr-util.h" |
71d35b6b | 10 | #include "list.h" |
7a8f6325 LP |
11 | |
12 | typedef struct ExposePort { | |
13 | int protocol; | |
14 | uint16_t host_port; | |
15 | uint16_t container_port; | |
16 | LIST_FIELDS(struct ExposePort, ports); | |
17 | } ExposePort; | |
18 | ||
19 | void expose_port_free_all(ExposePort *p); | |
20 | int expose_port_parse(ExposePort **l, const char *s); | |
21 | ||
22 | int expose_port_watch_rtnl(sd_event *event, int recv_fd, sd_netlink_message_handler_t handler, union in_addr_union *exposed, sd_netlink **ret); | |
23 | int expose_port_send_rtnl(int send_fd); | |
24 | ||
25 | int expose_port_execute(sd_netlink *rtnl, ExposePort *l, union in_addr_union *exposed); | |
26 | int expose_port_flush(ExposePort* l, union in_addr_union *exposed); |