Show
Ignore:
Timestamp:
02/26/10 13:37:05 (7 months ago)
Author:
Holger Hans Peter Freyther <zecke@selfish.org>
Parents:
a820c5f89d0ea3a7aefd1621d9bf1c9c5a25e8eb
Children:
ef6bb25aa5b7dcb4a10469c6a39ace3534c08376
git-committer:
Holger Hans Peter Freyther <zecke@selfish.org> / 2010-02-26T13:37:05Z+0100
Message:

[mgcp] Introduce a policy CB for the MGCP protocol

The are three policies. Accept, Reject and Defer. This will
allow to handle network connections and such from the policy
callback instead of directly acting on it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • openbsc/include/openbsc/mgcp.h

    r154b955 rfe86d3c  
    6666#define MGCP_ENDP_MDCX 3 
    6767 
     68/* 
     69 * what to do with the msg? 
     70 *      - continue as usual? 
     71 *      - reject and send a failure code? 
     72 *      - defer? do not send anything 
     73 */ 
     74#define MGCP_POLICY_CONT        4 
     75#define MGCP_POLICY_REJECT      5 
     76#define MGCP_POLICY_DEFER       6 
     77 
    6878typedef int (*mgcp_change)(struct mgcp_config *cfg, int endpoint, int state, int local_rtp); 
     79typedef int (*mgcp_policy)(struct mgcp_config *cfg, int endpoint, int state, const char *transactio_id); 
    6980 
    7081struct mgcp_config { 
     
    8697 
    8798        mgcp_change change_cb; 
     99        mgcp_policy policy_cb; 
     100        void *data; 
    88101 
    89102        struct mgcp_endpoint *endpoints;