summaryrefslogtreecommitdiff
path: root/src/ne_socket.h
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2008-03-14 17:09:30 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2008-03-14 17:09:30 +0000
commit030753ace49027f0ee07bf2c5dcbd5c897875d54 (patch)
tree399bb87c5c748912580e0a05b90150b3ca1059c5 /src/ne_socket.h
parent038ac81d735597d1e5d3390ed6565d6d507c29f9 (diff)
downloadneon-030753ace49027f0ee07bf2c5dcbd5c897875d54.tar.gz
* src/ne_socket.h (ne_iaddr_raw): New prototype.
* src/ne_socket.c (ne_iaddr_raw): New function. * test/socket.c (addr_make_v4, addr_make_v6): Test ne_iaddr_raw. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1411 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_socket.h')
-rw-r--r--src/ne_socket.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ne_socket.h b/src/ne_socket.h
index f7b6cd6..9895785 100644
--- a/src/ne_socket.h
+++ b/src/ne_socket.h
@@ -1,6 +1,6 @@
/*
socket handling interface
- Copyright (C) 1999-2007, Joe Orton <joe@manyfish.co.uk>
+ Copyright (C) 1999-2008, Joe Orton <joe@manyfish.co.uk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -114,6 +114,12 @@ ne_iaddr_type ne_iaddr_typeof(const ne_inet_addr *ia);
* buffer 'buffer', which is of length 'bufsiz'. Returns 'buffer'. */
char *ne_iaddr_print(const ne_inet_addr *ia, char *buffer, size_t bufsiz);
+/* Dump the raw byte representation (in network byte order) of address
+ * 'ia' into the buffer 'buffer', which must be of a suitable length
+ * (4 bytes for an IPv4 address, 16 bytes for an IPv6 address).
+ * Returns 'buffer'. */
+unsigned char *ne_iaddr_raw(const ne_inet_addr *ia, unsigned char *buffer);
+
/* Perform the reverse name lookup on network address 'ia', placing
* the returned name in the 'buf' buffer (of length 'bufsiz') if
* successful. Returns zero on success, or non-zero on error. */