]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/nspawn/nspawn-expose-ports.h
tree-wide: drop 'This file is part of systemd' blurb
[thirdparty/systemd.git] / src / nspawn / nspawn-expose-ports.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 Copyright 2015 Lennart Poettering
6 ***/
7
8 #include <inttypes.h>
9
10 #include "sd-event.h"
11 #include "sd-netlink.h"
12
13 #include "in-addr-util.h"
14 #include "list.h"
15
16 typedef struct ExposePort {
17 int protocol;
18 uint16_t host_port;
19 uint16_t container_port;
20 LIST_FIELDS(struct ExposePort, ports);
21 } ExposePort;
22
23 void expose_port_free_all(ExposePort *p);
24 int expose_port_parse(ExposePort **l, const char *s);
25
26 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);
27 int expose_port_send_rtnl(int send_fd);
28
29 int expose_port_execute(sd_netlink *rtnl, ExposePort *l, union in_addr_union *exposed);
30 int expose_port_flush(ExposePort* l, union in_addr_union *exposed);