Commit 87e79c83 authored by Maciej Lipinski's avatar Maciej Lipinski Committed by Alessandro Rubini

[RTU] adding FID info into rtu_stat tool

parent 3332a33a
......@@ -194,19 +194,20 @@ int main(int argc, char **argv)
printf("RTU Filtering Database Dump: %d rules\n", n_entries);
printf("\n");
printf("MAC Dst.ports Type Age [s]\n");
printf("MAC Dst.ports FID Type Age [s]\n");
printf("----------------------------------------------------------------------------------\n");
char mac_buf[ETH_ALEN_STR];
for(i=0;i<n_entries;i++)
{
printf("%-25s %-22s %s (hash %03x:%x) ",
mac_to_buffer(fd_list[i].mac,mac_buf),
decode_ports(fd_list[i].dpm),
fd_list[i].dynamic ? "DYNAMIC":"STATIC ",
fd_list[i].hash,
fd_list[i].bucket);
printf("%-25s %-12s %2d %s (hash %03x:%x) ",
mac_to_buffer(fd_list[i].mac,mac_buf),
decode_ports(fd_list[i].dpm),
fd_list[i].fid,
fd_list[i].dynamic ? "DYNAMIC":"STATIC ",
fd_list[i].hash,
fd_list[i].bucket);
if(fd_list[i].dynamic)
printf("%d\n", fd_list[i].age);
else
......
......@@ -77,6 +77,7 @@ int rtudexp_get_fd_list(const struct minipc_pd *pd,
list->list[i].hash = ent->addr.hash;
list->list[i].bucket = ent->addr.bucket;
list->list[i].age = ent->age;
list->list[i].fid = ent->fid;
}
list->num_rules = i;
......
......@@ -42,6 +42,7 @@ typedef struct
uint16_t hash;
int bucket;
int age;
int fid;
} rtudexp_fd_entry_t;
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