Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Functions
bitswap.h File Reference
#include <wireshark.h>

Go to the source code of this file.

Functions

WS_DLL_PUBLIC void bitswap_buf_inplace (uint8_t *buf, size_t len)
 Reverse the bit order of each byte in a buffer, in-place.
 

Detailed Description

Macro to bitswap a byte by looking it up in a table

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

Function Documentation

◆ bitswap_buf_inplace()

WS_DLL_PUBLIC void bitswap_buf_inplace ( uint8_t *  buf,
size_t  len 
)

Reverse the bit order of each byte in a buffer, in-place.

Performs a bitwise reversal on every byte in the given buffer, modifying the contents directly. For example, a byte 0b00000101 becomes 0b10100000.

Parameters
bufPointer to the buffer to modify.
lenNumber of bytes in the buffer.