Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
packet-ncp-int.h
1/* packet-ncp-int.h
2 * Structures and functions for NetWare Core Protocol.
3 * Gilbert Ramirez <[email protected]>
4 * Modified for NDS support by Greg Morris ([email protected])
5 *
6 * Portions Copyright (c) Gilbert Ramirez 2000-2002
7 * Portions Copyright (c) Novell, Inc. 2000-2003
8 *
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <[email protected]>
11 * Copyright 2000 Gerald Combs
12 *
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 */
15
16#ifndef __PACKET_NCP_INT_H__
17#define __PACKET_NCP_INT_H__
18
19#include <epan/expert.h>
20#include <epan/ptvcursor.h>
21
22typedef struct _ptvc_record ptvc_record;
24
25typedef struct {
26 int *hf_ptr;
27 const char *first_string;
28 const char *repeat_string;
30
32 int *hf_ptr;
33 int length;
34 const sub_ptvc_record *sub_ptvc_rec;
35 const info_string_t *req_info_str;
36 unsigned int endianness;
37 unsigned int var_index : 2;
38 unsigned int repeat_index : 2;
39 unsigned int req_cond_index : 8;
40};
41
42/*
43 * Every NCP packet has this common header (except for burst packets).
44 */
46 uint16_t type;
47 uint8_t sequence;
48 uint8_t conn_low;
49 uint8_t task;
50 uint8_t conn_high; /* type=0x5555 doesn't have this */
51};
52
53extern bool nds_defragment;
54extern bool nds_echo_eid;
55extern bool ncp_echo_err;
56extern bool ncp_echo_conn;
57extern bool ncp_echo_server;
58extern bool ncp_echo_file;
59extern bool ncp_newstyle;
60
62 int *ett;
63 const char *descr;
64 const ptvc_record *ptvc_rec;
65};
66
67typedef struct {
68 const char *dfilter_text;
69 struct epan_dfilter *dfilter;
71
72struct novell_tap {
73 int stat;
74 int hdr;
75};
76
77typedef struct novell_tap _novell_tap;
78
79typedef struct {
80 uint8_t error_in_packet;
81 int ncp_error_index;
83
84struct _ncp_record;
85typedef void (ncp_expert_handler)(ptvcursor_t *ptvc, packet_info *pinfo, const struct _ncp_record *ncp_rec, bool request);
86
87typedef struct _ncp_record {
88 uint8_t func;
89 uint8_t subfunc;
90 uint8_t has_subfunc;
91 const char* name;
92 int group;
93 const ptvc_record *request_ptvc;
94 const ptvc_record *reply_ptvc;
95 const error_equivalency *errors;
96 const int *req_cond_indexes;
97 unsigned int req_cond_size_type;
98 ncp_expert_handler *expert_handler_func;
100
101/*
102 * XXX - should the object_name be a pointer, initialized to null,
103 * and set to a wmem-allocated copy of the full string?
104 */
105typedef struct {
106 const ncp_record *ncp_rec;
107 bool *req_cond_results;
108 uint32_t req_frame_num;
109 nstime_t req_frame_time;
110 uint16_t length;
111 uint32_t req_nds_flags;
112 uint32_t req_nds_prot_flags;
113 uint8_t nds_request_verb;
114 uint8_t nds_version;
115 char object_name[256];
116 bool nds_frag;
117 uint32_t nds_end_frag;
118 uint32_t nds_frag_num;
119 uint16_t req_mask;
120 uint16_t req_mask_ext;
121 uint32_t nds_frag_flags;
123
124WS_DLL_PUBLIC const value_string sss_verb_enum[];
125WS_DLL_PUBLIC const value_string nmas_subverb_enum[];
126WS_DLL_PUBLIC const value_string ncp_nds_verb_vals[];
127
128void dissect_ncp_request(tvbuff_t*, packet_info*, uint32_t,
129 uint8_t, uint16_t, bool, proto_tree *volatile);
130
131void dissect_ncp_reply(tvbuff_t *, packet_info*, uint32_t, uint8_t,
132 uint16_t, proto_tree*, struct novell_tap*);
133
134void dissect_ping_req(tvbuff_t *, packet_info*, uint32_t, uint8_t,
135 uint16_t, proto_tree*);
136
137void dissect_nds_request(tvbuff_t*, packet_info*, uint32_t,
138 uint8_t, uint16_t, proto_tree*);
139
140void nds_defrag(tvbuff_t*, packet_info*, uint32_t,
141 uint8_t, uint16_t, proto_tree*, struct novell_tap*);
142
143extern int proto_ncp;
144extern int ett_ncp;
145extern int ett_nds;
146extern int ett_nds_segments;
147extern int ett_nds_segment;
148
149/*extern dissector_handle_t nds_data_handle;*/
150
151/*
152 * NCP packet types.
153 */
154#define NCP_ALLOCATE_SLOT 0x1111
155#define NCP_SERVICE_REQUEST 0x2222
156#define NCP_SERVICE_REPLY 0x3333
157#define NCP_WATCHDOG 0x3e3e
158#define NCP_DEALLOCATE_SLOT 0x5555
159#define NCP_BURST_MODE_XFER 0x7777
160#define NCP_POSITIVE_ACK 0x9999
161#define NCP_BROADCAST_SLOT 0xbbbb
162#define NCP_LIP_ECHO 0x4c69
163
164#endif
Definition packet-ncp-int.h:87
Definition packet_info.h:43
Definition proto.h:901
Definition packet-ncp-int.h:31
Definition packet-ncp-int.h:61
Definition value_string.h:25
Definition packet-ncp-int.h:67
Definition dfilter-int.h:35
Definition packet-ncp-int.h:79
Definition packet-ncp-int.h:25
Definition packet-ncp-int.h:45
Definition packet-ncp-int.h:105
Definition packet-ncp-int.h:72
Definition nstime.h:26
Definition proto.c:70
Definition tvbuff-int.h:35