Mon Oct 8 12:39:26 2012

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 470 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().

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


Generated on Mon Oct 8 12:39:26 2012 for Asterisk - The Open Source Telephony Project by  doxygen 1.4.7