summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h29
-rw-r--r--source3/include/smb.h19
2 files changed, 35 insertions, 13 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 4613137d0d..149009685e 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -6,6 +6,16 @@
BOOL check_access(int snum);
BOOL allow_access(char *deny_list,char *allow_list,char *cname,char *caddr);
+/*The following definitions come from asyncdns.c */
+
+int asyncdns_fd(void);
+void start_async_dns(void);
+void run_dns_queue(void);
+BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question,
+ struct name_record **n);
+BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question,
+ struct name_record **n);
+
/*The following definitions come from charcnv.c */
char *unix2dos_format(char *str,BOOL overwrite);
@@ -420,8 +430,8 @@ void remove_name(struct subnet_record *d, struct name_record *n);
struct name_record *find_name(struct name_record *n,
struct nmb_name *name, int search);
struct name_record *find_name_search(struct subnet_record **d,
- struct nmb_name *name,
- int search, struct in_addr ip);
+ struct nmb_name *name,
+ int search, struct in_addr ip);
void dump_names(void);
void load_netbios_names(void);
void remove_netbios_name(struct subnet_record *d,
@@ -432,7 +442,6 @@ struct name_record *add_netbios_entry(struct subnet_record *d,
int ttl, enum name_source source, struct in_addr ip,
BOOL new_only,BOOL wins);
void expire_names(time_t t);
-struct name_record *dns_name_search(struct nmb_name *question, int Time);
/*The following definitions come from namedbresp.c */
@@ -842,15 +851,13 @@ int construct_reply(char *inbuf,char *outbuf,int size,int bufsize);
/*The following definitions come from shmem.c */
-BOOL smb_shm_create_hash_table( unsigned int size );
-BOOL smb_shm_open( char *file_name, int size);
+BOOL smb_shm_open(char *file_name, int size);
BOOL smb_shm_close( void );
-smb_shm_offset_t smb_shm_alloc(int size);
-BOOL smb_shm_free(smb_shm_offset_t offset);
-smb_shm_offset_t smb_shm_get_userdef_off(void);
-BOOL smb_shm_set_userdef_off(smb_shm_offset_t userdef_off);
-void *smb_shm_offset2addr(smb_shm_offset_t offset);
-smb_shm_offset_t smb_shm_addr2offset(void *addr);
+int smb_shm_alloc(int size);
+BOOL smb_shm_free(int offset);
+int smb_shm_get_userdef_off(void);
+void *smb_shm_offset2addr(int offset);
+int smb_shm_addr2offset(void *addr);
BOOL smb_shm_lock_hash_entry( unsigned int entry);
BOOL smb_shm_unlock_hash_entry( unsigned int entry );
BOOL smb_shm_get_usage(int *bytes_free,
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 0965b6b90b..c982e3e78d 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -63,8 +63,7 @@
typedef int BOOL;
/* offset in shared memory */
-typedef int smb_shm_offset_t;
-#define NULL_OFFSET (smb_shm_offset_t)(0)
+#define NULL_OFFSET (int)(0)
/* limiting size of ipc replies */
#define REALLOC(ptr,size) Realloc(ptr,MAX((size),4*1024))
@@ -1273,6 +1272,22 @@ struct share_ops {
void (*status)(FILE *);
};
+/* each implementation of the shared memory code needs
+ to support the following operations */
+struct shmem_ops {
+ BOOL (*open)(char *, int );
+ BOOL (*close)( void );
+ int (*alloc)(int );
+ BOOL (*free)(int );
+ int (*get_userdef_off)(void);
+ void *(*offset2addr)(int );
+ int (*addr2offset)(void *addr);
+ BOOL (*lock_hash_entry)(unsigned int);
+ BOOL (*unlock_hash_entry)( unsigned int );
+ BOOL (*get_usage)(int *,int *,int *);
+};
+
+
/* this is used for smbstatus */
struct connect_record
{