File: inet_cidr.lst3

package info (click to toggle)
bind 1%3A8.4.7-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 20,188 kB
  • ctags: 22,422
  • sloc: ansic: 156,772; sh: 20,008; perl: 14,224; makefile: 5,660; yacc: 2,475; cpp: 2,154; csh: 848; awk: 753; tcl: 674; lex: 423; fortran: 240
file content (57 lines) | stat: -rw-r--r-- 2,622 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
INET_CIDR(3)           FreeBSD Library Functions Manual           INET_CIDR(3)

NNAAMMEE
     iinneett__cciiddrr__nnttoopp, iinneett__cciiddrr__ppttoonn -- network translation routines

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
     ##iinncclluuddee <<ssyyss//ssoocckkeett..hh>>
     ##iinncclluuddee <<nneettiinneett//iinn..hh>>
     ##iinncclluuddee <<aarrppaa//iinneett..hh>>

     iinneett__cciiddrr__nnttoopp(_i_n_t _a_f, _c_o_n_s_t _v_o_i_d _*_s_r_c, _i_n_t _b_i_t_s, _c_h_a_r _*_d_s_t,
         _s_i_z_e___t _s_i_z_e);

     iinneett__cciiddrr__ppttoonn(_i_n_t _a_f, _c_o_n_s_t _c_h_a_r _*_s_r_c, _v_o_i_d _*_d_s_t, _i_n_t _*_b_i_t_s);

DDEESSCCRRIIPPTTIIOONN
     These routines are used for converting addresses to and from network and
     presentation forms with CIDR (Classless Inter-Domain Routing) representa-
     tion, embedded net mask.

                     130.155.16.1/20

     iinneett__cciiddrr__nnttoopp() converts an address from network to presentation format.

     _a_f describes the type of address that is being passed in _s_r_c.  Currently
     only AF_INET is supported.

     _s_r_c is an address in network byte order, its length is determined from
     _a_f.

     _b_i_t_s specifies the number of bits in the netmask unless it is -1 in which
     case the CIDR representation is omitted.

     _d_s_t is a caller supplied buffer of at least _s_i_z_e bytes.

     iinneett__cciiddrr__nnttoopp() returns _d_s_t on success or NULL.  Check errno for reason.

     iinneett__cciiddrr__ppttoonn() converts and address from presentation format, with
     optional CIDR reperesentation, to network format.  The resulting address
     is zero filled if there were insufficint bits in _s_r_c.

     _a_f describes the type of address that is being passed in via _s_r_c and
     determines the size of _d_s_t.

     _s_r_c is an address in presentation format.

     _b_i_t_s returns the number of bits in the netmask or -1 if a CIDR represen-
     tation was not supplied.

     iinneett__cciiddrr__ppttoonn() returns 0 on succces or -1 on error.  Check errno for
     reason.  ENOENT indicates an invalid netmask.

SSEEEE AALLSSOO
     intro(2)

4th Berkeley Distribution      October 19, 1998      4th Berkeley Distribution