Changeset 220
- Timestamp:
- 08/22/05 21:28:12
- Files:
-
- openpgpsdk/trunk/examples/packet-dump.c (modified) (1 diff)
- openpgpsdk/trunk/include/packet-parse.h (modified) (1 diff)
- openpgpsdk/trunk/include/packet.h (modified) (1 diff)
- openpgpsdk/trunk/src/packet-parse.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openpgpsdk/trunk/examples/packet-dump.c
r211 r220 261 261 print_indent(); 262 262 printf("==== ptag new_format=%d content_tag=%d length_type=%d" 263 " length=0x%x (%d) \n",content->ptag.new_format,263 " length=0x%x (%d) position=0x%x (%d)\n",content->ptag.new_format, 264 264 content->ptag.content_tag,content->ptag.length_type, 265 content->ptag.length,content->ptag.length); 265 content->ptag.length,content->ptag.length, 266 content->ptag.position,content->ptag.position); 266 267 /* 267 268 print_tagname(ops_str_from_single_packet_tag(content->ptag.content_tag)); openpgpsdk/trunk/include/packet-parse.h
r209 r220 56 56 ops_packet_reader_t *reader; /*!< the reader function to use to get the data to be parsed */ 57 57 void *reader_arg; /*!< the args to pass to the reader function */ 58 // XXX: what do we do about offsets into compressed packets? 59 unsigned position; /*!< the offset from the beginning (with this reader) */ 58 60 59 61 unsigned accumulate:1; /*!< set to accumulate packet data */ openpgpsdk/trunk/include/packet.h
r211 r220 218 218 // unsigned length_read; /*!< How much bytes of this packet we have read so far - for internal use 219 219 // only. */ 220 unsigned position; /*!< The position (within the current reader) of the packet */ 220 221 } ops_ptag_t; 221 222 openpgpsdk/trunk/src/packet-parse.c
r219 r220 178 178 // we track length anyway, because it is used for packet offsets 179 179 opt->alength+=*plength; 180 // and also the position 181 opt->position+=*plength; 180 182 181 183 return ret; … … 1709 1711 ops_boolean_t indeterminate=ops_false; 1710 1712 1713 C.ptag.position=opt->position; 1714 1711 1715 ret=base_read(ptag,&one,0,opt); 1712 1716 if(ret == OPS_R_EOF)
