APR_DECLARE(apr_status_t) apr_mcast_leave(apr_socket_t *sock, apr_sockaddr_t *addr, apr_sockaddr_t *iface, apr_sockaddr_t *source) { #if defined(IP_DROP_MEMBERSHIP) && defined(HAVE_STRUCT_IPMREQ) return do_mcast(IP_DROP_MEMBERSHIP, sock, addr, iface, source); #else return APR_ENOTIMPL; #endif }
int main(int argc, char** argv) { struct configuration cfg; int sock; unsigned int pkt_num = 0; parse_options(argc, argv, &cfg); /* Initialise */ sock = add_socket(&cfg); do_mcast(&cfg, sock); do_ioctl(&cfg, sock); do_ts_sockopt(&cfg, sock); /* Run until we've got enough packets, or an error occurs */ while( (pkt_num++ < cfg.cfg_max_packets) || (cfg.cfg_max_packets == 0) ) TRY( do_echo(sock, pkt_num, cfg.cfg_templated) ); close(sock); return 0; }