Skip to content
Commits on Source (5)
*.o
/aggregartp
/ingests
/lasts
/multicat
/multicat_validate
/multilive
/offsets
/reordertp
# multicat Makefile
VERSION = 2.2
CFLAGS += -Wall -Wformat-security -O3 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE -D_BSD_SOURCE
CFLAGS += -Wall -Wformat-security -O3 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE -D_BSD_SOURCE -D_DEFAULT_SOURCE
CFLAGS += -g
# Comment out the following line for Mac OS X build
LDLIBS += -lrt -pthread
......@@ -31,28 +31,28 @@ $(OBJ_MULTICAT_VALIDATE): Makefile util.h
$(OBJ_MULTILIVE): Makefile util.h
multicat: $(OBJ_MULTICAT)
$(CC) -o $@ $(OBJ_MULTICAT) $(LDLIBS)
$(CC) $(LDFLAGS) -o $@ $(OBJ_MULTICAT) $(LDLIBS)
ingests: $(OBJ_INGESTS)
$(CC) -o $@ $(OBJ_INGESTS) $(LDLIBS)
$(CC) $(LDFLAGS) -o $@ $(OBJ_INGESTS) $(LDLIBS)
aggregartp: $(OBJ_AGGREGARTP)
$(CC) -o $@ $(OBJ_AGGREGARTP) $(LDLIBS)
$(CC) $(LDFLAGS) -o $@ $(OBJ_AGGREGARTP) $(LDLIBS)
reordertp: $(OBJ_REORDERTP)
$(CC) -o $@ $(OBJ_REORDERTP) $(LDLIBS)
$(CC) $(LDFLAGS) -o $@ $(OBJ_REORDERTP) $(LDLIBS)
offsets: $(OBJ_OFFSETS)
$(CC) -o $@ $(OBJ_OFFSETS) $(LDLIBS)
$(CC) $(LDFLAGS) -o $@ $(OBJ_OFFSETS) $(LDLIBS)
lasts: $(OBJ_LASTS)
$(CC) -o $@ $(OBJ_LASTS) $(LDLIBS)
$(CC) $(LDFLAGS) -o $@ $(OBJ_LASTS) $(LDLIBS)
multicat_validate: $(OBJ_MULTICAT_VALIDATE)
$(CC) -o $@ $(OBJ_MULTICAT_VALIDATE) $(LDLIBS)
$(CC) $(LDFLAGS) -o $@ $(OBJ_MULTICAT_VALIDATE) $(LDLIBS)
multilive: $(OBJ_MULTILIVE)
$(CC) -o $@ $(OBJ_MULTILIVE) $(LDLIBS)
$(CC) $(LDFLAGS) -o $@ $(OBJ_MULTILIVE) $(LDLIBS)
clean:
-rm -f multicat $(OBJ_MULTICAT) ingests $(OBJ_INGESTS) aggregartp $(OBJ_AGGREGARTP) reordertp $(OBJ_REORDERTP) offsets $(OBJ_OFFSETS) lasts $(OBJ_LASTS) multicat_validate $(OBJ_MULTICAT_VALIDATE) multilive $(OBJ_MULTILIVE)
......
/*****************************************************************************
* multicat.c: netcat-equivalent for multicast
*****************************************************************************
* Copyright (C) 2009, 2011-2012, 2015-2016 VideoLAN
* Copyright (C) 2009, 2011-2012, 2015-2017 VideoLAN
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
......@@ -43,10 +43,7 @@
#include <poll.h>
#include <sys/ioctl.h>
#include <syslog.h>
#ifdef __FreeBSD__
# include <sys/uio.h>
#endif
#include <sys/uio.h>
#ifdef SIOCGSTAMPNS
# define HAVE_TIMESTAMPS
......
/*****************************************************************************
* util.h: Utils for the multicat suite
*****************************************************************************
* Copyright (C) 2009, 2011, 2014-2016 VideoLAN
* Copyright (C) 2009, 2011, 2014-2017 VideoLAN
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
......@@ -23,6 +23,7 @@
#include <netinet/udp.h>
#include <netinet/ip.h>
#include <sys/types.h>
#if defined(__APPLE__) || defined(__FreeBSD__)
#define POLLRDHUP 0
......@@ -59,14 +60,12 @@ typedef union
* Raw udp packet structure with flexible-array payload
*****************************************************************************/
struct udprawpkt {
#if !defined(__APPLE__)
#if defined(__FreeBSD__)
#if defined(__APPLE__) || defined(__FreeBSD__)
struct ip iph;
#else
struct iphdr iph;
#endif
struct udphdr udph;
#endif
uint8_t payload[];
} __attribute__((packed));
......