r5304: removed lib/socket/socket.h from includes.h
authorAndrew Tridgell <tridge@samba.org>
Thu, 10 Feb 2005 06:59:29 +0000 (06:59 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:39 +0000 (13:09 -0500)
(This used to be commit b902ea546d2d1327b23f40ddaeeaa8e7e3662454)

23 files changed:
source4/include/includes.h
source4/ldap_server/ldap_server.c
source4/lib/messaging/messaging.c
source4/lib/socket/access.c
source4/lib/socket/config.mk
source4/lib/socket/socket.c
source4/lib/socket/socket.h
source4/lib/socket/socket_ipv4.c
source4/lib/socket/socket_ipv6.c
source4/lib/socket/socket_unix.c
source4/libcli/nbt/nbtsocket.c
source4/libcli/raw/clisocket.c
source4/libcli/raw/clitransport.c
source4/librpc/rpc/dcerpc_sock.c
source4/nbt_server/interfaces.c
source4/rpc_server/dcerpc_sock.c
source4/smbd/process_model.h
source4/smbd/service_stream.c
source4/torture/local/socket.c
source4/torture/nbt/register.c
source4/torture/nbt/wins.c
source4/utils/nmblookup.c
source4/winbind/wb_server.c

index 890491f8844c58f8530f51cf384037355fce504d..cfc0a262607ff8e57057c1386d6887304542f1c8 100644 (file)
@@ -122,7 +122,6 @@ extern int errno;
 #include "enums.h"
 #include "smb_macros.h"
 #include "smb.h"
-#include "lib/socket/socket.h"
 #include "libcli/ldap/ldap.h"
 #include "byteorder.h"
 #include "module.h"
index 3a0e3d1cde0804c0a5bb2b5b9586ab393997594b..7319c1c7ace4544b2be0de757dde1682599f54cb 100644 (file)
@@ -26,6 +26,7 @@
 #include "asn_1.h"
 #include "ldap_server/ldap_server.h"
 #include "smbd/service_stream.h"
+#include "lib/socket/socket.h"
 
 /*
   close the socket and shutdown a server_context
index df0216617d0b3b19caf7a7f09bcfdf58fa41d9c9..8127e7e8fc32f272ea38840c2564e9d6e39d1f99 100644 (file)
@@ -26,6 +26,7 @@
 #include "system/time.h"
 #include "messages.h"
 #include "dlinklist.h"
+#include "lib/socket/socket.h"
 
 /* change the message version with any incompatible changes in the protocol */
 #define MESSAGING_VERSION 1
index c90bf203ddb5b219e162229cf704c141021c8cd5..a64444d41ce8e53dc9bc76a33ea2cc377ba9807c 100644 (file)
@@ -34,6 +34,7 @@
 #include "includes.h"
 #include "system/network.h"
 #include "system/iconv.h"
+#include "lib/socket/socket.h"
 
 #define        FAIL            (-1)
 #define ALLONES  ((uint32_t)0xFFFFFFFF)
index 6217fbc079ba9e666a6d0cf55ff3478b0f0137c0..e4719c3f67e4bbac88517bb945d45ad513aba322 100644 (file)
@@ -5,6 +5,7 @@
 SUBSYSTEM = SOCKET
 INIT_OBJ_FILES = \
                lib/socket/socket_ipv4.o
+NOPROTO=YES
 # End MODULE socket_ipv4
 ################################################
 
@@ -14,6 +15,7 @@ INIT_OBJ_FILES = \
 SUBSYSTEM = SOCKET
 INIT_OBJ_FILES = \
                lib/socket/socket_ipv6.o
+NOPROTO=YES
 # End MODULE socket_ipv6
 ################################################
 
@@ -23,6 +25,7 @@ INIT_OBJ_FILES = \
 SUBSYSTEM = SOCKET
 INIT_OBJ_FILES = \
                lib/socket/socket_unix.o
+NOPROTO=YES
 # End MODULE socket_unix
 ################################################
 
@@ -33,5 +36,6 @@ INIT_OBJ_FILES = \
                lib/socket/socket.o
 ADD_OBJ_FILES = \
                lib/socket/access.o
+NOPROTO=YES
 # End SUBSYSTEM SOCKET
 ################################################
index 109a7cadc01750101ef906c828d7ae046cfbaf99..ddc2097f426ca3e78ebbd2e57f43f9d4c1caf197 100644 (file)
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "lib/socket/socket.h"
 #include "system/filesys.h"
 
 /*
@@ -326,6 +327,10 @@ NTSTATUS socket_dup(struct socket_context *sock)
 
 const struct socket_ops *socket_getops_byname(const char *name, enum socket_type type)
 {
+       extern const struct socket_ops *socket_ipv4_ops(enum socket_type );
+       extern const struct socket_ops *socket_ipv6_ops(enum socket_type );
+       extern const struct socket_ops *socket_unixdom_ops(enum socket_type );
+
        if (strcmp("ip", name) == 0 || 
            strcmp("ipv4", name) == 0) {
                return socket_ipv4_ops(type);
index 162a05cb402e3f01fcca1277b2c9e50540efd1dc..b1fae9ac56be9bd251465f31d59161c2ae78544b 100644 (file)
@@ -103,4 +103,39 @@ struct socket_context {
        const struct socket_ops *ops;
 };
 
+
+/* prototypes */
+NTSTATUS socket_create(const char *name, enum socket_type type, 
+                      struct socket_context **new_sock, uint32_t flags);
+void socket_destroy(struct socket_context *sock);
+NTSTATUS socket_connect(struct socket_context *sock,
+                       const char *my_address, int my_port,
+                       const char *server_address, int server_port,
+                       uint32_t flags);
+NTSTATUS socket_connect_complete(struct socket_context *sock, uint32_t flags);
+NTSTATUS socket_listen(struct socket_context *sock, const char *my_address, int port, int queue_size, uint32_t flags);
+NTSTATUS socket_accept(struct socket_context *sock, struct socket_context **new_sock);
+NTSTATUS socket_recv(struct socket_context *sock, void *buf, 
+                    size_t wantlen, size_t *nread, uint32_t flags);
+NTSTATUS socket_recvfrom(struct socket_context *sock, void *buf, 
+                        size_t wantlen, size_t *nread, uint32_t flags,
+                        const char **src_addr, int *src_port);
+NTSTATUS socket_send(struct socket_context *sock, 
+                    const DATA_BLOB *blob, size_t *sendlen, uint32_t flags);
+NTSTATUS socket_sendto(struct socket_context *sock, 
+                      const DATA_BLOB *blob, size_t *sendlen, uint32_t flags,
+                      const char *dest_addr, int dest_port);
+NTSTATUS socket_set_option(struct socket_context *sock, const char *option, const char *val);
+char *socket_get_peer_name(struct socket_context *sock, TALLOC_CTX *mem_ctx);
+char *socket_get_peer_addr(struct socket_context *sock, TALLOC_CTX *mem_ctx);
+int socket_get_peer_port(struct socket_context *sock);
+char *socket_get_my_addr(struct socket_context *sock, TALLOC_CTX *mem_ctx);
+int socket_get_my_port(struct socket_context *sock);
+int socket_get_fd(struct socket_context *sock);
+NTSTATUS socket_dup(struct socket_context *sock);
+const struct socket_ops *socket_getops_byname(const char *name, enum socket_type type);
+BOOL socket_check_access(struct socket_context *sock, 
+                        const char *service_name,
+                        const char **allow_list, const char **deny_list);
+
 #endif /* _SAMBA_SOCKET_H */
index 2a212fbc944bc8e4012090f33d1a0f7f52746955..4f8b1e6dd65292fd796bf1856ada029b15e2da8b 100644 (file)
@@ -24,6 +24,7 @@
 #include "includes.h"
 #include "system/network.h"
 #include "system/filesys.h"
+#include "lib/socket/socket.h"
 
 static NTSTATUS ipv4_init(struct socket_context *sock)
 {
index d7241d9b383c1af9624e814b4f3abd83018c9838..2384e60550b3b409febc5c7dcb3baeaba0bd2d77 100644 (file)
@@ -20,6 +20,7 @@
 */
 
 #include "includes.h"
+#include "lib/socket/socket.h"
 #include "system/network.h"
 #include "system/filesys.h"
 
index 2bcce0eb118c6c5ef4df4c598f8ffdbf9af50ba2..7cf12db4b2e503153338941c0311b3fb81f22e32 100644 (file)
@@ -22,6 +22,8 @@
 */
 
 #include "includes.h"
+#include "lib/socket/socket.h"
+#include "lib/socket/socket.h"
 #include "system/network.h"
 #include "system/filesys.h"
 
index c771d3b4f53ccbf51aa151288a516f32dee122a3..dd14e76706df861a2e95d023ae2e27e576883c01 100644 (file)
@@ -24,6 +24,7 @@
 #include "lib/events/events.h"
 #include "dlinklist.h"
 #include "libcli/nbt/libnbt.h"
+#include "lib/socket/socket.h"
 
 #define NBT_MAX_PACKET_SIZE 2048
 #define NBT_MAX_REPLIES 1000
index 44c6a87e2142d6561b27873e2716e9f1f49cefae..cbb479ca1a1388e8fb645663088be2ab4f553c1b 100644 (file)
@@ -25,6 +25,7 @@
 #include "lib/events/events.h"
 #include "libcli/raw/libcliraw.h"
 #include "libcli/composite/composite.h"
+#include "lib/socket/socket.h"
 
 /*
   this private structure is used during async connection handling
index 079783435c09d2c77d46fd159d31cf5267663a2a..ee382da3c2a1948c9bac5479e3cf8f4eb3e3d41e 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "includes.h"
 #include "libcli/raw/libcliraw.h"
+#include "lib/socket/socket.h"
 #include "system/time.h"
 #include "dlinklist.h"
 #include "lib/events/events.h"
index e983c9f532e51e7938100c2fe236ffab111d9077..4d2a66174993d3c5cffad7ad914c129079c985cd 100644 (file)
@@ -25,6 +25,7 @@
 #include "dlinklist.h"
 #include "lib/events/events.h"
 #include "librpc/gen_ndr/ndr_epmapper.h"
+#include "lib/socket/socket.h"
 
 #define MIN_HDR_SIZE 16
 
index c84f63040072218947ad693aa755c0c6c2ee3ddc..b2fc0ad6bee26318b9517d44c79c9df7214123c6 100644 (file)
@@ -24,6 +24,7 @@
 #include "dlinklist.h"
 #include "nbt_server/nbt_server.h"
 #include "smbd/service_task.h"
+#include "lib/socket/socket.h"
 
 
 /*
index 48537375d56b753a6a1d3e9557ce3f6dd44900e5..d2ebf794b36e6c851c2e9721f94cba64174e39f1 100644 (file)
@@ -23,6 +23,7 @@
 */
 
 #include "includes.h"
+#include "lib/socket/socket.h"
 #include "system/filesys.h"
 #include "lib/events/events.h"
 #include "rpc_server/dcerpc_server.h"
index 137f2add9111d1a564715a7061f5e785ac330325..2575adeccba1e3e437538034c6e9c560c1276c9a 100644 (file)
@@ -22,6 +22,8 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#include "lib/socket/socket.h"
+
 /* modules can use the following to determine if the interface has changed
  * please increment the version number after each interface change
  * with a comment and maybe update struct process_model_critical_sizes.
index 35a6014eb27c1a9690f6d1dbf1c3de1217c58f97..4da4453ac7d8df1a1048d408f0b908b0a3cb92da 100644 (file)
@@ -24,6 +24,7 @@
 #include "includes.h"
 #include "process_model.h"
 #include "lib/events/events.h"
+#include "lib/socket/socket.h"
 #include "smbd/service_stream.h"
 
 /* the range of ports to try for dcerpc over tcp endpoints */
index 6a6f867fa0f06cc35bddacba30b192e318805115..3b4707b06a65b7dc7747ed41114a4a337bf9f2c9 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "lib/socket/socket.h"
 
 #define CHECK_STATUS(status, correct) do { \
        if (!NT_STATUS_EQUAL(status, correct)) { \
index a8be5dbb9a1f9ce7aee4f6e9c61e612eef3d35e4..dbbe1d3e87b1be336a003276a5a9f3fca341ac1b 100644 (file)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "libcli/nbt/libnbt.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
+#include "lib/socket/socket.h"
 
 #define CHECK_VALUE(v, correct) do { \
        if ((v) != (correct)) { \
index 62efcd3e975cb092fc44203e2a0d574a447080b6..313a46b02af8ac0a416efb2e5a930c0be050f414 100644 (file)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "libcli/nbt/libnbt.h"
 #include "librpc/gen_ndr/ndr_nbt.h"
+#include "lib/socket/socket.h"
 
 #define CHECK_VALUE(v, correct) do { \
        if ((v) != (correct)) { \
index e4cf87802d8b65d2659b9a2732b9679888b4f368..5e8b59edc87e2d78c3684b64f11244fc672bd865 100644 (file)
@@ -27,6 +27,7 @@
 #include "libcli/nbt/libnbt.h"
 #include "lib/cmdline/popt_common.h"
 #include "system/iconv.h"
+#include "lib/socket/socket.h"
 
 /* command line options */
 static struct {
index 0513b1b1256ab93538928694e6a20964cc41b98b..63d186f9dd90266370dd77251f5ecd25e9c92ae1 100644 (file)
@@ -21,6 +21,7 @@
 */
 
 #include "includes.h"
+#include "lib/socket/socket.h"
 #include "system/filesys.h"
 #include "dlinklist.h"
 #include "lib/events/events.h"