Get rid of check_col();

svn path=/trunk/; revision=31552
This commit is contained in:
Anders Broman 2010-01-17 18:16:06 +00:00
parent fd5ca381c5
commit 9a030dda05
8 changed files with 96 additions and 130 deletions

View File

@ -165,19 +165,15 @@ static const inap_err_t inap_err_tab[] = {
%(DEFAULT_BODY)s
if (inap_opcode_type == INAP_OPCODE_RETURN_ERROR){
errorCode = opcode;
if (check_col(actx->pinfo->cinfo, COL_INFO)){
col_append_str(actx->pinfo->cinfo, COL_INFO,
val_to_str(errorCode, inap_err_code_string_vals, "Unknown INAP error (%%u)"));
col_append_str(actx->pinfo->cinfo, COL_INFO, " ");
col_set_fence(actx->pinfo->cinfo, COL_INFO);
}
}else{
if (check_col(actx->pinfo->cinfo, COL_INFO)){
col_append_str(actx->pinfo->cinfo, COL_INFO,
val_to_str(opcode, inap_opr_code_strings, "Unknown INAP (%%u)"));
col_append_str(actx->pinfo->cinfo, COL_INFO, " ");
col_set_fence(actx->pinfo->cinfo, COL_INFO);
}
}
#.FN_HDR Invoke

View File

@ -72,9 +72,7 @@ PasswordPolicyResponseValue B "1.3.6.1.4.1.42.2.27.8.5.1" "passwordPolicy"
if((hf_index == hf_ldap_requestName) || (hf_index == hf_ldap_responseName)) {
ldap_do_protocolop(actx->pinfo);
if(check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", name);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", name);
}
}
@ -139,8 +137,7 @@ PasswordPolicyResponseValue B "1.3.6.1.4.1.42.2.27.8.5.1" "passwordPolicy"
case LDAP_RES_SEARCH_RESULT:
if (check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " [%d result%s]",
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " [%d result%s]",
ldap_info->num_results, ldap_info->num_results == 1 ? "" : "s");
proto_item_append_text(tree, " [%d result%s]",
@ -342,8 +339,7 @@ ldap_conv_info_t *ldap_info;
if(!ldapstring || !*ldapstring)
ldapstring = "<ROOT>";
if(check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%%s\" ", ldapstring);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%%s\" ", ldapstring);
if(ldm_tree)
proto_item_append_text(ldm_tree, " \"%%s\"", ldapstring);
@ -355,8 +351,7 @@ ldap_conv_info_t *ldap_info;
}
} else if ((hf_index == hf_ldap_errorMessage) && ldapstring && *ldapstring) { /* only show message if not success */
if(check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%%s) ", ldapstring);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%%s) ", ldapstring);
if(ldm_tree)
proto_item_append_text(ldm_tree, " (%%s)", ldapstring);
@ -370,10 +365,9 @@ ldap_conv_info_t *ldap_info;
if(!ldapstring || !*ldapstring)
ldapstring = "<ROOT>";
if(check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%%s\" ", ldapstring);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%%s\" ", ldapstring);
if(ldm_tree)
if(ldm_tree)
proto_item_append_text(ldm_tree, " \"%%s\"", ldapstring);
} else if (hf_index == hf_ldap_attributeDesc){
/* remember the attribute description */
@ -425,8 +419,7 @@ ldap_conv_info_t *ldap_info;
valstr = val_to_str(scope, ldap_T_scope_vals, "Unknown scope(%%u)");
if (check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s ", valstr);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s ", valstr);
if(ldm_tree)
proto_item_append_text(ldm_tree, " %%s", valstr);
@ -441,8 +434,7 @@ ldap_conv_info_t *ldap_info;
valstr = val_to_str(result, ldap_T_resultCode_vals, "Unknown result(%%u)");
if (check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s ", valstr);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s ", valstr);
if(ldm_tree)
proto_item_append_text(ldm_tree, " %%s", valstr);
@ -458,8 +450,7 @@ ldap_conv_info_t *ldap_info;
valstr = val_to_str(result, ldap_BindResponse_resultCode_vals, "Unknown result(%%u)");
if (check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s ", valstr);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s ", valstr);
if(ldm_tree)
proto_item_append_text(ldm_tree, " %%s", valstr);
@ -513,7 +504,7 @@ ldap_conv_info_t *ldap_info;
valstr = val_to_str(auth, ldap_AuthenticationChoice_vals, "Unknown auth(%%u)");
/* If auth is NTLM (10 or 11) don't add to column as the NTLM dissection will do this */
if (check_col(actx->pinfo->cinfo, COL_INFO) && (auth != 10) && (auth != 11))
if ((auth != 10) && (auth != 11))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s ", valstr);
if(ldm_tree)

View File

@ -40,8 +40,7 @@ TimeOfDay TYPE = FT_STRING DISPLAY = BASE_NONE
%(DEFAULT_BODY)s
if( (branch_taken!=-1) && mms_MMSpdu_vals[branch_taken].strptr ){
if(check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s ", mms_MMSpdu_vals[branch_taken].strptr);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s ", mms_MMSpdu_vals[branch_taken].strptr);
}

View File

@ -57,6 +57,7 @@ dissect_mpeg_audio_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int data_size = 0;
asn1_ctx_t asn1_ctx;
int offset = 0;
static const char *version_names[] = { "1", "2", "2.5" };
if (!tvb_bytes_exist(tvb, 0, 4))
return FALSE; /* not enough data for an MPEG audio frame */
@ -69,14 +70,10 @@ dissect_mpeg_audio_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return FALSE;
if (!MPA_LAYER_VALID(&mpa))
return FALSE;
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
static const char *version_names[] = { "1", "2", "2.5" };
col_add_fstr(pinfo->cinfo, COL_PROTOCOL,
"MPEG-%s", version_names[mpa_version(&mpa)]);
}
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO,
col_add_fstr(pinfo->cinfo, COL_PROTOCOL,
"MPEG-%s", version_names[mpa_version(&mpa)]);
col_add_fstr(pinfo->cinfo, COL_INFO,
"Audio Layer %d", mpa_layer(&mpa) + 1);
if (MPA_BITRATE_VALID(&mpa) && MPA_FREQUENCY_VALID(&mpa)) {
data_size = (int)(MPA_DATA_BYTES(&mpa) - sizeof mpa);

View File

@ -1406,19 +1406,15 @@ dissect_inap_T_local(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
if (inap_opcode_type == INAP_OPCODE_RETURN_ERROR){
errorCode = opcode;
if (check_col(actx->pinfo->cinfo, COL_INFO)){
col_append_str(actx->pinfo->cinfo, COL_INFO,
val_to_str(errorCode, inap_err_code_string_vals, "Unknown INAP error (%u)"));
col_append_str(actx->pinfo->cinfo, COL_INFO, " ");
col_set_fence(actx->pinfo->cinfo, COL_INFO);
}
}else{
if (check_col(actx->pinfo->cinfo, COL_INFO)){
col_append_str(actx->pinfo->cinfo, COL_INFO,
val_to_str(opcode, inap_opr_code_strings, "Unknown INAP (%u)"));
col_append_str(actx->pinfo->cinfo, COL_INFO, " ");
col_set_fence(actx->pinfo->cinfo, COL_INFO);
}
}
@ -1461,7 +1457,7 @@ dissect_inap_Code(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
static int
dissect_inap_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 223 "inap.cnf"
#line 219 "inap.cnf"
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
NULL);
@ -2132,7 +2128,7 @@ dissect_inap_BCSMEvent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
static int
dissect_inap_T_bearerCap(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 250 "inap.cnf"
#line 246 "inap.cnf"
tvbuff_t *parameter_tvb;
@ -2287,7 +2283,7 @@ dissect_inap_CalledPartyBusinessGroupID(gboolean implicit_tag _U_, tvbuff_t *tvb
static int
dissect_inap_CalledPartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 229 "inap.cnf"
#line 225 "inap.cnf"
tvbuff_t *parameter_tvb;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
@ -2338,7 +2334,7 @@ dissect_inap_CallingPartyBusinessGroupID(gboolean implicit_tag _U_, tvbuff_t *tv
static int
dissect_inap_CallingPartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 239 "inap.cnf"
#line 235 "inap.cnf"
tvbuff_t *parameter_tvb;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
@ -4467,7 +4463,7 @@ dissect_inap_GlobalCallReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
int
dissect_inap_HighLayerCompatibility(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 292 "inap.cnf"
#line 288 "inap.cnf"
/*
* -- Indicates the teleservice. For encoding, DSS1 (Q.931) is used.
*/
@ -4641,7 +4637,7 @@ dissect_inap_NumberingPlan(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
static int
dissect_inap_OriginalCalledPartyID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 272 "inap.cnf"
#line 268 "inap.cnf"
tvbuff_t *parameter_tvb;
@ -4704,7 +4700,7 @@ dissect_inap_Reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
static int
dissect_inap_RedirectingPartyID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 282 "inap.cnf"
#line 278 "inap.cnf"
tvbuff_t *parameter_tvb;
@ -4725,7 +4721,7 @@ dissect_inap_RedirectingPartyID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
int
dissect_inap_RedirectionInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 261 "inap.cnf"
#line 257 "inap.cnf"
tvbuff_t *parameter_tvb;
@ -5089,7 +5085,7 @@ dissect_inap_T_triggerId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
static int
dissect_inap_T_triggerPar(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 208 "inap.cnf"
#line 204 "inap.cnf"
/* FIX ME */
@ -7667,7 +7663,7 @@ dissect_inap_MessageReceivedArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
static int
dissect_inap_T_uIScriptSpecificInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 214 "inap.cnf"
#line 210 "inap.cnf"
/* FIX ME */
@ -7696,7 +7692,7 @@ dissect_inap_ScriptCloseArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
static int
dissect_inap_T_uIScriptResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 211 "inap.cnf"
#line 207 "inap.cnf"
/* FIX ME */
@ -7726,7 +7722,7 @@ dissect_inap_ScriptEventArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
static int
dissect_inap_T_uIScriptSpecificInfo_01(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 217 "inap.cnf"
#line 213 "inap.cnf"
/* FIX ME */
@ -7754,7 +7750,7 @@ dissect_inap_ScriptInformationArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
static int
dissect_inap_T_uIScriptSpecificInfo_02(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 219 "inap.cnf"
#line 215 "inap.cnf"
/* FIX ME */
@ -7874,7 +7870,7 @@ dissect_inap_T_linkedId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
static int
dissect_inap_T_argument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 196 "inap.cnf"
#line 192 "inap.cnf"
offset = dissect_invokeData(tree, tvb, offset, actx);
@ -7893,7 +7889,7 @@ static const ber_sequence_t Invoke_sequence[] = {
static int
dissect_inap_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 184 "inap.cnf"
#line 180 "inap.cnf"
inap_opcode_type=INAP_OPCODE_INVOKE;
@ -7907,7 +7903,7 @@ dissect_inap_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
static int
dissect_inap_ResultArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 199 "inap.cnf"
#line 195 "inap.cnf"
offset = dissect_returnResultData(tree, tvb, offset, actx);
@ -7939,7 +7935,7 @@ static const ber_sequence_t ReturnResult_sequence[] = {
static int
dissect_inap_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 187 "inap.cnf"
#line 183 "inap.cnf"
inap_opcode_type=INAP_OPCODE_RETURN_RESULT;
@ -7953,7 +7949,7 @@ dissect_inap_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
static int
dissect_inap_T_parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 202 "inap.cnf"
#line 198 "inap.cnf"
offset = dissect_returnErrorData(tree, tvb, offset, actx);
@ -7973,7 +7969,7 @@ static const ber_sequence_t ReturnError_sequence[] = {
static int
dissect_inap_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 190 "inap.cnf"
#line 186 "inap.cnf"
inap_opcode_type=INAP_OPCODE_RETURN_ERROR;
@ -8093,7 +8089,7 @@ static const ber_sequence_t Reject_sequence[] = {
static int
dissect_inap_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 193 "inap.cnf"
#line 189 "inap.cnf"
inap_opcode_type=INAP_OPCODE_REJECT;

View File

@ -942,7 +942,7 @@ static int dissect_ldap_Filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
static int
dissect_ldap_MessageID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 100 "ldap.cnf"
#line 98 "ldap.cnf"
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
&MessageID);
@ -969,7 +969,7 @@ dissect_ldap_INTEGER_1_127(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
static int
dissect_ldap_LDAPString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 327 "ldap.cnf"
#line 324 "ldap.cnf"
tvbuff_t *parameter_tvb = NULL;
char *ldapstring = NULL;
gchar *sc = NULL; /* semi-colon pointer */
@ -990,8 +990,7 @@ dissect_ldap_LDAPString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
if(!ldapstring || !*ldapstring)
ldapstring = "<ROOT>";
if(check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%s\" ", ldapstring);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%s\" ", ldapstring);
if(ldm_tree)
proto_item_append_text(ldm_tree, " \"%s\"", ldapstring);
@ -1003,8 +1002,7 @@ dissect_ldap_LDAPString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
}
} else if ((hf_index == hf_ldap_errorMessage) && ldapstring && *ldapstring) { /* only show message if not success */
if(check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%s) ", ldapstring);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%s) ", ldapstring);
if(ldm_tree)
proto_item_append_text(ldm_tree, " (%s)", ldapstring);
@ -1018,10 +1016,9 @@ dissect_ldap_LDAPString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
if(!ldapstring || !*ldapstring)
ldapstring = "<ROOT>";
if(check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%s\" ", ldapstring);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "\"%s\" ", ldapstring);
if(ldm_tree)
if(ldm_tree)
proto_item_append_text(ldm_tree, " \"%s\"", ldapstring);
} else if (hf_index == hf_ldap_attributeDesc){
/* remember the attribute description */
@ -1080,7 +1077,7 @@ dissect_ldap_LDAPDN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
static int
dissect_ldap_Simple(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 170 "ldap.cnf"
#line 167 "ldap.cnf"
ldap_conv_info_t *ldap_info;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
@ -1101,7 +1098,7 @@ ldap_conv_info_t *ldap_info;
static int
dissect_ldap_Mechanism(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 180 "ldap.cnf"
#line 177 "ldap.cnf"
ldap_conv_info_t *ldap_info;
tvbuff_t *parameter_tvb;
@ -1149,7 +1146,7 @@ char *mechanism = NULL;
static int
dissect_ldap_Credentials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 217 "ldap.cnf"
#line 214 "ldap.cnf"
tvbuff_t *parameter_tvb;
ldap_conv_info_t *ldap_info;
@ -1215,7 +1212,7 @@ dissect_ldap_SaslCredentials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
static int
dissect_ldap_T_ntlmsspNegotiate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 696 "ldap.cnf"
#line 687 "ldap.cnf"
/* make sure the protocol op comes first */
ldap_do_protocolop(actx->pinfo);
@ -1231,7 +1228,7 @@ dissect_ldap_T_ntlmsspNegotiate(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
static int
dissect_ldap_T_ntlmsspAuth(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 703 "ldap.cnf"
#line 694 "ldap.cnf"
/* make sure the protocol op comes first */
ldap_do_protocolop(actx->pinfo);
@ -1262,7 +1259,7 @@ static const ber_choice_t AuthenticationChoice_choice[] = {
static int
dissect_ldap_AuthenticationChoice(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 502 "ldap.cnf"
#line 493 "ldap.cnf"
gint branch = -1;
gint auth = -1;
const gchar *valstr;
@ -1280,7 +1277,7 @@ dissect_ldap_AuthenticationChoice(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
valstr = val_to_str(auth, ldap_AuthenticationChoice_vals, "Unknown auth(%u)");
/* If auth is NTLM (10 or 11) don't add to column as the NTLM dissection will do this */
if (check_col(actx->pinfo->cinfo, COL_INFO) && (auth != 10) && (auth != 11))
if ((auth != 10) && (auth != 11))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", valstr);
if(ldm_tree)
@ -1369,7 +1366,7 @@ static const value_string ldap_BindResponse_resultCode_vals[] = {
static int
dissect_ldap_BindResponse_resultCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 452 "ldap.cnf"
#line 444 "ldap.cnf"
const gchar *valstr;
@ -1381,8 +1378,7 @@ dissect_ldap_BindResponse_resultCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U
valstr = val_to_str(result, ldap_BindResponse_resultCode_vals, "Unknown result(%u)");
if (check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", valstr);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", valstr);
if(ldm_tree)
proto_item_append_text(ldm_tree, " %s", valstr);
@ -1397,7 +1393,7 @@ dissect_ldap_BindResponse_resultCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U
static int
dissect_ldap_T_bindResponse_matchedDN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 710 "ldap.cnf"
#line 701 "ldap.cnf"
tvbuff_t *new_tvb=NULL;
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_ldap_matchedDN, &new_tvb);
@ -1458,7 +1454,7 @@ dissect_ldap_Referral(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
static int
dissect_ldap_ServerSaslCreds(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 257 "ldap.cnf"
#line 254 "ldap.cnf"
tvbuff_t *parameter_tvb;
ldap_conv_info_t *ldap_info;
@ -1576,7 +1572,7 @@ dissect_ldap_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
static int
dissect_ldap_UnbindRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 524 "ldap.cnf"
#line 515 "ldap.cnf"
implicit_tag = TRUE; /* correct problem with asn2wrs */
@ -1606,7 +1602,7 @@ static const value_string ldap_T_scope_vals[] = {
static int
dissect_ldap_T_scope(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 418 "ldap.cnf"
#line 412 "ldap.cnf"
gint scope;
const gchar *valstr;
@ -1619,8 +1615,7 @@ dissect_ldap_T_scope(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
valstr = val_to_str(scope, ldap_T_scope_vals, "Unknown scope(%u)");
if (check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", valstr);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", valstr);
if(ldm_tree)
proto_item_append_text(ldm_tree, " %s", valstr);
@ -1673,7 +1668,7 @@ static int
dissect_ldap_T_and_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
#line 566 "ldap.cnf"
#line 557 "ldap.cnf"
if(and_filter_string){
and_filter_string=ep_strdup_printf("(&%s%s)",and_filter_string,Filter_string);
} else {
@ -1691,7 +1686,7 @@ static const ber_sequence_t T_and_set_of[1] = {
static int
dissect_ldap_T_and(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 573 "ldap.cnf"
#line 564 "ldap.cnf"
proto_tree *tr=NULL;
proto_item *it=NULL;
char *old_and_filter_string=and_filter_string;
@ -1724,7 +1719,7 @@ static int
dissect_ldap_T_or_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
#line 593 "ldap.cnf"
#line 584 "ldap.cnf"
if(or_filter_string){
or_filter_string=ep_strdup_printf("(|%s%s)",or_filter_string,Filter_string);
} else {
@ -1743,7 +1738,7 @@ static const ber_sequence_t T_or_set_of[1] = {
static int
dissect_ldap_T_or(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 601 "ldap.cnf"
#line 592 "ldap.cnf"
proto_tree *tr=NULL;
proto_item *it=NULL;
char *old_or_filter_string=or_filter_string;
@ -1774,7 +1769,7 @@ static int
dissect_ldap_T_not(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
#line 622 "ldap.cnf"
#line 613 "ldap.cnf"
Filter_string=ep_strdup_printf("(!%s)",string_or_null(Filter_string));
@ -1812,7 +1807,7 @@ static int
dissect_ldap_T_equalityMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
#line 543 "ldap.cnf"
#line 534 "ldap.cnf"
Filter_string=ep_strdup_printf("(%s=%s)",
string_or_null(attributedesc_string),
string_or_null(ldapvalue_string));
@ -1843,7 +1838,7 @@ dissect_ldap_T_substringFilter_substrings_item(gboolean implicit_tag _U_, tvbuff
T_substringFilter_substrings_item_choice, hf_index, ett_ldap_T_substringFilter_substrings_item,
NULL);
#line 648 "ldap.cnf"
#line 639 "ldap.cnf"
if (substring_item_final) {
substring_value=ep_strdup_printf("%s%s",
(substring_value?substring_value:"*"),
@ -1883,7 +1878,7 @@ static const ber_sequence_t SubstringFilter_sequence[] = {
static int
dissect_ldap_SubstringFilter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 662 "ldap.cnf"
#line 653 "ldap.cnf"
proto_tree *tr=NULL;
proto_item *it=NULL;
char *old_substring_value=substring_value;
@ -1917,7 +1912,7 @@ static int
dissect_ldap_T_greaterOrEqual(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
#line 549 "ldap.cnf"
#line 540 "ldap.cnf"
Filter_string=ep_strdup_printf("(%s>=%s)",
string_or_null(attributedesc_string),
string_or_null(ldapvalue_string));
@ -1933,7 +1928,7 @@ static int
dissect_ldap_T_lessOrEqual(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
#line 555 "ldap.cnf"
#line 546 "ldap.cnf"
Filter_string=ep_strdup_printf("(%s<=%s)",
string_or_null(attributedesc_string),
string_or_null(ldapvalue_string));
@ -1949,7 +1944,7 @@ static int
dissect_ldap_T_present(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_AttributeDescription(implicit_tag, tvb, offset, actx, tree, hf_index);
#line 619 "ldap.cnf"
#line 610 "ldap.cnf"
Filter_string=ep_strdup_printf("(%s=*)",string_or_null(Filter_string));
@ -1962,7 +1957,7 @@ static int
dissect_ldap_T_approxMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
offset = dissect_ldap_AttributeValueAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
#line 561 "ldap.cnf"
#line 552 "ldap.cnf"
Filter_string=ep_strdup_printf("(%s~=%s)",
string_or_null(attributedesc_string),
string_or_null(ldapvalue_string));
@ -1984,7 +1979,7 @@ dissect_ldap_MatchingRuleId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
static int
dissect_ldap_T_dnAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 625 "ldap.cnf"
#line 616 "ldap.cnf"
gboolean val;
offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &val);
@ -2019,7 +2014,7 @@ dissect_ldap_MatchingRuleAssertion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
static int
dissect_ldap_T_extensibleMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 634 "ldap.cnf"
#line 625 "ldap.cnf"
attr_type=NULL;
matching_rule_string=NULL;
ldapvalue_string=NULL;
@ -2028,7 +2023,7 @@ dissect_ldap_T_extensibleMatch(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
offset = dissect_ldap_MatchingRuleAssertion(implicit_tag, tvb, offset, actx, tree, hf_index);
#line 640 "ldap.cnf"
#line 631 "ldap.cnf"
Filter_string=ep_strdup_printf("(%s:%s%s%s=%s)",
(attr_type?attr_type:""),
(matching_rule_dnattr?"dn:":""),
@ -2071,7 +2066,7 @@ static const ber_choice_t Filter_choice[] = {
static int
dissect_ldap_Filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 683 "ldap.cnf"
#line 674 "ldap.cnf"
proto_tree *tr=NULL;
proto_item *it=NULL;
@ -2096,13 +2091,13 @@ dissect_ldap_Filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
static int
dissect_ldap_T_filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 536 "ldap.cnf"
#line 527 "ldap.cnf"
Filter_string=NULL;
offset = dissect_ldap_Filter(implicit_tag, tvb, offset, actx, tree, hf_index);
#line 539 "ldap.cnf"
#line 530 "ldap.cnf"
Filter_string=NULL;
and_filter_string=NULL;
@ -2158,7 +2153,7 @@ dissect_ldap_SearchRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
static int
dissect_ldap_AttributeValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 469 "ldap.cnf"
#line 460 "ldap.cnf"
tvbuff_t *next_tvb;
gchar *string;
@ -2315,7 +2310,7 @@ static const value_string ldap_T_resultCode_vals[] = {
static int
dissect_ldap_T_resultCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 435 "ldap.cnf"
#line 428 "ldap.cnf"
const gchar *valstr;
@ -2327,8 +2322,7 @@ dissect_ldap_T_resultCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
valstr = val_to_str(result, ldap_T_resultCode_vals, "Unknown result(%u)");
if (check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", valstr);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", valstr);
if(ldm_tree)
proto_item_append_text(ldm_tree, " %s", valstr);
@ -2383,7 +2377,7 @@ dissect_ldap_SEQUENCE_OF_LDAPURL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
static int
dissect_ldap_SearchResultReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 770 "ldap.cnf"
#line 761 "ldap.cnf"
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
hf_index, BER_CLASS_APP, 19, TRUE, dissect_ldap_SEQUENCE_OF_LDAPURL);
@ -2660,7 +2654,7 @@ dissect_ldap_CompareResponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
static int
dissect_ldap_AbandonRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 777 "ldap.cnf"
#line 768 "ldap.cnf"
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
hf_index, BER_CLASS_APP, 16, TRUE, dissect_ldap_MessageID);
@ -2702,9 +2696,7 @@ dissect_ldap_LDAPOID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
if((hf_index == hf_ldap_requestName) || (hf_index == hf_ldap_responseName)) {
ldap_do_protocolop(actx->pinfo);
if(check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", name);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", name);
}
}
@ -2734,7 +2726,7 @@ dissect_ldap_LDAPOID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
static int
dissect_ldap_T_requestValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 745 "ldap.cnf"
#line 736 "ldap.cnf"
if((object_identifier_id != NULL) && oid_has_dissector(object_identifier_id)) {
offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
@ -2883,12 +2875,12 @@ dissect_ldap_ExtendedResponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
static int
dissect_ldap_T_intermediateResponse_responseValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 753 "ldap.cnf"
#line 744 "ldap.cnf"
const gchar *name;
#line 757 "ldap.cnf"
#line 748 "ldap.cnf"
if(ldm_tree && object_identifier_id) {
proto_item_set_text(ldm_tree, "%s %s", "IntermediateResponse", object_identifier_id);
name = oid_resolved_from_string(object_identifier_id);
@ -2986,7 +2978,7 @@ static const ber_choice_t ProtocolOp_choice[] = {
static int
dissect_ldap_ProtocolOp(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 108 "ldap.cnf"
#line 106 "ldap.cnf"
ldap_call_response_t *lcrp;
ldap_conv_info_t *ldap_info = (ldap_conv_info_t *)actx->pinfo->private_data;
@ -2997,7 +2989,7 @@ dissect_ldap_ProtocolOp(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
ProtocolOp_choice, hf_index, ett_ldap_ProtocolOp,
&ProtocolOp);
#line 114 "ldap.cnf"
#line 112 "ldap.cnf"
if (ProtocolOp == -1) {
return offset;
@ -3026,8 +3018,7 @@ dissect_ldap_ProtocolOp(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
case LDAP_RES_SEARCH_RESULT:
if (check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " [%d result%s]",
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " [%d result%s]",
ldap_info->num_results, ldap_info->num_results == 1 ? "" : "s");
proto_item_append_text(tree, " [%d result%s]",
@ -3070,7 +3061,7 @@ dissect_ldap_ControlType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
static int
dissect_ldap_T_controlValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 726 "ldap.cnf"
#line 717 "ldap.cnf"
gint8 class;
gboolean pc, ind;
gint32 tag;

View File

@ -1761,7 +1761,7 @@ dissect_mms_FloatingPoint(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
static int
dissect_mms_TimeOfDay(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 50 "mms.cnf"
#line 49 "mms.cnf"
guint32 len;
proto_item *cause;
@ -6925,8 +6925,7 @@ dissect_mms_MMSpdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
if( (branch_taken!=-1) && mms_MMSpdu_vals[branch_taken].strptr ){
if(check_col(actx->pinfo->cinfo, COL_INFO))
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", mms_MMSpdu_vals[branch_taken].strptr);
col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", mms_MMSpdu_vals[branch_taken].strptr);
}

View File

@ -469,6 +469,7 @@ dissect_mpeg_audio_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int data_size = 0;
asn1_ctx_t asn1_ctx;
int offset = 0;
static const char *version_names[] = { "1", "2", "2.5" };
if (!tvb_bytes_exist(tvb, 0, 4))
return FALSE; /* not enough data for an MPEG audio frame */
@ -481,14 +482,10 @@ dissect_mpeg_audio_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
return FALSE;
if (!MPA_LAYER_VALID(&mpa))
return FALSE;
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
static const char *version_names[] = { "1", "2", "2.5" };
col_add_fstr(pinfo->cinfo, COL_PROTOCOL,
"MPEG-%s", version_names[mpa_version(&mpa)]);
}
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO,
col_add_fstr(pinfo->cinfo, COL_PROTOCOL,
"MPEG-%s", version_names[mpa_version(&mpa)]);
col_add_fstr(pinfo->cinfo, COL_INFO,
"Audio Layer %d", mpa_layer(&mpa) + 1);
if (MPA_BITRATE_VALID(&mpa) && MPA_FREQUENCY_VALID(&mpa)) {
data_size = (int)(MPA_DATA_BYTES(&mpa) - sizeof mpa);
@ -666,7 +663,7 @@ proto_register_mpeg_audio(void)
"mpeg_audio.T_genre", HFILL }},
/*--- End of included file: packet-mpeg-audio-hfarr.c ---*/
#line 165 "packet-mpeg-audio-template.c"
#line 162 "packet-mpeg-audio-template.c"
{ &hf_mpeg_audio_data,
{ "Data", "mpeg.audio.data",
FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
@ -690,7 +687,7 @@ proto_register_mpeg_audio(void)
&ett_mpeg_audio_ID3v1,
/*--- End of included file: packet-mpeg-audio-ettarr.c ---*/
#line 182 "packet-mpeg-audio-template.c"
#line 179 "packet-mpeg-audio-template.c"
};
proto_mpeg_audio = proto_register_protocol(