00001 /* 00002 * Copyright (C) 2009 1&1 Internet AG 00003 * 00004 * This file is part of sip-router, a free SIP server. 00005 * 00006 * sip-router 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 * sip-router 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 00021 #ifndef _COMMON_H_ 00022 #define _COMMON_H_ 00023 00024 00025 00026 00027 #include <stdint.h> 00028 00029 00030 00031 00032 /* 00033 0 no carrier id defined. 00034 1..999 are regular carrier ids. 00035 1000 is used as fake carrier id when merging carriers we are not interested in. 00036 -1000..-1 used in dtm to indicate a carrier id and that no more nodes will follow (leaf node compression). 00037 -1001 used in dtm to mark a pointer to a child node as NULL. 00038 */ 00039 #define MIN_PDB_CARRIERID 1 00040 #define MAX_PDB_CARRIERID 999 00041 #define OTHER_CARRIERID 1000 00042 #define MAX_CARRIERID 1000 00043 #define NULL_CARRIERID -1001 00044 00045 #define IS_VALID_PDB_CARRIERID(id) ((id>=MIN_PDB_CARRIERID) && (id<=MAX_PDB_CARRIERID)) 00046 #define IS_VALID_CARRIERID(id) ((id>=MIN_PDB_CARRIERID) && (id<=MAX_CARRIERID)) 00047 00048 00049 00050 00051 typedef int16_t carrier_t; 00052 00053 00054 00055 00056 #endif
1.7.1