File: InetMaskAddress.3cc

package info (click to toggle)
libcommoncpp2 1.0.13-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,740 kB
  • ctags: 2,860
  • sloc: cpp: 18,857; sh: 8,451; ansic: 1,546; makefile: 299; xml: 5
file content (84 lines) | stat: -rw-r--r-- 2,876 bytes parent folder | download
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
.TH "InetMaskAddress" 3 "19 Jul 2003" "CommonC++" \" -*- nroff -*-
.ad l
.nh
.SH NAME
InetMaskAddress \- Internet addresses used specifically as masking addresses (such as ' 255.255.255.0') are held in the InetMaskAddress derived object. Internet Address Mask such as subnet masks. 
.SH SYNOPSIS
.br
.PP
\fC#include <socket.h>\fP
.PP
Inherits \fBInetAddress\fP.
.PP
.SS "Public Methods"

.in +1c
.ti -1c
.RI "\fBInetMaskAddress\fP (const char *mask)"
.br
.RI "\fICreate the mask from a null terminated ASCII string such as '255.255.255.128'.\fP"
.ti -1c
.RI "\fBInetAddress\fP & \fBoperator=\fP (unsigned long addr)"
.br
.RI "\fIAllows assignment from the return of functions like inet_addr() or htonl().\fP"
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "\fBInetHostAddress\fP \fBoperator &\fP (const \fBInetHostAddress\fP &addr, const InetMaskAddress &mask)"
.br
.RI "\fIMasks are usually used to coerce host addresses into a specific router or class domain.\fP"
.in -1c
.SH "DETAILED DESCRIPTION"
.PP 
Internet addresses used specifically as masking addresses (such as ' 255.255.255.0') are held in the InetMaskAddress derived object. Internet Address Mask such as subnet masks.
.PP
The seperate class is used so that C++ type casting can automatically determine when an \fBInetAddress\fP object is really a mask address object rather than simply using the base class. This also allows manipulative operators for address masking to operate only when presented with a Masked address as well as providing cleaner and safer source.
.PP
\fBAuthor: \fP
.in +1c
David Sugar <dyfet@ostel.com> 
.PP
.SH "CONSTRUCTOR & DESTRUCTOR DOCUMENTATION"
.PP 
.SS "InetMaskAddress::InetMaskAddress (const char * mask)"
.PP
Create the mask from a null terminated ASCII string such as '255.255.255.128'.
.PP
\fBParameters: \fP
.in +1c
.TP
\fB\fImask\fP\fP
null terminated ASCII mask string. 
.SH "MEMBER FUNCTION DOCUMENTATION"
.PP 
.SS "\fBInetAddress\fP& InetMaskAddress::operator= (unsigned long addr)\fC [inline]\fP"
.PP
Allows assignment from the return of functions like inet_addr() or htonl().
.PP
Reimplemented from \fBInetAddress\fP.
.SH "FRIENDS AND RELATED FUNCTION DOCUMENTATION"
.PP 
.SS "\fBInetHostAddress\fP operator & (const \fBInetHostAddress\fP & addr, const InetMaskAddress & mask)\fC [friend]\fP"
.PP
Masks are usually used to coerce host addresses into a specific router or class domain.
.PP
This can be done by taking the Inet Host Address object and 'and'ing it with an address mask. This operation can be directly expressed in C++ through the & operator.
.PP
\fBReturns: \fP
.in +1c
a internet host address that has been masked. 
.PP
\fBParameters: \fP
.in +1c
.TP
\fB\fIaddr\fP\fP
host address to be masked by subnet. 
.TP
\fB\fImask\fP\fP
inetnet mask address object to mask by. 

.SH "AUTHOR"
.PP 
Generated automatically by Doxygen for CommonC++ from the source code.