static void dissect_tacplus_body_author_rep( tvbuff_t* tvb, proto_tree *tree ) { int offset=AUTHOR_R_VARDATA_OFF; int val=tvb_get_guint8( tvb, AUTHOR_R_STATUS_OFF ) ; proto_tree_add_text( tree, tvb, AUTHOR_R_STATUS_OFF , 1, "Auth Status: 0x%01x (%s)", val, val_to_str( val, tacplus_author_status, "Unknown Authorization Status" )); val=tvb_get_ntohs( tvb, AUTHOR_R_SRV_MSG_LEN_OFF ); offset+=val; proto_tree_add_text( tree, tvb, AUTHOR_R_SRV_MSG_LEN_OFF, 2, "Server Msg length: %d", val ); val=tvb_get_ntohs( tvb, AUTHOR_R_DATA_LEN_OFF ); offset+=val; proto_tree_add_text( tree, tvb, AUTHOR_R_DATA_LEN_OFF, 2, "Data length: %d", val ); val=tvb_get_guint8( tvb, AUTHOR_R_ARGC_OFF); offset+=val; proto_tree_add_text( tree, tvb, AUTHOR_R_ARGC_OFF, 1, "Arg count: %d", val ); dissect_tacplus_args_list( tvb, tree, offset, AUTHOR_R_VARDATA_OFF, val ); }
static void dissect_tacplus_body_acct_req( tvbuff_t* tvb, proto_tree *tree ) { int val, var_off; proto_item *tf; proto_tree *flags_tree; tf = proto_tree_add_item( tree, hf_tacplus_acct_flags, tvb, ACCT_Q_FLAGS_OFF, 1, ENC_BIG_ENDIAN); flags_tree = proto_item_add_subtree( tf, ett_tacplus_acct_flags ); proto_tree_add_item(flags_tree, hf_tacplus_acct_flags_more, tvb, ACCT_Q_FLAGS_OFF, 1, ENC_BIG_ENDIAN); proto_tree_add_item(flags_tree, hf_tacplus_acct_flags_start, tvb, ACCT_Q_FLAGS_OFF, 1, ENC_BIG_ENDIAN); proto_tree_add_item(flags_tree, hf_tacplus_acct_flags_stop, tvb, ACCT_Q_FLAGS_OFF, 1, ENC_BIG_ENDIAN); proto_tree_add_item(flags_tree, hf_tacplus_acct_flags_watchdog, tvb, ACCT_Q_FLAGS_OFF, 1, ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_tacplus_acct_authen_method, tvb, ACCT_Q_METHOD_OFF, 1, ENC_BIG_ENDIAN); val=tvb_get_guint8( tvb, ACCT_Q_ARG_CNT_OFF ); /* authen_type */ var_off=proto_tree_add_tacplus_common_fields( tvb, tree , ACCT_Q_PRIV_LVL_OFF, ACCT_Q_VARDATA_OFF+val ); proto_tree_add_item(tree, hf_tacplus_acct_arg_count, tvb, ACCT_Q_ARG_CNT_OFF, 1, ENC_BIG_ENDIAN); dissect_tacplus_args_list( tvb, tree, var_off, ACCT_Q_VARDATA_OFF, val ); }
static void dissect_tacplus_body_acct_req( tvbuff_t* tvb, proto_tree *tree ) { int val, var_off; proto_item *tf; proto_tree *flags_tree; val=tvb_get_guint8( tvb, ACCT_Q_FLAGS_OFF ); tf = proto_tree_add_uint( tree, hf_tacplus_acct_flags, tvb, ACCT_Q_FLAGS_OFF, 1, val ); flags_tree = proto_item_add_subtree( tf, ett_tacplus_acct_flags ); proto_tree_add_text( flags_tree, tvb, ACCT_Q_FLAGS_OFF, 1, "%s", decode_boolean_bitfield( val, TAC_PLUS_ACCT_FLAG_MORE, 8, "More: Set", "More: Not set" ) ); proto_tree_add_text( flags_tree, tvb, ACCT_Q_FLAGS_OFF, 1, "%s", decode_boolean_bitfield( val, TAC_PLUS_ACCT_FLAG_START, 8, "Start: Set", "Start: Not set" ) ); proto_tree_add_text( flags_tree, tvb, ACCT_Q_FLAGS_OFF, 1, "%s", decode_boolean_bitfield( val, TAC_PLUS_ACCT_FLAG_STOP, 8, "Stop: Set", "Stop: Not set" ) ); proto_tree_add_text( flags_tree, tvb, ACCT_Q_FLAGS_OFF, 1, "%s", decode_boolean_bitfield( val, TAC_PLUS_ACCT_FLAG_WATCHDOG, 8, "Watchdog: Set", "Watchdog: Not set" ) ); val=tvb_get_guint8( tvb, ACCT_Q_METHOD_OFF ); proto_tree_add_text( tree, tvb, ACCT_Q_METHOD_OFF, 1, "Authen Method: 0x%01x (%s)", val, val_to_str( val, tacplus_authen_method, "Unknown Authen Method" ) ); val=tvb_get_guint8( tvb, ACCT_Q_ARG_CNT_OFF ); /* authen_type */ var_off=proto_tree_add_tacplus_common_fields( tvb, tree , ACCT_Q_PRIV_LVL_OFF, ACCT_Q_VARDATA_OFF+val ); proto_tree_add_text( tree, tvb, ACCT_Q_ARG_CNT_OFF, 1, "Arg Cnt: %d", val ); dissect_tacplus_args_list( tvb, tree, var_off, ACCT_Q_VARDATA_OFF, val ); }
static void dissect_tacplus_body_author_req( tvbuff_t* tvb, proto_tree *tree ) { int val; int var_off; proto_tree_add_item(tree, hf_tacplus_body_author_req_auth_method, tvb, AUTHOR_Q_AUTH_METH_OFF, 1, ENC_NA); val = tvb_get_guint8( tvb, AUTHOR_Q_ARGC_OFF ); var_off=proto_tree_add_tacplus_common_fields( tvb, tree , AUTHOR_Q_PRIV_LVL_OFF, AUTHOR_Q_VARDATA_OFF + val); proto_tree_add_item(tree, hf_tacplus_body_author_req_arg_count, tvb, AUTHOR_Q_ARGC_OFF, 1, ENC_NA); /* var_off points after rem_addr */ dissect_tacplus_args_list( tvb, tree, var_off, AUTHOR_Q_VARDATA_OFF, val ); }
static void dissect_tacplus_body_author_req( tvbuff_t* tvb, proto_tree *tree ) { int val; int var_off; val=tvb_get_guint8( tvb, AUTHOR_Q_AUTH_METH_OFF ) ; proto_tree_add_text( tree, tvb, AUTHOR_Q_AUTH_METH_OFF, 1, "Auth Method: %s", val_to_str( val, tacplus_authen_method, "Unknown Authen Method" ) ); val=tvb_get_guint8( tvb, AUTHOR_Q_ARGC_OFF ); var_off=proto_tree_add_tacplus_common_fields( tvb, tree , AUTHOR_Q_PRIV_LVL_OFF, AUTHOR_Q_VARDATA_OFF + val ); proto_tree_add_text( tree, tvb, AUTHOR_Q_ARGC_OFF, 1, "Arg count: %d", val ); /* var_off points after rem_addr */ dissect_tacplus_args_list( tvb, tree, var_off, AUTHOR_Q_VARDATA_OFF, val ); }
static void dissect_tacplus_body_author_rep( tvbuff_t* tvb, proto_tree *tree ) { int offset=AUTHOR_R_VARDATA_OFF; int val; proto_tree_add_item(tree, hf_tacplus_body_author_rep_auth_status, tvb, AUTHOR_R_STATUS_OFF, 1, ENC_NA); val=tvb_get_ntohs( tvb, AUTHOR_R_SRV_MSG_LEN_OFF ); offset+=val; proto_tree_add_item(tree, hf_tacplus_body_author_rep_server_msg_len, tvb, AUTHOR_R_SRV_MSG_LEN_OFF, 2, ENC_BIG_ENDIAN); val=tvb_get_ntohs( tvb, AUTHOR_R_DATA_LEN_OFF ); offset+=val; proto_tree_add_item(tree, hf_tacplus_body_author_rep_server_data_len, tvb, AUTHOR_R_DATA_LEN_OFF, 2, ENC_BIG_ENDIAN); val=tvb_get_guint8( tvb, AUTHOR_R_ARGC_OFF); offset+=val; proto_tree_add_item(tree, hf_tacplus_body_author_rep_arg_count, tvb, AUTHOR_R_ARGC_OFF, 1, ENC_NA); dissect_tacplus_args_list( tvb, tree, offset, AUTHOR_R_VARDATA_OFF, val ); }