Functionality for capturing and replaying UDP packets.
More...
|
| 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
} |
| |
Functionality for capturing and replaying UDP packets.
◆ ouster_udpcap_error_t
| enum ouster_udpcap_error_t |
◆ ouster_udpcap_read()
Read file into capture buffer.
- Parameters
-
| cap | The capture buffer. |
| f | Source file |
- Returns
- Returns 0 on ok otherwise error code
◆ ouster_udpcap_sendto()
Send the capture buffer from sock to addr.
- Parameters
-
| cap | The capture buffer. |
| sock | The source socket filedescriptor |
| addr | The destination address |
- Returns
- Returns the number sent, or -1 for errors
◆ ouster_udpcap_set_port()
Set the UDP port of the capture buffer.
- Parameters
-
| cap | The capture buffer. |
| port | The 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
-
| cap | The capture buffer. |
| sock | The socket filedescriptor |
| f | Destination file |
- Returns
- Returns 0 on ok otherwise error code