]>
Commit | Line | Data |
---|---|---|
7a8f6325 LP |
1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
2 | ||
3 | #pragma once | |
4 | ||
5 | /*** | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2015 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | ***/ | |
23 | ||
24 | #include <inttypes.h> | |
25 | ||
26 | #include "sd-event.h" | |
27 | #include "sd-netlink.h" | |
28 | #include "list.h" | |
29 | #include "in-addr-util.h" | |
30 | ||
31 | typedef struct ExposePort { | |
32 | int protocol; | |
33 | uint16_t host_port; | |
34 | uint16_t container_port; | |
35 | LIST_FIELDS(struct ExposePort, ports); | |
36 | } ExposePort; | |
37 | ||
38 | void expose_port_free_all(ExposePort *p); | |
39 | int expose_port_parse(ExposePort **l, const char *s); | |
40 | ||
41 | 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); | |
42 | int expose_port_send_rtnl(int send_fd); | |
43 | ||
44 | int expose_port_execute(sd_netlink *rtnl, ExposePort *l, union in_addr_union *exposed); | |
45 | int expose_port_flush(ExposePort* l, union in_addr_union *exposed); |