| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
packet-xdlc.h File Reference
`#include "ws_symbol_export.h"`

Go to the source code of this file.

## Classes
struct | xdlc_cf_items

## Macros
#define | XDLC_I_MASK 0x01
#define | XDLC_I 0x00
#define | XDLC_S_U_MASK 0x03
#define | XDLC_S 0x01
#define | XDLC_U 0x03
#define | XDLC_N_R_MASK 0xE0
#define | XDLC_N_R_SHIFT 5
#define | XDLC_N_R_EXT_MASK 0xFE00
#define | XDLC_N_R_EXT_SHIFT 9
#define | XDLC_N_S_MASK 0x0E
#define | XDLC_N_S_SHIFT 1
#define | XDLC_N_S_EXT_MASK 0x00FE
#define | XDLC_N_S_EXT_SHIFT 1
#define | XDLC_P_F 0x10
#define | XDLC_P_F_EXT 0x0100
#define | XDLC_S_FTYPE_MASK 0x0C
#define | XDLC_RR 0x00
#define | XDLC_RNR 0x04
#define | XDLC_REJ 0x08
#define | XDLC_SREJ 0x0C
#define | XDLC_U_MODIFIER_MASK 0xEC
#define | XDLC_UI 0x00
#define | XDLC_UP 0x20
#define | XDLC_DISC 0x40
#define | XDLC_RD 0x40
#define | XDLC_UA 0x60
#define | XDLC_SNRM 0x80
#define | XDLC_TEST 0xE0
#define | XDLC_SIM 0x04
#define | XDLC_RIM 0x04
#define | XDLC_FRMR 0x84
#define | XDLC_CFGR 0xC4
#define | XDLC_SARM 0x0C
#define | XDLC_DM 0x0C
#define | XDLC_SABM 0x2C
#define | XDLC_SARME 0x4C
#define | XDLC_SABME 0x6C
#define | XDLC_RESET 0x8C
#define | XDLC_XID 0xAC
#define | XDLC_SNRME 0xCC
#define | XDLC_BCN 0xEC
#define | XDLC_IS_INFORMATION(control) (((control) & XDLC_I_MASK) == XDLC_I || (control) == (XDLC_UI|XDLC_U))
#define | XDLC_CONTROL_LEN(control, is_extended) ((((control) & XDLC_S_U_MASK) == XDLC_U || !(is_extended)) ? 1 : 2)

## Functions
int | get_xdlc_control (const uint8_t *pd, int offset, bool is_extended)
WS_DLL_PUBLIC int | dissect_xdlc_control (tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *xdlc_tree, int hf_xdlc_control, int ett_xdlc_control, const xdlc_cf_items *cf_items_nonext, const xdlc_cf_items *cf_items_ext, const value_string *u_modifier_short_vals_cmd, const value_string *u_modifier_short_vals_resp, bool is_response, bool is_extended, bool append_info)

## Variables
const value_string | ftype_vals []
const value_string | stype_vals []
const value_string | modifier_vals_cmd []
const value_string | modifier_vals_resp []

## Detailed Description

Define *DLC frame types, and routine to dissect the control field of a *DLC frame.

## Macro Definition Documentation

## ◆ XDLC_BCN

#define XDLC_BCN 0xEC

Beacon

## ◆ XDLC_CFGR

#define XDLC_CFGR 0xC4

Configure

## ◆ XDLC_CONTROL_LEN

#define XDLC_CONTROL_LEN | ( |  | control,
|  |  | is_extended
| ) |  | ((((control) & XDLC_S_U_MASK) == XDLC_U || !(is_extended)) ? 1 : 2)

This macro takes the control field of an xDLC frame, and a flag saying whether we're doing basic or extended operation, and evaluates to the length of that field (if it's an Unnumbered frame, or we're not in extended mode, it's 1 byte long, otherwise it's 2 bytes long).

## ◆ XDLC_DISC

#define XDLC_DISC 0x40

Disconnect (command)

## ◆ XDLC_DM

#define XDLC_DM 0x0C

Disconnected mode (response)

## ◆ XDLC_FRMR

#define XDLC_FRMR 0x84

Frame reject

## ◆ XDLC_I

#define XDLC_I 0x00

Information frames

## ◆ XDLC_I_MASK

#define XDLC_I_MASK 0x01

Mask to test for I or not I

## ◆ XDLC_IS_INFORMATION

#define XDLC_IS_INFORMATION | ( |  | control | ) | (((control) & XDLC_I_MASK) == XDLC_I || (control) == (XDLC_UI|XDLC_U))

This macro takes the control field of an xDLC frame, as returned by "get_xdlc_control()" or "dissect_xdlc_control()", and evaluates to true if the frame is an "information" frame and false if it isn't. Note that frames other than information frames can have data in them, e.g. TEST frames.

## ◆ XDLC_N_R_EXT_MASK

#define XDLC_N_R_EXT_MASK 0xFE00

extended

## ◆ XDLC_N_R_MASK

#define XDLC_N_R_MASK 0xE0

basic

## ◆ XDLC_N_S_EXT_MASK

#define XDLC_N_S_EXT_MASK 0x00FE

extended

## ◆ XDLC_N_S_MASK

#define XDLC_N_S_MASK 0x0E

basic

## ◆ XDLC_P_F

#define XDLC_P_F 0x10

basic

## ◆ XDLC_P_F_EXT

#define XDLC_P_F_EXT 0x0100

extended

## ◆ XDLC_RD

#define XDLC_RD 0x40

Request Disconnect (response)

## ◆ XDLC_REJ

#define XDLC_REJ 0x08

Reject

## ◆ XDLC_RESET

#define XDLC_RESET 0x8C

Reset

## ◆ XDLC_RIM

#define XDLC_RIM 0x04

Request Initialization Mode (response)

## ◆ XDLC_RNR

#define XDLC_RNR 0x04

Receiver not ready

## ◆ XDLC_RR

#define XDLC_RR 0x00

Receiver ready

## ◆ XDLC_S

#define XDLC_S 0x01

Supervisory frames

## ◆ XDLC_S_U_MASK

#define XDLC_S_U_MASK 0x03

Mask to test for S or U

## ◆ XDLC_SABM

#define XDLC_SABM 0x2C

Set Asynchronous Balanced Mode

## ◆ XDLC_SABME

#define XDLC_SABME 0x6C

Set Asynchronous Balanced Mode Extended

## ◆ XDLC_SARM

#define XDLC_SARM 0x0C

Set Asynchronous Response Mode (command)

## ◆ XDLC_SARME

#define XDLC_SARME 0x4C

Set Asynchronous Response Mode Extended

## ◆ XDLC_SIM

#define XDLC_SIM 0x04

Set Initialization Mode (command)

## ◆ XDLC_SNRM

#define XDLC_SNRM 0x80

Set Normal Response Mode

## ◆ XDLC_SNRME

#define XDLC_SNRME 0xCC

Set Normal Response Mode Extended

## ◆ XDLC_SREJ

#define XDLC_SREJ 0x0C

Selective reject

## ◆ XDLC_TEST

#define XDLC_TEST 0xE0

Test

## ◆ XDLC_U

#define XDLC_U 0x03

Unnumbered frames

## ◆ XDLC_UA

#define XDLC_UA 0x60

Unnumbered Acknowledge

## ◆ XDLC_UI

#define XDLC_UI 0x00

Unnumbered Information

## ◆ XDLC_UP

#define XDLC_UP 0x20

Unnumbered Poll

## ◆ XDLC_XID

#define XDLC_XID 0xAC

Exchange identification