亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? packet-mgcp.c

?? ethereal公司開發的aodv路由協議代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* packet-mgcp.c * Routines for mgcp packet disassembly * RFC 2705 * * $Id: packet-mgcp.c,v 1.31 2002/01/21 07:37:49 guy Exp $ *  * Copyright (c) 2000 by Ed Warnicke <hagbard@physics.rutgers.edu> * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> * Copyright 1999 Gerald Combs * * 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; either version 2 * of the License, or (at your option) any later version. * * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */#ifdef HAVE_CONFIG_H#include "config.h"#endif#include "plugins/plugin_api.h"#include "moduleinfo.h"#ifdef HAVE_SYS_TYPES_H# include <sys/types.h>#endif#ifdef HAVE_NETINET_IN_H#include <netinet/in.h>#endif#include <stdio.h>#include <stdlib.h>#include <gmodule.h>#include <ctype.h>#include <time.h>#include <string.h>#include <epan/packet.h>#include <epan/resolv.h>#include "prefs.h"#include <epan/strutil.h>#include "plugins/plugin_api_defs.h"#ifndef __ETHEREAL_STATIC__G_MODULE_EXPORT const gchar version[] = VERSION;#endif#define TCP_PORT_MGCP_GATEWAY 2427#define UDP_PORT_MGCP_GATEWAY 2427#define TCP_PORT_MGCP_CALLAGENT 2727#define UDP_PORT_MGCP_CALLAGENT 2727void proto_reg_handoff_mgcp(void);/* Define the mgcp proto */static int proto_mgcp = -1;/* Define many many headers for mgcp */static int hf_mgcp_req = -1;static int hf_mgcp_req_verb = -1;static int hf_mgcp_req_endpoint = -1;static int hf_mgcp_rsp = -1;static int hf_mgcp_transid = -1;static int hf_mgcp_version = -1;static int hf_mgcp_rsp_rspcode = -1;static int hf_mgcp_rsp_rspstring = -1;static int hf_mgcp_param_rspack = -1;static int hf_mgcp_param_bearerinfo = -1;static int hf_mgcp_param_callid = -1;static int hf_mgcp_param_connectionid = -1;static int hf_mgcp_param_secondconnectionid = -1;static int hf_mgcp_param_notifiedentity = -1;static int hf_mgcp_param_requestid = -1;static int hf_mgcp_param_localconnoptions = -1;static int hf_mgcp_param_connectionmode = -1;static int hf_mgcp_param_reqevents = -1;static int hf_mgcp_param_restartmethod = -1;static int hf_mgcp_param_restartdelay = -1;static int hf_mgcp_param_signalreq  = -1;static int hf_mgcp_param_digitmap = -1;static int hf_mgcp_param_observedevent = -1;static int hf_mgcp_param_connectionparam = -1;static int hf_mgcp_param_reasoncode = -1;static int hf_mgcp_param_eventstates = -1;static int hf_mgcp_param_specificendpoint = -1;static int hf_mgcp_param_secondendpointid = -1;static int hf_mgcp_param_reqinfo = -1;static int hf_mgcp_param_quarantinehandling = -1;static int hf_mgcp_param_detectedevents = -1;static int hf_mgcp_param_capabilities = -1;static int hf_mgcp_param_extention = -1;static int hf_mgcp_param_invalid = -1;static int hf_mgcp_messagecount = -1;/*  * Define the trees for mgcp * We need one for MGCP itself and one for the MGCP paramters */static int ett_mgcp = -1;static int ett_mgcp_param = -1;/*  * Here are the global variables associated with   * the various user definable characteristics of the dissection * * MGCP has two kinds of "agents", gateways and callagents.  Callagents * control gateways in a master/slave sort of arrangement.  Since gateways * and callagents have different well known ports and could both  * operate under either udp or tcp we have rather a lot of port info to  * specify. * * global_mgcp_raw_text determines whether we are going to display * the raw text of the mgcp message, much like the HTTP dissector does. * * global_mgcp_dissect_tree determines whether we are going to display * a detailed tree that expresses a somewhat more semantically meaningful * decode. */static int global_mgcp_gateway_tcp_port = TCP_PORT_MGCP_GATEWAY;static int global_mgcp_gateway_udp_port = UDP_PORT_MGCP_GATEWAY;static int global_mgcp_callagent_tcp_port = TCP_PORT_MGCP_CALLAGENT;static int global_mgcp_callagent_udp_port = UDP_PORT_MGCP_CALLAGENT;static gboolean global_mgcp_raw_text = FALSE;static gboolean global_mgcp_dissect_tree = TRUE;static gboolean global_mgcp_message_count = FALSE;/* * Variables to allow for proper deletion of dissector registration when  * the user changes port from the gui.  */static int gateway_tcp_port = 0;static int gateway_udp_port = 0;static int callagent_tcp_port = 0;static int callagent_udp_port = 0;/* A simple MGCP type that is occasionally handy */typedef enum _mgcp_type {  MGCP_REQUEST,  MGCP_RESPONSE,  MGCP_OTHERS} mgcp_type_t;/* Some basic utility functions that are specific to this dissector */static gboolean is_mgcp_verb(tvbuff_t *tvb, gint offset, gint maxlength);  static gboolean is_mgcp_rspcode(tvbuff_t *tvb, gint offset, gint maxlength);static gint tvb_parse_param(tvbuff_t *tvb, gint offset, gint maxlength, 			    int** hf);/*  * The various functions that either dissect some  * subpart of MGCP.  These aren't really proto dissectors but they  * are written in the same style. */ static void dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, 				 proto_tree *tree,proto_tree *mgcp_tree, proto_tree *ti);static void dissect_mgcp_firstline(tvbuff_t *tvb, 				   packet_info* pinfo, 				   proto_tree *tree);static void dissect_mgcp_params(tvbuff_t *tvb,  				packet_info* pinfo,				proto_tree *tree);static void mgcp_raw_text_add(tvbuff_t *tvb, packet_info *pinfo, 			      proto_tree *tree);/*  * Some functions which should be moved to a library  * as I think that people may find them of general usefulness.  */static gint tvb_skip_wsp(tvbuff_t* tvb, gint offset, gint maxlength);static gint tvb_find_null_line(tvbuff_t* tvb, gint offset, gint len,			       gint* next_offset); static gint tvb_find_dot_line(tvbuff_t* tvb, gint offset, 			      gint len, gint* next_offset);static gboolean is_rfc2234_alpha(guint8 c);static dissector_handle_t sdp_handle;/* * dissect_mgcp - The dissector for the Media Gateway Control Protocol */static voiddissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree){  gint sectionlen;  guint32 num_messages;  gint tvb_sectionend,tvb_sectionbegin, tvb_len, tvb_current_len;  proto_tree *mgcp_tree, *ti;  /* Initialize variables */  tvb_sectionend = 0;  tvb_sectionbegin = tvb_sectionend;  sectionlen = 0;  tvb_len = tvb_length(tvb);  tvb_current_len  = tvb_len;  num_messages = 0;  mgcp_tree = NULL;  ti = NULL;    /*   * Set the columns now, so that they'll be set correctly if we throw   * an exception.  We can set them later as well....   */  if (check_col(pinfo->cinfo, COL_PROTOCOL))    col_add_str(pinfo->cinfo, COL_PROTOCOL, "MGCP");  if (check_col(pinfo->cinfo, COL_INFO))    col_clear(pinfo->cinfo, COL_INFO);  /*    * Check to see whether we're really dealing with MGCP by looking    * for a valid MGCP verb or response code.  This isn't infallible,   * but its cheap and its better than nothing.   */  if(is_mgcp_verb(tvb,0,tvb_len) || is_mgcp_rspcode(tvb,0,tvb_len)){    /* Build the info tree if we've been given a root */    if (tree || global_mgcp_message_count == TRUE) {         /*        * Loop through however many mgcp messages may be stuck in        * this packet using piggybacking       */      do{	num_messages++;	if(tree){	  /* Create out mgcp subtree */	  ti = proto_tree_add_item(tree,proto_mgcp,tvb,0,0, FALSE);	  mgcp_tree = proto_item_add_subtree(ti, ett_mgcp);	}	sectionlen = tvb_find_dot_line(tvb, tvb_sectionbegin, -1,				       &tvb_sectionend);	if( sectionlen != -1){	  dissect_mgcp_message(tvb_new_subset(tvb, tvb_sectionbegin, 					      sectionlen, -1),			       pinfo, tree, mgcp_tree,ti);	  tvb_sectionbegin = tvb_sectionend;	}	else {	  break;	}      } while(tvb_sectionend < tvb_len );      if(mgcp_tree){	proto_tree_add_uint_hidden(mgcp_tree, hf_mgcp_messagecount, tvb, 				   0 ,0 , num_messages);       }    }     /*      * Add our column information we do this after dissecting SDP      * in order to prevent the column info changing to reflect the SDP.     */    tvb_sectionbegin = 0;    if (check_col(pinfo->cinfo, COL_PROTOCOL)){      if( global_mgcp_message_count == TRUE ){	if(num_messages > 1){	  col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "MGCP (%i messages)",num_messages);	}	else {	  col_add_fstr(pinfo->cinfo, COL_PROTOCOL, "MGCP (%i message)",num_messages);	}      }      else {	  col_add_str(pinfo->cinfo, COL_PROTOCOL, "MGCP");      }    }	    if (check_col(pinfo->cinfo, COL_INFO) ){      sectionlen = tvb_find_line_end(tvb, tvb_sectionbegin,-1,				     &tvb_sectionend);      col_add_fstr(pinfo->cinfo, COL_INFO, "%s", 		   tvb_format_text(tvb,tvb_sectionbegin,sectionlen));    }   }  }static void dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, 		     proto_tree *mgcp_tree, proto_tree *ti){  /* Declare variables */  gint sectionlen;  gint tvb_sectionend,tvb_sectionbegin, tvb_len, tvb_current_len;  tvbuff_t *next_tvb;  /* Initialize variables */  tvb_sectionend = 0;  tvb_sectionbegin = tvb_sectionend;  sectionlen = 0;  tvb_len = tvb_length(tvb);  tvb_current_len  = tvb_len;  /*    * Check to see whether we're really dealing with MGCP by looking    * for a valid MGCP verb or response code.  This isn't infallible,   * but its cheap and its better than nothing.   */  if(is_mgcp_verb(tvb,0,tvb_len) || is_mgcp_rspcode(tvb,0,tvb_len)){        /* Build the info tree if we've been given a root */    if (tree && mgcp_tree) {              /* dissect first line */      tvb_sectionbegin = 0;      tvb_current_len = tvb_len;      tvb_sectionend = tvb_sectionbegin;      sectionlen = tvb_find_line_end(tvb,0,-1,&tvb_sectionend);      if( sectionlen > 0){	dissect_mgcp_firstline(tvb_new_subset(tvb, tvb_sectionbegin,					      sectionlen,-1), 			       pinfo, mgcp_tree);      }      tvb_sectionbegin = tvb_sectionend;      /* dissect params */      if(tvb_sectionbegin < tvb_len){	sectionlen = tvb_find_null_line(tvb, tvb_sectionbegin, -1,					&tvb_sectionend);	dissect_mgcp_params(tvb_new_subset(tvb, tvb_sectionbegin, 					   sectionlen, -1),			    pinfo, mgcp_tree);	tvb_sectionbegin = tvb_sectionend;      }	      /* set the mgcp payload length correctly so we don't include the        * encapsulated SDP       */      sectionlen = tvb_sectionend;      proto_item_set_len(ti,sectionlen);      /* Display the raw text of the mgcp message if desired */      /* Do we want to display the raw text of our MGCP packet? */      if(global_mgcp_raw_text){	mgcp_raw_text_add(tvb_new_subset(tvb,0,tvb_len,-1),pinfo, 			  mgcp_tree);      }      /* dissect sdp payload */      if( tvb_sectionend < tvb_len && global_mgcp_dissect_tree == TRUE){ 	next_tvb = tvb_new_subset(tvb, tvb_sectionend, -1, -1);       	call_dissector(sdp_handle, next_tvb, pinfo, tree);      }    }  }}/*  * Add the raw text of the message to the dissect tree if appropriate  * preferences are specified.  The args and returns follow the general  * convention for proto dissectors (although this is NOT a proto dissector). */static void mgcp_raw_text_add(tvbuff_t *tvb, packet_info *pinfo, 			      proto_tree *tree){  gint tvb_linebegin,tvb_lineend,tvb_len,linelen;  tvb_linebegin = 0;  tvb_len = tvb_length(tvb);  do {    tvb_find_line_end(tvb,tvb_linebegin,-1,&tvb_lineend);        linelen = tvb_lineend - tvb_linebegin;    proto_tree_add_text(tree, tvb, tvb_linebegin, linelen, 			"%s", tvb_format_text(tvb,tvb_linebegin, 					      linelen));    tvb_linebegin = tvb_lineend;  } while ( tvb_lineend < tvb_len );}/* Register all the bits needed with the filtering engine */void proto_register_mgcp(void){  static hf_register_info hf[] = {    { &hf_mgcp_req,      { "Request", "mgcp.req", FT_BOOLEAN, BASE_NONE, NULL, 0x0, 	"True if MGCP request", HFILL }},    { &hf_mgcp_rsp,      { "Response", "mgcp.rsp", FT_BOOLEAN, BASE_NONE, NULL, 0x0, 	"TRUE if MGCP response", HFILL }},    { &hf_mgcp_req_verb,      { "Verb", "mgcp.req.verb", FT_STRING, BASE_DEC, NULL, 0x0, 	"Name of the verb", HFILL }},    { &hf_mgcp_req_endpoint,      { "Endpoint", "mgcp.req.endpoint", FT_STRING, BASE_DEC, NULL, 0x0,	"Endpoint referenced by the message", HFILL }},    { &hf_mgcp_transid,      { "Transaction ID", "mgcp.transid", FT_STRING, BASE_DEC, NULL, 0x0,	"Transaction ID of this message", HFILL }},    { &hf_mgcp_version,       { "Version", "mgcp.version", FT_STRING, BASE_DEC, NULL, 0x0,	"MGCP Version", HFILL }},    { &hf_mgcp_rsp_rspcode,       { "Response Code", "mgcp.rsp.rspcode", FT_STRING, BASE_DEC, NULL, 0x0,	"Response Code", HFILL }},    { &hf_mgcp_rsp_rspstring,      { "Response String", "mgcp.rsp.rspstring", FT_STRING, BASE_DEC, NULL, 	0x0, "Response String", HFILL }},    { &hf_mgcp_param_rspack,      { "ResponseAck (K)", "mgcp.param.rspack", FT_STRING, BASE_DEC, NULL,	0x0, "Response Ack", HFILL }},    { &hf_mgcp_param_bearerinfo,      { "BearerInformation (B)", "mgcp.param.bearerinfo", FT_STRING, BASE_DEC, 	NULL, 0x0, "Bearer Information", HFILL }},    { &hf_mgcp_param_callid,      { "CallId (C)", "mgcp.param.callid", FT_STRING, BASE_DEC, NULL, 0x0,	"Call Id", HFILL }},

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产综合| 高清国产一区二区| 不卡的av网站| 欧美日韩mp4| 亚洲丝袜精品丝袜在线| 欧美a一区二区| 欧美综合亚洲图片综合区| 欧美激情一区二区三区不卡| 日韩vs国产vs欧美| 欧美撒尿777hd撒尿| 国产精品成人一区二区三区夜夜夜| 天天综合日日夜夜精品| 在线中文字幕一区| 国产精品成人免费| 国产精品亚洲人在线观看| 日韩欧美的一区| 一区二区三区四区乱视频| 成+人+亚洲+综合天堂| 欧美国产日韩一二三区| 国产综合久久久久久久久久久久| 91精品在线免费| 香蕉成人啪国产精品视频综合网| 91成人免费网站| 亚洲在线观看免费视频| 色综合久久综合网| 亚洲特黄一级片| 99这里只有精品| 国产精品无人区| 成人av在线播放网址| 国产欧美日韩久久| 成人小视频在线观看| 欧美韩日一区二区三区| 成人av手机在线观看| 综合久久久久久| 色综合一个色综合亚洲| 一区二区三区不卡在线观看| 在线视频欧美区| 午夜欧美电影在线观看| 91精品综合久久久久久| 狠狠色狠狠色综合| 国产日韩欧美a| 91美女蜜桃在线| 亚洲电影欧美电影有声小说| 欧美精品丝袜中出| 精品一区二区久久| 国产精品网站一区| 91麻豆精品在线观看| 亚洲高清免费观看 | 日韩专区中文字幕一区二区| 一本久道中文字幕精品亚洲嫩| 亚洲欧美激情视频在线观看一区二区三区| av网站一区二区三区| 亚洲电影在线播放| 国产精品久久久久久久蜜臀| 91原创在线视频| 亚洲大型综合色站| 精品国产乱码久久久久久浪潮| 国产麻豆精品久久一二三| 国产精品成人一区二区三区夜夜夜| 91视频在线观看免费| 亚洲成人动漫在线免费观看| 精品久久久久久久一区二区蜜臀| 成人天堂资源www在线| 亚洲综合偷拍欧美一区色| 日韩精品影音先锋| 99精品在线免费| 日本午夜一区二区| 综合在线观看色| 欧美v日韩v国产v| 一本到高清视频免费精品| 免费亚洲电影在线| 日韩美女精品在线| 精品理论电影在线| 在线日韩国产精品| 国产精品1区2区3区| 一区二区在线电影| 久久女同精品一区二区| 91九色02白丝porn| 国产成人精品免费| 日韩不卡一区二区| 亚洲免费毛片网站| 国产日韩欧美精品一区| 3d成人h动漫网站入口| av一区二区三区在线| 韩国精品久久久| 天天影视网天天综合色在线播放| 久久机这里只有精品| 亚洲欧美成aⅴ人在线观看| 精品成人佐山爱一区二区| 在线不卡一区二区| 99视频精品在线| 成人一区二区三区视频在线观看| 日韩电影免费在线| 亚洲成人在线网站| 亚洲一区免费在线观看| 成人欧美一区二区三区白人| 精品福利二区三区| 日韩欧美激情一区| 91精品国产黑色紧身裤美女| 欧美视频精品在线观看| 色婷婷激情综合| 一本高清dvd不卡在线观看| 99天天综合性| 粉嫩欧美一区二区三区高清影视| 国内精品写真在线观看| 免费成人在线网站| 视频一区二区三区入口| 婷婷中文字幕一区三区| 亚洲福利视频三区| 亚洲成人一区在线| 日日摸夜夜添夜夜添精品视频| 亚洲福利视频三区| 视频一区视频二区中文字幕| 五月天精品一区二区三区| 午夜精品爽啪视频| 日韩福利视频导航| 日韩—二三区免费观看av| 亚洲国产日韩a在线播放性色| 亚洲激情一二三区| 亚洲最快最全在线视频| 亚洲综合激情小说| 亚洲第一电影网| 久久机这里只有精品| 国产米奇在线777精品观看| 国产精品99久久久久久似苏梦涵| 国产激情一区二区三区| 懂色一区二区三区免费观看| 国模冰冰炮一区二区| 成人综合激情网| 成人免费av在线| 一本久久a久久精品亚洲| 欧洲av一区二区嗯嗯嗯啊| 在线观看亚洲a| 日韩欧美二区三区| 欧美国产成人精品| 亚洲精品中文在线观看| 午夜av电影一区| 蜜臀91精品一区二区三区| 国产在线精品一区二区夜色 | 中文字幕一区二区三区乱码在线 | 欧美日韩一级片在线观看| 制服视频三区第一页精品| 欧美成va人片在线观看| 中文成人av在线| 肉丝袜脚交视频一区二区| 国产美女一区二区| 一本色道久久综合精品竹菊| 在线播放91灌醉迷j高跟美女| 久久综合成人精品亚洲另类欧美| 国产精品久久久久aaaa樱花| 午夜精品久久久久久久久久 | 久久精品视频免费| 欧美性生活一区| 日韩欧美一区二区在线视频| 国产日韩三级在线| 亚洲国产精品久久人人爱 | 26uuuu精品一区二区| 久久精品99国产精品| 99久久精品免费| 欧美精品一区二区三区久久久 | 国产精品久久久久久久久久免费看 | 国产福利不卡视频| 欧美影院午夜播放| 国产欧美精品区一区二区三区| 亚洲精品你懂的| 国产二区国产一区在线观看| 8v天堂国产在线一区二区| 国产欧美精品一区二区色综合朱莉| 一区二区三区波多野结衣在线观看| 国产东北露脸精品视频| 欧美大尺度电影在线| 亚洲高清免费一级二级三级| av网站一区二区三区| 国产欧美日韩三级| 国产一区二区视频在线| 欧美肥妇bbw| 亚洲电影一区二区| 色婷婷av一区二区三区大白胸 | 欧美亚洲一区二区三区四区| 国产日韩精品一区二区三区| 欧美电影一区二区| 国产精品一级黄| 精品日韩一区二区| 麻豆精品国产91久久久久久| 制服丝袜在线91| 亚洲午夜私人影院| 91蜜桃婷婷狠狠久久综合9色| 国产日韩欧美精品电影三级在线| 九九久久精品视频| 欧美v亚洲v综合ⅴ国产v| 男女男精品网站| 欧美一区二区三区日韩视频| 亚洲成人免费av| 777精品伊人久久久久大香线蕉| 性做久久久久久久免费看| 欧美丝袜丝交足nylons图片| 亚洲一区二区三区国产| 欧美调教femdomvk| 婷婷中文字幕综合| 日韩一区二区不卡|