ouster_clib v1.0
C library for Ouster LiDAR
Loading...
Searching...
No Matches
UDP Capture/Replay

Functionality for capturing and replaying UDP packets. More...

Classes

struct  ouster_udpcap_t
 

Enumerations

enum  ouster_udpcap_error_t {
  OUSTER_UDPCAP_OK , OUSTER_UDPCAP_ERROR_RECV , OUSTER_UDPCAP_ERROR_FREAD , OUSTER_UDPCAP_ERROR_FWRITE ,
  OUSTER_UDPCAP_ERROR_BUFFER_TOO_SMALL
}
 

Functions

int ouster_udpcap_read (ouster_udpcap_t *cap, FILE *f)
 Read file into capture buffer. More...
 
int ouster_udpcap_sendto (ouster_udpcap_t *cap, int sock, ouster_net_addr_t *addr)
 Send the capture buffer from sock to addr. More...
 
int ouster_udpcap_sock_to_file (ouster_udpcap_t *cap, int sock, FILE *f)
 Find header in request. More...
 
void ouster_udpcap_set_port (ouster_udpcap_t *cap, int port)
 Set the UDP port of the capture buffer. More...
 

Detailed Description

Functionality for capturing and replaying UDP packets.

Enumeration Type Documentation

◆ ouster_udpcap_error_t

enum ouster_udpcap_error_t

Definition at line 21 of file ouster_udpcap.h.

Function Documentation

◆ ouster_udpcap_read()

int ouster_udpcap_read ( ouster_udpcap_t cap,
FILE *  f 
)

Read file into capture buffer.

Parameters
capThe capture buffer.
fSource file
Returns
Returns 0 on ok otherwise error code

◆ ouster_udpcap_sendto()

int ouster_udpcap_sendto ( ouster_udpcap_t cap,
int  sock,
ouster_net_addr_t addr 
)

Send the capture buffer from sock to addr.

Parameters
capThe capture buffer.
sockThe source socket filedescriptor
addrThe destination address
Returns
Returns the number sent, or -1 for errors

◆ ouster_udpcap_set_port()

void ouster_udpcap_set_port ( ouster_udpcap_t cap,
int  port 
)

Set the UDP port of the capture buffer.

Parameters
capThe capture buffer.
portThe port

◆ ouster_udpcap_sock_to_file()

int ouster_udpcap_sock_to_file ( ouster_udpcap_t cap,
int  sock,
FILE *  f 
)

Find header in request.

Parameters
capThe capture buffer.
sockThe socket filedescriptor
fDestination file
Returns
Returns 0 on ok otherwise error code