mirror of
https://github.com/samba-team/samba.git
synced 2025-03-29 02:50:28 +03:00
libutil: moved the networking defines to util_net.h
These were causing thousands of warnings on solaris8
This commit is contained in:
parent
c81d2ae3c9
commit
fae84f98e3
@ -662,33 +662,6 @@ _PUBLIC_ void msleep(unsigned int t);
|
||||
**/
|
||||
_PUBLIC_ char* get_myname(TALLOC_CTX *mem_ctx);
|
||||
|
||||
/**
|
||||
Return true if a string could be a pure IP address.
|
||||
**/
|
||||
_PUBLIC_ bool is_ipaddress(const char *str);
|
||||
|
||||
/**
|
||||
Interpret an internet address or name into an IP address in 4 byte form.
|
||||
**/
|
||||
_PUBLIC_ uint32_t interpret_addr(const char *str);
|
||||
|
||||
/**
|
||||
A convenient addition to interpret_addr().
|
||||
**/
|
||||
_PUBLIC_ struct in_addr interpret_addr2(const char *str);
|
||||
|
||||
/**
|
||||
Check if an IP is the 0.0.0.0.
|
||||
**/
|
||||
_PUBLIC_ bool is_zero_ip_v4(struct in_addr ip);
|
||||
|
||||
/**
|
||||
Are two IPs on the same subnet?
|
||||
**/
|
||||
_PUBLIC_ bool same_net_v4(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
|
||||
|
||||
_PUBLIC_ bool is_ipaddress_v4(const char *str);
|
||||
|
||||
/**
|
||||
Check if a process exists. Does this work on all unixes?
|
||||
**/
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "system/network.h"
|
||||
#include "system/locale.h"
|
||||
#include "system/filesys.h"
|
||||
#include "lib/util/util_net.h"
|
||||
#undef strcasecmp
|
||||
|
||||
/*******************************************************************
|
||||
|
@ -45,4 +45,32 @@ bool interpret_string_addr_prefer_ipv4(struct sockaddr_storage *pss,
|
||||
|
||||
void set_sockaddr_port(struct sockaddr *psa, uint16_t port);
|
||||
|
||||
/**
|
||||
Check if an IP is the 0.0.0.0.
|
||||
**/
|
||||
_PUBLIC_ bool is_zero_ip_v4(struct in_addr ip);
|
||||
|
||||
/**
|
||||
Are two IPs on the same subnet?
|
||||
**/
|
||||
_PUBLIC_ bool same_net_v4(struct in_addr ip1,struct in_addr ip2,struct in_addr mask);
|
||||
|
||||
/**
|
||||
Return true if a string could be a pure IP address.
|
||||
**/
|
||||
_PUBLIC_ bool is_ipaddress(const char *str);
|
||||
|
||||
/**
|
||||
Interpret an internet address or name into an IP address in 4 byte form.
|
||||
**/
|
||||
_PUBLIC_ uint32_t interpret_addr(const char *str);
|
||||
|
||||
/**
|
||||
A convenient addition to interpret_addr().
|
||||
**/
|
||||
_PUBLIC_ struct in_addr interpret_addr2(const char *str);
|
||||
|
||||
_PUBLIC_ bool is_ipaddress_v4(const char *str);
|
||||
|
||||
|
||||
#endif /* _SAMBA_UTIL_NET_H_ */
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "librpc/gen_ndr/ndr_nbt.h"
|
||||
#include "librpc/gen_ndr/ndr_misc.h"
|
||||
#include "system/locale.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
/* don't allow an unlimited number of name components */
|
||||
#define MAX_COMPONENTS 10
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "includes.h"
|
||||
#include "system/network.h"
|
||||
#include "librpc/ndr/libndr.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
#define NDR_SVAL(ndr, ofs) (NDR_BE(ndr)?RSVAL(ndr->data,ofs):SVAL(ndr->data,ofs))
|
||||
#define NDR_IVAL(ndr, ofs) (NDR_BE(ndr)?RIVAL(ndr->data,ofs):IVAL(ndr->data,ofs))
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "../../lib/util/util_net.h"
|
||||
#include "librpc/gen_ndr/ndr_epmapper.h"
|
||||
#include "librpc/gen_ndr/ndr_misc.h"
|
||||
#include "librpc/rpc/dcerpc.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "nsswitch/libwbclient/wbc_async.h"
|
||||
#include "torture/smbtorture.h"
|
||||
#include "torture/winbind/proto.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
#define WBC_ERROR_EQUAL(x,y) (x == y)
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include <gssapi/gssapi_krb5.h>
|
||||
#include <gssapi/gssapi_spnego.h>
|
||||
#include "auth/gensec/gensec_gssapi.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
static size_t gensec_gssapi_max_input_size(struct gensec_security *gensec_security);
|
||||
static size_t gensec_gssapi_max_wrapped_size(struct gensec_security *gensec_security);
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "auth/gensec/gensec_proto.h"
|
||||
#include "param/param.h"
|
||||
#include "auth/auth_sam_reply.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
enum GENSEC_KRB5_STATE {
|
||||
GENSEC_KRB5_SERVER_START,
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "system/network.h"
|
||||
#include "lib/socket/socket.h"
|
||||
#include "system/locale.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
#define FAIL (-1)
|
||||
#define ALLONES ((uint32_t)0xFFFFFFFF)
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "includes.h"
|
||||
#include "system/network.h"
|
||||
#include "lib/socket/netif.h"
|
||||
#include "../lib/util/util_net.h"
|
||||
#include "../lib/util/dlinklist.h"
|
||||
|
||||
/** used for network interfaces */
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "system/filesys.h"
|
||||
#include "lib/socket/socket.h"
|
||||
#include "system/network.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
static NTSTATUS ipv4_init(struct socket_context *sock)
|
||||
{
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "lib/socket/socket.h"
|
||||
#include "../lib/util/dlinklist.h"
|
||||
#include "lib/tsocket/tsocket.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
struct resolve_state {
|
||||
struct resolve_context *ctx;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "libcli/resolve/resolve.h"
|
||||
#include "torture/torture.h"
|
||||
#include "system/network.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
static bool test_async_resolve(struct torture_context *tctx)
|
||||
{
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "auth/credentials/credentials.h"
|
||||
#include "librpc/gen_ndr/ndr_nbt.h"
|
||||
#include "param/param.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
/* the stages of this call */
|
||||
enum connect_stage {CONNECT_SOCKET,
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "librpc/rpc/dcerpc.h"
|
||||
#include "librpc/rpc/dcerpc_proto.h"
|
||||
#include "torture/torture.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
static bool test_BindingString(struct torture_context *tctx,
|
||||
const void *test_data)
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "system/network.h"
|
||||
#include "lib/socket/netif.h"
|
||||
#include "param/param.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
|
||||
/*
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "lib/ldb/include/ldb.h"
|
||||
#include "param/param.h"
|
||||
#include "libcli/resolve/resolve.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
/*
|
||||
work out the ttl we will use given a client requested ttl
|
||||
|
Loading…
x
Reference in New Issue
Block a user