mirror of
https://git.proxmox.com/git/mirror_kronosnet
synced 2026-01-16 17:04:36 +00:00
and cleanup all netutils common functions Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
30 lines
693 B
C
30 lines
693 B
C
/*
|
|
* Copyright (C) 2010-2020 Red Hat, Inc. All rights reserved.
|
|
*
|
|
* Authors: Fabio M. Di Nitto <fabbione@kronosnet.org>
|
|
* Federico Simoncelli <fsimon@kronosnet.org>
|
|
*
|
|
* This software licensed under LGPL-2.0+
|
|
*/
|
|
|
|
#ifndef __KNET_NETUTILS_H__
|
|
#define __KNET_NETUTILS_H__
|
|
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
|
|
/*
|
|
* s6_addr32 is not defined in BSD userland, only kernel.
|
|
* definition is the same as linux and it works fine for
|
|
* what we need.
|
|
*/
|
|
|
|
#ifndef s6_addr32
|
|
#define s6_addr32 __u6_addr.__u6_addr32
|
|
#endif
|
|
|
|
int cmpaddr(const struct sockaddr_storage *ss1, const struct sockaddr_storage *ss2);
|
|
|
|
socklen_t sockaddr_len(const struct sockaddr_storage *ss);
|
|
#endif
|