| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "shared-forward.h" |
| 5 |
#include "list.h" |
| 6 |
|
| 7 |
typedef struct ExposePort { |
| 8 |
int protocol; |
| 9 |
uint16_t host_port; |
| 10 |
uint16_t container_port; |
| 11 |
LIST_FIELDS(struct ExposePort, ports); |
| 12 |
} ExposePort; |
| 13 |
|
| 14 |
void expose_port_free_all(ExposePort *p); |
| 15 |
int expose_port_parse(ExposePort **l, const char *s); |
| 16 |
|
| 17 |
int expose_port_watch_rtnl(sd_event *event, int recv_fd, sd_netlink_message_handler_t handler, void *userdata, sd_netlink **ret); |
| 18 |
int expose_port_send_rtnl(int send_fd); |
| 19 |
|
| 20 |
int expose_port_execute(sd_netlink *rtnl, sd_netlink *nfnl, ExposePort *l, int af, union in_addr_union *exposed); |
| 21 |
int expose_port_flush(sd_netlink *nfnl, ExposePort* l, int af, union in_addr_union *exposed); |