Print this page
7388 Support DHCP Client FQDN. Allow IAID/DUID for all v4.
   1 /*
   2  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
   3  * Use is subject to license terms.

   4  */
   5 
   6 /*
   7  * Copyright (c) 1983, 1989, 1993
   8  *    The Regents of the University of California.  All rights reserved.
   9  *
  10  * Redistribution and use in source and binary forms, with or without
  11  * modification, are permitted provided that the following conditions
  12  * are met:
  13  * 1. Redistributions of source code must retain the above copyright
  14  *    notice, this list of conditions and the following disclaimer.
  15  * 2. Redistributions in binary form must reproduce the above copyright
  16  *    notice, this list of conditions and the following disclaimer in the
  17  *    documentation and/or other materials provided with the distribution.
  18  * 3. All advertising materials mentioning features or use of this software
  19  *    must display the following acknowledgement:
  20  *      This product includes software developed by the University of
  21  *      California, Berkeley and its contributors.
  22  * 4. Neither the name of the University nor the names of its contributors
  23  *    may be used to endorse or promote products derived from this software


 559 /*
 560  * ANSI C identifier hiding.
 561  */
 562 #define ns_msg_getflag          __ns_msg_getflag
 563 #define ns_get16                __ns_get16
 564 #define ns_get32                __ns_get32
 565 #define ns_put16                __ns_put16
 566 #define ns_put32                __ns_put32
 567 #define ns_initparse            __ns_initparse
 568 #define ns_skiprr               __ns_skiprr
 569 #define ns_parserr              __ns_parserr
 570 #define ns_parserr2             __ns_parserr2
 571 #define ns_sprintrr             __ns_sprintrr
 572 #define ns_sprintrrf            __ns_sprintrrf
 573 #define ns_format_ttl           __ns_format_ttl
 574 #define ns_parse_ttl            __ns_parse_ttl
 575 #define ns_datetosecs           __ns_datetosecs
 576 #define ns_name_ntol            __ns_name_ntol
 577 #define ns_name_ntop            __ns_name_ntop
 578 #define ns_name_pton            __ns_name_pton

 579 #define ns_name_unpack          __ns_name_unpack
 580 #define ns_name_pack            __ns_name_pack
 581 #define ns_name_compress        __ns_name_compress
 582 #define ns_name_uncompress      __ns_name_uncompress
 583 #define ns_name_skip            __ns_name_skip
 584 #define ns_name_rollback        __ns_name_rollback
 585 #define ns_name_length          __ns_name_length
 586 #define ns_name_eq              __ns_name_eq
 587 #define ns_name_owned           __ns_name_owned
 588 #define ns_name_map             __ns_name_map
 589 #define ns_name_labels          __ns_name_labels
 590 #define ns_sign                 __ns_sign
 591 #define ns_sign2                __ns_sign2
 592 #define ns_sign_tcp             __ns_sign_tcp
 593 #define ns_sign_tcp2            __ns_sign_tcp2
 594 #define ns_sign_tcp_init        __ns_sign_tcp_init
 595 #define ns_find_tsig            __ns_find_tsig
 596 #define ns_verify               __ns_verify
 597 #define ns_verify_tcp           __ns_verify_tcp
 598 #define ns_verify_tcp_init      __ns_verify_tcp_init


 615 uint_t          ns_get16(const uchar_t *);
 616 ulong_t         ns_get32(const uchar_t *);
 617 void            ns_put16(uint_t, uchar_t *);
 618 void            ns_put32(ulong_t, uchar_t *);
 619 int             ns_initparse(const uchar_t *, int, ns_msg *);
 620 int             ns_skiprr(const uchar_t *, const uchar_t *, ns_sect, int);
 621 int             ns_parserr(ns_msg *, ns_sect, int, ns_rr *);
 622 int             ns_parserr2(ns_msg *, ns_sect, int, ns_rr2 *);
 623 int             ns_sprintrr(const ns_msg *, const ns_rr *,
 624     const char *, const char *, char *, size_t);
 625 int             ns_sprintrrf(const uchar_t *, size_t, const char *,
 626     ns_class, ns_type, ulong_t, const uchar_t *,
 627     size_t, const char *, const char *,
 628     char *, size_t);
 629 int             ns_format_ttl(ulong_t, char *, size_t);
 630 int             ns_parse_ttl(const char *, ulong_t *);
 631 uint32_t        ns_datetosecs(const char *cp, int *errp);
 632 int             ns_name_ntol(const uchar_t *, uchar_t *, size_t);
 633 int             ns_name_ntop(const uchar_t *, char *, size_t);
 634 int             ns_name_pton(const char *, uchar_t *, size_t);

 635 int             ns_name_unpack(const uchar_t *, const uchar_t *,
 636                                     const uchar_t *, uchar_t *, size_t);
 637 int             ns_name_pack(const uchar_t *, uchar_t *, int,
 638     const uchar_t **, const uchar_t **);
 639 int             ns_name_uncompress(const uchar_t *, const uchar_t *,
 640                                         const uchar_t *, char *, size_t);
 641 int             ns_name_compress(const char *, uchar_t *, size_t,
 642                         const uchar_t **, const uchar_t **);
 643 int             ns_name_skip(const uchar_t **, const uchar_t *);
 644 void    ns_name_rollback(const uchar_t *, const uchar_t **,
 645                         const uchar_t **);
 646 ssize_t         ns_name_length(ns_nname_ct, size_t);
 647 int             ns_name_eq(ns_nname_ct, size_t, ns_nname_ct, size_t);
 648 int             ns_name_owned(ns_namemap_ct, int, ns_namemap_ct, int);
 649 int             ns_name_map(ns_nname_ct, size_t, ns_namemap_t, int);
 650 int             ns_name_labels(ns_nname_ct, size_t);
 651 int             ns_sign(uchar_t *, int *, int, int, void *,
 652                         const uchar_t *, int, uchar_t *, int *, time_t);
 653 int             ns_sign2(uchar_t *, int *, int, int, void *,
 654                         const uchar_t *, int, uchar_t *, int *, time_t,


   1 /*
   2  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
   3  * Use is subject to license terms.
   4  * Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
   5  */
   6 
   7 /*
   8  * Copyright (c) 1983, 1989, 1993
   9  *    The Regents of the University of California.  All rights reserved.
  10  *
  11  * Redistribution and use in source and binary forms, with or without
  12  * modification, are permitted provided that the following conditions
  13  * are met:
  14  * 1. Redistributions of source code must retain the above copyright
  15  *    notice, this list of conditions and the following disclaimer.
  16  * 2. Redistributions in binary form must reproduce the above copyright
  17  *    notice, this list of conditions and the following disclaimer in the
  18  *    documentation and/or other materials provided with the distribution.
  19  * 3. All advertising materials mentioning features or use of this software
  20  *    must display the following acknowledgement:
  21  *      This product includes software developed by the University of
  22  *      California, Berkeley and its contributors.
  23  * 4. Neither the name of the University nor the names of its contributors
  24  *    may be used to endorse or promote products derived from this software


 560 /*
 561  * ANSI C identifier hiding.
 562  */
 563 #define ns_msg_getflag          __ns_msg_getflag
 564 #define ns_get16                __ns_get16
 565 #define ns_get32                __ns_get32
 566 #define ns_put16                __ns_put16
 567 #define ns_put32                __ns_put32
 568 #define ns_initparse            __ns_initparse
 569 #define ns_skiprr               __ns_skiprr
 570 #define ns_parserr              __ns_parserr
 571 #define ns_parserr2             __ns_parserr2
 572 #define ns_sprintrr             __ns_sprintrr
 573 #define ns_sprintrrf            __ns_sprintrrf
 574 #define ns_format_ttl           __ns_format_ttl
 575 #define ns_parse_ttl            __ns_parse_ttl
 576 #define ns_datetosecs           __ns_datetosecs
 577 #define ns_name_ntol            __ns_name_ntol
 578 #define ns_name_ntop            __ns_name_ntop
 579 #define ns_name_pton            __ns_name_pton
 580 #define ns_name_pton2           __ns_name_pton2
 581 #define ns_name_unpack          __ns_name_unpack
 582 #define ns_name_pack            __ns_name_pack
 583 #define ns_name_compress        __ns_name_compress
 584 #define ns_name_uncompress      __ns_name_uncompress
 585 #define ns_name_skip            __ns_name_skip
 586 #define ns_name_rollback        __ns_name_rollback
 587 #define ns_name_length          __ns_name_length
 588 #define ns_name_eq              __ns_name_eq
 589 #define ns_name_owned           __ns_name_owned
 590 #define ns_name_map             __ns_name_map
 591 #define ns_name_labels          __ns_name_labels
 592 #define ns_sign                 __ns_sign
 593 #define ns_sign2                __ns_sign2
 594 #define ns_sign_tcp             __ns_sign_tcp
 595 #define ns_sign_tcp2            __ns_sign_tcp2
 596 #define ns_sign_tcp_init        __ns_sign_tcp_init
 597 #define ns_find_tsig            __ns_find_tsig
 598 #define ns_verify               __ns_verify
 599 #define ns_verify_tcp           __ns_verify_tcp
 600 #define ns_verify_tcp_init      __ns_verify_tcp_init


 617 uint_t          ns_get16(const uchar_t *);
 618 ulong_t         ns_get32(const uchar_t *);
 619 void            ns_put16(uint_t, uchar_t *);
 620 void            ns_put32(ulong_t, uchar_t *);
 621 int             ns_initparse(const uchar_t *, int, ns_msg *);
 622 int             ns_skiprr(const uchar_t *, const uchar_t *, ns_sect, int);
 623 int             ns_parserr(ns_msg *, ns_sect, int, ns_rr *);
 624 int             ns_parserr2(ns_msg *, ns_sect, int, ns_rr2 *);
 625 int             ns_sprintrr(const ns_msg *, const ns_rr *,
 626     const char *, const char *, char *, size_t);
 627 int             ns_sprintrrf(const uchar_t *, size_t, const char *,
 628     ns_class, ns_type, ulong_t, const uchar_t *,
 629     size_t, const char *, const char *,
 630     char *, size_t);
 631 int             ns_format_ttl(ulong_t, char *, size_t);
 632 int             ns_parse_ttl(const char *, ulong_t *);
 633 uint32_t        ns_datetosecs(const char *cp, int *errp);
 634 int             ns_name_ntol(const uchar_t *, uchar_t *, size_t);
 635 int             ns_name_ntop(const uchar_t *, char *, size_t);
 636 int             ns_name_pton(const char *, uchar_t *, size_t);
 637 int             ns_name_pton2(const char *, uchar_t *, size_t, size_t *);
 638 int             ns_name_unpack(const uchar_t *, const uchar_t *,
 639                                     const uchar_t *, uchar_t *, size_t);
 640 int             ns_name_pack(const uchar_t *, uchar_t *, int,
 641     const uchar_t **, const uchar_t **);
 642 int             ns_name_uncompress(const uchar_t *, const uchar_t *,
 643                                         const uchar_t *, char *, size_t);
 644 int             ns_name_compress(const char *, uchar_t *, size_t,
 645                         const uchar_t **, const uchar_t **);
 646 int             ns_name_skip(const uchar_t **, const uchar_t *);
 647 void    ns_name_rollback(const uchar_t *, const uchar_t **,
 648                         const uchar_t **);
 649 ssize_t         ns_name_length(ns_nname_ct, size_t);
 650 int             ns_name_eq(ns_nname_ct, size_t, ns_nname_ct, size_t);
 651 int             ns_name_owned(ns_namemap_ct, int, ns_namemap_ct, int);
 652 int             ns_name_map(ns_nname_ct, size_t, ns_namemap_t, int);
 653 int             ns_name_labels(ns_nname_ct, size_t);
 654 int             ns_sign(uchar_t *, int *, int, int, void *,
 655                         const uchar_t *, int, uchar_t *, int *, time_t);
 656 int             ns_sign2(uchar_t *, int *, int, int, void *,
 657                         const uchar_t *, int, uchar_t *, int *, time_t,