

Public Member Functions | |
| LDPHeaderClass () | |
| virtual void | bind () |
| virtual void | export_offsets () |
| 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 55 of file ldp.cc. References PacketHeaderClass::bind_offset(), and hdr_ldp::offset_.
00055 : PacketHeaderClass("PacketHeader/LDP", 00056 sizeof(hdr_ldp)) { 00057 bind_offset(&hdr_ldp::offset_); 00058 } |
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 in ResvHeaderClass, IPHeaderClass, CommonHeaderClass, and MacHeaderClass. Definition at line 72 of file packet.cc. Referenced by PacketHeaderClass::bind().
00073 {
00074 }
|
|
||||||||||||
|
Definition at line 76 of file packet.cc. Referenced by ResvHeaderClass::export_offsets(), CommonHeaderClass::export_offsets(), MacHeaderClass::export_offsets(), and IPHeaderClass::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