---
name: "modbus_get_header_length"
section: "3"
platform: "linux"
package: "libmodbus-dev"
version: "3.1.6-2.1"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/modbus_get_header_length"
---

# modbus\_get\_header\_length(3)

retrieve the current header length

## NAME

modbus\_get\_header\_length - retrieve the current header length

## SYNOPSIS

**int modbus\_get\_header\_length(modbus\_t \****ctx***);**

## DESCRIPTION

The **modbus\_get\_header\_length()** function shall retrieve the current header length from the backend. This function is convenient to manipulate a message and so its limited to low-level operations.

## RETURN VALUE

The header length as integer value.

## SEE ALSO

[**libmodbus**(7)](/libmodbus/7.md)

## AUTHORS

The libmodbus documentation was written by Stéphane Raimbault \<stephane.raimbault@gmail.com\>
