

Public Member Functions | |
| IPHeaderClass () | |
| void | export_offsets () |
| virtual void | bind () |
| TclObject * | create (int argc, const char *const *argv) |
Protected Member Functions | |
| virtual int | method (int argc, const char *const *argv) |
| void | field_offset (const char *fieldname, int offset) |
| void | bind_offset (int *off) |
| void | offset (int *off) |
Protected Attributes | |
| int | hdrlen_ |
| int * | offset_ |
|
|
Definition at line 48 of file ip.cc. References PacketHeaderClass::bind_offset(), IP, and hdr_ip::offset_.
00048 : PacketHeaderClass("PacketHeader/IP", 00049 sizeof(hdr_ip)) { 00050 bind_offset(&hdr_ip::offset_); 00051 } |
Here is the call graph for this function:

|
|
Definition at line 63 of file packet.cc. References PacketHeaderClass::export_offsets(), and PacketHeaderClass::hdrlen_.
00064 {
00065 TclClass::bind();
00066 Tcl& tcl = Tcl::instance();
00067 tcl.evalf("%s set hdrlen_ %d", classname_, hdrlen_);
00068 export_offsets();
00069 add_method("offset");
00070 }
|
Here is the call graph for this function:

|
|
||||||||||||
|
Definition at line 58 of file packet.cc.
00059 {
00060 return (0);
00061 }
|
|
|
Reimplemented from PacketHeaderClass. Definition at line 52 of file ip.cc. References PacketHeaderClass::field_offset(), and OFFSET.
00052 {
00053 field_offset("src_", OFFSET(hdr_ip, src_));
00054 field_offset("dst_", OFFSET(hdr_ip, dst_));
00055 field_offset("ttl_", OFFSET(hdr_ip, ttl_));
00056 field_offset("fid_", OFFSET(hdr_ip, fid_));
00057 field_offset("prio_", OFFSET(hdr_ip, prio_));
00058 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 76 of file packet.cc. Referenced by ResvHeaderClass::export_offsets(), CommonHeaderClass::export_offsets(), MacHeaderClass::export_offsets(), and export_offsets().
00077 {
00078 Tcl& tcl = Tcl::instance();
00079 tcl.evalf("%s set offset_(%s) %d", classname_, fieldname, offset);
00080 }
|
|
||||||||||||
|
Definition at line 82 of file packet.cc. References PacketHeaderClass::offset_.
00083 {
00084 Tcl& tcl = Tcl::instance();
00085 int argc = ac - 2;
00086 const char*const* argv = av + 2;
00087 if (argc == 3) {
00088 if (strcmp(argv[1], "offset") == 0) {
00089 if (offset_) {
00090 *offset_ = atoi(argv[2]);
00091 return TCL_OK;
00092 }
00093 tcl.resultf("Warning: cannot set offset_ for %s",
00094 classname_);
00095 return TCL_OK;
00096 }
00097 }
00098 else if (argc == 2) {
00099 if (strcmp(argv[1], "offset") == 0) {
00100 if (offset_) {
00101 tcl.resultf("%d", *offset_);
00102 return TCL_OK;
00103 }
00104 }
00105 }
00106 return TclClass::method(ac, av);
00107 }
|
|
|
Definition at line 491 of file packet.h. References PacketHeaderClass::offset_. Referenced by SRHeaderClass::SRHeaderClass().
00491 {offset_= off;}
|
|
|
Definition at line 492 of file packet.h. Referenced by PacketHeaderClass::bind(). |
|
|
Definition at line 493 of file packet.h. Referenced by PacketHeaderClass::bind_offset(), PacketHeaderClass::method(), and PacketHeaderClass::offset(). |
1.3.3