parser/parse_identity.h
bbb84f26
 /*
  * Copyright (c) 2007 iptelorg GmbH
  *
07ca8c05
  * This file is part of Kamailio, a free SIP server.
bbb84f26
  *
07ca8c05
  * Kamailio is free software; you can redistribute it and/or modify
bbb84f26
  * 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
  *
07ca8c05
  * Kamailio is distributed in the hope that it will be useful,
bbb84f26
  * 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
9e1ff448
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
bbb84f26
  */
 
1eb01c66
 /*! \file
  * \brief Parser :: Parse Identity header field
  *
  * \ingroup parser
  */
 
bbb84f26
 
 #ifndef PARSE_IDENTITY
 #define PARSE_IDENTITY
 
 #include "../str.h"
52553188
 #include "msg_parser.h"
bbb84f26
 
 struct identity_body{
1eb01c66
 	int error;  		/*!< Error code */
 	int ballocated;  	/*!< Does hash point to an allocated area */
bbb84f26
 	str hash;
 };
 
 
1eb01c66
 /*! \brief casting macro for accessing IDENTITY body */
bbb84f26
 #define get_identity(p_msg) ((struct identity_body*)(p_msg)->identity->parsed)
 
 
1eb01c66
 /*! \brief
bbb84f26
  * Parse Identity header field
  */
52553188
 void parse_identity(char *buf, char *end, struct identity_body *ib);
1eb01c66
 
 /*! \brief
  * Parse Identity header field
  */
52553188
 int parse_identity_header(struct sip_msg *msg);
bbb84f26
 
 
1eb01c66
 /*! \brief
bbb84f26
  * Free all associated memory
  */
 void free_identity(struct identity_body *ib);
 
 
 #endif