---
name: "pcap_tstamp_type_name_to_val"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/pcap_tstamp_type_name_to_val"
---

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

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**(3)](/pcap/3.md), [**pcap\_tstamp\_type\_val\_to\_name**(3)](/pcap_tstamp_type_val_to_name/3.md)
