|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
#include <string.h>#include "tvbuff.h"#include <epan/wmem_scopes.h>#include <wsutil/ws_assert.h>#include <wsutil/inet_cidr.h>Go to the source code of this file.
Classes | |
| struct | _address |
| Holds a network or link-layer address of any supported type. More... | |
Macros | |
| #define | ADDRESS_INIT(type, len, data) {type, len, data, NULL} |
| Static initializer for an address with explicit type, length, and data pointer. | |
| #define | ADDRESS_INIT_NONE ADDRESS_INIT(AT_NONE, 0, NULL) |
Static initializer for an empty address (AT_NONE, zero length, NULL data). | |
Typedefs | |
| typedef struct _address | address |
| Holds a network or link-layer address of any supported type. | |
Enumerations | |
| enum | address_type { AT_NONE , AT_ETHER , AT_IPv4 , AT_IPv6 , AT_IPX , AT_FC , AT_FCWWN , AT_STRINGZ , AT_EUI64 , AT_IB , AT_AX25 , AT_VINES , AT_NUMERIC , AT_MCTP , AT_ILNP_NID , AT_ILNP_L64 , AT_ILNP_ILV , AT_END_OF_LIST } |
| Identifies the type of a network layer or link layer address. More... | |
| enum | port_type { PT_NONE , PT_SCTP , PT_TCP , PT_UDP , PT_DCCP , PT_IPX , PT_DDP , PT_IDP , PT_USB , PT_I2C , PT_IBQP , PT_BLUETOOTH , PT_IWARP_MPA , PT_MCTP } |
| Transport-layer port number types recognized by Wireshark. More... | |
Functions | |
| WS_DLL_PUBLIC unsigned | address_to_bytes (const address *addr, uint8_t *buf, unsigned buf_len) |
| Converts an address to a byte array. | |
Definitions for structures storing addresses, and for the type of variables holding port-type values
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
| enum address_type |
Identifies the type of a network layer or link layer address.
Address types can be added here if there are many dissectors that use them or just within a specific dissector. If an address type is added here, it must be "registered" within address_types.c For dissector address types, just use the address_type_dissector_register function from address_types.h
AT_NUMERIC - a numeric address type can consist of a uint8_t, uint16_t, uint32_t or uint64_t value. If no correct length is provided, to avoid data bleed, a uint8_t is assumed. Only representation (aka conversion of value to string) is implemented for this type.
| enum port_type |
Transport-layer port number types recognized by Wireshark.
| Enumerator | |
|---|---|
| PT_NONE | No port number applicable |
| PT_SCTP | Stream Control Transmission Protocol (SCTP) port |
| PT_TCP | Transmission Control Protocol (TCP) port |
| PT_UDP | User Datagram Protocol (UDP) port |
| PT_DCCP | Datagram Congestion Control Protocol (DCCP) port |
| PT_IPX | IPX socket number |
| PT_DDP | AppleTalk Datagram Delivery Protocol (DDP) connection |
| PT_IDP | XNS Internet Datagram Protocol (IDP) socket number |
| PT_USB | USB endpoint number; 0xffff denotes the host |
| PT_I2C | I2C bus endpoint |
| PT_IBQP | InfiniBand Queue Pair (QP) number |
| PT_BLUETOOTH | Bluetooth endpoint |
| PT_IWARP_MPA | iWARP Marker PDU Aligned (MPA) framing endpoint |
| PT_MCTP | Management Component Transport Protocol (MCTP) endpoint |
| WS_DLL_PUBLIC unsigned address_to_bytes | ( | const address * | addr, |
| uint8_t * | buf, | ||
| unsigned | buf_len | ||
| ) |
Converts an address to a byte array.
This function takes an address structure and converts it into a byte array. The output buffer must be provided with sufficient space to hold the address data.
| addr | Pointer to the address structure to convert. |
| buf | Buffer to store the converted byte array. |
| buf_len | Length of the output buffer. |