diff --git a/protobuffersrc/DosEvent.proto b/protobuffersrc/DosEvent.proto index a3f55491..e86f411a 100644 --- a/protobuffersrc/DosEvent.proto +++ b/protobuffersrc/DosEvent.proto @@ -11,8 +11,9 @@ enum Protocol { } message DosEvent { - string fromHost = 1; // Source IP address as string (e.g., 192.168.56.11) - string toHost = 2; // Destination IP address as string (e.g., 192.168.56.11) + string fromHost = 1; // Source IP address as string (e.g., 192.168.56.11) + string toHost = 2; // Destination IP address as string (e.g., 192.168.56.11) Protocol protocol = 3; // Enum for protocol type (all, tcp, udp, icmp) - int64 timeStamp = 4; // Unix timestamp in milliseconds + string ruleId = 4; // RuleID for the DOS rule + int64 timeStamp = 5; // Unix timestamp in milliseconds } diff --git a/structs/protocolbuffers/DosEvent/DosEvent.pb.go b/structs/protocolbuffers/DosEvent/DosEvent.pb.go index 9b576ad2..fa4d5804 100644 --- a/structs/protocolbuffers/DosEvent/DosEvent.pb.go +++ b/structs/protocolbuffers/DosEvent/DosEvent.pb.go @@ -80,7 +80,8 @@ type DosEvent struct { FromHost string `protobuf:"bytes,1,opt,name=fromHost,proto3" json:"fromHost,omitempty"` // Source IP address as string (e.g., 192.168.56.11) ToHost string `protobuf:"bytes,2,opt,name=toHost,proto3" json:"toHost,omitempty"` // Destination IP address as string (e.g., 192.168.56.11) Protocol Protocol `protobuf:"varint,3,opt,name=protocol,proto3,enum=DosEvent.Protocol" json:"protocol,omitempty"` // Enum for protocol type (all, tcp, udp, icmp) - TimeStamp int64 `protobuf:"varint,4,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"` // Unix timestamp in milliseconds + RuleId string `protobuf:"bytes,4,opt,name=ruleId,proto3" json:"ruleId,omitempty"` // RuleID for the DOS rule + TimeStamp int64 `protobuf:"varint,5,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"` // Unix timestamp in milliseconds } func (x *DosEvent) Reset() { @@ -136,6 +137,13 @@ func (x *DosEvent) GetProtocol() Protocol { return Protocol_ALL } +func (x *DosEvent) GetRuleId() string { + if x != nil { + return x.RuleId + } + return "" +} + func (x *DosEvent) GetTimeStamp() int64 { if x != nil { return x.TimeStamp @@ -147,24 +155,25 @@ var File_DosEvent_proto protoreflect.FileDescriptor var file_DosEvent_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x44, 0x6f, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x08, 0x44, 0x6f, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x8c, 0x01, 0x0a, 0x08, 0x44, + 0x12, 0x08, 0x44, 0x6f, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xa4, 0x01, 0x0a, 0x08, 0x44, 0x6f, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x72, 0x6f, 0x6d, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6f, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x44, 0x6f, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x2f, 0x0a, 0x08, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x02, - 0x12, 0x08, 0x0a, 0x04, 0x49, 0x43, 0x4d, 0x50, 0x10, 0x03, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x74, 0x61, 0x6e, 0x67, 0x6c, - 0x65, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2d, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x44, 0x6f, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, + 0x75, 0x6c, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, + 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, + 0x70, 0x2a, 0x2f, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x07, 0x0a, + 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x01, 0x12, + 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x43, 0x4d, 0x50, + 0x10, 0x03, 0x42, 0x44, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x75, 0x6e, 0x74, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, + 0x2d, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, + 0x44, 0x6f, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var (