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 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Protocol Decodes: IP</title><meta name="generator" content="LompoZer" /><link rel="stylesheet" type="text/css" href="plt-doc.css" /></head><body>
<h2>Network Layer Decodes</h2>
<h3>Class IP</h3>
<p>Provides access to fields in an IPv4 header. Further, you can see any following IP Options by using <span style="font-style: italic;">pkt.Layer3; </span>see the Layers Decode page.</p>
<br />
<table class="indent1">
<tbody>
<tr><td class="heading" colspan="2">Instance Variables</td></tr><tr>
<td class="name methodwidth"><strong>version</strong></td>
<td style="background-color: rgb(153, 255, 153);" class="name descriptionwidth"><em>ip.version -> anInteger</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">IP Version, 4 for IPv4
</td>
</tr>
<tr>
<td class="name"><strong>hdr_len</strong></td>
<td class="name"><em>ip.hdr_len -> anInteger</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">IP Header Length, in 4-byte units
</td>
</tr>
<tr>
<td class="name"><strong>traffic_class</strong></td>
<td class="name"><em>ip.traffic_class -> anInteger</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">Originally IPv4 Type-Of-Service, now used for DSCP and ECN. (Traffic Class is its IPv6 name)
</td>
</tr>
<tr>
<td class="name"><strong>pkt_len</strong></td>
<td class="name"><em>ip.pkt_len -> anInteger</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">Total Length of IP packet
</td>
</tr>
<tr>
<td class="name"><strong>ident</strong></td>
<td class="name"><em>ip.iden t-> anInteger</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">IP Identification
</td>
</tr>
<tr>
<td class="name"><strong>has_rf</strong></td>
<td class="name"><em>ip.has_rf -> true or false</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">True if 'Reserved' IP flag is 1
</td>
</tr>
<tr>
<td class="name"><strong>has_df</strong></td>
<td class="name"><em>ip.has_df --> true or false</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">True if 'Don't Fragment' IP flag is 1
</td>
</tr>
<tr>
<td class="name"><strong>has_mf</strong></td>
<td class="name"><em>ip.has_mf -> true or false</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">True if 'More Fragments' IP flag is 1
</td>
</tr>
<tr>
<td class="name"><strong>frag_offset</strong></td>
<td class="name"><em>ip.frag_offset -> anInteger</em> </td>
</tr>
<tr>
<td><br />
</td>
<td class="description">Fragment Offset, in 8-byte units
</td>
</tr>
<tr>
<td class="name"><strong>ttl</strong></td>
<td class="name"><em>ip.ttl -> anInteger</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">IP Time to Live (TTL)
</td>
</tr>
<tr>
<td class="name"><span style="font-weight: bold;">proto</span><strong /></td>
<td class="name"><em>ip.proto -> anInteger</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">IP Protocol, e.g. 6 = TCP, 17 = UDP, 1 = ICMP
</td>
</tr>
<tr>
<td class="name"><strong>hdr_checksum</strong></td>
<td class="name"><em>ip.hdr_checksum -> anInteger</em> </td>
</tr>
<tr>
<td><br />
</td>
<td class="description">IP Header Checksum
</td>
</tr>
<tr>
<td class="name"><strong>src_prefix<em /></strong></td>
<td class="name"><em>ip.src_prefix -> anIPprefix</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">IPv4 source address
</td>
</tr>
<tr>
<td class="name"><strong>dst_prefix</strong></td>
<td class="name"><em>ip.dst_prefix -> anIPprefix</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">IPv4 destination address
</td>
</tr>
<tr>
<td class="name"><strong>payload</strong></td>
<td class="name"><em>ip.payload -> aByteArray</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">Byte array containing the IP object's payload<br />
<span style="font-style: italic;"></span>
</td>
</tr>
</tbody></table>
<br />A few of the fields in an IP object may be set to new values, as follows:<br /><br /><table class="indent1">
<tbody>
<tr><td class="heading" colspan="2">Class <span style="font-style: italic;">set</span> Methods</td></tr>
<tr>
<td class="name methodwidth"><strong>traffic_class=</strong></td>
<td class="name descriptionwidth"><em>ip.traffic_class = anInteger</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">Sets the <span style="font-style: italic;">traffic_class</span> value in an <span style="font-style: italic;">IP</span>
</td>
</tr>
<tr>
<td class="name"><strong>ttl=</strong></td>
<td class="name"><em>ip.ttl = anInteger</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">Sets the Time to Live (TTL) in an <span style="font-style: italic;">IP</span>
</td>
</tr>
<tr>
<td class="name"><span style="font-weight: bold;">checksum=</span></td>
<td class="name"><em>ip.checksum = anInteger</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">Sets Header Checksum in an <span style="font-style: italic;">IP</span>
</td>
</tr>
<tr>
<td class="name"><strong>src_prefix=<em /></strong></td>
<td class="name"><em>ip.src_prefix = anIPprefix</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">Sets the IPv4 source address in an <span style="font-style: italic;">IP</span>
</td>
</tr>
<tr>
<td class="name"><strong>dst_prefix=</strong></td>
<td class="name"><em>ip.dst_prefix = anIPprefix</em></td>
</tr>
<tr>
<td><br />
</td>
<td class="description">Sets the IPv4 destination address in an <span style="font-style: italic;">IP</span>
</td>
</tr>
</tbody>
</table>
<br />
<p>Nevil Brownlee<br />Mon, 30 Jun 14 (NZST)</p>
</body></html>
|