/*
** pat_16.h for  in 
** 
** Made by 
** Login   <vianney@epita.fr>
** 
** Started on  Wed Sep  1 06:50:54 1999 
** Last update Thu Oct 28 20:21:41 1999 
*/
#ifndef PAT_16_H
#define PAT_16_H	1

#include "pat.h"

#define UNSAFE_NTOHS	ntohs
#define UNSAFE_HTONS	htons

extern t_pat		ns16_pat;
extern t_pat		nu16_pat;
extern t_pat		u16_pat;
extern t_pat		s16_pat;
extern t_pat		nu16assoc_pat;
extern t_pat		nu16bitfield_pat;
extern t_pat		u16bitfield_pat;
extern t_pat		nu16bitfieldassoc_pat;

/* PROTO pat_16.c */
/* pat_16.c */
t_u16 safe_ntohs P((t_u16 *p_nu16));
void safe_htons P((int a_u16, t_u16 *p_nu16));
t_status sixteen_pat_off P((void *data, char *buf, int len, t_off *off_return));
t_status ns16_pat_name P((void *data, t_id *optional_id, char *str, int max_len));
t_status ns16_pat_extract P((void *data, char *buf, int len, char *str, int max_len));
t_status ns16_pat_insert P((void *data, char *buf, int len, char *value));
t_status nu16_pat_name P((void *data, t_id *optional_id, char *str, int max_len));
t_status nu16_pat_extract P((void *data, char *buf, int len, char *str, int max_len));
t_status nu16_pat_insert P((void *data, char *buf, int len, char *value));
t_status nu16_pat_get_field P((void *data, t_id *optional_id, char *buf, int len, char *field, char *str, int max_len));
t_status nu16_pat_set_field P((void *data, t_id *optional_id, char *buf, int len, char *field, char *value));
t_status nu16_pat_get_fields P((void *data, t_vec *vec_str));
t_status nu16_pat_get_tmpl P((void *data, t_id *id, char *buf, int len, char *str, int max_len));
t_status nu16_pat_get_field_pat P((void *data, t_id *optional_id, char *buf, int len, char *field, t_pat **pat_return, void **data_return));
t_status nu16_pat_sub P((void *data, t_id *optional_id, char *buf, int len, t_pat **pat_return));
t_status u16_pat_name P((void *data, t_id *optional_id, char *str, int max_len));
t_status u16_pat_extract P((void *data, char *buf, int len, char *str, int max_len));
t_status u16_pat_insert P((void *data, char *buf, int len, char *value));
t_status s16_pat_name P((void *data, t_id *optional_id, char *str, int max_len));
t_status s16_pat_extract P((void *data, char *buf, int len, char *str, int max_len));
t_status s16_pat_insert P((void *data, char *buf, int len, char *value));
t_status nu16assoc_pat_name P((void *data, t_id *optional_id, char *str, int max_len));
t_status nu16assoc_pat_extract P((void *data, char *buf, int len, char *str, int max_len));
t_status nu16assoc_pat_insert P((void *data, char *buf, int len, char *value));
t_status nu16assoc_pat_get_choices P((void *data, char *buf, int len, t_vec *vec_str, t_boolean *do_sort_return));
t_status nu16bitfield_pat_name P((void *data, t_id *optional_id, char *str, int max_len));
t_status nu16bitfield_pat_extract P((void *data, char *buf, int len, char *str, int max_len));
t_status nu16bitfield_pat_insert P((void *data, char *buf, int len, char *value));
t_status nu16bitfield_pat_get_field P((void *data, t_id *optional_id, char *buf, int len, char *field, char *str, int max_len));
t_status nu16bitfield_pat_set_field P((void *data, t_id *optional_id, char *buf, int len, char *field, char *value));
t_status nu16bitfield_pat_get_fields P((void *data, t_vec *vec_str));
t_status nu16bitfield_pat_get_tmpl P((void *data, t_id *id, char *buf, int len, char *str, int max_len));
t_status nu16bitfield_pat_get_field_pat P((void *data, t_id *optional_id, char *buf, int len, char *field, t_pat **pat_return, void **data_return));
t_status nu16bitfield_pat_sub P((void *data, t_id *optional_id, char *buf, int len, t_pat **pat_return));
t_status u16bitfield_pat_name P((void *data, t_id *optional_id, char *str, int max_len));
t_status u16bitfield_pat_extract P((void *data, char *buf, int len, char *str, int max_len));
t_status u16bitfield_pat_insert P((void *data, char *buf, int len, char *value));
t_status u16bitfield_pat_get_field P((void *data, t_id *optional_id, char *buf, int len, char *field, char *str, int max_len));
t_status u16bitfield_pat_set_field P((void *data, t_id *optional_id, char *buf, int len, char *field, char *value));
t_status u16bitfield_pat_get_fields P((void *data, t_vec *vec_str));
t_status u16bitfield_pat_get_tmpl P((void *data, t_id *id, char *buf, int len, char *str, int max_len));
t_status u16bitfield_pat_get_field_pat P((void *data, t_id *optional_id, char *buf, int len, char *field, t_pat **pat_return, void **data_return));
t_status u16bitfield_pat_sub P((void *data, t_id *optional_id, char *buf, int len, t_pat **pat_return));
t_status nu16bitfieldassoc_pat_name P((void *data, t_id *optional_id, char *str, int max_len));
t_status nu16bitfieldassoc_pat_extract P((void *data, char *buf, int len, char *str, int max_len));
t_status nu16bitfieldassoc_pat_insert P((void *data, char *buf, int len, char *value));
t_status nu16bitfieldassoc_pat_get_choices P((void *data, char *buf, int len, t_vec *vec_str, t_boolean *do_sort_return));
#endif
