]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/nspawn/nspawn-expose-ports.h
tree-wide: remove Lennart's copyright lines
[thirdparty/systemd.git] / src / nspawn / nspawn-expose-ports.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include <inttypes.h>
5
6 #include "sd-event.h"
7 #include "sd-netlink.h"
8
9 #include "in-addr-util.h"
10 #include "list.h"
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);