Asterisk - The Open Source Telephony Project  18.5.0
pktccops.h
Go to the documentation of this file.
1 /*
2  * Asterisk -- An open source telephony toolkit.
3  *
4  * Copyright (C) 2009, Attila Domjan
5  *
6  * Attila Domjan <[email protected]>
7  *
8  * See http://www.asterisk.org for more information about
9  * the Asterisk project. Please do not directly contact
10  * any of the maintainers of this project for assistance;
11  * the project provides a web site, mailing lists and IRC
12  * channels for your use.
13  *
14  * This program is free software, distributed under the terms of
15  * the GNU General Public License Version 2. See the LICENSE file
16  * at the top of the source tree.
17  */
18 
19 /*! \file
20  *
21  * \brief PacketCable COPS
22  *
23  * \author Attila Domjan <[email protected]>
24  */
25 
26 #ifndef _ASTERISK_PKTCCOPS_H
27 #define _ASTERISK_PKTCCOPS_H
28 
29 #include "asterisk/optional_api.h"
30 
31 #if defined(__cplusplus) || defined(c_plusplus)
32 extern "C" {
33 #endif
34 
35 enum {
40 };
41 
42 enum {
51 };
52 
53 struct cops_gate {
55  uint32_t gateid;
56  uint16_t trid;
58  uint32_t mta;
59  int state;
60  time_t allocated;
61  time_t checked;
62  time_t deltimer;
63  struct cops_cmts *cmts;
64  int (* got_dq_gi) (struct cops_gate *gate);
65  int (* gate_remove) (struct cops_gate *gate);
66  int (* gate_open) (struct cops_gate *gate);
67  void *tech_pvt;
68 };
69 
70 
72  (int cmd, struct cops_gate *gate, uint32_t mta, uint32_t actcount,
73  float bitrate, uint32_t psize, uint32_t ssip, uint16_t ssport,
74  int (* const got_dq_gi) (struct cops_gate *gate),
75  int (* const gate_remove) (struct cops_gate *gate)),
76  { return NULL; });
77 
78 #if defined(__cplusplus) || defined(c_plusplus)
79 }
80 #endif
81 
82 #endif /* _ASTERISK_PKTCCOPS_H */
Optional API function macros.
int state
Definition: pktccops.h:59
struct cops_gate * ast_pktccops_gate_alloc(int cmd, struct cops_gate *gate, uint32_t mta, uint32_t actcount, float bitrate, uint32_t psize, uint32_t ssip, uint16_t ssport, int(*const got_dq_gi)(struct cops_gate *gate), int(*const gate_remove)(struct cops_gate *gate))
Definition: res_pktccops.c:468
time_t deltimer
Definition: pktccops.h:62
#define AST_OPTIONAL_API(result, name, proto, stub)
Declare an optional API function.
Definition: optional_api.h:230
time_t allocated
Definition: pktccops.h:60
#define NULL
Definition: resample.c:96
void * tech_pvt
Definition: pktccops.h:67
AST_LIST_ENTRY(cops_gate) list
time_t checked
Definition: pktccops.h:61
uint16_t trid
Definition: pktccops.h:56
time_t in_transaction
Definition: pktccops.h:57
uint32_t gateid
Definition: pktccops.h:55
int(* gate_open)(struct cops_gate *gate)
Definition: pktccops.h:66
int(* gate_remove)(struct cops_gate *gate)
Definition: pktccops.h:65
uint32_t mta
Definition: pktccops.h:58
int(* got_dq_gi)(struct cops_gate *gate)
Definition: pktccops.h:64
struct cops_cmts * cmts
Definition: pktccops.h:63