---
name: "function::sock_state_str2num"
section: "3stap"
platform: "linux"
package: "systemtap-doc"
version: "5.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/function::sock_state_str2num"
---

# function::sock\_state\_str2num(3stap)

Given a socket state string, return the corresponding state number

## NAME

function::sock\_state\_str2num - Given a socket state string, return the corresponding state number

## SYNOPSIS

```
    sock_state_str2num:long(state:string)
```

## ARGUMENTS

*state*

The state name

## SEE ALSO0

[*tapset::socket*(3stap)](/tapset::socket/3stap.md)
