From fccbbf354634b31c9c3cb2bca15843f13e3b77f9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 14 Oct 2005 12:22:15 +0000 Subject: r10997: r11980@SERNOX (orig r10037): metze | 2005-09-05 14:21:40 +0200 add struct nbt_peer_socket and use it instead of passing const char *addr, uint16 port everyhwere (tridge: can you review this please, (make test works) metze (This used to be commit a599d7a4ae881c94be2c2d908a398838549942bb) --- source4/libcli/nbt/libnbt.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source4/libcli/nbt/libnbt.h') diff --git a/source4/libcli/nbt/libnbt.h b/source4/libcli/nbt/libnbt.h index 5a53510ccf..218b5e5921 100644 --- a/source4/libcli/nbt/libnbt.h +++ b/source4/libcli/nbt/libnbt.h @@ -31,6 +31,12 @@ enum nbt_request_state {NBT_REQUEST_SEND, NBT_REQUEST_TIMEOUT, NBT_REQUEST_ERROR}; +/* where to send the request/replies */ +struct nbt_peer_socket { + const char *addr; + int port; +}; + /* a nbt name request */ @@ -45,8 +51,7 @@ struct nbt_name_request { struct nbt_name_socket *nbtsock; /* where to send the request */ - const char *dest_addr; - int dest_port; + struct nbt_peer_socket dest; /* timeout between retries */ int timeout; @@ -75,8 +80,7 @@ struct nbt_name_request { uint_t num_replies; struct nbt_name_reply { struct nbt_name_packet *packet; - const char *reply_addr; - int reply_port; + struct nbt_peer_socket dest; } *replies; /* information on what to do on completion */ @@ -110,14 +114,14 @@ struct nbt_name_socket { /* what to do with incoming request packets */ struct { void (*handler)(struct nbt_name_socket *, struct nbt_name_packet *, - const char *, int ); + const struct nbt_peer_socket *); void *private; } incoming; /* what to do with unexpected replies */ struct { void (*handler)(struct nbt_name_socket *, struct nbt_name_packet *, - const char *, int ); + const struct nbt_peer_socket *); void *private; } unexpected; }; -- cgit