---
name: "pcap_tstamp_type_name_to_val"
section: "3pcap"
platform: "macos"
package: "libpcap"
version: "146"
release: "macOS 26.5"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/pcap_tstamp_type_name_to_val/3pcap"
---

# pcap\_tstamp\_type\_name\_to\_val(3pcap)

get the time stamp type value corresponding to a time stamp type name

## NAME

pcap\_tstamp\_type\_name\_to\_val - get the time stamp type value corresponding to a time stamp type name

## SYNOPSIS

```
#include <pcap/pcap.h>
```

**int pcap\_tstamp\_type\_name\_to\_val(const char \*name);**

## DESCRIPTION

**pcap\_tstamp\_type\_name\_to\_val**() translates a time stamp type name to the corresponding time stamp type value.  The translation is case-insensitive.

## RETURN VALUE

**pcap\_tstamp\_type\_name\_to\_val**() returns time stamp type value on success and **PCAP\_ERROR** on failure.

## BACKWARD COMPATIBILITY

This function became available in libpcap release 1.2.1.

## SEE ALSO

**pcap**(3PCAP), **pcap\_tstamp\_type\_val\_to\_name**(3PCAP)
