parse_allow.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2004 Juha Heinanen
00003  *
00004  * This file is part of ser, a free SIP server.
00005  *
00006  * ser is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version
00010  *
00011  * ser is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License 
00017  * along with this program; if not, write to the Free Software 
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00028 #ifndef PARSE_ALLOW_H
00029 #define PARSE_ALLOW_H
00030  
00031 #include "hf.h"
00032 #include "msg_parser.h"
00033 
00034  
00038 #define get_allow_methods(p_msg)                                                        \
00039         (((struct allow_body*)(p_msg)->allow->parsed)->allow_all)
00040 
00041 
00042 struct allow_body {
00043         unsigned int allow;     
00044         unsigned int allow_all; 
00047 };
00048 
00049 
00053 int parse_allow(struct sip_msg *msg);
00054 
00055 
00062 int parse_allow_header(struct hdr_field* _hf);
00063 
00064 
00068 void free_allow_body(struct allow_body **ab);
00069 
00070 void free_allow_header(struct hdr_field* hf);
00071 
00072 
00073 
00074 #endif /* PARSE_ALLOW_H */