From f63630cdf3f79805c67e98c70177c10f9822b561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 7 Oct 2010 07:53:31 +0000 Subject: Move multicast address identification fallback macros to network.h from udp.c Originally committed as revision 25386 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/network.h | 7 +++++++ libavformat/udp.c | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'libavformat') diff --git a/libavformat/network.h b/libavformat/network.h index d1f3d29..07112ef 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -155,4 +155,11 @@ const char *ff_gai_strerror(int ecode); #define INET6_ADDRSTRLEN INET_ADDRSTRLEN #endif +#ifndef IN_MULTICAST +#define IN_MULTICAST(a) ((((uint32_t)(a)) & 0xf0000000) == 0xe0000000) +#endif +#ifndef IN6_IS_ADDR_MULTICAST +#define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff) +#endif + #endif /* AVFORMAT_NETWORK_H */ diff --git a/libavformat/udp.c b/libavformat/udp.c index 58fbe96..c1160cf 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -40,12 +40,6 @@ #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP #endif -#ifndef IN_MULTICAST -#define IN_MULTICAST(a) ((((uint32_t)(a)) & 0xf0000000) == 0xe0000000) -#endif -#ifndef IN6_IS_ADDR_MULTICAST -#define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff) -#endif typedef struct { int udp_fd; -- cgit v1.1