parser/parse_allow.h
6def693e
 /*
  * $Id$
  *
  * Copyright (c) 2004 Juha Heinanen
  *
  * This file is part of ser, a free SIP server.
  *
  * ser 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
  *
  * ser 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 
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
7b7456b0
 
 /*! \file
  * \brief Parser :: Allow header
  *
  * \ingroup parser
  */
 
6def693e
  
 #ifndef PARSE_ALLOW_H
 #define PARSE_ALLOW_H
  
 #include "hf.h"
0d54a775
 #include "msg_parser.h"
6def693e
 
  
7b7456b0
 /*! \brief
0d54a775
  * casting macro for accessing Allow body 
6def693e
  */
0d54a775
 #define get_allow_methods(p_msg)							\
 	(((struct allow_body*)(p_msg)->allow->parsed)->allow_all)
 
 
 struct allow_body {
7b7456b0
 	unsigned int allow;     /*!< allow mask for the current hdr */
 	unsigned int allow_all; /*!< allow mask for the all allow hdr - it's
0d54a775
 							 * set only for the first hdr in sibling
 							 * list*/
 };
 
 
7b7456b0
 /*! \brief
0d54a775
  * Parse all Allow HFs
  */
 int parse_allow(struct sip_msg *msg);
6def693e
 
 
7b7456b0
 /*! \brief
6def693e
  * Parse Allow HF body
  */
0d54a775
 int parse_allow_header(struct hdr_field* _h);
6def693e
 
 
7b7456b0
 /*! \brief
6def693e
  * Release memory
  */
0d54a775
 void free_allow_body(struct allow_body **ab);
 
 void free_allow_header(struct hdr_field* hf);
 
 
6def693e
 
 #endif /* PARSE_ALLOW_H */