Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
address.h File Reference
#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
 

Macros

#define ADDRESS_INIT(type, len, data)   {type, len, data, NULL}
 
#define ADDRESS_INIT_NONE   ADDRESS_INIT(AT_NONE, 0, NULL)
 

Typedefs

typedef struct _address address
 

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
}
 
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
}
 

Functions

WS_DLL_PUBLIC unsigned address_to_bytes (const address *addr, uint8_t *buf, unsigned buf_len)
 Converts an address to a byte array.
 

Detailed Description

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

Function Documentation

◆ address_to_bytes()

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.

Parameters
addrPointer to the address structure to convert.
bufBuffer to store the converted byte array.
buf_lenLength of the output buffer.
Returns
Number of bytes copied to the buffer, or 0 if an error occurred.