/*
- * Copyright (C) 2005-2013 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2014 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/** \file udp_recv.c Paraslash's udp receiver */
+#include <netinet/in.h>
#include <regex.h>
#include <sys/socket.h>
#include <net/if.h>
+#include <sys/types.h>
+#include <arpa/inet.h>
+#include <sys/un.h>
+#include <netdb.h>
#include "para.h"
#include "error.h"
}
if (memcmp(iov[0].iov_base, FEC_EOF_PACKET, iov[0].iov_len) != 0)
return 0;
- if (memcmp(iov[1].iov_base, FEC_EOF_PACKET + iov[0].iov_len,
+ if (memcmp(iov[1].iov_base, &FEC_EOF_PACKET[iov[0].iov_len],
FEC_EOF_PACKET_LEN - iov[0].iov_len) != 0)
return 0;
return -E_RECV_EOF;
r->post_select = udp_recv_post_select;
r->parse_config = udp_recv_parse_config;
r->free_config = udp_recv_free_config;
- r->help = (struct ggo_help) {
- .short_help = udp_recv_args_info_help,
- .detailed_help = udp_recv_args_info_detailed_help
- };
+ r->help = (struct ggo_help)DEFINE_GGO_HELP(udp_recv);
udp_recv_cmdline_parser_free(&dummy);
}