Mon Jun 27 16:51:18 2011

Asterisk developer's documentation


pktccops.h File Reference

PacketCable COPS. More...

#include "asterisk/optional_api.h"

Go to the source code of this file.

Data Structures

struct  cops_gate

Enumerations

enum  { GATE_SET, GATE_INFO, GATE_SET_HAVE_GATEID, GATE_DEL }
enum  {
  GATE_ALLOC_FAILED, GATE_ALLOC_PROGRESS, GATE_ALLOCATED, GATE_CLOSED,
  GATE_CLOSED_ERR, GATE_OPEN, GATE_DELETED, GATE_TIMEOUT
}

Functions

cops_gateast_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))


Detailed Description

PacketCable COPS.

Author:
Attila Domjan <attila.domjan.hu@gmail.com>

Definition in file pktccops.h.


Enumeration Type Documentation

anonymous enum

Enumerator:
GATE_SET 
GATE_INFO 
GATE_SET_HAVE_GATEID 
GATE_DEL 

Definition at line 35 of file pktccops.h.

00035      {
00036    GATE_SET,
00037    GATE_INFO,
00038    GATE_SET_HAVE_GATEID,
00039    GATE_DEL
00040 };

anonymous enum

Enumerator:
GATE_ALLOC_FAILED 
GATE_ALLOC_PROGRESS 
GATE_ALLOCATED 
GATE_CLOSED 
GATE_CLOSED_ERR 
GATE_OPEN 
GATE_DELETED 
GATE_TIMEOUT 

Definition at line 42 of file pktccops.h.

00042      {
00043    GATE_ALLOC_FAILED,
00044    GATE_ALLOC_PROGRESS,
00045    GATE_ALLOCATED,
00046    GATE_CLOSED,
00047    GATE_CLOSED_ERR,
00048    GATE_OPEN,
00049    GATE_DELETED,
00050    GATE_TIMEOUT
00051 };


Function Documentation

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(*)(struct cops_gate *gate)  got_dq_gi,
int(*)(struct cops_gate *gate)  gate_remove 
)

Definition at line 469 of file res_pktccops.c.

References ast_debug, ast_log(), cops_gate_cmd(), cops_gate::gate_remove, GATE_SET_HAVE_GATEID, cops_gate::gateid, cops_gate::got_dq_gi, LOG_WARNING, and pktcreload.

Referenced by mgcp_alloc_pktcgate(), and mgcp_hangup().

00474 {
00475    while (pktcreload) {
00476       sched_yield();
00477    }
00478 
00479    if (cmd == GATE_SET_HAVE_GATEID && gate) {
00480       ast_debug(3, "------- gate modify gateid 0x%x ssip: 0x%x\n", gate->gateid, ssip);
00481       /* TODO implement it */
00482       ast_log(LOG_WARNING, "Modify GateID not implemented\n");
00483    } 
00484    
00485    if ((gate = cops_gate_cmd(cmd, NULL, cops_trid++, mta, actcount, bitrate, psize, ssip, ssport, gate))) {
00486       ast_debug(3, "COPS: Allocating gate for mta: 0x%x\n", mta);
00487       gate->got_dq_gi = got_dq_gi;
00488       gate->gate_remove = gate_remove;
00489       return(gate);
00490    } else {
00491       ast_debug(3, "COPS: Couldn't allocate gate for mta: 0x%x\n", mta); 
00492       return NULL;
00493    }
00494 }


Generated on Mon Jun 27 16:51:18 2011 for Asterisk - The Open Source Telephony Project by  doxygen 1.4.7