aboutsummaryrefslogtreecommitdiff
path: root/pcap-rpcap.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-03-12 13:59:03 -0700
committerGuy Harris <guy@alum.mit.edu>2017-03-12 13:59:03 -0700
commit6ee13e223c9709e79ac112f8c37ff0a7272a4f5f (patch)
tree92703f857d52406ebbb466436605b9516bf52bf2 /pcap-rpcap.h
parentedbbf439dc9a9a4f1cf6fd6d14dcf9913244a7b3 (diff)
Standardize the format of network addresses sent over the wire.
We *CANNOT* use struct sockaddr_storage, as the layout and size are platform-dependent, and that would mean that a client wouldn't be guaranteed to work with a server running a different OS. We also *CANNOT* send the OS's AF_ values over the wire, as AF_INET6 has different values on different OSes. So we choose a format that resembles the Windows struct sockaddr_storage, and we choose the Windows AF_ value for IPv6. We try, as best we can, to handle replies from older servers, although that won't work with servers sending a struct sockaddr_storage that's not 128 bytes long. (We could do more, I guess, by checking whether the total message size, and count of interfaces, are consistent with a 128-byte or 256-byte struct sockaddr_storage.)
Diffstat (limited to 'pcap-rpcap.h')
-rw-r--r--pcap-rpcap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-rpcap.h b/pcap-rpcap.h
index f8ef06c2..148056f6 100644
--- a/pcap-rpcap.h
+++ b/pcap-rpcap.h
@@ -100,7 +100,7 @@ int pcap_opensource_remote(pcap_t *p, struct pcap_rmtauth *auth);
int pcap_startcapture_remote(pcap_t *fp);
void rpcap_createhdr(struct rpcap_header *header, uint8 type, uint16 value, uint32 length);
-int rpcap_deseraddr(struct sockaddr_storage *sockaddrin, struct sockaddr_storage **sockaddrout, char *errbuf);
+int rpcap_deseraddr(struct rpcap_sockaddr *sockaddrin, struct sockaddr_storage **sockaddrout, char *errbuf);
int rpcap_checkmsg(char *errbuf, SOCKET sock, struct rpcap_header *header, uint8 first, ...);
int rpcap_senderror(SOCKET sock, char *error, unsigned short errcode, char *errbuf);
int rpcap_sendauth(SOCKET sock, struct pcap_rmtauth *auth, char *errbuf);