suricata
flow-bindgen.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct Flow_ Flow
 

Functions

void SCFlowGetLastTimeAsParts (const Flow *flow, uint64_t *secs, uint64_t *usecs)
 Get flow last time as individual values. More...
 
uint64_t SCFlowGetFlags (const Flow *flow)
 Get flow flags. More...
 
bool SCFlowIsIPv4 (const Flow *flow)
 Return true if the flow is IPv4. More...
 
bool SCFlowIsIPv6 (const Flow *flow)
 Return true if the flow is IPv6. More...
 
uint8_t SCFlowGetIPProtocol (const Flow *flow)
 Get flow IP protocol. More...
 
uint16_t SCFlowGetSourcePort (const Flow *flow)
 Get flow source port. More...
 
uint16_t SCFlowGetDestinationPort (const Flow *flow)
 Get flow destination port. More...
 
const uint8_t * SCFlowGetSourceAddressAsRawPtr (const Flow *flow)
 Returns a borrowed raw pointer to the flow source address. More...
 
const uint8_t * SCFlowGetDestinationAddressAsRawPtr (const Flow *flow)
 Returns a borrowed raw pointer to the flow destination address. More...
 
uint32_t SCFlowGetToServerPacketCount (const Flow *flow)
 Get the number of packets seen toserver. More...
 
uint32_t SCFlowGetToClientPacketCount (const Flow *flow)
 Get the number of packets seen toclient. More...
 
AppProto SCFlowGetAppProtocol (const Flow *f)
 

Typedef Documentation

◆ Flow

typedef struct Flow_ Flow

Definition at line 1 of file flow-bindgen.h.

Function Documentation

◆ SCFlowGetAppProtocol()

AppProto SCFlowGetAppProtocol ( const Flow f)

Definition at line 1278 of file flow.c.

References Flow_::alproto.

Referenced by JsonBuildFileInfoRecord().

Here is the caller graph for this function:

◆ SCFlowGetDestinationAddressAsRawPtr()

const uint8_t* SCFlowGetDestinationAddressAsRawPtr ( const Flow flow)

Returns a borrowed raw pointer to the flow destination address.

The address is in network byte order. Use SCFlowIsIPv4 and SCFlowIsIPV6 to properly determine the size and family of the address.

Definition at line 1249 of file flow.c.

References FlowAddress_::address, FlowAddress_::address_un_data8, and Flow_::dst.

◆ SCFlowGetDestinationPort()

uint16_t SCFlowGetDestinationPort ( const Flow flow)

Get flow destination port.

A function to get the flow dport useful when the caller only has an opaque pointer to the flow structure.

Definition at line 1290 of file flow.c.

References Flow_::dp.

◆ SCFlowGetFlags()

uint64_t SCFlowGetFlags ( const Flow flow)

Get flow flags.

A function to get the flow flags useful when the caller only has an opaque pointer to the flow structure.

Definition at line 1317 of file flow.c.

References Flow_::flags.

◆ SCFlowGetIPProtocol()

uint8_t SCFlowGetIPProtocol ( const Flow flow)

Get flow IP protocol.

Definition at line 1273 of file flow.c.

References Flow_::proto.

◆ SCFlowGetLastTimeAsParts()

void SCFlowGetLastTimeAsParts ( const Flow flow,
uint64_t *  secs,
uint64_t *  usecs 
)

Get flow last time as individual values.

Instead of returning a pointer to the timeval copy the timeval parts into output pointers to make it simpler to call from Rust over FFI using only basic data types.

Definition at line 1227 of file flow.c.

References Flow_::lastts, SCTIME_SECS, and SCTIME_USECS.

◆ SCFlowGetSourceAddressAsRawPtr()

const uint8_t* SCFlowGetSourceAddressAsRawPtr ( const Flow flow)

Returns a borrowed raw pointer to the flow source address.

The address is in network byte order. Use SCFlowIsIPv4 and SCFlowIsIPV6 to properly determine the size and family of the address.

Definition at line 1244 of file flow.c.

References FlowAddress_::address, FlowAddress_::address_un_data8, and Flow_::src.

◆ SCFlowGetSourcePort()

uint16_t SCFlowGetSourcePort ( const Flow flow)

Get flow source port.

A function to get the flow sport useful when the caller only has an opaque pointer to the flow structure.

Definition at line 1239 of file flow.c.

References Flow_::sp.

◆ SCFlowGetToClientPacketCount()

uint32_t SCFlowGetToClientPacketCount ( const Flow flow)

Get the number of packets seen toclient.

Definition at line 1306 of file flow.c.

References Flow_::tosrcpktcnt.

◆ SCFlowGetToServerPacketCount()

uint32_t SCFlowGetToServerPacketCount ( const Flow flow)

Get the number of packets seen toserver.

Definition at line 1298 of file flow.c.

References Flow_::todstpktcnt.

◆ SCFlowIsIPv4()

bool SCFlowIsIPv4 ( const Flow flow)

Return true if the flow is IPv4.

Definition at line 1257 of file flow.c.

References FLOW_IS_IPV4.

◆ SCFlowIsIPv6()

bool SCFlowIsIPv6 ( const Flow flow)

Return true if the flow is IPv6.

Definition at line 1265 of file flow.c.

References FLOW_IS_IPV6.