ReactOS  0.4.14-dev-1314-gacf135d
ip_addr.h File Reference
#include "lwip/opt.h"
Include dependency graph for ip_addr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ip_addr
 
struct  ip_addr2
 

Macros

#define IP_ADDR_ANY   0
 
#define IP6_ADDR(ipaddr, a, b, c, d, e, f, g, h)
 
#define ip_addr_debug_print(debug, ipaddr)
 

Functions

u8_t ip_addr_netcmp (struct ip_addr *addr1, struct ip_addr *addr2, struct ip_addr *mask)
 
u8_t ip_addr_cmp (struct ip_addr *addr1, struct ip_addr *addr2)
 
void ip_addr_set (struct ip_addr *dest, struct ip_addr *src)
 
u8_t ip_addr_isany (struct ip_addr *addr)
 

Variables

PACK_STRUCT_BEGIN struct ip_addr PACK_STRUCT_STRUCT
 

Macro Definition Documentation

◆ IP6_ADDR

#define IP6_ADDR (   ipaddr,
  a,
  b,
  c,
  d,
  e,
  f,
  g,
  h 
)
Value:
do { (ipaddr)->addr[0] = htonl((u32_t)((a & 0xffff) << 16) | (b & 0xffff)); \
(ipaddr)->addr[1] = htonl(((c & 0xffff) << 16) | (d & 0xffff)); \
(ipaddr)->addr[2] = htonl(((e & 0xffff) << 16) | (f & 0xffff)); \
(ipaddr)->addr[3] = htonl(((g & 0xffff) << 16) | (h & 0xffff)); } while(0)
#define htonl(x)
Definition: module.h:212
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define e
Definition: ke_i.h:82
GLboolean GLboolean g
Definition: glext.h:6204
GLfloat f
Definition: glext.h:7540
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define d
Definition: ke_i.h:81
unsigned long u32_t
Definition: cc.h:25
const GLubyte * c
Definition: glext.h:8905
GLenum const GLvoid * addr
Definition: glext.h:9621
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

Definition at line 71 of file ip_addr.h.

◆ IP_ADDR_ANY

#define IP_ADDR_ANY   0

Definition at line 41 of file ip_addr.h.

◆ ip_addr_debug_print

#define ip_addr_debug_print (   debug,
  ipaddr 
)
Value:
LWIP_DEBUGF(debug, ("%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F":%"X32_F"\n", \
(ntohl(ipaddr->addr[0]) >> 16) & 0xffff, \
ntohl(ipaddr->addr[0]) & 0xffff, \
(ntohl(ipaddr->addr[1]) >> 16) & 0xffff, \
ntohl(ipaddr->addr[1]) & 0xffff, \
(ntohl(ipaddr->addr[2]) >> 16) & 0xffff, \
ntohl(ipaddr->addr[2]) & 0xffff, \
(ntohl(ipaddr->addr[3]) >> 16) & 0xffff, \
ntohl(ipaddr->addr[3]) & 0xffff));
#define X32_F
Definition: cc.h:41
#define LWIP_DEBUGF(debug, message)
Definition: debug.h:95
#define debug(msg)
Definition: key_call.c:71
#define ntohl(x)
Definition: module.h:203

Definition at line 82 of file ip_addr.h.

Function Documentation

◆ ip_addr_cmp()

u8_t ip_addr_cmp ( struct ip_addr addr1,
struct ip_addr addr2 
)

Definition at line 49 of file ip6_addr.c.

50 {
51  return(addr1->addr[0] == addr2->addr[0] &&
52  addr1->addr[1] == addr2->addr[1] &&
53  addr1->addr[2] == addr2->addr[2] &&
54  addr1->addr[3] == addr2->addr[3]);
55 }
u32_t addr
Definition: ip_addr.h:45

◆ ip_addr_isany()

u8_t ip_addr_isany ( struct ip_addr addr)

Definition at line 68 of file ip6_addr.c.

69 {
70  if (addr == NULL) return 1;
71  return((addr->addr[0] | addr->addr[1] | addr->addr[2] | addr->addr[3]) == 0);
72 }
smooth NULL
Definition: ftsmooth.c:416
GLenum const GLvoid * addr
Definition: glext.h:9621

◆ ip_addr_netcmp()

u8_t ip_addr_netcmp ( struct ip_addr addr1,
struct ip_addr addr2,
struct ip_addr mask 
)

Definition at line 38 of file ip6_addr.c.

40 {
41  return((addr1->addr[0] & mask->addr[0]) == (addr2->addr[0] & mask->addr[0]) &&
42  (addr1->addr[1] & mask->addr[1]) == (addr2->addr[1] & mask->addr[1]) &&
43  (addr1->addr[2] & mask->addr[2]) == (addr2->addr[2] & mask->addr[2]) &&
44  (addr1->addr[3] & mask->addr[3]) == (addr2->addr[3] & mask->addr[3]));
45 
46 }
GLenum GLint GLuint mask
Definition: glext.h:6028
u32_t addr
Definition: ip_addr.h:45

◆ ip_addr_set()

void ip_addr_set ( struct ip_addr dest,
struct ip_addr src 
)

Definition at line 58 of file ip6_addr.c.

59 {
60  SMEMCPY(dest, src, sizeof(struct ip_addr));
61  /* dest->addr[0] = src->addr[0];
62  dest->addr[1] = src->addr[1];
63  dest->addr[2] = src->addr[2];
64  dest->addr[3] = src->addr[3];*/
65 }
#define SMEMCPY(dst, src, len)
Definition: opt.h:92
GLenum src
Definition: glext.h:6340
static char * dest
Definition: rtl.c:135

Variable Documentation

◆ PACK_STRUCT_STRUCT