};
static int udp_beforepoll(void *state, struct pollfd *fds, int *nfds_io,
- int *timeout_io, const struct timeval *tv,
- uint64_t *now)
+ int *timeout_io)
{
struct udp *st=state;
if (*nfds_io<1) {
return 0;
}
-static void udp_afterpoll(void *state, struct pollfd *fds, int nfds,
- const struct timeval *tv, uint64_t *now)
+static void udp_afterpoll(void *state, struct pollfd *fds, int nfds)
{
struct udp *st=state;
struct sockaddr_in from;
- int fromlen;
+ socklen_t fromlen;
struct notify_list *n;
bool_t done;
int rv;
d=i->data.dict;
j=dict_find_item(d,"address",False,"udp",st->loc);
- st->addr=j?st->addr=string_item_to_ipaddr(j, "udp"):INADDR_ANY;
+ st->addr=j?string_item_to_ipaddr(j, "udp"):INADDR_ANY;
st->port=dict_read_number(d,"port",True,"udp",st->loc,0);
st->rbuf=find_cl_if(d,"buffer",CL_BUFFER,True,"udp",st->loc);
st->authbind=dict_read_string(d,"authbind",False,"udp",st->loc);
return new_closure(&st->cl);
}
-init_module udp_module;
void udp_module(dict_t *dict)
{
add_closure(dict,"udp",udp_apply);