3 * $Id: packet-tcp.h,v 1.18 2003/09/12 05:52:38 sahlberg Exp $
5 * Ethereal - Network traffic analyzer
6 * By Gerald Combs <gerald@ethereal.com>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #ifndef __PACKET_TCP_H__
25 #define __PACKET_TCP_H__
38 /* the tcp header structure, passed to tap listeners */
42 gboolean th_have_seglen; /* TRUE if th_seglen is valid */
44 guint32 th_win; /* make it 32 bits so we can handle some scaling */
54 * Private data passed from the TCP dissector to subdissectors.
57 guint32 seq; /* Sequence number of first byte in the data */
58 gboolean is_reassembled; /* This is reassembled data. */
59 gboolean urgent; /* TRUE if "urgent_pointer" is valid */
60 guint16 urgent_pointer; /* Urgent pointer value for the current packet. */
64 * Loop for dissecting PDUs within a TCP stream; assumes that a PDU
65 * consists of a fixed-length chunk of data that contains enough information
66 * to determine the length of the PDU, followed by rest of the PDU.
68 * The first three arguments are the arguments passed to the dissector
69 * that calls this routine.
71 * "proto_desegment" is the dissector's flag controlling whether it should
72 * desegment PDUs that cross TCP segment boundaries.
74 * "fixed_len" is the length of the fixed-length part of the PDU.
76 * "get_pdu_len()" is a routine called to get the length of the PDU from
77 * the fixed-length part of the PDU; it's passed "tvb" and "offset".
79 * "dissect_pdu()" is the routine to dissect a PDU.
82 tcp_dissect_pdus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
83 gboolean proto_desegment, guint fixed_len,
84 guint (*get_pdu_len)(tvbuff_t *, int),
85 void (*dissect_pdu)(tvbuff_t *, packet_info *, proto_tree *));
87 extern void decode_tcp_ports(tvbuff_t *, int, packet_info *,
88 proto_tree *, int, int, guint32);