mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Rename protocol_id field to ip_proto and similar renaming for name field
This commit is contained in:
parent
d0896e81d6
commit
5e5aceb6f7
140 changed files with 214 additions and 212 deletions
|
@ -1,12 +1,12 @@
|
|||
##! This script adds a string version of the protocol_id field
|
||||
##! This script adds a string version of the ip_proto field
|
||||
|
||||
@load base/protocols/conn
|
||||
|
||||
module Conn;
|
||||
|
||||
redef record Info += {
|
||||
## A string version of the protocol_id field
|
||||
protocol_name: string &log &optional;
|
||||
## A string version of the ip_proto field
|
||||
ip_proto_name: string &log &optional;
|
||||
};
|
||||
|
||||
global protocol_names: table[count] of string = {
|
||||
|
@ -159,9 +159,9 @@ global protocol_names: table[count] of string = {
|
|||
};
|
||||
|
||||
event connection_state_remove(c: connection) {
|
||||
if ( c$conn$protocol_id in protocol_names ) {
|
||||
c$conn$protocol_name = protocol_names[c$conn$protocol_id];
|
||||
if ( c$conn$ip_proto in protocol_names ) {
|
||||
c$conn$ip_proto_name = protocol_names[c$conn$ip_proto];
|
||||
} else {
|
||||
c$conn$protocol_name = "unknown";
|
||||
c$conn$ip_proto_name = "unknown";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue