packet-parse.h File Reference

Parser for OpenPGP packets - headers. More...

#include "types.h"
#include "packet.h"
#include "lists.h"

Go to the source code of this file.

Data Structures

struct  ops_region
 ops_region_t More...

Typedefs

typedef ops_region ops_region_t
 ops_region_t
typedef ops_parse_cb_info ops_parse_cb_info_t
typedef ops_parse_cb_return_t ops_parse_cb_t (const ops_parser_content_t *content, ops_parse_cb_info_t *cbinfo)
typedef ops_parse_info ops_parse_info_t
typedef ops_reader_info ops_reader_info_t
typedef ops_crypt_info ops_crypt_info_t
typedef int ops_reader_t (void *dest, size_t length, ops_error_t **errors, ops_reader_info_t *rinfo, ops_parse_cb_info_t *cbinfo)
typedef void ops_reader_destroyer_t (ops_reader_info_t *rinfo)

Enumerations

enum  ops_parse_cb_return_t { OPS_RELEASE_MEMORY, OPS_KEEP_MEMORY, OPS_FINISHED }
 ops_parse_callback_return_t

Functions

void ops_init_subregion (ops_region_t *subregion, ops_region_t *region)
ops_parse_info_tops_parse_info_new (void)
 Creates a new zero-ed ops_parse_info_t struct.
void ops_parse_info_delete (ops_parse_info_t *pinfo)
 Free ops_parse_info_t struct and its contents.
ops_error_tops_parse_info_get_errors (ops_parse_info_t *pinfo)
 Returns the parse_info's errors.
ops_crypt_tops_parse_get_decrypt (ops_parse_info_t *pinfo)
void ops_parse_cb_set (ops_parse_info_t *pinfo, ops_parse_cb_t *cb, void *arg)
 Sets the parse_info's callback This is used when adding the first callback in a stack of callbacks.
void ops_parse_cb_push (ops_parse_info_t *pinfo, ops_parse_cb_t *cb, void *arg)
 Adds a further callback to a stack of callbacks.
void * ops_parse_cb_get_arg (ops_parse_cb_info_t *cbinfo)
 Returns callback's arg.
void * ops_parse_cb_get_errors (ops_parse_cb_info_t *cbinfo)
 Returns callback's errors.
void ops_reader_set (ops_parse_info_t *pinfo, ops_reader_t *reader, ops_reader_destroyer_t *destroyer, void *arg)
 Starts reader stack.
void ops_reader_push (ops_parse_info_t *pinfo, ops_reader_t *reader, ops_reader_destroyer_t *destroyer, void *arg)
 Adds to reader stack.
void ops_reader_pop (ops_parse_info_t *pinfo)
 Removes from reader stack.
void * ops_reader_get_arg_from_pinfo (ops_parse_info_t *pinfo)
 Gets reader's arg from parse_info.
void * ops_reader_get_arg (ops_reader_info_t *rinfo)
 Gets arg from reader.
ops_parse_cb_return_t ops_parse_cb (const ops_parser_content_t *content, ops_parse_cb_info_t *cbinfo)
 Calls the parse_cb_info's callback if present.
ops_parse_cb_return_t ops_parse_stacked_cb (const ops_parser_content_t *content, ops_parse_cb_info_t *cbinfo)
 Calls the next callback in the stack.
ops_reader_info_tops_parse_get_rinfo (ops_parse_info_t *pinfo)
 Returns the parse_info's reader_info.
int ops_parse (ops_parse_info_t *parse_info)
 Parse packets from an input stream until EOF or error.
int ops_parse_and_print_errors (ops_parse_info_t *parse_info)
 Parse packets and print any errors.
int ops_parse_and_save_errs (ops_parse_info_t *parse_info, ops_ulong_list_t *errs)
int ops_parse_errs (ops_parse_info_t *parse_info, ops_ulong_list_t *errs)
void ops_parse_and_validate (ops_parse_info_t *parse_info)
void ops_parse_options (ops_parse_info_t *pinfo, ops_content_tag_t tag, ops_parse_type_t type)
 Specifies whether one or more signature subpacket types should be returned parsed; or raw; or ignored.
ops_boolean_t ops_limited_read (unsigned char *dest, size_t length, ops_region_t *region, ops_error_t **errors, ops_reader_info_t *rinfo, ops_parse_cb_info_t *cbinfo)
 Read bytes from a region within the packet.
ops_boolean_t ops_stacked_limited_read (void *dest, unsigned length, ops_region_t *region, ops_error_t **errors, ops_reader_info_t *rinfo, ops_parse_cb_info_t *cbinfo)
 Call ops_limited_read on next in stack.
void ops_parse_hash_init (ops_parse_info_t *pinfo, ops_hash_algorithm_t type, const unsigned char *keyid)
void ops_parse_hash_data (ops_parse_info_t *pinfo, const void *data, size_t length)
void ops_parse_hash_finish (ops_parse_info_t *pinfo)
ops_hash_tops_parse_hash_find (ops_parse_info_t *pinfo, const unsigned char keyid[OPS_KEY_ID_SIZE])

Variables

ops_reader_t ops_stacked_read


Detailed Description

Parser for OpenPGP packets - headers.


Generated on Mon May 20 00:00:02 2013 for OpenPGP:SDK by  doxygen 1.4.6