file_server: Move vfs objects initialisation into file_server.c smb.conf wrapper
[sfrench/samba-autobuild/.git] / source4 / nbt_server / nodestatus.c
index efd4720790bdc43f41104b0d2acb10e16cd485f4..f71746ab300f855c3ee8483570a047a09cd8e35e 100644 (file)
@@ -7,7 +7,7 @@
    
    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
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    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.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
-#include "dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "system/network.h"
 #include "nbt_server/nbt_server.h"
+#include "lib/socket/socket.h"
+#include "librpc/gen_ndr/ndr_nbt.h"
 
 /*
   send a name status reply
 */
 static void nbtd_node_status_reply(struct nbt_name_socket *nbtsock, 
                                   struct nbt_name_packet *request_packet, 
-                                  const struct nbt_peer_socket *src,
+                                  struct socket_address *src,
                                   struct nbt_name *name, 
                                   struct nbtd_interface *iface)
 {
@@ -53,7 +54,7 @@ static void nbtd_node_status_reply(struct nbt_name_socket *nbtsock,
 
        packet->name_trn_id = request_packet->name_trn_id;
        packet->ancount = 1;
-       packet->operation = NBT_OPCODE_QUERY | NBT_FLAG_REPLY | NBT_FLAG_AUTHORITIVE;
+       packet->operation = NBT_OPCODE_QUERY | NBT_FLAG_REPLY | NBT_FLAG_AUTHORITATIVE;
 
        packet->answers = talloc_array(packet, struct nbt_res_rec, 1);
        if (packet->answers == NULL) goto failed;
@@ -99,11 +100,11 @@ failed:
 */
 void nbtd_query_status(struct nbt_name_socket *nbtsock, 
                       struct nbt_name_packet *packet, 
-                      const struct nbt_peer_socket *src)
+                      struct socket_address *src)
 {
        struct nbt_name *name;
        struct nbtd_iface_name *iname;
-       struct nbtd_interface *iface = talloc_get_type(nbtsock->incoming.private
+       struct nbtd_interface *iface = talloc_get_type(nbtsock->incoming.private_data,
                                                       struct nbtd_interface);
 
        NBTD_ASSERT_PACKET(packet, src, packet->qdcount == 1);