/usr/include/re/re_udp.h is in libre-dev 0.5.6-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | /**
* @file re_udp.h Interface to User Datagram Protocol
*
* Copyright (C) 2010 Creytiv.com
*/
struct sa;
struct udp_sock;
/**
* Defines the UDP Receive handler
*
* @param src Source address
* @param mb Datagram buffer
* @param arg Handler argument
*/
typedef void (udp_recv_h)(const struct sa *src, struct mbuf *mb, void *arg);
typedef void (udp_error_h)(int err, void *arg);
int udp_listen(struct udp_sock **usp, const struct sa *local,
udp_recv_h *rh, void *arg);
int udp_connect(struct udp_sock *us, const struct sa *peer);
int udp_send(struct udp_sock *us, const struct sa *dst, struct mbuf *mb);
int udp_send_anon(const struct sa *dst, struct mbuf *mb);
int udp_local_get(const struct udp_sock *us, struct sa *local);
int udp_setsockopt(struct udp_sock *us, int level, int optname,
const void *optval, uint32_t optlen);
int udp_sockbuf_set(struct udp_sock *us, int size);
void udp_rxsz_set(struct udp_sock *us, size_t rxsz);
void udp_rxbuf_presz_set(struct udp_sock *us, size_t rx_presz);
void udp_handler_set(struct udp_sock *us, udp_recv_h *rh, void *arg);
void udp_error_handler_set(struct udp_sock *us, udp_error_h *eh);
int udp_thread_attach(struct udp_sock *us);
void udp_thread_detach(struct udp_sock *us);
int udp_sock_fd(const struct udp_sock *us, int af);
int udp_multicast_join(struct udp_sock *us, const struct sa *group);
int udp_multicast_leave(struct udp_sock *us, const struct sa *group);
/* Helper API */
typedef bool (udp_helper_send_h)(int *err, struct sa *dst,
struct mbuf *mb, void *arg);
typedef bool (udp_helper_recv_h)(struct sa *src,
struct mbuf *mb, void *arg);
struct udp_helper;
int udp_register_helper(struct udp_helper **uhp, struct udp_sock *us,
int layer,
udp_helper_send_h *sh, udp_helper_recv_h *rh,
void *arg);
int udp_send_helper(struct udp_sock *us, const struct sa *dst,
struct mbuf *mb, struct udp_helper *uh);
struct udp_helper *udp_helper_find(const struct udp_sock *us, int layer);
|