---
name: "gnutls_ext_raw_parse"
section: "3"
platform: "linux"
package: "gnutls"
version: "3.8.13-3"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/gnutls_ext_raw_parse"
---

# gnutls\_ext\_raw\_parse(3)

API function

## NAME

gnutls\_ext\_raw\_parse - API function

## SYNOPSIS

**#include \<gnutls/gnutls.h\>**

**int gnutls\_ext\_raw\_parse(void \*** *ctx***, gnutls\_ext\_raw\_process\_func** *cb***, const gnutls\_datum\_t \*** *data***, unsigned int** *flags***);**

## ARGUMENTS

- void \* ctx

  a pointer to pass to callback function

- gnutls\_ext\_raw\_process\_func cb

  callback function to process each extension found

- const gnutls\_datum\_t \* data

  TLS extension data

- unsigned int flags

  should be zero or **GNUTLS\_EXT\_RAW\_FLAG\_TLS\_CLIENT\_HELLO** or **GNUTLS\_EXT\_RAW\_FLAG\_DTLS\_CLIENT\_HELLO**

## DESCRIPTION

This function iterates through the TLS extensions as passed in\
  *data* , passing the individual extension data to callback. The\
  *data* must conform to Extension extensions\<0..2^16-1\> format.

If flags is **GNUTLS\_EXT\_RAW\_TLS\_FLAG\_CLIENT\_HELLO** then this function will parse the extension data from the position, as if the packet in\
  *data* is a client hello (without record or handshake headers) - as provided by **gnutls\_handshake\_set\_hook\_function()**.

The return value of the callback will be propagated.

## RETURNS

**GNUTLS\_E\_SUCCESS** on success, or an error code. On unknown flags it returns **GNUTLS\_E\_INVALID\_REQUEST**.

## SINCE

3\.6.3

## REPORTING BUGS

Report bugs to \<bugs@gnutls.org\>.\
 Home page: https://www.gnutls.org

## COPYRIGHT

Copyright © 2001-2023 Free Software Foundation, Inc., and others.\
 Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.

## SEE ALSO

The full documentation for **gnutls** is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form visit

- https://www.gnutls.org/manual/
