#include <flowstruct.h>
Collaboration diagram for DRTable:

Public Member Functions | |
| DRTable (int size_=FLOW_TABLE_SIZE) | |
| ~DRTable () | |
| bool | find (nsaddr_t src, nsaddr_t dst, u_int16_t &flow) |
| void | insert (nsaddr_t src, nsaddr_t dst, u_int16_t flow) |
| void | flush (nsaddr_t src, nsaddr_t dst) |
Private Member Functions | |
| void | grow () |
Private Attributes | |
| int | size |
| int | maxSize |
| DRTabEnt * | table |
|
|
Definition at line 170 of file flowstruct.cc. References maxSize, size, and table.
|
|
|
Definition at line 177 of file flowstruct.cc. References table.
00177 {
00178 delete table;
00179 }
|
|
||||||||||||||||
|
Definition at line 181 of file flowstruct.cc. References size, DRTabEnt::src, and table. Referenced by checkDefaultFlow(), and FlowTable::defaultFlow().
|
|
||||||||||||
|
Definition at line 224 of file flowstruct.cc. References size, DRTabEnt::src, and table. Referenced by checkDefaultFlow().
|
|
|
Definition at line 190 of file flowstruct.cc. References maxSize, and table. Referenced by insert().
|
|
||||||||||||||||
|
Definition at line 201 of file flowstruct.cc. References DRTabEnt::dst, DRTabEnt::fid, grow(), maxSize, size, DRTabEnt::src, and table. Referenced by FlowTable::createEntry().
00201 {
00202 assert(flow & 1);
00203 for (int i = 0; i < size; i++) {
00204 if (src == table[i].src && dst == table[i].dst) {
00205 if ((short)((flow) - (table[i].fid)) > 0) {
00206 table[i].fid = flow;
00207 } else {
00208 }
00209 return;
00210 }
00211 }
00212
00213 if (size == maxSize)
00214 grow();
00215
00216 assert(size != maxSize);
00217
00218 table[size].src = src;
00219 table[size].dst = dst;
00220 table[size].fid = flow;
00221 size++;
00222 }
|
Here is the call graph for this function:

|
|
Definition at line 81 of file flowstruct.h. |
|
|
Definition at line 80 of file flowstruct.h. |
|
|
Definition at line 82 of file flowstruct.h. Referenced by DRTable(), find(), flush(), grow(), insert(), and ~DRTable(). |
1.3.3