Commit 9acabe2b authored by Maciej Lipinski's avatar Maciej Lipinski

[RTU] adding FID info into rtu_stat tool

parent a75771ac
...@@ -113,14 +113,15 @@ main() ...@@ -113,14 +113,15 @@ main()
printf("RTU Filtering Database Dump: %d rules\n", n_entries); printf("RTU Filtering Database Dump: %d rules\n", n_entries);
printf("\n"); printf("\n");
printf("MAC Dst.ports Type Age [s]\n"); printf("MAC Dst.ports FID Type Age [s]\n");
printf("----------------------------------------------------------------------------------\n"); printf("----------------------------------------------------------------------------------\n");
for(i=0;i<n_entries;i++) for(i=0;i<n_entries;i++)
{ {
printf("%-25s %-22s %s (hash %03x:%x) ", printf("%-25s %-12s %2d %s (hash %03x:%x) ",
mac_to_string(fd_list[i].mac), mac_to_string(fd_list[i].mac),
decode_ports(fd_list[i].dpm), decode_ports(fd_list[i].dpm),
fd_list[i].fid,
fd_list[i].dynamic ? "DYNAMIC":"STATIC ", fd_list[i].dynamic ? "DYNAMIC":"STATIC ",
fd_list[i].hash, fd_list[i].hash,
fd_list[i].bucket); fd_list[i].bucket);
......
...@@ -68,6 +68,7 @@ int rtudexp_get_fd_list(const struct minipc_pd *pd, ...@@ -68,6 +68,7 @@ int rtudexp_get_fd_list(const struct minipc_pd *pd,
list->list[i].hash = ent->addr.hash; list->list[i].hash = ent->addr.hash;
list->list[i].bucket = ent->addr.bucket; list->list[i].bucket = ent->addr.bucket;
list->list[i].age = ent->age; list->list[i].age = ent->age;
list->list[i].fid = ent->fid;
} }
list->num_rules = i; list->num_rules = i;
......
...@@ -42,6 +42,7 @@ typedef struct ...@@ -42,6 +42,7 @@ typedef struct
uint16_t hash; uint16_t hash;
int bucket; int bucket;
int age; int age;
int fid;
} rtudexp_fd_entry_t; } rtudexp_fd_entry_t;
typedef struct { typedef struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment