mtp_pcap.c File Reference
`#include <osmocom/mtp/mtp_pcap.h>`
`#include <sys/time.h>`
`#include <unistd.h>`

## Data Structures

struct | pcap_hdr
struct | pcaprec_hdr

## Macros

#define | static_assert(exp, name) typedef int dummy##name [(exp) ? 1 : -1];

## Functions

struct pcap_hdr | __attribute__ ((packed))
int | mtp_pcap_write_header (int fd)
int | mtp_pcap_write_msu (int fd, const uint8_t *data, int length)

## Variables

uint32_t | magic_number
uint16_t | version_major
uint16_t | version_minor
int32_t | thiszone
uint32_t | sigfigs
uint32_t | snaplen
uint32_t | network
uint32_t | ts_sec
uint32_t | ts_usec
uint32_t | incl_len
uint32_t | orig_len

## Macro Definition Documentation

## static_assert

#define static_assert | ( |  | exp,
|  |  | name
| ) |  | typedef int dummy##name [(exp) ? 1 : -1];

## Function Documentation

## __attribute__()

struct pcap_hdr __attribute__ | ( | (packed) |  | ) |

## mtp_pcap_write_header()

int mtp_pcap_write_header | ( | int | fd | ) |

References pcap_hdr::magic_number.

## mtp_pcap_write_msu()

int mtp_pcap_write_msu | ( | int | fd,
|  | const uint8_t * | data,
|  | int | length
| ) |  |

References data, pcaprec_hdr::ts_sec, and pcaprec_hdr::ts_usec.

## Variable Documentation

## incl_len

uint32_t incl_len

## magic_number

uint32_t magic_number

## network

uint32_t network

## orig_len

uint32_t orig_len

## sigfigs

uint32_t sigfigs

## snaplen

uint32_t snaplen

## thiszone

int32_t thiszone

## ts_sec

uint32_t ts_sec

## ts_usec

uint32_t ts_usec

## version_major

uint16_t version_major

## version_minor

uint16_t version_minor