Changes between Version 6 and Version 7 of UMPA/Documentation/Tutorials/YourFirstPackets
- Timestamp:
- 08/28/08 23:29:12 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UMPA/Documentation/Tutorials/YourFirstPackets
v6 v7 303 303 Now, we can simple create a new packet and use already created {{{sock}}} object to send it out, but before we will do that, lets change TTL field of the IP protocol. 304 304 305 Some common fields like TTL or ports in TCP/UDP headers are {{{EnumField}}} objects. What does mean? Well, this is a simple numeric field but with special behaviour.305 Some common fields like TTL or ports in TCP/UDP headers are {{{EnumField}}} objects. What does it mean? Well, this is a simple numeric field but with special behaviour. 306 306 We can pass common names instead of numbers (what is easier to remember). Let's do it on the TTL example. 307 307 … … 328 328 }}} 329 329 330 Why we can'tuse {{{ip.time_to_live.enumerable}}} in the first line? Well, attributes like object.''name_of_field'' are reserved only to get/set values of them. They handle only with values. To get a reference to the field's object we need to use {{{get_field()}}} method.330 Why can't we use {{{ip.time_to_live.enumerable}}} in the first line? Well, attributes like object.''name_of_field'' are reserved only to get/set values of them. They handle only with values. To get a reference to the field's object we need to use {{{get_field()}}} method. 331 331 332 332 ===== print statement is sooo cool =====
