diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-07-13 14:24:57 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-07-13 14:24:57 +0200 |
commit | 48d2a55b40871c584b0af8ff4c918a7734a12b59 (patch) | |
tree | 1c7742fab2b3090c3b1e2a45fe76e2a9f9fe3914 /src/host/virt_phy/include | |
parent | 16da443e7376fcf7c88757f8ce2a342a0fd48a99 (diff) |
VIRT-PHY mcast_sock: Use uint16_t for ports, bool and const
Change-Id: I4eab1da8d43fdad05c04f23d89711081c4696fe7
Diffstat (limited to 'src/host/virt_phy/include')
-rw-r--r-- | src/host/virt_phy/include/virtphy/osmo_mcast_sock.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/host/virt_phy/include/virtphy/osmo_mcast_sock.h b/src/host/virt_phy/include/virtphy/osmo_mcast_sock.h index 31b2fd41..aa2013c6 100644 --- a/src/host/virt_phy/include/virtphy/osmo_mcast_sock.h +++ b/src/host/virt_phy/include/virtphy/osmo_mcast_sock.h @@ -1,5 +1,7 @@ #pragma once +#include <stdbool.h> +#include <stdint.h> #include <netinet/in.h> #include <osmocom/core/select.h> @@ -9,19 +11,19 @@ struct mcast_bidir_sock { }; struct mcast_bidir_sock *mcast_bidir_sock_setup(void *ctx, - const char *tx_mcast_group, int tx_mcast_port, - const char *rx_mcast_group, int rx_mcast_port, int loopback, + const char *tx_mcast_group, uint16_t tx_mcast_port, + const char *rx_mcast_group, uint16_t rx_mcast_port, bool loopback, int (*fd_rx_cb)(struct osmo_fd *ofd, unsigned int what), void *osmo_fd_data); int mcast_server_sock_setup(struct osmo_fd *ofd, const char *tx_mcast_group, - int tx_mcast_port, int loopback); + uint16_t tx_mcast_port, bool loopback); -int mcast_client_sock_setup(struct osmo_fd *ofd, const char *mcast_group, int mcast_port, +int mcast_client_sock_setup(struct osmo_fd *ofd, const char *mcast_group, uint16_t mcast_port, int (*fd_rx_cb)(struct osmo_fd *ofd, unsigned int what), void *osmo_fd_data); -int mcast_bidir_sock_tx(struct mcast_bidir_sock *bidir_sock, void *data, int data_len); -int mcast_bidir_sock_rx(struct mcast_bidir_sock *bidir_sock, void *buf, int buf_len); +int mcast_bidir_sock_tx(struct mcast_bidir_sock *bidir_sock, const uint8_t *data, unsigned int data_len); +int mcast_bidir_sock_rx(struct mcast_bidir_sock *bidir_sock, uint8_t *buf, unsigned int buf_len); void mcast_bidir_sock_close(struct mcast_bidir_sock* bidir_sock); |