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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Net::ICMPPacketImpl</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Net.html" class="namespace">Poco::Net</a></h1>
<h1 class="symbol">class ICMPPacketImpl</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Net<br />
<b>Package:</b> ICMP<br />
<b>Header:</b> Poco/Net/ICMPPacketImpl.h</p>
<h2>Description</h2>
<div class="description">
<p>This is the abstract class for ICMP packet implementations. </p>
</div>
<h2>Inheritance</h2>
<p><b>Known Derived Classes: </b><a href="Poco.Net.ICMPv4PacketImpl.html" title="class Poco::Net::ICMPv4PacketImpl">ICMPv4PacketImpl</a></p>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Net.ICMPPacketImpl.html#13458" title="Poco::Net::ICMPPacketImpl::checksum()">checksum</a>, <a href="Poco.Net.ICMPPacketImpl.html#13448" title="Poco::Net::ICMPPacketImpl::errorDescription()">errorDescription</a>, <a href="Poco.Net.ICMPPacketImpl.html#13441" title="Poco::Net::ICMPPacketImpl::getDataSize()">getDataSize</a>, <a href="Poco.Net.ICMPPacketImpl.html#13457" title="Poco::Net::ICMPPacketImpl::initPacket()">initPacket</a>, <a href="Poco.Net.ICMPPacketImpl.html#13437" title="Poco::Net::ICMPPacketImpl::maxPacketSize()">maxPacketSize</a>, <a href="Poco.Net.ICMPPacketImpl.html#13455" title="Poco::Net::ICMPPacketImpl::nextSequence()">nextSequence</a>, <a href="Poco.Net.ICMPPacketImpl.html#13434" title="Poco::Net::ICMPPacketImpl::packet()">packet</a>, <a href="Poco.Net.ICMPPacketImpl.html#13436" title="Poco::Net::ICMPPacketImpl::packetSize()">packetSize</a>, <a href="Poco.Net.ICMPPacketImpl.html#13456" title="Poco::Net::ICMPPacketImpl::resetSequence()">resetSequence</a>, <a href="Poco.Net.ICMPPacketImpl.html#13438" title="Poco::Net::ICMPPacketImpl::sequence()">sequence</a>, <a href="Poco.Net.ICMPPacketImpl.html#13439" title="Poco::Net::ICMPPacketImpl::setDataSize()">setDataSize</a>, <a href="Poco.Net.ICMPPacketImpl.html#13442" title="Poco::Net::ICMPPacketImpl::time()">time</a>, <a href="Poco.Net.ICMPPacketImpl.html#13451" title="Poco::Net::ICMPPacketImpl::typeDescription()">typeDescription</a>, <a href="Poco.Net.ICMPPacketImpl.html#13445" title="Poco::Net::ICMPPacketImpl::validReplyID()">validReplyID</a></p>
<h2>Constructors</h2>
<h3><a name="13431">ICMPPacketImpl</a></h3>
<p class="decl"><a href="Poco.Net.ICMPPacketImpl.html" title="class Poco::Net::ICMPPacketImpl">ICMPPacketImpl</a>(<br /> int dataSize = 48<br />);</p>
<div class="description">
<p>Constructor. Creates an <a href="Poco.Net.ICMPPacketImpl.html" title="class Poco::Net::ICMPPacketImpl">ICMPPacketImpl</a>. </p>
</div>
<h2>Destructor</h2>
<h3><a name="13433">~ICMPPacketImpl</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual ~<a href="Poco.Net.ICMPPacketImpl.html" title="class Poco::Net::ICMPPacketImpl">ICMPPacketImpl</a>();</p>
<div class="description">
<p>Destructor. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="13448">errorDescription</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual std::string errorDescription(<br /> <a href="Poco.html#11350" title="Poco::UInt8">Poco::UInt8</a> * buffer,<br /> int length<br />) = 0;</p>
<div class="description">
<p>Returns error description string. If supplied buffer contains an ICMP echo reply packet, an empty string is returned indicating the absence of error. </p>
<p>Supplied buffer includes IP header, ICMP header and data. Must be overriden. </p>
</div>
<h3><a name="13441">getDataSize</a></h3>
<p class="decl">int getDataSize() const;</p>
<div class="description">
<p>Returns data size. </p>
</div>
<h3><a name="13437">maxPacketSize</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual int maxPacketSize() const;</p>
<div class="description">
<p>Returns the maximum permitted size of packet in number of octets. </p>
</div>
<h3><a name="13434">packet</a></h3>
<p class="decl">const <a href="Poco.html#11350" title="Poco::UInt8">Poco::UInt8</a> * packet(<br /> bool init = true<br />);</p>
<div class="description">
<p>Returns raw ICMP packet. ICMP header and data are included in the packet. If init is true, <a href="Poco.Net.ICMPPacketImpl.html#13457" title="Poco::Net::ICMPPacketImpl::initPacket()">initPacket</a>() is called. </p>
</div>
<h3><a name="13436">packetSize</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual int packetSize() const = 0;</p>
<div class="description">
<p>Returns the total size of packet (ICMP header + data) in number of octets. Must be overriden. </p>
</div>
<h3><a name="13438">sequence</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> sequence() const;</p>
<div class="description">
<p>Returns the most recent sequence number generated. </p>
</div>
<h3><a name="13439">setDataSize</a></h3>
<p class="decl">void setDataSize(<br /> int dataSize<br />);</p>
<div class="description">
<p>Sets data size. </p>
</div>
<h3><a name="13442">time</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual struct timeval time(<br /> <a href="Poco.html#11350" title="Poco::UInt8">Poco::UInt8</a> * buffer = 0,<br /> int length = 0<br />) const = 0;</p>
<div class="description">
<p>Returns current epoch time if either argument is equal to zero. Otherwise, it extracts the time value from the supplied buffer. </p>
<p>Supplied buffer includes IP header, ICMP header and data. Must be overriden. </p>
</div>
<h3><a name="13451">typeDescription</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual std::string typeDescription(<br /> int typeId<br />) = 0;</p>
<div class="description">
<p>Returns the description of the packet type. Must be overriden. </p>
</div>
<h3><a name="13445">validReplyID</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual bool validReplyID(<br /> unsigned char * buffer,<br /> int length<br />) const = 0;</p>
<div class="description">
<p>Returns true if the extracted id is recognized (i.e. equals the process id). </p>
<p>Supplied buffer includes IP header, ICMP header and data. Must be overriden. </p>
</div>
<h3><a name="13458">checksum</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> checksum(<br /> <a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> * addr,<br /> <a href="Poco.html#11353" title="Poco::Int32">Poco::Int32</a> len<br />);</p>
<div class="description">
<p>Calculates the checksum for supplied buffer. </p>
</div>
<h3><a name="13457">initPacket</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual void initPacket() = 0;</p>
<div class="description">
<p>(Re)assembles the packet. Must be overriden. </p>
</div>
<h3><a name="13455">nextSequence</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> nextSequence();</p>
<div class="description">
<p>Increments sequence number and returns the new value. </p>
</div>
<h3><a name="13456">resetSequence</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void resetSequence();</p>
<div class="description">
<p>Resets the sequence to zero. </p>
</div>
<h2>Variables</h2>
<h3><a name="13453">MAX_PACKET_SIZE</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const <a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> <a href="Poco.Net.ICMPPacketImpl.html#13453" title="Poco::Net::ICMPPacketImpl::MAX_PACKET_SIZE">MAX_PACKET_SIZE</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="13454">MAX_SEQ_VALUE</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static const <a href="Poco.html#11352" title="Poco::UInt16">Poco::UInt16</a> <a href="Poco.Net.ICMPPacketImpl.html#13454" title="Poco::Net::ICMPPacketImpl::MAX_SEQ_VALUE">MAX_SEQ_VALUE</a>;</p>
<div class="description">
<p></p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright © 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>
</div>
</body>
</html>
|