summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt/libnbt.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-10-14 12:22:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:52 -0500
commitfccbbf354634b31c9c3cb2bca15843f13e3b77f9 (patch)
tree6678adb19a88171fce5569d2183e212d08753aba /source4/libcli/nbt/libnbt.h
parent0b0c38d899db75e6954af2618e7f063dbfc09fd6 (diff)
downloadsamba-fccbbf354634b31c9c3cb2bca15843f13e3b77f9.tar.gz
samba-fccbbf354634b31c9c3cb2bca15843f13e3b77f9.tar.bz2
samba-fccbbf354634b31c9c3cb2bca15843f13e3b77f9.zip
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)
Diffstat (limited to 'source4/libcli/nbt/libnbt.h')
-rw-r--r--source4/libcli/nbt/libnbt.h16
1 files changed, 10 insertions, 6 deletions
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;
};