mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
GH-618: add "tcp_options" event containing TCP option values
This commit is contained in:
parent
222e3ad3ea
commit
052feacbda
14 changed files with 269 additions and 52 deletions
|
@ -64,19 +64,10 @@ public:
|
|||
void SetContentsFile(unsigned int direction, BroFile* f) override;
|
||||
BroFile* GetContentsFile(unsigned int direction) const override;
|
||||
|
||||
// Callback to process a TCP option.
|
||||
typedef int (*proc_tcp_option_t)(unsigned int opt, unsigned int optlen,
|
||||
const u_char* option, TCP_Analyzer* analyzer,
|
||||
bool is_orig, void* cookie);
|
||||
|
||||
// From Analyzer.h
|
||||
void UpdateConnVal(RecordVal *conn_val) override;
|
||||
|
||||
// Needs to be static because it's passed as a pointer-to-function
|
||||
// rather than pointer-to-member-function.
|
||||
static int ParseTCPOptions(const struct tcphdr* tcp,
|
||||
proc_tcp_option_t proc, TCP_Analyzer* analyzer,
|
||||
bool is_orig, void* cookie);
|
||||
int ParseTCPOptions(const struct tcphdr* tcp, bool is_orig);
|
||||
|
||||
static analyzer::Analyzer* Instantiate(Connection* conn)
|
||||
{ return new TCP_Analyzer(conn); }
|
||||
|
@ -168,12 +159,6 @@ protected:
|
|||
|
||||
void SetReassembler(tcp::TCP_Reassembler* rorig, tcp::TCP_Reassembler* rresp);
|
||||
|
||||
// Needs to be static because it's passed as a pointer-to-function
|
||||
// rather than pointer-to-member-function.
|
||||
static int TCPOptionEvent(unsigned int opt, unsigned int optlen,
|
||||
const u_char* option, TCP_Analyzer* analyzer,
|
||||
bool is_orig, void* cookie);
|
||||
|
||||
// A couple utility functions that may also be useful to derived analyzers.
|
||||
static uint64_t get_relative_seq(const TCP_Endpoint* endpoint,
|
||||
uint32_t cur_base, uint32_t last,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue