/*
	**
	** packet-parse.h
	**
	** Routines to extract data from network packets
	**
	** Copyright 1998 Damien Miller <dmiller@ilogic.com.au>
	**
	** This software is licensed under the terms of the GNU General 
	** Public License (GPL). Please see the file COPYING for details.
	** 
	** $Id: packet-parse.h,v 1.4 1998/11/29 08:53:38 dmiller Exp $
	**
 */

#ifndef _PACKET_PARSE_H
#define _PACKET_PARSE_H

typedef struct 
{
	int total_length;
	int header_length;
	int is_fragment;
	int is_connection_request;
	int protocol;
	unsigned long int src_addr;
	unsigned long int dest_addr;
	unsigned int src_port;
	unsigned int dest_port;
} pinfo_t;

/* Parse a packet, filling structure pinfo */
/* Returns 1 on success, 0 on error */
int parse_packet(int link_type, const unsigned char *pkt, 
                 unsigned int len, pinfo_t *pinfo);

/* Returns a string describing the last error to occur */
/* The error string is cleared at each call to parse_packet() */
const char *parse_error(void);

/* Return RCS version */
const char *pp_version(void);

#endif
