#include <MCFTPid.h>
Collaboration diagram for MCFTPid:

Public Member Functions | |
| MCFTPid & | copy (const MCFTPid id) |
| unsigned char | dst_ip (int b) |
| unsigned int | dst_ip () |
| unsigned int | dst_port () |
| string | filename () |
| string | hex () |
| bool | is_equal (const MCFTPid &rhs) |
| MCFTPid (unsigned int dst_ip, unsigned int dst_port, unsigned int src_ip, unsigned int src_port, unsigned int mssgnum) | |
| MCFTPid (const MCFTPid &) | |
| MCFTPid () | |
| unsigned int | mssgnum () |
| bool | operator!= (const MCFTPid &rhs) |
| MCFTPid & | operator() (unsigned int dst_ip, unsigned int dst_port, unsigned int src_ip, unsigned int src_port, unsigned int mssgnum) |
| MCFTPid & | operator() (const MCFTPid &) |
| MCFTPid & | operator() () |
| MCFTPid & | operator<< (BufferBase &) |
| MCFTPid & | operator= (const MCFTPid &rhs) |
| bool | operator== (const MCFTPid &rhs) |
| MCFTPid & | operator>> (BufferBase &) |
| void | read (ostream &) |
| void | read (BufferBase &) |
| void | report (ostream &=cout) |
| void | set_dst_ip (unsigned char ip3, unsigned char ip2, unsigned char ip1, unsigned char ip0) |
| void | set_dst_ip (unsigned int dst_ip) |
| void | set_dst_port (unsigned int dst_port) |
| void | set_mssgnum (unsigned int mssgnum) |
| void | set_src_ip (unsigned char ip3, unsigned char ip2, unsigned char ip1, unsigned char ip0) |
| void | set_src_ip (unsigned int src_ip) |
| void | set_src_port (unsigned int src_port) |
| unsigned char | src_ip (int b) |
| unsigned int | src_ip () |
| unsigned int | src_port () |
| void | write (istream &) |
| void | write (BufferBase &) |
Private Attributes | |
| unsigned int | _dst_ip |
| unsigned int | _dst_port |
| unsigned int | _mssgnum |
| unsigned int | _src_ip |
| unsigned int | _src_port |
Friends | |
| ostream & | operator<< (ostream &, MCFTPid &) |
| BufferBase & | operator<< (BufferBase &, MCFTPid &) |
| istream & | operator>> (istream &, MCFTPid &) |
| BufferBase & | operator>> (BufferBase &, MCFTPid &) |
|
|
Definition at line 106 of file MCFTPid.h.
|
|
|
Definition at line 113 of file MCFTPid.h.
|
|
||||||||||||||||||||||||
|
Definition at line 120 of file MCFTPid.h.
|
|
|
Definition at line 167 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, and _src_port. Referenced by operator=().
|
|
|
Definition at line 319 of file MCFTPid.h. References _dst_ip.
00320 {
00321 int itmp = 0;
00322 switch ( b ) {
00323 case 0:
00324 itmp = _dst_ip & 0x000000FF;
00325 break;
00326 case 1:
00327 itmp = (_dst_ip & 0x0000FF00) >> 8;
00328 break;
00329 case 2:
00330 itmp = (_dst_ip & 0x00FF0000) >> 16;
00331 break;
00332 case 3:
00333 itmp = (_dst_ip & 0xFF000000) >> 24;
00334 break;
00335 }
00336 return (unsigned char)(itmp);
00337 }
|
|
|
Definition at line 316 of file MCFTPid.h. References _dst_ip. Referenced by report().
00316 { return _dst_ip; }
|
|
|
Definition at line 340 of file MCFTPid.h. References _dst_port.
00340 { return _dst_port; }
|
|
|
Definition at line 390 of file MCFTPid.h. References hex().
00391 {
00392 return hex() + ".mcftp";
00393 }
|
|
|
Definition at line 373 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, _src_port, and inttohex(). Referenced by filename(), and report().
00374 {
00375 string s = "";
00376
00377 char* tmp2 = new char[4+1];
00378 char* tmp4 = new char[8+1];
00379
00380 inttohex( int(_dst_ip), tmp4, 4 ); s += tmp4;
00381 inttohex( _dst_port, tmp2, 2 ); s += tmp2;
00382 inttohex( _src_ip, tmp4, 4 ); s += tmp4;
00383 inttohex( _src_port, tmp2, 2 ); s += tmp2;
00384 inttohex( _mssgnum, tmp4, 4 ); s += tmp4;
00385
00386 return s;
00387 }
|
|
|
Definition at line 184 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, and _src_port. Referenced by operator!=(), and operator==().
|
|
|
Definition at line 370 of file MCFTPid.h. References _mssgnum.
00370 { return _mssgnum; }
|
|
|
Definition at line 201 of file MCFTPid.h. References is_equal().
00202 {
00203 return !is_equal(rhs);
00204 }
|
|
||||||||||||||||||||||||
|
Definition at line 152 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, and _src_port.
|
|
|
Definition at line 141 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, and _src_port.
|
|
|
Definition at line 130 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, and _src_port.
|
|
|
Definition at line 218 of file MCFTPid.h. References write().
00219 {
00220 write(buffer);
00221 return *this;
00222 }
|
|
|
Definition at line 178 of file MCFTPid.h. References copy().
00179 {
00180 return copy(rhs);
00181 }
|
|
|
Definition at line 195 of file MCFTPid.h. References is_equal().
00196 {
00197 return is_equal(rhs);
00198 }
|
|
|
Definition at line 236 of file MCFTPid.h. References read().
00237 {
00238 read(buffer);
00239 return *this;
00240 }
|
|
|
Definition at line 261 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, and _src_port.
00262 {
00263 bytepack bp;
00264 os << bp( int(_dst_ip), 4 );
00265 os << bp( int(_dst_port), 2 );
00266 os << bp( int(_src_ip), 4 );
00267 os << bp( int(_src_port), 2 );
00268 os << bp( int(_mssgnum), 4 );
00269 }
|
|
|
Definition at line 225 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, and _src_port. Referenced by operator>>().
00226 {
00227 bytepack bp;
00228 buffer << bp( int(_dst_ip), 4 );
00229 buffer << bp( int(_dst_port), 2 );
00230 buffer << bp( int(_src_ip), 4 );
00231 buffer << bp( int(_src_port), 2 );
00232 buffer << bp( int(_mssgnum), 4 );
00233 }
|
|
|
Definition at line 396 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, _src_port, dst_ip(), hex(), and src_ip(). Referenced by MCFTPheader.report().
00397 {
00398 os << "MCFTPid::report(){\n";
00399 os << "dst_ip = " << _dst_ip << " = "
00400 << int(dst_ip(3)) << '.' << int(dst_ip(2)) << '.'
00401 << int(dst_ip(1)) << '.' << int(dst_ip(0)) << '\n';
00402 os << "dst_port = " << _dst_port << '\n';
00403 os << "src_ip = " << _src_ip << '\n';
00404 os << "src_ip = " << _src_ip << " = "
00405 << int(src_ip(3)) << '.' << int(src_ip(2)) << '.'
00406 << int(src_ip(1)) << '.' << int(src_ip(0)) << '\n';
00407 os << "src_port = " << _src_port << '\n';
00408 os << "mssgnum = " << _mssgnum << '\n';
00409 os << "hex = " << hex() << '\n';
00410 os << "}\n";
00411 }
|
|
||||||||||||||||||||
|
Definition at line 282 of file MCFTPid.h. References _dst_ip.
|
|
|
Definition at line 279 of file MCFTPid.h. References _dst_ip.
00279 { _dst_ip = dst_ip; }
|
|
|
Definition at line 293 of file MCFTPid.h. References _dst_port.
00293 { _dst_port = dst_port; }
|
|
|
Definition at line 313 of file MCFTPid.h. References _mssgnum.
00313 { _mssgnum = mssgnum; }
|
|
||||||||||||||||||||
|
Definition at line 299 of file MCFTPid.h. References _src_ip.
|
|
|
Definition at line 296 of file MCFTPid.h. References _src_ip.
00296 { _src_ip = src_ip; }
|
|
|
Definition at line 310 of file MCFTPid.h. References _src_port.
00310 { _src_port = src_port; }
|
|
|
Definition at line 346 of file MCFTPid.h. References _src_ip.
00347 {
00348 int itmp = 0;
00349 switch ( b ) {
00350 case 0:
00351 itmp = _src_ip & 0x000000FF;
00352 break;
00353 case 1:
00354 itmp = (_src_ip & 0x0000FF00) >> 8;
00355 break;
00356 case 2:
00357 itmp = (_src_ip & 0x00FF0000) >> 16;
00358 break;
00359 case 3:
00360 itmp = (_src_ip & 0xFF000000) >> 24;
00361 break;
00362 }
00363 return (unsigned char)(itmp);
00364 }
|
|
|
Definition at line 343 of file MCFTPid.h. References _src_ip. Referenced by report().
00343 { return _src_ip; }
|
|
|
Definition at line 367 of file MCFTPid.h. References _src_port.
00367 { return _src_port; }
|
|
|
Definition at line 243 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, and _src_port.
|
|
|
Definition at line 207 of file MCFTPid.h. References _dst_ip, _dst_port, _mssgnum, _src_ip, and _src_port. Referenced by operator<<().
|
|
||||||||||||
|
Definition at line 430 of file MCFTPid.h.
00431 {
00432 id.read(os);
00433 return os;
00434 }
|
|
||||||||||||
|
Definition at line 416 of file MCFTPid.h.
00417 {
00418 id.read(buffer);
00419 return buffer;
00420 }
|
|
||||||||||||
|
Definition at line 437 of file MCFTPid.h.
00438 {
00439 id.write(is);
00440 return is;
00441 }
|
|
||||||||||||
|
Definition at line 423 of file MCFTPid.h.
00424 {
00425 id.write(buffer);
00426 return buffer;
00427 }
|
|
|
Definition at line 91 of file MCFTPid.h. Referenced by copy(), dst_ip(), hex(), is_equal(), operator()(), read(), report(), set_dst_ip(), and write(). |
|
|
Definition at line 92 of file MCFTPid.h. Referenced by copy(), dst_port(), hex(), is_equal(), operator()(), read(), report(), set_dst_port(), and write(). |
|
|
Definition at line 95 of file MCFTPid.h. Referenced by copy(), hex(), is_equal(), mssgnum(), operator()(), read(), report(), set_mssgnum(), and write(). |
|
|
Definition at line 93 of file MCFTPid.h. Referenced by copy(), hex(), is_equal(), operator()(), read(), report(), set_src_ip(), src_ip(), and write(). |
|
|
Definition at line 94 of file MCFTPid.h. Referenced by copy(), hex(), is_equal(), operator()(), read(), report(), set_src_port(), src_port(), and write(). |
1.3.6