/*
 * res_netsec.h -- Header file
 *
 * Copyright (C) 2005, Ranch Networks, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 *
 * Author : Srivatsa Chivukula <srivatsa@ranchnetworks.com>
 *
 */

extern int midcom_load_module(void);
extern void midcom_unload_module(void);

struct ast_sip_helper_cb {
  void (* const ast_rtp_get_peer_audio_helper)(void *p, struct sockaddr_in *them);
  void (* const ast_rtp_get_peer_video_helper)(void *p, struct sockaddr_in *them);
  void (* const ast_rtp_get_us_audio_helper)(void *p, struct sockaddr_in *sin);
  void (* const ast_rtp_get_us_video_helper)(void *p, struct sockaddr_in *vsin);
  void (* const ast_map_hook_struct)(void *p, void *r);
  void *(* const ast_get_hook_struct)(void *p);
  int (* const ast_get_flag_novideo)(void *p);
  int (* const ast_cmp_sa_addr)(void *p, struct sockaddr_in *addr);
  void (* const ast_get_recv_addr)(void *p, struct in_addr *addr);
  char *(* const ast_get_username)(void *p);
  struct ast_channel *(* const ast_channel_helper)(void *p);
  struct ast_channel *(* const ast_bridged_channel_helper)(void *p);
  int (*const ast_get_capability_helper)(void *p);
  void (* const ast_softhangup_helper)(void *p);
};

struct ast_sip_hook_cb {
  int (* const handle_request_invite_hook)(void *p);
  int (* const handle_response_invite_hook)(void *p);
  int (* const transmit_response_with_sdp_hook)(void *p);
  int (* const transmit_reinvite_with_sdp_hook)(void *p);
  int (* const __sip_destroy_hook)(void *p);
  void (* const ast_rtp_nat_us_audio_hook)(struct ast_rtp *rtp, void *r);
  void (* const ast_rtp_nat_us_video_hook)(struct ast_rtp *rtp, void *r);
  void (* const ast_get_redirip_audio_hook)(void *r, struct sockaddr_in *redirip);
  void (* const ast_get_vredirip_video_hook)(void *r, struct sockaddr_in *vredirip);
  void (* const ast_rtp_get_their_nat_audio_hook)(struct ast_rtp *rtp, void *r);
  void (* const ast_rtp_get_their_nat_video_hook)(struct ast_rtp *vrtp, void *r);
  void (* const ast_sip_helper_register)(struct ast_sip_helper_cb *cb);
  void (* const ast_sip_helper_unregister)(void);
};


