From a75e9a3ee91b83af9c0fa25e407bf63cd67cd343 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 6 Feb 2005 08:25:53 +0000 Subject: r5251: - renamed the nbtd server side structures to have a nbtd_ prefix, to be consistent with the function names - added WINS client support to the NBT server. It will do initial WINS registration, and WINS refresh, automatically failing over to secondary WINS servers and handling multi-homed servers where we need to register multiple IPs. - added support for multi-homed name query replies, which are essential for multi-homed registration as the WINS server will query us to ensure we have the names when doing the secondary IPs in multi-homed registration (This used to be commit a1553fa8054dc7d33f5d77f8f95d3ffd90392b2a) --- source4/nbt_server/nbt_server.h | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'source4/nbt_server/nbt_server.h') diff --git a/source4/nbt_server/nbt_server.h b/source4/nbt_server/nbt_server.h index d7c85d77f2..3def958cc4 100644 --- a/source4/nbt_server/nbt_server.h +++ b/source4/nbt_server/nbt_server.h @@ -25,39 +25,47 @@ /* a list of our registered names on each interface */ -struct nbt_iface_name { - struct nbt_iface_name *next, *prev; - struct nbt_interface *iface; +struct nbtd_iface_name { + struct nbtd_iface_name *next, *prev; + struct nbtd_interface *iface; struct nbt_name name; uint16_t nb_flags; struct timeval registration_time; uint32_t ttl; + + /* if registered with a wins server, then this lists the server being + used */ + char *wins_server; }; /* a list of network interfaces we are listening on */ -struct nbt_interface { - struct nbt_interface *next, *prev; - struct nbt_server *nbtsrv; +struct nbtd_interface { + struct nbtd_interface *next, *prev; + struct nbtd_server *nbtsrv; const char *ip_address; const char *bcast_address; const char *netmask; struct nbt_name_socket *nbtsock; - struct nbt_iface_name *names; + struct nbtd_iface_name *names; }; /* top level context structure for the nbt server */ -struct nbt_server { +struct nbtd_server { struct task_server *task; /* the list of local network interfaces */ - struct nbt_interface *interfaces; + struct nbtd_interface *interfaces; /* broadcast interface used for receiving packets only */ - struct nbt_interface *bcast_interface; + struct nbtd_interface *bcast_interface; + + /* wins client interface - used for registering and refreshing + our names with a WINS server */ + struct nbtd_interface *wins_interface; }; -- cgit