/** * udp_init: * @addr: character string containing an IPv4 or IPv6 network address. * @rx_port: receive port. * @tx_port: transmit port. * @ttl: time-to-live value for transmitted packets. * * Creates a session for sending and receiving UDP datagrams over IP * networks. * * Returns: a pointer to a valid socket_udp structure on success, NULL otherwise. **/ socket_udp *udp_init(const char *addr, uint16_t rx_port, uint16_t tx_port, int ttl, bool use_ipv6) { return udp_init_if(addr, NULL, rx_port, tx_port, ttl, use_ipv6); }
/** * udp_init: * @addr: character string containing an IPv4 or IPv6 network address. * @rx_port: receive port. * @tx_port: transmit port. * @ttl: time-to-live value for transmitted packets. * * Creates a session for sending and receiving UDP datagrams over IP * networks. * * Returns: a pointer to a valid socket_udp structure on success, NULL otherwise. **/ socket_udp *udp_init(const char *addr, uint16_t rx_port, uint16_t tx_port, int ttl) { return udp_init_if(addr, NULL, rx_port, tx_port, ttl); }