* Craig Newell <CraigN@cheque.uq.edu.au>
* RFC2347 TFTP Option Extension
*
- * $Id: packet-tftp.c,v 1.37 2002/05/24 22:50:55 guy Exp $
+ * $Id$
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
* Copied from packet-bootp.c
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# include "config.h"
#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
#include <glib.h>
#include <epan/packet.h>
#include <epan/conversation.h>
{ 5, "Unknown transfer ID" },
{ 6, "File already exists" },
{ 7, "No such user" },
+ { 8, "Option negotiation failed" },
{ 0, NULL }
};
guint16 opcode;
guint16 bytes;
guint16 blocknum;
- u_int i1;
+ guint i1;
guint16 error;
/*
offset, 2, opcode);
}
offset += 2;
-
+
switch (opcode) {
case TFTP_RRQ:
(bytes < 512)?" (last)":"" );
}
- if (tree) {
- proto_tree_add_text(tftp_tree, tvb, offset, -1,
+ if (bytes != 0) {
+ if (tree) {
+ proto_tree_add_text(tftp_tree, tvb, offset, -1,
"Data (%d bytes)", bytes);
+ }
}
break;