Skip to content

Commit

Permalink
netinet/in.h: Add missing IN6_IS_ADDR_V4COMPAT macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-nutt committed Sep 18, 2017
1 parent 725aa4a commit 15128a6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions include/netinet/in.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* include/netinet/in.h
*
* Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009-2010, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -128,6 +128,13 @@
(a)->s6_addr32[2] == 0 && \
(a)->s6_addr32[3] == 0)

#define IN6_IS_ADDR_V4COMPAT(a) \
((a)->s6_addr32[0] == 0 && \
(a)->s6_addr32[1] == 0 && \
(a)->s6_addr32[2] == 0 && \
(a)->s6_addr32[3] != 0 && \
(a)->s6_addr32[3] != NTOHL(1))

#define IN6_IS_ADDR_V4MAPPED(a) \
((a)->s6_addr32[0] == 0 && \
(a)->s6_addr32[1] == 0 && \
Expand All @@ -137,10 +144,6 @@
* Public Type Definitions
****************************************************************************/

/****************************************************************************
* Public Type Definitions
****************************************************************************/

typedef uint16_t in_port_t;

/* IPv4 Internet address */
Expand Down

0 comments on commit 15128a6

Please sign in to comment.