From f6077db3173c7b6520d5735f78d06138ac273174 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sat, 4 Dec 1999 21:55:39 +0000 Subject: cool! created higher-order function table for agent redirection. (This used to be commit 7bb2e55d0d3a00a97bba99ebed722a4adf84093c) --- source3/include/proto.h | 6 ++++++ source3/include/smb.h | 3 +++ source3/include/vagent.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 source3/include/vagent.h (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 24dfd6ed1a..5e423e3726 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -138,6 +138,12 @@ BOOL allow_access(char *deny_list,char *allow_list, char *cname,char *caddr); BOOL check_access(int sock, char *allow_list, char *deny_list); +/*The following definitions come from lib/agent.c */ + +void init_sock_redir(struct vagent_ops*va); +void free_sock_redir(struct vagent_ops*va); +void start_agent(struct vagent_ops *va); + /*The following definitions come from lib/bitmap.c */ struct bitmap *bitmap_allocate(int n); diff --git a/source3/include/smb.h b/source3/include/smb.h index 8adfa5e690..d4d2f6712a 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -550,6 +550,9 @@ typedef struct #include "vfs.h" + +#include "vagent.h" + typedef struct connection_struct { struct connection_struct *next, *prev; diff --git a/source3/include/vagent.h b/source3/include/vagent.h new file mode 100644 index 0000000000..19bb976635 --- /dev/null +++ b/source3/include/vagent.h @@ -0,0 +1,51 @@ +/* + Unix SMB/Netbios implementation. + Version 1.9. + Vagent structures and parameters + Copyright (C) Luke Kenneth Casson Leighton 1999 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef _VAGENT_H +#define _VAGENT_H + +/* Vagent operations structure */ + +struct sock_redir +{ + int c; + int s; + int c_id; + int s_id; + void *n; +}; + +struct vagent_ops +{ + void (*free_sock)(void* sock); + int (*get_agent_sock)(void* id); + + BOOL (*process_cli_sock)(struct sock_redir **socks, uint32 num_socks, + struct sock_redir *sock); + BOOL (*process_srv_sock)(struct sock_redir **socks, uint32 num_socks, + int fd); + + void* id; + struct sock_redir **socks; + uint32 num_socks; +}; + +#endif /* _VAGENT_H */ -- cgit