shared/trivial: move code
This commit is contained in:
@@ -26,23 +26,6 @@
|
|||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
union {
|
|
||||||
guint8 addr_ptr[1];
|
|
||||||
in_addr_t addr4;
|
|
||||||
struct in6_addr addr6;
|
|
||||||
|
|
||||||
/* NMIPAddr is really a union for IP addresses.
|
|
||||||
* However, as ethernet addresses fit in here nicely, use
|
|
||||||
* it also for an ethernet MAC address. */
|
|
||||||
guint8 addr_eth[6 /*ETH_ALEN*/];
|
|
||||||
};
|
|
||||||
} NMIPAddr;
|
|
||||||
|
|
||||||
extern const NMIPAddr nm_ip_addr_zero;
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static inline char
|
static inline char
|
||||||
nm_utils_addr_family_to_char (int addr_family)
|
nm_utils_addr_family_to_char (int addr_family)
|
||||||
{
|
{
|
||||||
@@ -68,6 +51,23 @@ nm_utils_addr_family_to_size (int addr_family)
|
|||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
union {
|
||||||
|
guint8 addr_ptr[1];
|
||||||
|
in_addr_t addr4;
|
||||||
|
struct in6_addr addr6;
|
||||||
|
|
||||||
|
/* NMIPAddr is really a union for IP addresses.
|
||||||
|
* However, as ethernet addresses fit in here nicely, use
|
||||||
|
* it also for an ethernet MAC address. */
|
||||||
|
guint8 addr_eth[6 /*ETH_ALEN*/];
|
||||||
|
};
|
||||||
|
} NMIPAddr;
|
||||||
|
|
||||||
|
extern const NMIPAddr nm_ip_addr_zero;
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define NM_CMP_RETURN(c) \
|
#define NM_CMP_RETURN(c) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
const int _cc = (c); \
|
const int _cc = (c); \
|
||||||
|
Reference in New Issue
Block a user