KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
net.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <string.h>

Go to the source code of this file.

Data Structures

struct  SockAddr
 Combination of IP address and port. More...
 

Macros

#define NET_IP_U32(A, B, C, D)
 Creates a U32 IP address from components. More...
 

Functions

static bool sockAddrEq (SockAddr *addr1, SockAddr *addr2)
 Checks if two socket addresses are equal. More...
 

Macro Definition Documentation

#define NET_IP_U32 (   A,
  B,
  C,
 
)
Value:
(( ( ( A ) & 0xFF) << 24 ) | ( ( ( B ) & 0xFF) << 16 )\
| ( ( ( C ) & 0xFF) << 8 ) | ( ( ( D ) & 0xFF) << 0 ))

Creates a U32 IP address from components.

Definition at line 40 of file net.h.

Function Documentation

static bool sockAddrEq ( SockAddr addr1,
SockAddr addr2 
)
inlinestatic

Checks if two socket addresses are equal.

Parameters
addr1First address to compare.
addr2Second address to compare.
Returns

Definition at line 51 of file net.h.