2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 13:08:06 +00:00

40 Commits

Author SHA1 Message Date
Andreas Gustafsson
35af0018dd made isc_sockaddr_totext() return failure rather than catch an
assertion when confronted with an unsupported address family, like it used to
before it was changed to use isc_netaddr_totext() internally
2000-06-02 17:48:31 +00:00
David Lawrence
87cafc5e70 Megacommit of many files.
Mostly, several functions that take pointers as arguments, almost
always char * pointers, had those pointers qualified with "const".
Those that returned pointers to previously const-qualified arguments
had their return values qualified as const.  Some structure members
were qualified as const to retain that attribute from the variables
from which they were assigned.

The macro DE_CONST was added to isc/util.h to deal with a handful of very
special places where something is qualified as const but really needs to have
its const qualifier removed.

Also cleaned up a few places where variable names clashed with reserved
identifiers.  (Which mostly works fine, but strictly speaking is undefined
by the standard.)

Minor other ISC style cleanups.
2000-06-01 17:20:56 +00:00
Andreas Gustafsson
bb25076ffc implement isc_sockaddr_totext() in terms of isc_netaddr_totext() 2000-05-26 00:41:57 +00:00
Andreas Gustafsson
b68f341a48 must include <isc/print.h> to use snprintf 2000-05-22 19:29:09 +00:00
Andreas Gustafsson
33e0be00e3 isc_sockaddr_any6() set sockaddr->length incorrectly 2000-05-15 04:47:20 +00:00
Andreas Gustafsson
527ea00c17 174. [func] New public function isc_sockaddr_format(), for
formatting socket addresses in log messages.
2000-05-14 20:42:43 +00:00
David Lawrence
1a69a1a78c Megacommit of dozens of files.
Cleanup of redundant/useless header file inclusion.

ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
   /*
    * This is a comment.
    */
2000-05-08 14:38:29 +00:00
Michael Graff
6c41175537 add isc_sockaddr_any() and isc_sockaddr_any6 to set up a wildcarded address/port for v4 and v6 sockaddrs 2000-05-06 01:49:43 +00:00
Bob Halley
364a82f7c2 include isc/util.h 2000-04-28 01:12:23 +00:00
David Lawrence
2cc1d2536d 114. [cleanup] <isc/sockaddr.h> does not need <isc/buffer.h> or <isc/list.h>. 2000-04-27 23:29:28 +00:00
David Lawrence
6e49e91bd0 103. [func] libisc buffer API changes for <isc/buffer.h>:
Added:
                                isc_buffer_base(b)          (pointer)
                                isc_buffer_current(b)       (pointer)
                                isc_buffer_active(b)        (pointer)
                                isc_buffer_used(b)          (pointer)
                                isc_buffer_length(b)            (int)
                                isc_buffer_usedlength(b)        (int)
                                isc_buffer_consumedlength(b)    (int)
                                isc_buffer_remaininglength(b)   (int)
                                isc_buffer_activelength(b)      (int)
                                isc_buffer_availablelength(b)   (int)
                        Removed:
                                ISC_BUFFER_USEDCOUNT(b)
                                ISC_BUFFER_AVAILABLECOUNT(b)
                                isc_buffer_type(b)
                        Changed names:
                                isc_buffer_used(b, r) ->
                                        isc_buffer_usedregion(b, r)
                                isc_buffer_available(b, r) ->
                                        isc_buffer_available_region(b, r)
                                isc_buffer_consumed(b, r) ->
                                        isc_buffer_consumedregion(b, r)
                                isc_buffer_active(b, r) ->
                                        isc_buffer_activeregion(b, r)
                                isc_buffer_remaining(b, r) ->
                                        isc_buffer_remainingregion(b, r)

                        Buffer types were removed, so the ISC_BUFFERTYPE_*
                        macros are no more, and the type argument to
                        isc_buffer_init and isc_buffer_allocate were removed.
                        isc_buffer_putstr is now void (instead of isc_result_t)
                        and requires that the caller ensure that there
                        is enough available buffer space for the string.
2000-04-27 00:03:12 +00:00
Andreas Gustafsson
0f7045b0c4 moved a few more typedefs to <isc/types.h>: isc_region_t,
isc_textregion_t, isc_lex_t
2000-04-10 21:57:24 +00:00
Andreas Gustafsson
c0d0a59d1b removed newlines from UNEXPECTED_ERROR() messages 2000-02-17 19:58:59 +00:00
Andreas Gustafsson
5d82424f5d New source file netaddr.c; new functions isc_netaddr_eqprefix(),
isc_netaddr_masktoprefixlen(), isc_netaddr_fromsockaddr(),
isc_netaddr_fromin(), isc_netaddr_fromin6(), isc_sockaddr_fromnetaddr();
new result code ISC_R_MASKNONCONTIG
2000-02-09 22:52:37 +00:00
Bob Halley
ca41b452ed update copyrights 2000-02-03 23:08:31 +00:00
David Lawrence
c5f33ba0f0 added isc_sockaddr_getport 2000-01-31 21:52:17 +00:00
Bob Halley
043c6c62e6 add isc_sockaddr_setport() 2000-01-26 19:22:41 +00:00
Andreas Gustafsson
37eebcb917 isc_sockaddr_eqaddrprefix() checked prefix length against wrong value 1999-11-30 22:03:16 +00:00
Andreas Gustafsson
33911b409b added isc_sockaddr_eqaddrprefix() 1999-11-29 20:00:19 +00:00
Bob Halley
a5cda71d84 fix bad return value 1999-10-31 00:06:38 +00:00
Bob Halley
8393bb7925 eliminate type warning 1999-10-31 00:01:47 +00:00
Andreas Gustafsson
297d85a324 silenced compiler warning 1999-10-30 01:37:55 +00:00
Andreas Gustafsson
9ed7290e07 new isc_sockaddr_totext() had a comparison backwards 1999-10-30 01:00:05 +00:00
Andreas Gustafsson
91fbf6ef97 the new isc_sockaddr_totext() now null terminates the text;
the terminating null is not part of the buffer's used region
1999-10-29 23:53:26 +00:00
Andreas Gustafsson
4ed0c326e6 isc_sockaddr_totext() now writes to an isc_buf_t, not
a dynamically allocated string
1999-10-29 23:46:27 +00:00
Andreas Gustafsson
0e42fb6588 ISC_NET_HAVESALEN -> ISC_PLATFORM_HAVESALEN 1999-10-28 01:36:36 +00:00
Mark Andrews
0f0ed7ea47 Add "const" to input only arguements. 1999-10-25 14:37:04 +00:00
James Brister
54570ba7ff Added isc_sockaddr_eqaddr and its protoype: compares only the addresses
(and not the port values) of two isc_sockaddr_t.
1999-10-25 10:07:37 +00:00
David Lawrence
a252c2771f include isc/net.h, do not include sys/socket.h, netinet/in.h or arpa/inet.h,
and/or use type in_port_t instead of unsigned int for ports
1999-10-02 02:54:16 +00:00
David Lawrence
2af4e7e0e6 Remove #include <unistd.h>. Not portable to NT and is apparently
not needed for any unix-standard thing, at least none that I could
identify in the file, and removing it did not generate any errors
on BSD/OS.
1999-09-27 19:23:57 +00:00
Mark Andrews
ff89d6add5 add isc_sockaddr_totext() 1999-09-02 12:07:00 +00:00
Michael Graff
2dcb05b6a8 more portable method to generate v6 from v4 sockaddrs 1999-08-28 05:33:29 +00:00
Bob Halley
ae35d63c9d memset structures to 0; add isc_sockaddr_v6fromin() and isc_sockaddr_pf() 1999-07-15 20:10:38 +00:00
Bob Halley
1ece2b413f add isc_sockaddr_from{in,in6} 1999-07-13 01:46:15 +00:00
Bob Halley
e430659af6 lint 1999-07-12 19:34:46 +00:00
Bob Halley
3724ec85fb isc_sockaddr_equal() wasn't matching sockets that really were equal because
it was comparing the sin_zero fields which weren't equal.
1999-07-12 18:43:53 +00:00
Bob Halley
56f6fd8362 simply _equal; add _hash 1999-07-08 00:04:44 +00:00
Bob Halley
283be780d8 do not need to include sys/types.h or sys/socket.h 1999-07-06 22:58:44 +00:00
Bob Halley
38bc5e05ab fix casting problem 1999-06-28 18:29:35 +00:00
Michael Graff
5c02d3183f add isc_sockaddr_equal() 1999-06-25 22:09:35 +00:00