diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-03-07 11:07:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:52:24 -0500 |
commit | 4ac2be99588b48b0652a524bf12fb1aa9c3f5fbb (patch) | |
tree | 1d810fa37a23a91d9405b686bd8b86befe2b1f9a /source4/lib | |
parent | 45c92c9cf08210e1d5792e2d8db93912727c3dba (diff) | |
download | samba-4ac2be99588b48b0652a524bf12fb1aa9c3f5fbb.tar.gz samba-4ac2be99588b48b0652a524bf12fb1aa9c3f5fbb.tar.bz2 samba-4ac2be99588b48b0652a524bf12fb1aa9c3f5fbb.zip |
r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 122835876748a3eaf5e8d31ad1abddab9acb8781)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/basic.mk | 2 | ||||
-rw-r--r-- | source4/lib/db_wrap.h | 1 | ||||
-rw-r--r-- | source4/lib/ldb/samba/ldif_handlers.c | 1 | ||||
-rw-r--r-- | source4/lib/ldb/tools/cmdline.c | 1 | ||||
-rw-r--r-- | source4/lib/netif/interface.c | 50 | ||||
-rw-r--r-- | source4/lib/netif/netif.c | 1 | ||||
-rw-r--r-- | source4/lib/netif/netif.h | 1 | ||||
-rw-r--r-- | source4/lib/samba3/group.c | 1 | ||||
-rw-r--r-- | source4/lib/samba3/idmap.c | 1 | ||||
-rw-r--r-- | source4/lib/socket/connect.c | 1 | ||||
-rw-r--r-- | source4/lib/socket/connect_multi.c | 1 |
11 files changed, 36 insertions, 25 deletions
diff --git a/source4/lib/basic.mk b/source4/lib/basic.mk index b57de3f6ef..50ed8cc02f 100644 --- a/source4/lib/basic.mk +++ b/source4/lib/basic.mk @@ -22,6 +22,7 @@ include tdr/config.mk ############################## # Start SUBSYSTEM LIBNETIF [SUBSYSTEM::LIBNETIF] +PRIVATE_PROTO_HEADER = netif/proto.h OBJ_FILES = \ netif/interface.o \ netif/netif.o @@ -55,6 +56,7 @@ OBJ_FILES = \ gencache/gencache.o \ [SUBSYSTEM::DB_WRAP] +PRIVATE_PROTO_HEADER = db_wrap_proto.h OBJ_FILES = db_wrap.o \ gendb.o REQUIRED_SUBSYSTEMS = LIBLDB LIBTDB LDBSAMBA diff --git a/source4/lib/db_wrap.h b/source4/lib/db_wrap.h index 48e1bbc9e1..1af2cd2e2a 100644 --- a/source4/lib/db_wrap.h +++ b/source4/lib/db_wrap.h @@ -28,3 +28,4 @@ struct tdb_wrap { struct tdb_wrap *next, *prev; }; +#include "db_wrap_proto.h" diff --git a/source4/lib/ldb/samba/ldif_handlers.c b/source4/lib/ldb/samba/ldif_handlers.c index df4b5e9c3b..e57cd970b1 100644 --- a/source4/lib/ldb/samba/ldif_handlers.c +++ b/source4/lib/ldb/samba/ldif_handlers.c @@ -28,6 +28,7 @@ #include "librpc/gen_ndr/ndr_security.h" #include "librpc/gen_ndr/ndr_misc.h" #include "dsdb/samdb/samdb.h" +#include "libcli/security/proto.h" /* convert a ldif formatted objectSid to a NDR formatted blob diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c index 8f803c5118..2874818160 100644 --- a/source4/lib/ldb/tools/cmdline.c +++ b/source4/lib/ldb/tools/cmdline.c @@ -29,6 +29,7 @@ #ifdef _SAMBA_BUILD_ #include "lib/cmdline/popt_common.h" #include "auth/auth.h" +#include "db_wrap.h" #endif /* diff --git a/source4/lib/netif/interface.c b/source4/lib/netif/interface.c index 8d738f6c41..019b05cfbb 100644 --- a/source4/lib/netif/interface.c +++ b/source4/lib/netif/interface.c @@ -25,7 +25,7 @@ #include "lib/netif/netif.h" #include "dlinklist.h" -/* used for network interfaces */ +/** used for network interfaces */ struct interface { struct interface *next, *prev; struct ipv4_addr ip; @@ -105,7 +105,7 @@ static void add_interface(struct in_addr ip, struct in_addr nmask) -/**************************************************************************** +/** interpret a single element from a interfaces= config line This handles the following different forms: @@ -115,7 +115,7 @@ This handles the following different forms: 3) IP/masklen 4) ip/mask 5) bcast/mask -****************************************************************************/ +**/ static void interpret_interface(const char *token, struct iface_struct *probed_ifaces, int total_probed) @@ -184,9 +184,9 @@ static void interpret_interface(const char *token, } -/**************************************************************************** +/** load the list of network interfaces -****************************************************************************/ +**/ static void load_interfaces(void) { const char **ptr; @@ -230,19 +230,19 @@ static void load_interfaces(void) } -/* +/** unload the interfaces list, so it can be reloaded when needed */ -_PUBLIC_ void unload_interfaces(void) +void unload_interfaces(void) { talloc_free(local_interfaces); local_interfaces = NULL; } -/**************************************************************************** +/** how many interfaces do we have - **************************************************************************/ -_PUBLIC_ int iface_count(void) + **/ +int iface_count(void) { int ret = 0; struct interface *i; @@ -254,10 +254,10 @@ _PUBLIC_ int iface_count(void) return ret; } -/**************************************************************************** +/** return IP of the Nth interface - **************************************************************************/ -_PUBLIC_ const char *iface_n_ip(int n) + **/ +const char *iface_n_ip(int n) { struct interface *i; @@ -272,10 +272,10 @@ _PUBLIC_ const char *iface_n_ip(int n) return NULL; } -/**************************************************************************** +/** return bcast of the Nth interface - **************************************************************************/ -_PUBLIC_ const char *iface_n_bcast(int n) + **/ +const char *iface_n_bcast(int n) { struct interface *i; @@ -290,10 +290,10 @@ _PUBLIC_ const char *iface_n_bcast(int n) return NULL; } -/**************************************************************************** +/** return netmask of the Nth interface - **************************************************************************/ -_PUBLIC_ const char *iface_n_netmask(int n) + **/ +const char *iface_n_netmask(int n) { struct interface *i; @@ -308,11 +308,11 @@ _PUBLIC_ const char *iface_n_netmask(int n) return NULL; } -/* +/** return the local IP address that best matches a destination IP, or our first interface if none match */ -_PUBLIC_ const char *iface_best_ip(const char *dest) +const char *iface_best_ip(const char *dest) { struct interface *iface; struct in_addr ip; @@ -327,10 +327,10 @@ _PUBLIC_ const char *iface_best_ip(const char *dest) return iface_n_ip(0); } -/* +/** return True if an IP is one one of our local networks */ -_PUBLIC_ BOOL iface_is_local(const char *dest) +BOOL iface_is_local(const char *dest) { struct in_addr ip; @@ -343,10 +343,10 @@ _PUBLIC_ BOOL iface_is_local(const char *dest) return False; } -/* +/** return True if a IP matches a IP/netmask pair */ -_PUBLIC_ BOOL iface_same_net(const char *ip1, const char *ip2, const char *netmask) +BOOL iface_same_net(const char *ip1, const char *ip2, const char *netmask) { return same_net(interpret_addr2(ip1), interpret_addr2(ip2), diff --git a/source4/lib/netif/netif.c b/source4/lib/netif/netif.c index 8256615ef2..0344febf38 100644 --- a/source4/lib/netif/netif.c +++ b/source4/lib/netif/netif.c @@ -77,6 +77,7 @@ #endif #include <net/if.h> +#define BOOL int #include "netif.h" #if HAVE_IFACE_IFCONF diff --git a/source4/lib/netif/netif.h b/source4/lib/netif/netif.h index 7efe5a9b19..77b7809685 100644 --- a/source4/lib/netif/netif.h +++ b/source4/lib/netif/netif.h @@ -28,3 +28,4 @@ struct iface_struct { #define MAX_INTERFACES 128 +#include "netif/proto.h" diff --git a/source4/lib/samba3/group.c b/source4/lib/samba3/group.c index eea70c8530..74190e24ea 100644 --- a/source4/lib/samba3/group.c +++ b/source4/lib/samba3/group.c @@ -24,6 +24,7 @@ #include "lib/samba3/samba3.h" #include "lib/tdb/include/tdbutil.h" #include "system/filesys.h" +#include "libcli/security/proto.h" #define DATABASE_VERSION_V1 1 /* native byte format. */ #define DATABASE_VERSION_V2 2 /* le format. */ diff --git a/source4/lib/samba3/idmap.c b/source4/lib/samba3/idmap.c index 205089f1cc..6958f8d004 100644 --- a/source4/lib/samba3/idmap.c +++ b/source4/lib/samba3/idmap.c @@ -27,6 +27,7 @@ #include "lib/tdb/include/tdbutil.h" #include "lib/samba3/samba3.h" #include "system/filesys.h" +#include "libcli/security/proto.h" /* High water mark keys */ #define HWM_GROUP "GROUP HWM" diff --git a/source4/lib/socket/connect.c b/source4/lib/socket/connect.c index dc64198caa..a74e2a67e6 100644 --- a/source4/lib/socket/connect.c +++ b/source4/lib/socket/connect.c @@ -26,6 +26,7 @@ #include "lib/socket/socket.h" #include "lib/events/events.h" #include "libcli/composite/composite.h" +#include "libcli/resolve/resolve.h" struct connect_state { diff --git a/source4/lib/socket/connect_multi.c b/source4/lib/socket/connect_multi.c index 7396435075..9f060767af 100644 --- a/source4/lib/socket/connect_multi.c +++ b/source4/lib/socket/connect_multi.c @@ -26,6 +26,7 @@ #include "lib/socket/socket.h" #include "lib/events/events.h" #include "libcli/composite/composite.h" +#include "libcli/resolve/resolve.h" #define MULTI_PORT_DELAY 2000 /* microseconds */ |