2006-08-26 09:16:38 +00:00
|
|
|
/* packet-image-png.c
|
|
|
|
*
|
|
|
|
* Routines for PNG (Portable Network Graphics) image file dissection
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright 2006 Ronnie Sahlberg
|
|
|
|
*
|
2007-01-02 14:11:35 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
2007-01-02 17:19:25 +00:00
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2006-08-26 09:16:38 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* 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
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2006-08-26 09:16:38 +00:00
|
|
|
*/
|
|
|
|
/* See http://www.w3.org/TR/PNG for specification
|
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2006-08-26 09:16:38 +00:00
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
#include <epan/packet.h>
|
|
|
|
|
|
|
|
|
|
|
|
static int proto_png = -1;
|
|
|
|
static int hf_png_signature = -1;
|
|
|
|
static int hf_png_chunk_data = -1;
|
|
|
|
static int hf_png_chunk_type = -1;
|
|
|
|
static int hf_png_chunk_len = -1;
|
|
|
|
static int hf_png_chunk_crc = -1;
|
|
|
|
static int hf_png_chunk_flag_anc = -1;
|
|
|
|
static int hf_png_chunk_flag_priv = -1;
|
|
|
|
static int hf_png_chunk_flag_stc = -1;
|
|
|
|
static int hf_png_ihdr_width = -1;
|
|
|
|
static int hf_png_ihdr_height = -1;
|
|
|
|
static int hf_png_ihdr_bitdepth = -1;
|
|
|
|
static int hf_png_ihdr_colour_type = -1;
|
|
|
|
static int hf_png_ihdr_compression_method = -1;
|
|
|
|
static int hf_png_ihdr_filter_method = -1;
|
|
|
|
static int hf_png_ihdr_interlace_method = -1;
|
2006-08-26 11:57:28 +00:00
|
|
|
static int hf_png_text_keyword = -1;
|
|
|
|
static int hf_png_text_string = -1;
|
|
|
|
static int hf_png_time_year = -1;
|
|
|
|
static int hf_png_time_month = -1;
|
|
|
|
static int hf_png_time_day = -1;
|
|
|
|
static int hf_png_time_hour = -1;
|
|
|
|
static int hf_png_time_minute = -1;
|
|
|
|
static int hf_png_time_second = -1;
|
2006-08-26 12:26:19 +00:00
|
|
|
static int hf_png_phys_horiz = -1;
|
|
|
|
static int hf_png_phys_vert = -1;
|
|
|
|
static int hf_png_phys_unit = -1;
|
|
|
|
static int hf_png_bkgd_palette_index = -1;
|
|
|
|
static int hf_png_bkgd_greyscale = -1;
|
|
|
|
static int hf_png_bkgd_red = -1;
|
|
|
|
static int hf_png_bkgd_green = -1;
|
|
|
|
static int hf_png_bkgd_blue = -1;
|
2006-08-26 09:16:38 +00:00
|
|
|
|
|
|
|
static gint ett_png = -1;
|
|
|
|
static gint ett_png_chunk = -1;
|
|
|
|
static gint ett_png_chunk_item = -1;
|
|
|
|
|
|
|
|
|
|
|
|
static const value_string colour_type_vals[] = {
|
|
|
|
{ 0, "Greyscale"},
|
|
|
|
{ 2, "Truecolour"},
|
|
|
|
{ 3, "Indexed-colour"},
|
|
|
|
{ 4, "Greyscale with alpha"},
|
2006-08-26 11:57:28 +00:00
|
|
|
{ 6, "Truecolour with alpha"},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
static const value_string compression_method_vals[] = {
|
|
|
|
{ 0, "Deflate"},
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
static const value_string filter_method_vals[] = {
|
|
|
|
{ 0, "Adaptive"},
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
static const value_string interlace_method_vals[] = {
|
|
|
|
{ 0, "No interlace"},
|
|
|
|
{ 1, "Adam7"},
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_png_ihdr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
|
|
|
|
{
|
|
|
|
int offset=0;
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_ihdr_width, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=4;
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_ihdr_height, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=4;
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_ihdr_bitdepth, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=1;
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_ihdr_colour_type, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=1;
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_ihdr_compression_method, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=1;
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_ihdr_filter_method, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=1;
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_ihdr_interlace_method, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=1;
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2006-08-26 11:57:28 +00:00
|
|
|
static void
|
|
|
|
dissect_png_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
|
|
|
|
{
|
|
|
|
int offset=1;
|
|
|
|
|
|
|
|
/* find the null that separates keyword and text string */
|
|
|
|
while(1){
|
|
|
|
if(!tvb_get_guint8(tvb, offset)){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
offset++;
|
|
|
|
}
|
|
|
|
|
2011-10-15 18:46:26 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_text_keyword, tvb, 0, offset, ENC_ASCII|ENC_NA);
|
2006-08-26 11:57:28 +00:00
|
|
|
offset++;
|
|
|
|
|
2011-10-15 18:46:26 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_text_string, tvb, offset, tvb_length_remaining(tvb, offset), ENC_ASCII|ENC_NA);
|
2006-08-26 11:57:28 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_png_time(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
|
|
|
|
{
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_time_year, tvb, 0, 2, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_png_time_month, tvb, 2, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_png_time_day, tvb, 3, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_png_time_hour, tvb, 4, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_png_time_minute, tvb, 5, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_png_time_second, tvb, 6, 1, ENC_BIG_ENDIAN);
|
2006-08-26 11:57:28 +00:00
|
|
|
}
|
2006-08-26 09:16:38 +00:00
|
|
|
|
2006-08-26 12:26:19 +00:00
|
|
|
static const value_string phys_unit_vals[] = {
|
|
|
|
{ 0, "Unit is unknown"},
|
|
|
|
{ 1, "Unit is METRE"},
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
static void
|
|
|
|
dissect_png_phys(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
|
|
|
|
{
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_phys_horiz, tvb, 0, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_png_phys_vert, tvb, 4, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_png_phys_unit, tvb, 8, 1, ENC_BIG_ENDIAN);
|
2006-08-26 12:26:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_png_bkgd(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
|
|
|
|
{
|
|
|
|
switch(tvb_reported_length(tvb)){
|
|
|
|
case 1: /* colour type 3 */
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_bkgd_palette_index, tvb, 0, 1, ENC_BIG_ENDIAN);
|
2006-08-26 12:26:19 +00:00
|
|
|
break;
|
|
|
|
case 2: /* colour type 0, 4 */
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_bkgd_greyscale, tvb, 0, 2, ENC_BIG_ENDIAN);
|
2006-08-26 12:26:19 +00:00
|
|
|
break;
|
|
|
|
case 6: /* colour type 2, 6 */
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_bkgd_red, tvb, 0, 2, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_png_bkgd_green, tvb, 2, 2, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(tree, hf_png_bkgd_blue, tvb, 4, 2, ENC_BIG_ENDIAN);
|
2006-08-26 12:26:19 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-08-26 09:16:38 +00:00
|
|
|
typedef struct _chunk_dissector_t {
|
|
|
|
guint32 type;
|
2008-06-25 09:12:35 +00:00
|
|
|
const char *name;
|
2006-08-26 09:16:38 +00:00
|
|
|
void (*dissector)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
|
|
|
} chunk_dissector_t;
|
|
|
|
|
|
|
|
static chunk_dissector_t chunk_table[] = {
|
|
|
|
{ 0x49484452, "Image Header", dissect_png_ihdr }, /* IHDR */
|
2006-08-26 12:26:19 +00:00
|
|
|
{ 0x624b4744, "Background colour", dissect_png_bkgd }, /* bKGD */
|
|
|
|
{ 0x70485973, "Physical pixel dimensions",
|
|
|
|
dissect_png_phys }, /* pHYs */
|
2006-08-26 11:57:28 +00:00
|
|
|
{ 0x74455874, "Textual data", dissect_png_text }, /* tEXt */
|
|
|
|
{ 0x74494d45, "Image last-modification time",
|
|
|
|
dissect_png_time }, /* tIME */
|
2006-08-26 09:16:38 +00:00
|
|
|
{ 0x49454e44, "Image Trailer", NULL }, /* IEND */
|
|
|
|
{ 0, NULL, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const true_false_string png_chunk_anc = {
|
|
|
|
"This is an ANCILLARY chunk",
|
|
|
|
"This is a CRITICAL chunk"
|
|
|
|
};
|
|
|
|
static const true_false_string png_chunk_priv = {
|
|
|
|
"This is a PRIVATE chunk",
|
|
|
|
"This is a PUBLIC chunk"
|
|
|
|
};
|
|
|
|
static const true_false_string png_chunk_stc = {
|
|
|
|
"This chunk is SAFE TO COPY",
|
|
|
|
"This chunk is NOT safe to copy"
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-03-24 02:49:05 +00:00
|
|
|
static gint
|
2012-09-10 21:40:21 +00:00
|
|
|
dissect_png(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
|
2006-08-26 09:16:38 +00:00
|
|
|
{
|
|
|
|
proto_tree *tree = NULL;
|
|
|
|
proto_item *ti;
|
|
|
|
int offset=0;
|
|
|
|
|
2011-03-24 02:49:05 +00:00
|
|
|
/* http://libpng.org/pub/png/spec/1.2/PNG-Structure.html#PNG-file-signature */
|
|
|
|
static const guint8 magic[8] = { 137, 80, 78, 71, 13, 10, 26, 10 };
|
|
|
|
if (tvb_length(tvb) < 20)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
if (tvb_memeql(tvb, 0, magic, sizeof(magic)) != 0)
|
|
|
|
return 0;
|
|
|
|
|
2009-09-24 20:21:23 +00:00
|
|
|
col_append_str(pinfo->cinfo, COL_INFO, " (PNG)");
|
2006-08-26 09:16:38 +00:00
|
|
|
|
|
|
|
if(parent_tree){
|
2011-10-21 02:10:19 +00:00
|
|
|
ti=proto_tree_add_item(parent_tree, proto_png, tvb, offset, -1, ENC_NA);
|
2006-08-26 09:16:38 +00:00
|
|
|
tree=proto_item_add_subtree(ti, ett_png);
|
|
|
|
}
|
|
|
|
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item(tree, hf_png_signature, tvb, offset, 8, ENC_NA);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=8;
|
|
|
|
|
|
|
|
while(tvb_reported_length_remaining(tvb, offset)){
|
|
|
|
proto_tree *chunk_tree=NULL;
|
|
|
|
proto_item *it=NULL;
|
|
|
|
guint32 len, type;
|
|
|
|
chunk_dissector_t *cd;
|
|
|
|
char str[5];
|
|
|
|
|
|
|
|
len=tvb_get_ntohl(tvb, offset);
|
|
|
|
type=tvb_get_ntohl(tvb, offset+4);
|
|
|
|
str[0]=tvb_get_guint8(tvb, offset+4);
|
|
|
|
str[1]=tvb_get_guint8(tvb, offset+5);
|
|
|
|
str[2]=tvb_get_guint8(tvb, offset+6);
|
|
|
|
str[3]=tvb_get_guint8(tvb, offset+7);
|
|
|
|
str[4]=0;
|
|
|
|
|
2006-08-28 02:06:28 +00:00
|
|
|
if(tree){
|
2006-08-26 09:16:38 +00:00
|
|
|
it=proto_tree_add_text(tree, tvb, offset, offset+8+len+4, "%s", str);
|
|
|
|
chunk_tree=proto_item_add_subtree(it, ett_png_chunk);
|
|
|
|
}
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(chunk_tree, hf_png_chunk_len, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=4;
|
|
|
|
|
2006-08-28 02:06:28 +00:00
|
|
|
|
2011-10-15 18:46:26 +00:00
|
|
|
it=proto_tree_add_item(chunk_tree, hf_png_chunk_type, tvb, offset, 4, ENC_ASCII|ENC_NA);
|
2011-10-10 00:39:31 +00:00
|
|
|
proto_tree_add_item(chunk_tree, hf_png_chunk_flag_anc, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(chunk_tree, hf_png_chunk_flag_priv, tvb, offset, 4, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(chunk_tree, hf_png_chunk_flag_stc, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=4;
|
|
|
|
|
2006-08-28 02:06:28 +00:00
|
|
|
if (len >= 1000000000)
|
|
|
|
THROW(ReportedBoundsError);
|
2006-08-26 09:16:38 +00:00
|
|
|
cd=&chunk_table[0];
|
|
|
|
while(1){
|
|
|
|
if(cd->type==0){
|
|
|
|
cd=NULL;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if(cd->type==type){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
cd++;
|
|
|
|
}
|
|
|
|
if(chunk_tree){
|
2008-12-17 17:23:37 +00:00
|
|
|
proto_item_append_text(chunk_tree, " %s", cd?cd->name:"(don't know how to dissect this)");
|
2006-08-26 09:16:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(!cd){
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item(chunk_tree, hf_png_chunk_data, tvb, offset, len, ENC_NA);
|
2006-08-26 09:16:38 +00:00
|
|
|
} else {
|
|
|
|
if(cd->dissector){
|
|
|
|
tvbuff_t *next_tvb;
|
|
|
|
proto_tree *cti=NULL;
|
|
|
|
|
|
|
|
next_tvb=tvb_new_subset(tvb, offset, MIN(tvb_length_remaining(tvb, offset), (int)len), len);
|
2006-08-28 02:06:28 +00:00
|
|
|
if(it){
|
2006-08-26 09:16:38 +00:00
|
|
|
cti=proto_item_add_subtree(it, ett_png_chunk_item);
|
|
|
|
}
|
|
|
|
cd->dissector(next_tvb, pinfo, cti);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
offset+=len;
|
|
|
|
|
2011-10-06 03:35:44 +00:00
|
|
|
proto_tree_add_item(chunk_tree, hf_png_chunk_crc, tvb, offset, 4, ENC_BIG_ENDIAN);
|
2006-08-26 09:16:38 +00:00
|
|
|
offset+=4;
|
|
|
|
}
|
2011-03-24 02:49:05 +00:00
|
|
|
return offset;
|
2006-08-26 09:16:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_register_png(void)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] =
|
|
|
|
{
|
|
|
|
{ &hf_png_signature, {
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
"PNG Signature", "png.signature", FT_BYTES, BASE_NONE,
|
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_chunk_type, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Chunk", "png.chunk.type", FT_STRING, BASE_NONE,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_chunk_data, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Data", "png.chunk.data", FT_NONE, BASE_NONE,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_chunk_len, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Len", "png.chunk.len", FT_UINT32, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_chunk_crc, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"CRC", "png.chunk.crc", FT_UINT32, BASE_HEX,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_chunk_flag_anc, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Ancillary", "png.chunk.flag.ancillary", FT_BOOLEAN, 32,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
TFS(&png_chunk_anc), 0x20000000, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_chunk_flag_priv, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Private", "png.chunk.flag.private", FT_BOOLEAN, 32,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
TFS(&png_chunk_priv), 0x00200000, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_chunk_flag_stc, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Safe To Copy", "png.chunk.flag.stc", FT_BOOLEAN, 32,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
TFS(&png_chunk_stc), 0x00000020, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_ihdr_width, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Width", "png.ihdr.width", FT_UINT32, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_ihdr_height, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Height", "png.ihdr.height", FT_UINT32, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_ihdr_bitdepth, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Bit Depth", "png.ihdr.bitdepth", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_ihdr_colour_type, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Colour Type", "png.ihdr.colour_type", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
VALS(colour_type_vals), 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_ihdr_compression_method, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Compression Method", "png.ihdr.compression_method", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
VALS(compression_method_vals), 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_ihdr_filter_method, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Filter Method", "png.ihdr.filter_method", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
VALS(filter_method_vals), 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
{ &hf_png_ihdr_interlace_method, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Interlace Method", "png.ihdr.interlace_method", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
VALS(interlace_method_vals), 0, NULL, HFILL }},
|
2006-08-26 11:57:28 +00:00
|
|
|
{ &hf_png_text_keyword, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Keyword", "png.text.keyword", FT_STRING, BASE_NONE,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 11:57:28 +00:00
|
|
|
{ &hf_png_text_string, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"String", "png.text.string", FT_STRING, BASE_NONE,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 11:57:28 +00:00
|
|
|
{ &hf_png_time_year, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Year", "png.time.year", FT_UINT16, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 11:57:28 +00:00
|
|
|
{ &hf_png_time_month, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Month", "png.time.month", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 11:57:28 +00:00
|
|
|
{ &hf_png_time_day, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Day", "png.time.day", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 11:57:28 +00:00
|
|
|
{ &hf_png_time_hour, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Hour", "png.time.hour", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 11:57:28 +00:00
|
|
|
{ &hf_png_time_minute, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Minute", "png.time.minute", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 11:57:28 +00:00
|
|
|
{ &hf_png_time_second, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Second", "png.time.second", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 12:26:19 +00:00
|
|
|
{ &hf_png_phys_horiz, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Horizontal pixels per unit", "png.phys.horiz", FT_UINT32, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 12:26:19 +00:00
|
|
|
{ &hf_png_phys_vert, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Vertical pixels per unit", "png.phys.vert", FT_UINT32, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 12:26:19 +00:00
|
|
|
{ &hf_png_phys_unit, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Unit", "png.phys.unit", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
VALS(phys_unit_vals), 0, NULL, HFILL }},
|
2006-08-26 12:26:19 +00:00
|
|
|
{ &hf_png_bkgd_palette_index, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Palette Index", "png.bkgd.palette_index", FT_UINT8, BASE_DEC,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 12:26:19 +00:00
|
|
|
{ &hf_png_bkgd_greyscale, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Greyscale", "png.bkgd.greyscale", FT_UINT16, BASE_HEX,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 12:26:19 +00:00
|
|
|
{ &hf_png_bkgd_red, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Red", "png.bkgd.red", FT_UINT16, BASE_HEX,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 12:26:19 +00:00
|
|
|
{ &hf_png_bkgd_green, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Green", "png.bkgd.green", FT_UINT16, BASE_HEX,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 12:26:19 +00:00
|
|
|
{ &hf_png_bkgd_blue, {
|
2006-08-28 02:06:28 +00:00
|
|
|
"Blue", "png.bkgd.blue", FT_UINT16, BASE_HEX,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
NULL, 0, NULL, HFILL }},
|
2006-08-26 09:16:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static gint *ett[] =
|
|
|
|
{
|
|
|
|
&ett_png,
|
|
|
|
&ett_png_chunk,
|
|
|
|
&ett_png_chunk_item,
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
proto_png = proto_register_protocol("Portable Network Graphics","PNG","png");
|
|
|
|
proto_register_field_array(proto_png, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2011-05-04 19:42:51 +00:00
|
|
|
new_register_dissector("png", dissect_png, proto_png);
|
2006-08-26 09:16:38 +00:00
|
|
|
}
|
|
|
|
|
2012-09-10 21:40:21 +00:00
|
|
|
static gboolean dissect_png_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
2011-03-22 16:43:16 +00:00
|
|
|
{
|
2012-09-10 21:40:21 +00:00
|
|
|
return dissect_png(tvb, pinfo, tree, NULL) > 0;
|
2011-03-22 16:43:16 +00:00
|
|
|
}
|
|
|
|
|
2006-08-26 09:16:38 +00:00
|
|
|
void
|
|
|
|
proto_reg_handoff_png(void)
|
|
|
|
{
|
2011-03-24 02:49:05 +00:00
|
|
|
dissector_handle_t png_handle = new_create_dissector_handle(dissect_png, proto_png);
|
2006-08-26 09:16:38 +00:00
|
|
|
dissector_add_string("media_type", "image/png", png_handle);
|
2011-03-22 16:43:16 +00:00
|
|
|
heur_dissector_add("http", dissect_png_heur, proto_png);
|
2006-08-26 09:16:38 +00:00
|
|
|
}
|