code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
3
942
language
stringclasses
30 values
license
stringclasses
15 values
size
int32
3
1.05M
line_mean
float64
0.5
100
line_max
int64
1
1k
alpha_frac
float64
0.25
1
autogenerated
bool
1 class
#include <filezilla.h> #include "directorycache.h" #include "list.h" enum listStates { list_init = 0, list_waitresolve, list_waitlock, list_list }; int CStorjListOpData::Send() { LogMessage(MessageType::Debug_Verbose, L"CStorjListOpData::Send() in state %d", opState); switch (opState) { case list_init: if (!subDir_.empty()) { LogMessage(MessageType::Error, _("Invalid path")); return FZ_REPLY_ERROR; } if (path_.empty()) { path_ = CServerPath(L"/"); } currentPath_ = path_; if (!currentServer_) { LogMessage(MessageType::Debug_Warning, L"CStorjControlSocket::List called with m_pCurrenServer == 0"); return FZ_REPLY_INTERNALERROR; } if (currentPath_.GetType() != ServerType::UNIX) { LogMessage(MessageType::Debug_Warning, L"CStorControlSocket::List called with incompatible server type %d in path", currentPath_.GetType()); return FZ_REPLY_INTERNALERROR; } opState = list_waitresolve; controlSocket_.Resolve(path_, std::wstring(), bucket_); return FZ_REPLY_CONTINUE; case list_waitlock: if (!holdsLock_) { LogMessage(MessageType::Debug_Warning, L"Not holding the lock as expected"); return FZ_REPLY_INTERNALERROR; } { // Check if we can use already existing listing CDirectoryListing listing; bool is_outdated = false; bool found = engine_.GetDirectoryCache().Lookup(listing, currentServer_, path_, false, is_outdated); if (found && !is_outdated && listing.m_firstListTime >= time_before_locking_) { controlSocket_.SendDirectoryListingNotification(listing.path, topLevel_, false); return FZ_REPLY_OK; } } opState = list_list; return FZ_REPLY_CONTINUE; case list_list: if (bucket_.empty()) { return controlSocket_.SendCommand(L"list-buckets"); } else { std::wstring path = path_.GetPath(); auto pos = path.find('/', 1); if (pos == std::string::npos) { path.clear(); } else { path = controlSocket_.QuoteFilename(path.substr(pos + 1) + L"/"); } return controlSocket_.SendCommand(L"list " + bucket_ + L" " + path); } } LogMessage(MessageType::Debug_Warning, L"Unknown opState in CStorjListOpData::ListSend()"); return FZ_REPLY_INTERNALERROR; } int CStorjListOpData::ParseResponse() { LogMessage(MessageType::Debug_Verbose, L"CStorjListOpData::ParseResponse() in state %d", opState); if (opState == list_list) { if (controlSocket_.result_ != FZ_REPLY_OK) { return controlSocket_.result_; } directoryListing_.path = path_; directoryListing_.m_firstListTime = fz::monotonic_clock::now(); engine_.GetDirectoryCache().Store(directoryListing_, currentServer_); controlSocket_.SendDirectoryListingNotification(directoryListing_.path, topLevel_, false); currentPath_ = path_; return FZ_REPLY_OK; } LogMessage(MessageType::Debug_Warning, L"ListParseResponse called at inproper time: %d", opState); return FZ_REPLY_INTERNALERROR; } int CStorjListOpData::SubcommandResult(int prevResult, COpData const&) { LogMessage(MessageType::Debug_Verbose, L"CStorjListOpData::SubcommandResult() in state %d", opState); if (prevResult != FZ_REPLY_OK) { return prevResult; } switch (opState) { case list_waitresolve: opState = list_waitlock; if (!controlSocket_.TryLockCache(CStorjControlSocket::lock_list, path_)) { time_before_locking_ = fz::monotonic_clock::now(); return FZ_REPLY_WOULDBLOCK; } opState = list_list; return FZ_REPLY_CONTINUE; } LogMessage(MessageType::Debug_Warning, L"Unknown opState in CStorjListOpData::SubcommandResult()"); return FZ_REPLY_INTERNALERROR; } int CStorjListOpData::ParseEntry(std::wstring && name, std::wstring const& size, std::wstring && id, std::wstring const& created) { if (opState != list_list) { LogMessage(MessageType::Debug_Warning, L"ListParseResponse called at inproper time: %d", opState); return FZ_REPLY_INTERNALERROR; } if (name == L".") { pathId_ = id; return FZ_REPLY_WOULDBLOCK; } CDirentry entry; entry.name = name; entry.ownerGroup.get() = id; if (bucket_.empty()) { entry.flags = CDirentry::flag_dir; } else { if (!entry.name.empty() && entry.name.back() == '/') { entry.flags = CDirentry::flag_dir; entry.name.pop_back(); } else { entry.flags = 0; } } if (entry.is_dir()) { entry.size = -1; } else { entry.size = fz::to_integral<int64_t>(size, -1); } entry.time.set(created, fz::datetime::utc); if (!entry.name.empty()) { directoryListing_.Append(std::move(entry)); } return FZ_REPLY_WOULDBLOCK; }
madnight/filezilla
src/engine/storj/list.cpp
C++
gpl-2.0
4,511
24.777143
143
0.688317
false
/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 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. * */ #include <linux/init.h> #include <linux/ioport.h> #include <linux/platform_device.h> #include <linux/bootmem.h> #include <asm/mach-types.h> #include <mach/msm_bus_board.h> #include <mach/msm_memtypes.h> #include <mach/board.h> #include <mach/gpio.h> #include <mach/gpiomux.h> #include <linux/ion.h> #include <mach/ion.h> #include "devices.h" #ifndef CONFIG_MACH_LGE #endif #include <linux/fb.h> #include "../../../../drivers/video/msm/msm_fb.h" #include "../../../../drivers/video/msm/msm_fb_def.h" #include "../../../../drivers/video/msm/mipi_dsi.h" #include <mach/board_lge.h> #include CONFIG_BOARD_HEADER_FILE #ifdef CONFIG_LGE_KCAL #ifdef CONFIG_LGE_QC_LCDC_LUT extern int set_qlut_kcal_values(int kcal_r, int kcal_g, int kcal_b); extern int refresh_qlut_display(void); #else #error only kcal by Qucalcomm LUT is supported now!!! #endif #endif #ifdef CONFIG_FB_MSM_TRIPLE_BUFFER #define MSM_FB_PRIM_BUF_SIZE (LCD_RESOLUTION_X * LCD_RESOLUTION_Y * 4 * 3) /* 4(bpp) x 3(pages) */ #else #define MSM_FB_PRIM_BUF_SIZE (LCD_RESOLUTION_X * LCD_RESOLUTION_Y * 4 * 2) /* 4(bpp) x 2(pages) */ #endif #ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL #define MSM_FB_EXT_BUF_SIZE (1920 * 1088 * 2 * 1) /* 2 bpp x 1 page */ #elif defined(CONFIG_FB_MSM_TVOUT) #define MSM_FB_EXT_BUF_SIZE (720 * 576 * 2 * 2) /* 2 bpp x 2 pages */ #else #define MSM_FB_EXT_BUF_SIZE 0 #endif /* Note: must be multiple of 4096 */ #define MSM_FB_SIZE roundup(MSM_FB_PRIM_BUF_SIZE + MSM_FB_EXT_BUF_SIZE, 4096) #ifdef CONFIG_FB_MSM_OVERLAY0_WRITEBACK #define MSM_FB_OVERLAY0_WRITEBACK_SIZE roundup((LCD_RESOLUTION_X * LCD_RESOLUTION_Y * 3 * 2), 4096) #else #define MSM_FB_OVERLAY0_WRITEBACK_SIZE (0) #endif /* CONFIG_FB_MSM_OVERLAY0_WRITEBACK */ #ifdef CONFIG_FB_MSM_OVERLAY1_WRITEBACK #define MSM_FB_OVERLAY1_WRITEBACK_SIZE roundup((1920 * 1088 * 3 * 2), 4096) #else #define MSM_FB_OVERLAY1_WRITEBACK_SIZE (0) #endif /* CONFIG_FB_MSM_OVERLAY1_WRITEBACK */ #define MDP_VSYNC_GPIO 0 #define MIPI_CMD_NOVATEK_QHD_PANEL_NAME "mipi_cmd_novatek_qhd" #define MIPI_VIDEO_NOVATEK_QHD_PANEL_NAME "mipi_video_novatek_qhd" #define MIPI_VIDEO_TOSHIBA_WSVGA_PANEL_NAME "mipi_video_toshiba_wsvga" #define MIPI_VIDEO_TOSHIBA_WUXGA_PANEL_NAME "mipi_video_toshiba_wuxga" #define MIPI_VIDEO_CHIMEI_WXGA_PANEL_NAME "mipi_video_chimei_wxga" #define MIPI_VIDEO_SIMULATOR_VGA_PANEL_NAME "mipi_video_simulator_vga" #define MIPI_CMD_RENESAS_FWVGA_PANEL_NAME "mipi_cmd_renesas_fwvga" #define HDMI_PANEL_NAME "hdmi_msm" #define TVOUT_PANEL_NAME "tvout_msm" #ifdef CONFIG_FB_MSM_HDMI_AS_PRIMARY unsigned char hdmi_is_primary = 1; #else unsigned char hdmi_is_primary; #endif #define TUNING_BUFSIZE 4096 #define TUNING_REGSIZE 40 #define TUNING_REGNUM 10 #define LCD_GAMMA 0 #if defined(CONFIG_LGE_BACKLIGHT_CABC) #define CABC_POWERON_OFFSET 4 /* offset from lcd display on cmds */ #define CABC_OFF 0 #define CABC_ON 1 #define CABC_10 1 #define CABC_20 2 #define CABC_30 3 #define CABC_40 4 #define CABC_50 5 #define CABC_DEFAULT CABC_10 #if defined (CONFIG_LGE_BACKLIGHT_CABC_DEBUG) static int lgit_cabc_index = CABC_DEFAULT; #endif /* CONFIG_LGE_BACKLIGHT_CABC_DEBUG */ #endif /* CONFIG_LGE_BACKLIGHT_CABC */ static struct resource msm_fb_resources[] = { { .flags = IORESOURCE_DMA, } }; #ifndef CONFIG_MACH_LGE #ifndef CONFIG_FB_MSM_MIPI_PANEL_DETECT static void set_mdp_clocks_for_wuxga(void); #endif #endif static int msm_fb_detect_panel(const char *name) { return 0; } static struct msm_fb_platform_data msm_fb_pdata = { .detect_client = msm_fb_detect_panel, }; static struct platform_device msm_fb_device = { .name = "msm_fb", .id = 0, .num_resources = ARRAY_SIZE(msm_fb_resources), .resource = msm_fb_resources, .dev.platform_data = &msm_fb_pdata, }; #ifndef CONFIG_MACH_LGE static void mipi_dsi_panel_pwm_cfg(void) { int rc; static int mipi_dsi_panel_gpio_configured; static struct pm_gpio pwm_enable = { .direction = PM_GPIO_DIR_OUT, .output_buffer = PM_GPIO_OUT_BUF_CMOS, .output_value = 1, .pull = PM_GPIO_PULL_NO, .vin_sel = PM_GPIO_VIN_VPH, .out_strength = PM_GPIO_STRENGTH_HIGH, .function = PM_GPIO_FUNC_NORMAL, .inv_int_pol = 0, .disable_pin = 0, }; static struct pm_gpio pwm_mode = { .direction = PM_GPIO_DIR_OUT, .output_buffer = PM_GPIO_OUT_BUF_CMOS, .output_value = 0, .pull = PM_GPIO_PULL_NO, .vin_sel = PM_GPIO_VIN_S4, .out_strength = PM_GPIO_STRENGTH_HIGH, .function = PM_GPIO_FUNC_2, .inv_int_pol = 0, .disable_pin = 0, }; if (mipi_dsi_panel_gpio_configured == 0) { /* pm8xxx: gpio-21, Backlight Enable */ rc = pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS(21), &pwm_enable); if (rc != 0) pr_err("%s: pwm_enabled failed\n", __func__); /* pm8xxx: gpio-24, Bl: Off, PWM mode */ rc = pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS(24), &pwm_mode); if (rc != 0) pr_err("%s: pwm_mode failed\n", __func__); mipi_dsi_panel_gpio_configured++; } } #endif static bool dsi_power_on; /* LGE_CHANGE * LG Display 4.0' WVGA for l_dcm * kyunghoo.ryu@lge.com */ static int mipi_dsi_panel_power(int on) { static struct regulator *reg_l8, *reg_l2, *reg_lvs6; static int gpio43 = PM8921_GPIO_PM_TO_SYS(43); int rc; pr_debug("%s: state : %d\n", __func__, on); if (!dsi_power_on) { reg_l8 = regulator_get(&msm_mipi_dsi1_device.dev, "dsi_vdc"); if (IS_ERR(reg_l8)) { pr_err("could not get 8921_l8, rc = %ld\n", PTR_ERR(reg_l8)); return -ENODEV; } reg_lvs6 = regulator_get(&msm_mipi_dsi1_device.dev, "8921_lvs6"); if (IS_ERR(reg_lvs6)) { pr_err("could not get 8921_lvs6, rc = %ld\n", PTR_ERR(reg_lvs6)); return -ENODEV; } reg_l2 = regulator_get(&msm_mipi_dsi1_device.dev, "dsi_vdda"); if (IS_ERR(reg_l2)) { pr_err("could not get 8921_l2, rc = %ld\n", PTR_ERR(reg_l2)); return -ENODEV; } rc = regulator_set_voltage(reg_l8, 2800000, 2800000); if (rc) { pr_err("set_voltage l8 failed, rc=%d\n", rc); return -EINVAL; } rc = regulator_set_voltage(reg_l2, 1200000, 1200000); if (rc) { pr_err("set_voltage l2 failed, rc=%d\n", rc); return -EINVAL; } /* VREG_2P8_LCD_VCI enable - kyunghoo.ryu@lge.com */ rc = gpio_request(LCD_VCI_EN_GPIO, "LCD_VCI_EN_GPIO"); if (rc) { pr_err("'%s'(%d) gpio_request failed, rc=%d\n", "LCD_VCI_EN_GPIO", LCD_VCI_EN_GPIO, rc); } gpio_tlmm_config(GPIO_CFG(LCD_VCI_EN_GPIO, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA), GPIO_CFG_ENABLE); rc = gpio_request(gpio43, "disp_rst_n"); if (rc) { pr_err("request gpio 43 failed, rc=%d\n", rc); return -ENODEV; } dsi_power_on = true; } if (on) { rc = regulator_set_optimum_mode(reg_l8, 100000); if (rc < 0) { pr_err("set_optimum_mode l8 failed, rc=%d\n", rc); return -EINVAL; } rc = regulator_set_optimum_mode(reg_l2, 100000); if (rc < 0) { pr_err("set_optimum_mode l2 failed, rc=%d\n", rc); return -EINVAL; } rc = regulator_enable(reg_l8); if (rc) { pr_err("enable l8 failed, rc=%d\n", rc); return -ENODEV; } rc = regulator_enable(reg_lvs6); if (rc) { pr_err("enable lvs6 failed, rc=%d\n", rc); return -ENODEV; } rc = gpio_direction_output(LCD_VCI_EN_GPIO, 1); mdelay(1); rc = regulator_enable(reg_l2); if (rc) { pr_err("enable l2 failed, rc=%d\n", rc); return -ENODEV; } } else { rc = regulator_disable(reg_l8); if (rc) { pr_err("disable reg_l8 failed, rc=%d\n", rc); return -ENODEV; } rc = regulator_disable(reg_lvs6); if (rc) { pr_err("disable reg_lvs6 failed, rc=%d\n", rc); return -ENODEV; } rc = regulator_disable(reg_l2); if (rc) { pr_err("enable l2 failed, rc=%d\n", rc); return -ENODEV; } /* LCD Reset LOW */ gpio_direction_output(gpio43, 0); /* LCD VCI EN LOW */ rc = gpio_direction_output(LCD_VCI_EN_GPIO, 0); rc = regulator_set_optimum_mode(reg_l8, 100); if (rc < 0) { pr_err("set_optimum_mode l8 failed, rc=%d\n", rc); return -EINVAL; } rc = regulator_set_optimum_mode(reg_l2, 100); if (rc < 0) { pr_err("set_optimum_mode l2 failed, rc=%d\n", rc); return -EINVAL; } } return 0; } static struct mipi_dsi_platform_data mipi_dsi_pdata = { .vsync_gpio = MDP_VSYNC_GPIO, .dsi_power_save = mipi_dsi_panel_power, }; #ifdef CONFIG_MSM_BUS_SCALING static struct msm_bus_vectors rotator_init_vectors[] = { { .src = MSM_BUS_MASTER_ROTATOR, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = 0, .ib = 0, }, }; static struct msm_bus_vectors rotator_ui_vectors[] = { { .src = MSM_BUS_MASTER_ROTATOR, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = (1024 * 600 * 4 * 2 * 60), .ib = (1024 * 600 * 4 * 2 * 60 * 1.5), }, }; static struct msm_bus_vectors rotator_vga_vectors[] = { { .src = MSM_BUS_MASTER_ROTATOR, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = (640 * 480 * 2 * 2 * 30), .ib = (640 * 480 * 2 * 2 * 30 * 1.5), }, }; static struct msm_bus_vectors rotator_720p_vectors[] = { { .src = MSM_BUS_MASTER_ROTATOR, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = (1280 * 736 * 2 * 2 * 30), .ib = (1280 * 736 * 2 * 2 * 30 * 1.5), }, }; static struct msm_bus_vectors rotator_1080p_vectors[] = { { .src = MSM_BUS_MASTER_ROTATOR, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = (1920 * 1088 * 2 * 2 * 30), .ib = (1920 * 1088 * 2 * 2 * 30 * 1.5), }, }; static struct msm_bus_paths rotator_bus_scale_usecases[] = { { ARRAY_SIZE(rotator_init_vectors), rotator_init_vectors, }, { ARRAY_SIZE(rotator_ui_vectors), rotator_ui_vectors, }, { ARRAY_SIZE(rotator_vga_vectors), rotator_vga_vectors, }, { ARRAY_SIZE(rotator_720p_vectors), rotator_720p_vectors, }, { ARRAY_SIZE(rotator_1080p_vectors), rotator_1080p_vectors, }, }; struct msm_bus_scale_pdata rotator_bus_scale_pdata = { rotator_bus_scale_usecases, ARRAY_SIZE(rotator_bus_scale_usecases), .name = "rotator", }; static struct msm_bus_vectors mdp_init_vectors[] = { { .src = MSM_BUS_MASTER_MDP_PORT0, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = 0, .ib = 0, }, }; #ifdef CONFIG_FB_MSM_HDMI_AS_PRIMARY static struct msm_bus_vectors hdmi_as_primary_vectors[] = { /* If HDMI is used as primary */ { .src = MSM_BUS_MASTER_MDP_PORT0, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = 2000000000, .ib = 2000000000, }, }; static struct msm_bus_paths mdp_bus_scale_usecases[] = { { ARRAY_SIZE(mdp_init_vectors), mdp_init_vectors, }, { ARRAY_SIZE(hdmi_as_primary_vectors), hdmi_as_primary_vectors, }, { ARRAY_SIZE(hdmi_as_primary_vectors), hdmi_as_primary_vectors, }, { ARRAY_SIZE(hdmi_as_primary_vectors), hdmi_as_primary_vectors, }, { ARRAY_SIZE(hdmi_as_primary_vectors), hdmi_as_primary_vectors, }, { ARRAY_SIZE(hdmi_as_primary_vectors), hdmi_as_primary_vectors, }, }; #else static struct msm_bus_vectors mdp_ui_vectors[] = { { .src = MSM_BUS_MASTER_MDP_PORT0, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = 216000000 * 2, .ib = 270000000 * 2, }, }; static struct msm_bus_vectors mdp_vga_vectors[] = { /* VGA and less video */ { .src = MSM_BUS_MASTER_MDP_PORT0, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = 216000000 * 2, .ib = 270000000 * 2, }, }; static struct msm_bus_vectors mdp_720p_vectors[] = { /* 720p and less video */ { .src = MSM_BUS_MASTER_MDP_PORT0, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = 230400000 * 2, .ib = 288000000 * 2, }, }; static struct msm_bus_vectors mdp_1080p_vectors[] = { /* 1080p and less video */ { .src = MSM_BUS_MASTER_MDP_PORT0, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = 334080000 * 2, .ib = 417600000 * 2, }, }; static struct msm_bus_paths mdp_bus_scale_usecases[] = { { ARRAY_SIZE(mdp_init_vectors), mdp_init_vectors, }, { ARRAY_SIZE(mdp_ui_vectors), mdp_ui_vectors, }, { ARRAY_SIZE(mdp_ui_vectors), mdp_ui_vectors, }, { ARRAY_SIZE(mdp_vga_vectors), mdp_vga_vectors, }, { ARRAY_SIZE(mdp_720p_vectors), mdp_720p_vectors, }, { ARRAY_SIZE(mdp_1080p_vectors), mdp_1080p_vectors, }, }; #endif static struct msm_bus_scale_pdata mdp_bus_scale_pdata = { mdp_bus_scale_usecases, ARRAY_SIZE(mdp_bus_scale_usecases), .name = "mdp", }; #endif static int mdp_core_clk_rate_table[] = { 128000000,/*85330000,*/ 128000000,/*85330000,*/ 160000000, 200000000, }; struct msm_fb_info_st { unsigned int width_mm; unsigned int height_mm; }; static struct msm_fb_info_st msm_fb_info_data = { .width_mm = MSM_FB_WIDTH_MM, .height_mm = MSM_FB_HEIGHT_MM }; static int msm_fb_event_notify(struct notifier_block *self, unsigned long action, void *data) { struct fb_event *event = data; struct fb_info *info = event->info; struct msm_fb_info_st *fb_info_mm = &msm_fb_info_data; int ret = 0; switch (action) { case FB_EVENT_FB_REGISTERED: info->var.width = fb_info_mm->width_mm; info->var.height = fb_info_mm->height_mm; break; } return ret; } static struct notifier_block msm_fb_event_notifier = { .notifier_call = msm_fb_event_notify, }; static struct msm_panel_common_pdata mdp_pdata = { .gpio = MDP_VSYNC_GPIO, .mdp_core_clk_rate = 128000000, /*85330000,*/ .mdp_core_clk_table = mdp_core_clk_rate_table, .num_mdp_clk = ARRAY_SIZE(mdp_core_clk_rate_table), #ifdef CONFIG_MSM_BUS_SCALING .mdp_bus_scale_table = &mdp_bus_scale_pdata, #endif .mdp_rev = MDP_REV_42, #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION .mem_hid = ION_CP_MM_HEAP_ID, #else .mem_hid = MEMTYPE_EBI1, #endif .cont_splash_enabled = 0x00, }; #ifndef CONFIG_MACH_LGE #ifndef CONFIG_FB_MSM_MIPI_PANEL_DETECT /** * Set MDP clocks to high frequency to avoid DSI underflow * when using high resolution 1200x1920 WUXGA panels */ static void set_mdp_clocks_for_wuxga(void) { int i; mdp_ui_vectors[0].ab = 2000000000; mdp_ui_vectors[0].ib = 2000000000; mdp_vga_vectors[0].ab = 2000000000; mdp_vga_vectors[0].ib = 2000000000; mdp_720p_vectors[0].ab = 2000000000; mdp_720p_vectors[0].ib = 2000000000; mdp_1080p_vectors[0].ab = 2000000000; mdp_1080p_vectors[0].ib = 2000000000; mdp_pdata.mdp_core_clk_rate = 200000000; for (i = 0; i < ARRAY_SIZE(mdp_core_clk_rate_table); i++) mdp_core_clk_rate_table[i] = 200000000; } #endif #endif void __init msm8960_mdp_writeback(struct memtype_reserve* reserve_table) { mdp_pdata.ov0_wb_size = MSM_FB_OVERLAY0_WRITEBACK_SIZE; mdp_pdata.ov1_wb_size = MSM_FB_OVERLAY1_WRITEBACK_SIZE; #if defined(CONFIG_ANDROID_PMEM) && !defined(CONFIG_MSM_MULTIMEDIA_USE_ION) reserve_table[mdp_pdata.mem_hid].size += mdp_pdata.ov0_wb_size; reserve_table[mdp_pdata.mem_hid].size += mdp_pdata.ov1_wb_size; #endif } /* LGE_CHANGE * * LM3533TMX BL driver for l_dcm * 2011-11-23 kyunghoo.ryu@lge.com */ #ifdef CONFIG_LGE_BACKLIGHT_LM3533 extern void lm3533_lcd_backlight_set_level(int level); #ifdef CONFIG_FB_MSM_MIPI_DSI_LGIT static int mipi_lgit_backlight_level(int level, int max, int min) { lm3533_lcd_backlight_set_level(level); return 0; } #if defined(CONFIG_FB_MSM_MIPI_LGIT_CMD_WVGA_INVERSE_PT_PANEL) ||\ defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL) /* LG Display 4.0" WVGA for l_dcm (CMD Mode) * Rotate Display output by l_dcm h/w implementation * 2011-11-24 Kyunghoo.ryu@lge.com */ #if defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL) static char video_switch[] = {0x01, 0x47}; #endif /* LG-4572B only for Rev.A and Rev.B */ static char hrx_to_old [ 2] = {0x03, 0x00}; static char inversion_off_old [ 2] = {0x20, 0x00}; static char tear_on_old [ 2] = {0x35, 0x00}; static char set_address_mode_old [ 2] = {0x36, 0x02}; /* Flip Horizontal Only (cause Tearing problem) - Kyunghoo.ryu@lge.com */ static char if_pixel_format_old [ 2] = {0x3A, 0x77}; #if defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL) static char rgb_interface_setting_old [ ] = {0xB1, 0x06, 0x43, 0x0A}; #endif static char page_address_set_old [ 5] = {0x2B, 0x00, 0x00, 0x03, 0x1F}; static char panel_char_setting_old [ 3] = {0xB2, 0x00, 0xC8}; static char panel_drive_setting_old [ 2] = {0xB3, 0x00}; static char display_mode_ctrl_old [ 2] = {0xB4, 0x04}; static char display_ctrl1_old [ 6] = {0xB5, 0x42, 0x10, 0x10, 0x00, 0x20}; static char display_ctrl2_old [ 7] = {0xB6, 0x0B, 0x0F, 0x02, 0x40, 0x10, 0xE8}; #if defined(CONFIG_FB_MSM_MIPI_LGIT_CMD_WVGA_INVERSE_PT_PANEL) static char display_ctrl3_old [ 6] = {0xB7, 0x48, 0x06, 0x2E, 0x00, 0x00}; #endif static char osc_setting_old [ 3] = {0xC0, 0x01, 0x15}; static char power_ctrl3_old [ 6] = {0xC3, 0x07, 0x03, 0x04, 0x04, 0x04}; static char power_ctrl4_old [ 7] = {0xC4, 0x12, 0x24, 0x18, 0x18, 0x05, 0x49}; static char power_ctrl5_old [ 2] = {0xC5, 0x69}; static char power_ctrl6_old [ 3] = {0xC6, 0x41, 0x63}; static char exit_sleep_old [ 2] = {0x11, 0x00}; static char display_on_old [ 2] = {0x29, 0x00}; static char enter_sleep_old [ 2] = {0x10, 0x00}; static char display_off_old [ 2] = {0x28, 0x00}; static char deep_standby_old [ 2] = {0xC1, 0x01}; /* LGE_CHANGE_S LG-4573B H/W Rev.C or upper revision, jamin.koo@lge.com, 2011.02.27 */ static char hrx_to [ 2] = {0x03, 0x00}; static char inversion_off [ 1] = {0x20}; static char set_address_mode [ 2] = {0x36, 0x02}; /* Flip Horizontal Only (cause Tearing problem) - Kyunghoo.ryu@lge.com */ static char if_pixel_format [ 2] = {0x3A, 0x70}; /* LGE_CHANGE_S, Add CABC Code, jamin.koo@lge.com, 2012.03.30 */ #ifdef CONFIG_LGE_BACKLIGHT_CABC static char cabc_51 [ 2] = {0x51,0xE6}; /* LCD CABC CODE, Write Display Brightness */ static char cabc_53 [ 2] = {0x53,0x24}; /* LCD CABC CODE, Write Control Display */ static char cabc_55 [ 2] = {0x55,0x01}; /* LCD CABC CODE, Write Content Adaptive Brightness Control */ static char cabc_5e [ 2] = {0x5E,0x33}; /* LCD CABC CODE, Write CABC Minimum Brightness */ #ifdef CONFIG_LGE_BACKLIGHT_CABC_DEBUG /* Write Display Brightness */ static char config_cabc_51[6][2] = { {0x51, 0x00}, /* off */ {0x51, 0xE6}, /* 10%, 230 */ {0x51, 0xCC}, /* 20%, 204 */ {0x51, 0xB3}, /* 30%, 179 */ {0x51, 0x99}, /* 40%, 153 */ {0x51, 0x80} /* 50%, 128 */ }; /* Write Control Display */ static char config_cabc_53[2][2] = { {0x53, 0x00}, /* off */ {0x53, 0x24} /* on */ }; /* Write Content Adaptive Brightness Control */ static char config_cabc_55[2][2] = { {0x55, 0x00}, /* off */ {0x55, 0x01} /* on */ }; /* Write CABC Minimum Brightness */ static char config_cabc_5e[6][2] = { {0x5E, 0x00}, /* off */ {0x5E, 0x33}, /* 10% */ {0x5E, 0x33}, /* 20% */ {0x5E, 0x33}, /* 30% */ {0x5E, 0x33}, /* 40% */ {0x5E, 0x33} /* 50% */ }; #endif /* CONFIG_LGE_BACKLIGHT_CABC_DEBUG */ #endif /* CONFIG_LGE_BACKLIGHT_CABC */ /* LGE_CHANGE_E, Add CABC Code, jamin.koo@lge.com, 2012.03.30 */ static char rgb_interface_setting [ 4] = {0xB1, 0x06, 0x43, 0x0A}; static char panel_char_setting [ 3] = {0xB2, 0x00, 0xC8}; static char panel_drive_setting [ 2] = {0xB3, 0x00}; static char display_mode_ctrl [ 2] = {0xB4, 0x04}; static char display_ctrl1 [ 6] = {0xB5, 0x40, 0x18, 0x02, 0x00, 0x01}; static char display_ctrl2 [ 7] = {0xB6, 0x0B, 0x0F, 0x02, 0x40, 0x10, 0xE8}; static char osc_setting [ 3] = {0xC0, 0x01, 0x18}; static char power_ctrl3 [ 6] = {0xC3, 0x07, 0x0A, 0x0A, 0x0A, 0x02}; static char power_ctrl4 [ 7] = {0xC4, 0x12, 0x24, 0x18, 0x18, 0x04, 0x49}; static char power_ctrl5 [ 2] = {0xC5, 0x6B}; static char power_ctrl6 [ 4] = {0xC6, 0x41, 0x63, 0x03}; static char p_gamma_r_setting [10] = {0xD0, 0x00, 0x01, 0x64, 0x25, 0x07, 0x02, 0x61, 0x13, 0x03}; static char n_gamma_r_setting [10] = {0xD1, 0x00, 0x01, 0x64, 0x25, 0x07, 0x02, 0x61, 0x13, 0x03}; static char p_gamma_g_setting [10] = {0xD2, 0x00, 0x01, 0x64, 0x25, 0x07, 0x02, 0x61, 0x13, 0x03}; static char n_gamma_g_setting [10] = {0xD3, 0x00, 0x01, 0x64, 0x25, 0x07, 0x02, 0x61, 0x13, 0x03}; static char p_gamma_b_setting [10] = {0xD4, 0x00, 0x01, 0x64, 0x25, 0x07, 0x02, 0x61, 0x13, 0x03}; static char n_gamma_b_setting [10] = {0xD5, 0x00, 0x01, 0x64, 0x25, 0x07, 0x02, 0x61, 0x13, 0x03}; static char exit_sleep [ 1] = {0x11}; static char display_on [ 1] = {0x29}; static char enter_sleep [ 1] = {0x10}; static char display_off [ 1] = {0x28}; /* LGE_CHANGE_E LG-4573B H/W Rev.C or upper revision, jamin.koo@lge.com, 2011.02.27 */ /* LG-4572B only for Rev.A and Rev.B */ /* initialize device */ static struct dsi_cmd_desc lgit_power_on_set_old[] = { #if defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL) {DTYPE_GEN_WRITE2, 1, 0, 0, 0, sizeof(video_switch), video_switch}, #endif {DTYPE_GEN_WRITE2, 1, 0, 0, 0, sizeof(hrx_to_old), hrx_to_old}, {DTYPE_DCS_WRITE, 1, 0, 0, 0, sizeof(inversion_off_old), inversion_off_old}, {DTYPE_DCS_WRITE, 1, 0, 0, 0, sizeof(tear_on_old), tear_on_old}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(set_address_mode_old), set_address_mode_old}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(if_pixel_format_old), if_pixel_format_old}, #if defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL) {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(rgb_interface_setting_old), rgb_interface_setting_old}, #endif {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(page_address_set_old), page_address_set_old}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(panel_char_setting_old), panel_char_setting_old}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(panel_drive_setting_old), panel_drive_setting_old}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(display_mode_ctrl_old), display_mode_ctrl_old}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(display_ctrl1_old), display_ctrl1_old}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(display_ctrl2_old), display_ctrl2_old}, #if defined(CONFIG_FB_MSM_MIPI_LGIT_CMD_WVGA_INVERSE_PT_PANEL) {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(display_ctrl3_old), display_ctrl3_old}, #endif {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(osc_setting_old), osc_setting_old}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(power_ctrl3_old), power_ctrl3_old}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(power_ctrl4_old), power_ctrl4_old}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(power_ctrl5_old), power_ctrl5_old}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(power_ctrl6_old), power_ctrl6_old}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(p_gamma_r_setting), p_gamma_r_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(n_gamma_r_setting), n_gamma_r_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(p_gamma_g_setting), p_gamma_g_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(n_gamma_g_setting), n_gamma_g_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(p_gamma_b_setting), p_gamma_b_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(n_gamma_b_setting), n_gamma_b_setting}, {DTYPE_DCS_WRITE, 1, 0, 0, 100, sizeof(exit_sleep_old), exit_sleep_old}, {DTYPE_DCS_WRITE, 1, 0, 0, 100, sizeof(display_on_old), display_on_old}, }; static struct dsi_cmd_desc lgit_power_off_set_old[] = { {DTYPE_DCS_WRITE, 1, 0, 0, 0, sizeof(display_off_old), display_off_old}, {DTYPE_DCS_WRITE, 1, 0, 0, 60, sizeof(enter_sleep_old), enter_sleep_old}, {DTYPE_DCS_WRITE, 1, 0, 0, 0, sizeof(deep_standby_old), deep_standby_old}, }; /* LGE_CHANGE_S LG-4573B H/W Rev.C or upper revision, jamin.koo@lge.com, 2011.02.27 */ /* initialize device */ static struct dsi_cmd_desc lgit_power_on_set[] = { {DTYPE_GEN_WRITE2, 1, 0, 0, 0, sizeof(hrx_to), hrx_to}, {DTYPE_DCS_WRITE, 1, 0, 0, 0, sizeof(inversion_off), inversion_off}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(set_address_mode), set_address_mode}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(if_pixel_format), if_pixel_format}, /* LGE_CHANGE_S, Add CABC Code, jamin.koo@lge.com, 2012.03.30 */ #if defined(CONFIG_LGE_BACKLIGHT_CABC) {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(cabc_51), cabc_51}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(cabc_53), cabc_53}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(cabc_55), cabc_55}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(cabc_5e), cabc_5e}, #endif /* CONFIG_LGE_BACKLIGHT_CABC */ /* LGE_CHANGE_E, Add CABC Code, jamin.koo@lge.com, 2012.03.30 */ {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(rgb_interface_setting), rgb_interface_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(panel_char_setting), panel_char_setting}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(panel_drive_setting), panel_drive_setting}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(display_mode_ctrl), display_mode_ctrl}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(display_ctrl1), display_ctrl1}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(display_ctrl2), display_ctrl2}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(osc_setting), osc_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(power_ctrl3), power_ctrl3}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(power_ctrl4), power_ctrl4}, {DTYPE_DCS_WRITE1, 1, 0, 0, 0, sizeof(power_ctrl5), power_ctrl5}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(power_ctrl6), power_ctrl6}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(p_gamma_r_setting), p_gamma_r_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(n_gamma_r_setting), n_gamma_r_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(p_gamma_g_setting), p_gamma_g_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(n_gamma_g_setting), n_gamma_g_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(p_gamma_b_setting), p_gamma_b_setting}, {DTYPE_DCS_LWRITE, 1, 0, 0, 0, sizeof(n_gamma_b_setting), n_gamma_b_setting}, {DTYPE_DCS_WRITE, 1, 0, 0, 120, sizeof(exit_sleep), exit_sleep}, {DTYPE_DCS_WRITE, 1, 0, 0, 40, sizeof(display_on), display_on}, }; /* LGE_CHANGE_E LG-4573B H/W Rev.C or upper revision, jamin.koo@lge.com, 2011.02.27 */ static struct dsi_cmd_desc lgit_power_off_set[] = { {DTYPE_DCS_WRITE, 1, 0, 0, 40, sizeof(display_off), display_off}, {DTYPE_DCS_WRITE, 1, 0, 0, 10, sizeof(enter_sleep), enter_sleep}, }; #if defined(CONFIG_LGE_BACKLIGHT_CABC) && \ defined(CONFIG_LGE_BACKLIGHT_CABC_DEBUG) void set_lgit_cabc(int cabc_index) { pr_info("%s! cabc_index: %d\n", __func__, cabc_index); switch(cabc_index) { case 0: /* CABC OFF */ lgit_power_on_set[CABC_POWERON_OFFSET+2].payload = config_cabc_55[CABC_OFF]; break; case 1: /* 10% */ case 2: /* 20% */ case 3: /* 30% */ case 4: /* 40% */ case 5: /* 50% */ { /* CABC ON */ lgit_power_on_set[CABC_POWERON_OFFSET].payload = config_cabc_51[cabc_index]; lgit_power_on_set[CABC_POWERON_OFFSET+1].payload = config_cabc_53[CABC_ON]; lgit_power_on_set[CABC_POWERON_OFFSET+2].payload = config_cabc_55[CABC_ON]; lgit_power_on_set[CABC_POWERON_OFFSET+3].payload = config_cabc_5e[cabc_index]; } break; default: printk("out of range cabc_index %d", cabc_index); return; } lgit_cabc_index = cabc_index; return; } EXPORT_SYMBOL(set_lgit_cabc); int get_lgit_cabc(void) { return lgit_cabc_index; } EXPORT_SYMBOL(get_lgit_cabc); #endif /* CONFIG_LGE_BACKLIGHT_CABC && CONFIG_LGE_BACKLIGHT_CABC_DEBUG */ /* LG-4572B only for Rev.A and Rev.B */ static struct msm_panel_common_pdata mipi_lgit_pdata_old = { .backlight_level = mipi_lgit_backlight_level, #if defined(CONFIG_FB_MSM_MIPI_LGIT_CMD_WVGA_INVERSE_PT_PANEL) ||\ defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL) .power_on_set = lgit_power_on_set_old, .power_off_set = lgit_power_off_set_old, .power_on_set_size = ARRAY_SIZE(lgit_power_on_set_old), .power_off_set_size = ARRAY_SIZE(lgit_power_off_set_old), .max_backlight_level = 0xFF, #endif #if defined (CONFIG_LGE_BACKLIGHT_LM3530) .max_backlight_level = 0x71, #elif defined (CONFIG_LGE_BACKLIGHT_LM3533) .max_backlight_level = 0xFF, #endif }; /* LGE_CHANGE_S LG-4573B H/W Rev.C or upper revision, jamin.koo@lge.com, 2011.02.27 */ static struct msm_panel_common_pdata mipi_lgit_pdata = { .backlight_level = mipi_lgit_backlight_level, #if defined(CONFIG_FB_MSM_MIPI_LGIT_CMD_WVGA_INVERSE_PT_PANEL) ||\ defined(CONFIG_FB_MSM_MIPI_LGIT_VIDEO_WVGA_INVERSE_PT_PANEL) .power_on_set = lgit_power_on_set, .power_off_set = lgit_power_off_set, .power_on_set_size = ARRAY_SIZE(lgit_power_on_set), .power_off_set_size = ARRAY_SIZE(lgit_power_off_set), .max_backlight_level = 0xFF, #endif /* LGE_CHANGE_E LG-4573B H/W Rev.C or upper revision, jamin.koo@lge.com, 2011.02.27 */ #if defined (CONFIG_LGE_BACKLIGHT_LM3530) .max_backlight_level = 0x71, #elif defined (CONFIG_LGE_BACKLIGHT_LM3533) .max_backlight_level = 0xFF, #endif }; static struct platform_device mipi_dsi_lgit_panel_device = { .name = "mipi_lgit", .id = 0, .dev = { .platform_data = &mipi_lgit_pdata, } }; #endif #endif #ifdef CONFIG_LGE_KCAL extern int set_kcal_values(int kcal_r, int kcal_g, int kcal_b); extern int refresh_kcal_display(void); extern int get_kcal_values(int *kcal_r, int *kcal_g, int *kcal_b); static struct kcal_platform_data kcal_pdata = { .set_values = set_kcal_values, .get_values = get_kcal_values, .refresh_display = refresh_kcal_display }; static struct platform_device kcal_platrom_device = { .name = "kcal_ctrl", .dev = { .platform_data = &kcal_pdata, } }; #endif #endif #ifdef CONFIG_FB_MSM_WRITEBACK_MSM_PANEL static struct platform_device wfd_panel_device = { .name = "wfd_panel", .id = 0, .dev.platform_data = NULL, }; static struct platform_device wfd_device = { .name = "msm_wfd", .id = -1, }; #endif #ifdef CONFIG_MSM_BUS_SCALING static struct msm_bus_vectors dtv_bus_init_vectors[] = { { .src = MSM_BUS_MASTER_MDP_PORT0, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = 0, .ib = 0, }, }; static struct msm_bus_vectors dtv_bus_def_vectors[] = { { .src = MSM_BUS_MASTER_MDP_PORT0, .dst = MSM_BUS_SLAVE_EBI_CH0, .ab = 566092800 * 2, .ib = 707616000 * 2, }, }; static struct msm_bus_paths dtv_bus_scale_usecases[] = { { ARRAY_SIZE(dtv_bus_init_vectors), dtv_bus_init_vectors, }, { ARRAY_SIZE(dtv_bus_def_vectors), dtv_bus_def_vectors, }, }; static struct msm_bus_scale_pdata dtv_bus_scale_pdata = { dtv_bus_scale_usecases, ARRAY_SIZE(dtv_bus_scale_usecases), .name = "dtv", }; static struct lcdc_platform_data dtv_pdata = { .bus_scale_table = &dtv_bus_scale_pdata, }; #endif static struct gpiomux_setting mdp_vsync_suspend_cfg = { .func = GPIOMUX_FUNC_GPIO, .drv = GPIOMUX_DRV_2MA, .pull = GPIOMUX_PULL_DOWN, }; static struct gpiomux_setting mdp_vsync_active_cfg = { .func = GPIOMUX_FUNC_1, .drv = GPIOMUX_DRV_2MA, .pull = GPIOMUX_PULL_DOWN, }; static struct msm_gpiomux_config msm8960_mdp_vsync_configs[] __initdata = { { .gpio = MDP_VSYNC_GPIO, .settings = { [GPIOMUX_ACTIVE] = &mdp_vsync_active_cfg, [GPIOMUX_SUSPENDED] = &mdp_vsync_suspend_cfg, }, } }; #ifdef CONFIG_LGE_HIDDEN_RESET int lge_get_fb_phys_info(unsigned long *start, unsigned long *size) { if (!start || !size) return -1; *start = (unsigned long)msm_fb_resources[0].start; *size = (unsigned long)(LCD_RESOLUTION_X * LCD_RESOLUTION_Y * 4); return 0; } void *lge_get_hreset_fb_phys_addr(void) { return (void *)0x88A00000; } #endif static void __init msm_fb_add_devices(void) { #ifdef CONFIG_FB_MSM_WRITEBACK_MSM_PANEL platform_device_register(&wfd_panel_device); platform_device_register(&wfd_device); #endif if (machine_is_msm8x60_rumi3()) { msm_fb_register_device("mdp", NULL); mipi_dsi_pdata.target_type = 1; } else msm_fb_register_device("mdp", &mdp_pdata); msm_fb_register_device("mipi_dsi", &mipi_dsi_pdata); #ifdef CONFIG_MSM_BUS_SCALING msm_fb_register_device("dtv", &dtv_pdata); #endif } void __init msm8960_allocate_fb_region(void) { void *addr; unsigned long size; size = MSM_FB_SIZE; addr = alloc_bootmem_align(size, 0x1000); msm_fb_resources[0].start = __pa(addr); msm_fb_resources[0].end = msm_fb_resources[0].start + size - 1; pr_info("allocating %lu bytes at %p (%lx physical) for fb\n", size, addr, __pa(addr)); } void __init msm8960_set_display_params(char *prim_panel, char *ext_panel) { if (strnlen(prim_panel, PANEL_NAME_MAX_LEN)) { strlcpy(msm_fb_pdata.prim_panel_name, prim_panel, PANEL_NAME_MAX_LEN); pr_debug("msm_fb_pdata.prim_panel_name %s\n", msm_fb_pdata.prim_panel_name); if (!strncmp((char *)msm_fb_pdata.prim_panel_name, HDMI_PANEL_NAME, strnlen(HDMI_PANEL_NAME, PANEL_NAME_MAX_LEN))) { pr_debug("HDMI is the primary display by" " boot parameter\n"); hdmi_is_primary = 1; } } if (strnlen(ext_panel, PANEL_NAME_MAX_LEN)) { strlcpy(msm_fb_pdata.ext_panel_name, ext_panel, PANEL_NAME_MAX_LEN); pr_debug("msm_fb_pdata.ext_panel_name %s\n", msm_fb_pdata.ext_panel_name); } } #ifdef CONFIG_I2C #ifdef CONFIG_LGE_BACKLIGHT_LM3533 #define LM3533_BACKLIGHT_ADDRESS 0x36 struct backlight_platform_data { void (*platform_init)(void); int gpio; unsigned int mode; int max_current; int init_on_boot; int min_brightness; int max_brightness; int default_brightness; int factory_brightness; }; #if defined(CONFIG_LGE_BACKLIGHT_CABC) #define PWM_SIMPLE_EN 0xA0 #endif static struct backlight_platform_data lm3533_data = { .gpio = PM8921_GPIO_PM_TO_SYS(24), .max_current = 0x13, .min_brightness = 0x05, .max_brightness = 0xFF, .default_brightness = 0x91, .factory_brightness = 0x64, }; static struct i2c_board_info msm_i2c_backlight_info[] = { { I2C_BOARD_INFO("lm3533", LM3533_BACKLIGHT_ADDRESS), .platform_data = &lm3533_data, } }; static struct i2c_registry l_dcm_i2c_backlight_device __initdata = { I2C_SURF | I2C_FFA | I2C_FLUID | I2C_RUMI, MSM_8960_GSBI2_QUP_I2C_BUS_ID, msm_i2c_backlight_info, ARRAY_SIZE(msm_i2c_backlight_info), }; #endif /* CONFIG_LGE_BACKLIGHT_LM3533 */ #endif /* CONFIG_I2C */ static int __init panel_gpiomux_init(void) { int rc; rc = msm_gpiomux_init(NR_GPIO_IRQS); if (rc == -EPERM) { pr_info("%s : msm_gpiomux_init is already initialized\n", __func__); } else if (rc) { pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); return rc; } msm_gpiomux_install(msm8960_mdp_vsync_configs, ARRAY_SIZE(msm8960_mdp_vsync_configs)); return 0; } static struct platform_device *l_dcm_panel_devices[] __initdata = { #ifdef CONFIG_FB_MSM_MIPI_DSI_LGIT &mipi_dsi_lgit_panel_device, #ifdef CONFIG_LGE_LCD_TUNING &lcd_misc_device, #endif #endif #ifdef CONFIG_LGE_KCAL &kcal_platrom_device, #endif }; void __init lge_add_lcd_devices(void) { panel_gpiomux_init(); fb_register_client(&msm_fb_event_notifier); /* LGE_CHANGE_S, Assign command set to panel info as H/W revision, jamin.koo@lge.com, 2011.02.27 */ if(lge_get_board_revno() < HW_REV_C) mipi_dsi_lgit_panel_device.dev.platform_data = &mipi_lgit_pdata_old; /* LGE_CHANGE_E, Assign command set to panel info as H/W revision, jamin.koo@lge.com, 2011.02.27 */ platform_add_devices(l_dcm_panel_devices, ARRAY_SIZE(l_dcm_panel_devices)); #ifdef CONFIG_LGE_BACKLIGHT_LM3533 lge_add_msm_i2c_device(&l_dcm_i2c_backlight_device); #endif msm_fb_add_devices(); platform_device_register(&msm_fb_device); }
jameskdev/lge-kernel-d1l_kr
arch/arm/mach-msm/lge/l_dcm/board-l_dcm-panel.c
C
gpl-2.0
35,276
28.033745
133
0.658323
false
<?php include(HTML_DIR . 'overall/header.php'); ?> <body> <section class="engine"><a rel="nofollow" href="#"><?php echo APP_TITLE ?></a></section> <?php include(HTML_DIR . '/overall/topnav.php'); ?> <section class="mbr-section mbr-after-navbar"> <div class="mbr-section__container container mbr-section__container--isolated"> <?php if(isset($_GET['success'])) { echo '<div class="alert alert-dismissible alert-success"> <strong>Completado!</strong> el producto ha sido subido</div>'; } if(isset($_GET['error'])) { if($_GET['error'] == 1) { echo '<div class="alert alert-dismissible alert-danger"> <strong>Error!</strong></strong> todos los campos deben estar llenos. </div>'; } else { echo '<div class="alert alert-dismissible alert-danger"> <strong>Error!</strong></strong> debe existir una categoría para asociar al foro. </div>'; } } ?> <div class="row container"> <div class="pull-right"> <div class="mbr-navbar__column"><ul class="mbr-navbar__items mbr-navbar__items--right mbr-buttons mbr-buttons--freeze mbr-buttons--right btn-inverse mbr-buttons--active"><li class="mbr-navbar__item"> <a class="mbr-buttons__btn btn btn-danger " href="?view=productos">Gestionar Productos</a> </li></ul></div> <div class="mbr-navbar__column"><ul class="mbr-navbar__items mbr-navbar__items--right mbr-buttons mbr-buttons--freeze mbr-buttons--right btn-inverse mbr-buttons--active"><li class="mbr-navbar__item"> <a class="mbr-buttons__btn btn btn-danger active" href="?view=productos&mode=add">Subir Producto</a> </li></ul></div> </div> <ol class="breadcrumb"> <li><a href="?view=index"><i class="fa fa-comments"></i> Productos</a></li> </ol> </div> <div class="row categorias_con_foros"> <div class="col-sm-12"> <div class="row titulo_categoria">Subir un producto</div> <div class="row cajas"> <div class="col-md-12"> <form class="form-horizontal" action="?view=productos&mode=add" method="POST" enctype="multipart/form-data"> <fieldset> <div class="form-group"> <label for="inputEmail" class="col-lg-2 control-label">Tipo de celular</label> <div class="col-lg-10"> <script> $(document).ready(function(){ $('#marca').change(function() { var id=$('#marca').val(); $('#modelo').load('?view=datos&mode=combo&id='+id); }); }); </script> <select class="form-control" name='marca' id='marca'> <?php if(false != $_tipos) { foreach($_tipos as $id_tipo => $array_tipo) { echo '<option value="'.$id_tipo.'">'.$_tipos[$id_tipo]['DES_TIPO'].'</option>'; } }else{ echo '<option value="0">No existen marcas</option>'; } ?> </select> </div> </div> <div class="form-group"> <label for="inputEmail" class="col-lg-2 control-label">Modelo</label> <div class="col-lg-10"> <select class='form-control' name='modelo' id='modelo'> <option value="OpModeloTodos">TODOS</option> </select> </div> </div> <div class="form-group"> <label for="inputEmail" class="col-lg-2 control-label">Precio</label> <div class="col-lg-10"> <input type="text" class="form-control" maxlength="250" name="precio" placeholder="Precio del celular"> </div> </div> <div class="form-group"> <label for="inputEmail" class="col-lg-2 control-label">Condicion</label> <div class="col-lg-10"> <select name="estado" class="form-control"> <option value="N">nuevo</option>'; <option value="U">usado</option> </select> </div> </div> <div class="form-group"> <label for="inputEmail" class="col-lg-2 control-label">Descripcion</label> <div class="col-lg-10"> <textarea class="form-control" name="descripcion" maxlength="100"></textarea> </div> </div> <div class="form-group"> <label for="inputEmail" class="col-lg-2 control-label"> Imagen</label> <div class="col-lg-10"> <input id="imagen" name="imagen" type="file" /> </div> </div> <div class="form-group"> <div class="col-lg-10 col-lg-offset-2"> <button type="reset" class="btn btn-default">Resetear</button> <button type="submit" class="btn btn-primary">Crear</button> </div> </div> </fieldset> </form> </div> </div> </div> </div> </div> </section> <?php include(HTML_DIR . 'overall/footer.php'); ?> </body> </html>
sofiaqsy/Opensale
html/productos/add_producto.php
PHP
gpl-2.0
5,407
34.103896
204
0.504809
false
/*************************************************************************** * Copyright (C) 2011 by Christoph Thelen * * doc_bacardi@users.sourceforge.net * * * * 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. * ***************************************************************************/ #include "muhkuh_split_testdescription.h" #include <wx/filename.h> #include <wx/log.h> #include <wx/txtstrm.h> #include <wx/wfstream.h> muhkuh_split_testdescription::muhkuh_split_testdescription(void) { } muhkuh_split_testdescription::~muhkuh_split_testdescription(void) { } bool muhkuh_split_testdescription::split(wxString strWorkingFolder) { bool fResult; wxFileName tFileName; wxString strXmlFullPath; wxXmlNode *ptNodeTestDescription; size_t sizSubTestIndex; wxXmlNode *ptNode; /* Set the working folder. */ m_strWorkingFolder = strWorkingFolder; /* Create the full path to the test description. */ tFileName.AssignDir(strWorkingFolder); tFileName.SetFullName("test_description.xml"); strXmlFullPath = tFileName.GetFullPath(); /* Does the test description exist and is it readable? */ if( tFileName.FileExists()!=true ) { wxLogError(_("The file %s does not exist!"), strXmlFullPath); fResult = false; } else if( tFileName.IsFileReadable()!=true ) { wxLogError(_("The file %s can not be read!"), strXmlFullPath); fResult = false; } else { /* Ok, we can access the file -> parse the XML tree. */ fResult = m_tXmlDoc.Load(strXmlFullPath); if( fResult!=true ) { /* FIXME: How can I get more information what went wrong here? */ wxLogError(_("Failed to load the XML document!")); } else { /* Search the TestDescription node. */ ptNodeTestDescription = search_node(m_tXmlDoc.GetRoot(), "TestDescription"); if( ptNodeTestDescription==NULL ) { wxLogError(_("Can not find the TestDescription node!")); fResult = false; } else { fResult = generate_description(ptNodeTestDescription); if( fResult==true ) { sizSubTestIndex = 0; /* Add the init code block. */ fResult = subtests_read_test(ptNodeTestDescription, sizSubTestIndex); if( fResult==true ) { ++sizSubTestIndex; /* Search all subtests. */ ptNode = ptNodeTestDescription->GetChildren(); while( ptNode!=NULL ) { if( ptNode->GetType()==wxXML_ELEMENT_NODE && ptNode->GetName()=="Test" ) { fResult = subtests_read_test(ptNode, sizSubTestIndex); if( fResult!=true ) { break; } ++sizSubTestIndex; } ptNode = ptNode->GetNext(); } } } } } } return fResult; } bool muhkuh_split_testdescription::generate_description(wxXmlNode *ptNodeTestDescription) { wxArrayString astrTestNames; wxArrayString astrTestVersions; wxArrayString astrTestDescription; wxXmlNode *ptNode; size_t sizSubTestIndex; wxString strArg; bool fResult; /* Get the name and version attribute. */ astrTestNames.Add(ptNodeTestDescription->GetAttribute("name", wxEmptyString)); astrTestVersions.Add(ptNodeTestDescription->GetAttribute("version", wxEmptyString)); /* Search all subtests. */ ptNode = ptNodeTestDescription->GetChildren(); while( ptNode!=NULL ) { if( ptNode->GetType()==wxXML_ELEMENT_NODE && ptNode->GetName()=="Test" ) { astrTestNames.Add(ptNode->GetAttribute("name", wxEmptyString)); astrTestVersions.Add(ptNode->GetAttribute("version", wxEmptyString)); } ptNode = ptNode->GetNext(); } /* Write all test names and versions to the file "test_description.lua". */ astrTestDescription.Add("_G.__MUHKUH_ALL_TESTS = {\n"); for(sizSubTestIndex=0; sizSubTestIndex<astrTestNames.GetCount(); ++sizSubTestIndex) { strArg.Printf("\t[%d] = { [\"name\"]=\"%s\", [\"version\"]=\"%s\" },\n", sizSubTestIndex, astrTestNames.Item(sizSubTestIndex), astrTestVersions.Item(sizSubTestIndex)); astrTestDescription.Add(strArg); } astrTestDescription.Add("}\n"); /* Write this to a file. */ fResult = write_textfile(MUHKUH_TESTDESCRIPTION_TYP_DESCRIPTION, 0, astrTestDescription); return fResult; } bool muhkuh_split_testdescription::subtests_read_test(wxXmlNode *ptParent, size_t sizSubTestIndex) { bool fResult; wxXmlNode *ptNode; wxString strData; wxArrayString astrParameter; wxString strParameterName; wxString strParameterValue; /* Expect failure. */ fResult = false; /* Search the code node. */ ptNode = search_node(ptParent->GetChildren(), "Code"); if( ptNode!=NULL ) { /* Get the node contents. */ strData = ptNode->GetNodeContent(); fResult = write_textfile(MUHKUH_TESTDESCRIPTION_TYP_CODE, sizSubTestIndex, strData); if( fResult==true ) { /* Collect all parameters. */ ptNode = ptParent->GetChildren(); while( ptNode!=NULL ) { if( ptNode->GetType()==wxXML_ELEMENT_NODE && ptNode->GetName()=="Parameter" ) { /* Get the name parameter. */ if( ptNode->GetAttribute("name", &strParameterName)==false ) { wxLogError(_("The parameter has no name attribute.")); fResult = false; break; } /* Get the value parameter. */ strParameterValue = ptNode->GetNodeContent(); /* Combine the name and value. */ strData.Printf("_G.__MUHKUH_TEST_PARAMETER[\"%s\"] = \"%s\"\n", strParameterName, strParameterValue); astrParameter.Add(strData); } ptNode = ptNode->GetNext(); } /* Write all parameters to a file. */ fResult = write_textfile(MUHKUH_TESTDESCRIPTION_TYP_PARAMETER, sizSubTestIndex, astrParameter); } } return fResult; } wxXmlNode *muhkuh_split_testdescription::search_node(wxXmlNode *ptNode, wxString strName) { while( ptNode!=NULL ) { if( ptNode->GetType()==wxXML_ELEMENT_NODE && ptNode->GetName()==strName ) { break; } ptNode = ptNode->GetNext(); } return ptNode; } wxString muhkuh_split_testdescription::get_lua_filename(MUHKUH_TESTDESCRIPTION_TYP_T tTyp, size_t sizSubTextIndex) { wxFileName tFileName; wxString strFileName; /* Construct the name and extension part of the filename. */ switch( tTyp ) { case MUHKUH_TESTDESCRIPTION_TYP_DESCRIPTION: strFileName = "test_description.lua"; break; case MUHKUH_TESTDESCRIPTION_TYP_CODE: strFileName.Printf("test_description_%d_code.lua", sizSubTextIndex); break; case MUHKUH_TESTDESCRIPTION_TYP_PARAMETER: strFileName.Printf("test_description_%d_par.lua", sizSubTextIndex); break; } /* Construct the complete path. */ tFileName.AssignDir(m_strWorkingFolder); tFileName.SetFullName(strFileName); return tFileName.GetFullPath(); } bool muhkuh_split_testdescription::write_textfile(MUHKUH_TESTDESCRIPTION_TYP_T tTyp, size_t sizSubTextIndex, wxString strContents) { bool fResult; wxString strFileName; wxFFileOutputStream *ptOutputStream; wxTextOutputStream *ptTextOutputStream; /* Create a new file. */ strFileName = get_lua_filename(tTyp, sizSubTextIndex); ptOutputStream = new wxFFileOutputStream(strFileName, "w"); if( ptOutputStream->IsOk()!=true ) { wxLogError("Failed to create new file %s!", strFileName); fResult = false; } else { /* Create the text output stream. */ ptTextOutputStream = new wxTextOutputStream(*ptOutputStream); /* Write the complete data to the file. */ ptTextOutputStream->WriteString(strContents); delete ptTextOutputStream; ptOutputStream->Close(); fResult = true; } delete ptOutputStream; return fResult; } bool muhkuh_split_testdescription::write_textfile(MUHKUH_TESTDESCRIPTION_TYP_T tTyp, size_t sizSubTextIndex, wxArrayString &astrContents) { bool fResult; wxString strFileName; wxFFileOutputStream *ptOutputStream; wxTextOutputStream *ptTextOutputStream; size_t sizStringCnt; size_t sizStringEnd; /* Create a new file. */ strFileName = get_lua_filename(tTyp, sizSubTextIndex); ptOutputStream = new wxFFileOutputStream(strFileName, "w"); if( ptOutputStream->IsOk()!=true ) { wxLogError("Failed to create new file %s!", strFileName); fResult = false; } else { /* Create the text output stream. */ ptTextOutputStream = new wxTextOutputStream(*ptOutputStream); /* Write the complete data to the file. */ sizStringCnt = 0; sizStringEnd = astrContents.GetCount(); while( sizStringCnt<sizStringEnd ) { ptTextOutputStream->WriteString(astrContents.Item(sizStringCnt)); ++sizStringCnt; } delete ptTextOutputStream; ptOutputStream->Close(); fResult = true; } delete ptOutputStream; return fResult; }
muhkuh-sys/org.muhkuh.tools-muhkuh_gui
application/muhkuh_split_testdescription.cpp
C++
gpl-2.0
9,641
27.026163
169
0.656571
false
-- VirtueMart table SQL script -- This will install all the tables need to run VirtueMart -- -- Table structure for table `#__virtuemart_adminmenuentries` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_adminmenuentries` ( `id` tinyint(1) unsigned NOT NULL AUTO_INCREMENT, `module_id` tinyint(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The ID of the VM Module, this Item is assigned to', `parent_id` tinyint(11) unsigned NOT NULL DEFAULT '0', `name` char(64) NOT NULL DEFAULT '0', `link` char(64) NOT NULL DEFAULT '0', `depends` char(64) NOT NULL DEFAULT '' COMMENT 'Names of the Parameters, this Item depends on', `icon_class` char(96), `ordering` int(2) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `tooltip` char(128), `view` char(32), `task` char(32), PRIMARY KEY (`id`), KEY `module_id` (`module_id`), KEY `published` (`published`), KEY `ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Administration Menu Items' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_calcs` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_calcs` ( `virtuemart_calc_id` smallint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Belongs to vendor', `calc_jplugin_id` int(11) NOT NULL DEFAULT '0', `calc_name` char(64) NOT NULL DEFAULT '' COMMENT 'Name of the rule', `calc_descr` char(128) NOT NULL DEFAULT '' COMMENT 'Description', `calc_kind` char(16) NOT NULL DEFAULT '' COMMENT 'Discount/Tax/Margin/Commission', `calc_value_mathop` char(8) NOT NULL DEFAULT '' COMMENT 'the mathematical operation like (+,-,+%,-%)', `calc_value` decimal(10,4) NOT NULL DEFAULT '0.0000' COMMENT 'The Amount', `calc_currency` smallint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Currency of the Rule', `calc_shopper_published` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Visible for Shoppers', `calc_vendor_published` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Visible for Vendors', `publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Startdate if nothing is set = permanent', `publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Enddate if nothing is set = permanent', `for_override` tinyint(1) NOT NULL DEFAULT '0', `calc_params` varchar(18000), `ordering` int(2) NOT NULL DEFAULT '0', `shared` tinyint(1) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_calc_id`), KEY `i_virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `i_published` (`published`), KEY `idx_calc_kind` (`calc_kind`), KEY `i_shared` (`shared`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_calc_categories` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_calc_categories` ( `id` mediumint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_calc_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_category_id` mediumint(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_calc_id` (`virtuemart_calc_id`,`virtuemart_category_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `#__virtuemart_calc_manufacturers` ( `id` mediumint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_calc_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_manufacturer_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_calc_id` (`virtuemart_calc_id`,`virtuemart_manufacturer_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_calc_shoppergroups` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_calc_shoppergroups` ( `id` mediumint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_calc_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_shoppergroup_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_calc_id` (`virtuemart_calc_id`,`virtuemart_shoppergroup_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_calc_countries` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_calc_countries` ( `id` mediumint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_calc_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_country_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_calc_id` (`virtuemart_calc_id`,`virtuemart_country_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_calc_states` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_calc_states` ( `id` mediumint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_calc_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_state_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_calc_id` (`virtuemart_calc_id`,`virtuemart_state_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_categories` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_categories` ( `virtuemart_category_id` mediumint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Belongs to vendor', `category_template` char(128), `category_layout` char(64), `category_product_layout` char(64), `products_per_row` tinyint(2), `limit_list_step` char(32), `limit_list_initial` smallint(1) UNSIGNED, `hits` int(1) unsigned NOT NULL DEFAULT '0', `metarobot` char(40) NOT NULL DEFAULT '', `metaauthor` char(64) NOT NULL DEFAULT '', `ordering` int(2) NOT NULL DEFAULT '0', `shared` tinyint(1) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_category_id`), KEY `idx_category_virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `i_published` (`published`), KEY `i_shared` (`shared`), KEY `i_ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Product Categories are stored here' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_category_categories` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_category_categories` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `category_parent_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `category_child_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY (`category_child_id`), KEY `ordering` (`ordering`), UNIQUE KEY `i_category_parent_id` (`category_parent_id`,`category_child_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Category child-parent relation list'; -- -- Table structure for table `#__virtuemart_category_medias` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_category_medias` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_category_id` mediumint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_media_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `ordering` (`ordering`), UNIQUE KEY `i_virtuemart_category_id` (`virtuemart_category_id`,`virtuemart_media_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_countries` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_countries` ( `virtuemart_country_id` smallint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_worldzone_id` tinyint(11) NOT NULL DEFAULT '1', `country_name` char(64), `country_3_code` char(3), `country_2_code` char(2), `ordering` int(2) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_country_id`), KEY `idx_country_3_code` (`country_3_code`), KEY `idx_country_2_code` (`country_2_code`), KEY `ordering` (`ordering`), KEY `published` (`published`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Country records' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_coupons` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_coupons` ( `virtuemart_coupon_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `coupon_code` char(32) NOT NULL DEFAULT '', `percent_or_total` enum('percent','total') NOT NULL DEFAULT 'percent', `coupon_type` enum('gift','permanent') NOT NULL DEFAULT 'gift', `coupon_value` decimal(15,5) NOT NULL DEFAULT '0.00000', `coupon_start_date` datetime, `coupon_expiry_date` datetime, `coupon_value_valid` decimal(15,5) NOT NULL DEFAULT '0.00000', `coupon_used` varchar(200) NOT NULL DEFAULT '', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_coupon_id`), KEY `idx_coupon_code` (`coupon_code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Used to store coupon codes' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_currencies` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_currencies` ( `virtuemart_currency_id` smallint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL DEFAULT '1', `currency_name` char(64), `currency_code_2` char(2), `currency_code_3` char(3), `currency_numeric_code` int(4), `currency_exchange_rate` decimal(10,5), `currency_symbol` char(4), `currency_decimal_place` char(4), `currency_decimal_symbol` char(4), `currency_thousands` char(4), `currency_positive_style` char(64), `currency_negative_style` char(64), `ordering` int(2) NOT NULL DEFAULT '0', `shared` tinyint(1) NOT NULL DEFAULT '1', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_currency_id`), KEY `ordering` (`ordering`), KEY `published` (`published`), KEY `shared` (`shared`), KEY `virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `idx_currency_code_3` (`currency_code_3`), KEY `idx_currency_numeric_code` (`currency_numeric_code`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Used to store currencies'; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_customs` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_customs` ( `virtuemart_custom_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `custom_parent_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_vendor_id` smallint(1) NOT NULL DEFAULT '1', `custom_jplugin_id` int(11) NOT NULL DEFAULT '0', `custom_element` char(50) NOT NULL DEFAULT '', `admin_only` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1:Display in admin only', `custom_title` char(255) NOT NULL DEFAULT '' COMMENT 'field title', `show_title` tinyint(1) NOT NULL DEFAULT '1', `custom_tip` char(255) NOT NULL DEFAULT '' COMMENT 'tip', `custom_value` text COMMENT 'defaut value', `custom_desc` char(255) COMMENT 'description or unit', `field_type` char(1) NOT NULL DEFAULT '0' COMMENT 'S:string,I:int,P:parent, B:bool,D:date,T:time,H:hidden', `is_list` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'list of values', `is_hidden` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1:hidden', `is_cart_attribute` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Add attributes to cart', `is_input` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Add input to cart', `layout_pos` char(24) COMMENT 'Layout Position', `custom_params` text, `shared` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'valid for all vendors?', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `ordering` int(2) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_custom_id`), KEY `i_custom_parent_id` (`custom_parent_id`), KEY `i_virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `idx_custom_element` (`custom_element`), KEY `idx_field_type` (`field_type`), KEY `i_is_cart_attribute` (`is_cart_attribute`), KEY `i_is_input` (`is_input`), KEY `i_shared` (`shared`), KEY `i_published` (`published`), KEY `i_ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='custom fields definition' AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `#__virtuemart_invoices` ( `virtuemart_invoice_id` INT(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL DEFAULT '1', `virtuemart_order_id` int(1) UNSIGNED, `invoice_number` char(64), `order_status` char(2), `xhtml` text, `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_invoice_id`), UNIQUE KEY `idx_invoice_number` (`invoice_number`,`virtuemart_vendor_id`), KEY `idx_virtuemart_order_id` (`virtuemart_order_id`), KEY `i_virtuemart_vendor_id` (`virtuemart_vendor_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='custom fields definition' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_manufacturers` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_manufacturers` ( `virtuemart_manufacturer_id` smallint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_manufacturercategories_id` int(11), `hits` int(11) unsigned NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_manufacturer_id`), KEY `published` (`published`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Manufacturers are those who deliver products' AUTO_INCREMENT=1 ; -- -- Table structure for table `#__virtuemart_manufacturer_medias` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_manufacturer_medias` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_manufacturer_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_media_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `ordering` (`ordering`), UNIQUE KEY `i_virtuemart_manufacturer_id` (`virtuemart_manufacturer_id`,`virtuemart_media_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_manufacturercategories` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_manufacturercategories` ( `virtuemart_manufacturercategories_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_manufacturercategories_id`), KEY `published` (`published`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Manufacturers are assigned to these categories' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_medias` (was `#__virtuemart_product_files`) -- CREATE TABLE IF NOT EXISTS `#__virtuemart_medias` ( `virtuemart_media_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1) NOT NULL DEFAULT '1', `file_title` char(126) NOT NULL DEFAULT '', `file_description` char(254) NOT NULL DEFAULT '', `file_meta` char(254) NOT NULL DEFAULT '', `file_mimetype` char(64) NOT NULL DEFAULT '', `file_type` char(32) NOT NULL DEFAULT '', `file_url` varchar(900) NOT NULL DEFAULT '', `file_url_thumb` varchar(900) NOT NULL DEFAULT '', `file_is_product_image` tinyint(1) NOT NULL DEFAULT '0', `file_is_downloadable` tinyint(1) NOT NULL DEFAULT '0', `file_is_forSale` tinyint(1) NOT NULL DEFAULT '0', `file_params` varchar(17500), `file_lang` varchar(500) NOT NULL, `shared` tinyint(1) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_media_id`), KEY `i_virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `i_published` (`published`), KEY `i_shared` (`shared`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Additional Images and Files which are assigned to products' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_migration_oldtonew_ids` (only used for migration) -- CREATE TABLE IF NOT EXISTS `#__virtuemart_migration_oldtonew_ids` ( `id` smallint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `cats` longblob, `catsxref` blob, `manus` longblob, `mfcats` blob, `shoppergroups` longblob, `products` longblob, `products_start` int(1), `orderstates` blob, `orders` longblob, `attributes` longblob, `relatedproducts` longblob, `orders_start` int(1), PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='xref table for vm1 ids to vm2 ids' ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_modules` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_modules` ( `module_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `module_name` char(255), `module_description` varchar(21000), `module_perms` char(255), `published` tinyint(1) NOT NULL DEFAULT '1', `is_admin` enum('0','1') NOT NULL DEFAULT '0', `ordering` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`module_id`), KEY `idx_module_name` (`module_name`), KEY `idx_module_ordering` (`ordering`), KEY `i_published` (`published`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='VirtueMart Core Modules, not: Joomla modules' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_orders` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_orders` ( `virtuemart_order_id` INT(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_user_id` int(1) UNSIGNED NOT NULL DEFAULT '1', `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `order_number` char(64), `customer_number` char(32), `order_pass` char(8), `order_total` decimal(15,5) NOT NULL DEFAULT '0.00000', `order_salesPrice` decimal(15,5) NOT NULL DEFAULT '0.00000', `order_billTaxAmount` decimal(15,5) NOT NULL DEFAULT '0.00000', `order_billTax` varchar(400), `order_billDiscountAmount` decimal(15,5) NOT NULL DEFAULT '0.00000', `order_discountAmount` decimal(15,5) NOT NULL DEFAULT '0.00000', `order_subtotal` decimal(15,5), `order_tax` decimal(10,5), `order_shipment` decimal(10,2), `order_shipment_tax` decimal(10,5), `order_payment` decimal(10,2), `order_payment_tax` decimal(10,5), `coupon_discount` decimal(12,2) NOT NULL DEFAULT '0.00', `coupon_code` char(32), `order_discount` decimal(12,2) NOT NULL DEFAULT '0.00', `order_currency` smallint(1), `order_status` char(1), `user_currency_id` smallint(1), `user_currency_rate` DECIMAL(10,5) NOT NULL DEFAULT '1.00000', `virtuemart_paymentmethod_id` mediumint(1) UNSIGNED, `virtuemart_shipmentmethod_id` mediumint(1) UNSIGNED, `customer_note` varchar(20000), `delivery_date` varchar(200), `order_language` char(7), `ip_address` char(15) NOT NULL DEFAULT '', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_order_id`), KEY `idx_orders_virtuemart_user_id` (`virtuemart_user_id`), KEY `idx_orders_virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `idx_orders_order_number` (`order_number`), KEY `idx_orders_virtuemart_paymentmethod_id` (`virtuemart_paymentmethod_id`), KEY `idx_orders_virtuemart_shipmentmethod_id` (`virtuemart_shipmentmethod_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Used to store all orders' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_order_histories` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_order_histories` ( `virtuemart_order_history_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_order_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `order_status_code` char(1) NOT NULL DEFAULT '0', `customer_notified` tinyint(1) NOT NULL DEFAULT '0', `comments` varchar(21000), `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_order_history_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores all actions and changes that occur to an order' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_order_items` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_order_items` ( `virtuemart_order_item_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_order_id` int(11), `virtuemart_vendor_id` smallint(11) NOT NULL DEFAULT '1', `virtuemart_product_id` int(11), `order_item_sku` char(64) NOT NULL DEFAULT '', `order_item_name` char(255) NOT NULL DEFAULT '', `product_quantity` int(11), `product_item_price` decimal(15,5), `product_priceWithoutTax` decimal(15,5), `product_tax` decimal(15,5), `product_basePriceWithTax` decimal(15,5), `product_discountedPriceWithoutTax` decimal(15,5), `product_final_price` decimal(15,5) NOT NULL DEFAULT '0.00000', `product_subtotal_discount` decimal(15,5) NOT NULL DEFAULT '0.00000', `product_subtotal_with_tax` decimal(15,5) NOT NULL DEFAULT '0.00000', `order_item_currency` INT(11), `order_status` char(1), `product_attribute` text, `delivery_date` varchar(200), `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_order_item_id`), KEY `virtuemart_product_id` (`virtuemart_product_id`), KEY `i_virtuemart_order_id` (`virtuemart_order_id`), KEY `i_virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `order_status` (`order_status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores all items (products) which are part of an order' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_order_calc_rules` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_order_calc_rules` ( `virtuemart_order_calc_rule_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_calc_id` int(11), `virtuemart_order_id` int(11), `virtuemart_vendor_id` smallint(11) NOT NULL DEFAULT '1', `virtuemart_order_item_id` int(11), `calc_rule_name` char(64) NOT NULL DEFAULT '' COMMENT 'Name of the rule', `calc_kind` char(16) NOT NULL DEFAULT '' COMMENT 'Discount/Tax/Margin/Commission', `calc_mathop` char(16) NOT NULL DEFAULT '' COMMENT 'Discount/Tax/Margin/Commission', `calc_amount` decimal(15,5) NOT NULL DEFAULT '0.00000', `calc_result` decimal(15,5) NOT NULL DEFAULT '0.00000', `calc_value` decimal(15,5) NOT NULL DEFAULT '0.00000', `calc_currency` smallint(1), `calc_params` varchar(18000), `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_order_calc_rule_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stores all calculation rules which are part of an order' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_orderstates` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_orderstates` ( `virtuemart_orderstate_id` tinyint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(11) NOT NULL DEFAULT '1', `order_status_code` char(1) NOT NULL DEFAULT '', `order_status_name` char(64), `order_status_description` varchar(20000), `order_stock_handle` char(1) NOT NULL DEFAULT 'A', `ordering` int(2) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_orderstate_id`), KEY `idx_order_status_ordering` (`ordering`), KEY `idx_order_status_virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `i_published` (`published`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='All available order statuses' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_order_userinfos` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_order_userinfos` ( `virtuemart_order_userinfo_id` INT(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_order_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_user_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `address_type` char(2), `address_type_name` char(32), `company` char(64), `title` char(32), `last_name` char(48), `first_name` char(48), `middle_name` char(48), `phone_1` char(32), `phone_2` char(32), `fax` char(32), `address_1` char(64) NOT NULL DEFAULT '', `address_2` char(64) , `city` char(64) NOT NULL DEFAULT '', `virtuemart_state_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_country_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `zip` char(16) NOT NULL DEFAULT '', `email` char(128), `agreed` tinyint(1) NOT NULL DEFAULT '0', `tos` tinyint(1) NOT NULL DEFAULT '0', `customer_note` varchar(2500) NOT NULL DEFAULT '', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_order_userinfo_id`), KEY `i_virtuemart_order_id` (`virtuemart_order_id`), KEY `i_virtuemart_user_id` (`virtuemart_user_id`), KEY `idx_address_type` (`address_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores the BillTo and ShipTo Information at order time' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_paymentmethods` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_paymentmethods` ( `virtuemart_paymentmethod_id` mediumint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(11) NOT NULL DEFAULT '1', `payment_jplugin_id` int(11) NOT NULL DEFAULT '0', `payment_element` char(50) NOT NULL DEFAULT '', `payment_params` varchar(19000), `shared` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'valide for all vendors?', `ordering` int(2) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_paymentmethod_id`), KEY `idx_payment_jplugin_id` (`payment_jplugin_id`), KEY `idx_payment_element` (payment_element,`virtuemart_vendor_id`), KEY `idx_payment_method_ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='The payment methods of your store' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_paymentmethod_shoppergroups` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_paymentmethod_shoppergroups` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_paymentmethod_id` mediumint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_shoppergroup_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_paymentmethod_id` (`virtuemart_paymentmethod_id`,`virtuemart_shoppergroup_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='xref table for paymentmethods to shoppergroup' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_products` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_products` ( `virtuemart_product_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL DEFAULT '1', `product_parent_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `product_sku` char(64), `product_gtin` char(64), `product_mpn` char(64), `product_weight` decimal(10,4), `product_weight_uom` char(7), `product_length` decimal(10,4), `product_width` decimal(10,4), `product_height` decimal(10,4), `product_lwh_uom` char(7), `product_url` char(255), `product_in_stock` int(1) NOT NULL DEFAULT '0', `product_ordered` int(1) NOT NULL DEFAULT '0', `low_stock_notification` int(1) UNSIGNED NOT NULL DEFAULT '0', `product_available_date` datetime NOT NULL default '0000-00-00 00:00:00', `product_availability` char(32), `product_special` tinyint(1), `product_sales` int(1) UNSIGNED NOT NULL DEFAULT '0', `product_unit` varchar(8), `product_packaging` decimal(8,4) UNSIGNED, `product_params` varchar(2000), `hits` int(11) unsigned, `intnotes` varchar(18000), `metarobot` varchar(400), `metaauthor` varchar(400), `layout` char(16), `published` tinyint(1), `pordering` mediumint(2) UNSIGNED NOT NULL DEFAULT '0', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_product_id`), KEY `idx_product_virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `idx_product_product_parent_id` (`product_parent_id`), KEY `i_product_special` (`product_special`), KEY `i_published` (`published`), KEY `i_pordering` (`pordering`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='All products are stored here.' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_product_categories` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_product_categories` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_product_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_category_id` mediumint(1) UNSIGNED NOT NULL DEFAULT '0', `ordering` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_product_id` (`virtuemart_product_id`,`virtuemart_category_id`), KEY `i_ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Maps Products to Categories'; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_product_shoppergroups` -- -- CREATE TABLE IF NOT EXISTS `#__virtuemart_product_shoppergroups` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_product_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_shoppergroup_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_product_id` (`virtuemart_product_id`,`virtuemart_shoppergroup_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Maps Products to Categories'; -- -------------------------------------------------------- -- -- Table structure `#__virtuemart_product_customfields` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_product_customfields` ( `virtuemart_customfield_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'field id', `virtuemart_product_id` int(11) NOT NULL DEFAULT '0', `virtuemart_custom_id` int(11) NOT NULL DEFAULT '1' COMMENT 'custom group id', `customfield_value` text COMMENT 'field value', `customfield_price` decimal(15,6) COMMENT 'price', `disabler` INT(1) UNSIGNED NOT NULL DEFAULT '0', `override` INT(1) UNSIGNED NOT NULL DEFAULT '0', `customfield_params` text COMMENT 'Param for Plugins', `product_sku` char(64), `product_gtin` char(64), `product_mpn` char(64), `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `created_by` int(1) UNSIGNED NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(1) UNSIGNED NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(1) UNSIGNED NOT NULL DEFAULT '0', `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_customfield_id`), KEY `idx_virtuemart_product_id` (`virtuemart_product_id`), KEY `idx_virtuemart_custom_id` (`virtuemart_custom_id`), KEY `idx_published` (`published`), KEY `idx_ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='custom fields' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_product_medias` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_product_medias` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_product_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_media_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_product_id` (`virtuemart_product_id`,`virtuemart_media_id`), KEY `i_ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_product_manufacturers` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_product_manufacturers` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_product_id` int(11), `virtuemart_manufacturer_id` smallint(1) UNSIGNED, PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_product_id` (`virtuemart_product_id`,`virtuemart_manufacturer_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Maps a product to a manufacturer'; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_product_prices` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_product_prices` ( `virtuemart_product_price_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_product_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_shoppergroup_id` int(11), `product_price` decimal(15,5), `override` tinyint(1), `product_override_price` decimal(15,5), `product_tax_id` int(11), `product_discount_id` int(11), `product_currency` smallint(1), `product_price_publish_up` datetime, `product_price_publish_down` datetime, `price_quantity_start` int(11) unsigned, `price_quantity_end` int(11) unsigned, `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_product_price_id`), KEY `i_product_id` (`virtuemart_product_id`), KEY `i_virtuemart_shoppergroup_id` (`virtuemart_shoppergroup_id`), KEY `dx_product_price_publish_up` (`product_price_publish_up`), KEY `dx_product_price_publish_down` (`product_price_publish_down`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Holds price records for a product' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_rating_reviews` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_rating_reviews` ( `virtuemart_rating_review_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_product_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `comment` varchar(18000), `review_ok` tinyint(1) NOT NULL DEFAULT '0', `review_rates` int(1) UNSIGNED NOT NULL DEFAULT '0', `review_ratingcount` int(1) UNSIGNED NOT NULL DEFAULT '0', `review_rating` decimal(10,2) NOT NULL DEFAULT '0.00', `review_editable` tinyint(1) NOT NULL DEFAULT '1', `lastip` char(50) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_rating_review_id`), UNIQUE KEY `i_virtuemart_product_id` (`virtuemart_product_id`,`created_by`), KEY `i_published` (`published`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_ratings` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_ratings` ( `virtuemart_rating_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_product_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `rates` int(11) NOT NULL DEFAULT '0', `ratingcount` int(1) UNSIGNED NOT NULL DEFAULT '0', `rating` decimal(10,1) NOT NULL DEFAULT '0.0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_rating_id`), UNIQUE KEY `i_virtuemart_product_id` (`virtuemart_product_id`,`virtuemart_rating_id`), KEY `i_published` (`published`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Stores all ratings for a product'; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_rating_votes` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_rating_votes` ( `virtuemart_rating_vote_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_product_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `vote` int(11) NOT NULL DEFAULT '0', `lastip` char(50) NOT NULL DEFAULT '0', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_rating_vote_id`), UNIQUE KEY `i_virtuemart_product_id` (`virtuemart_product_id`,`created_by`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Stores all ratings for a product'; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_shipmentmethods` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_shipmentmethods` ( `virtuemart_shipmentmethod_id` mediumint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(11) NOT NULL DEFAULT '1', `shipment_jplugin_id` int(11) NOT NULL DEFAULT '0', `shipment_element` char(50) NOT NULL DEFAULT '', `shipment_params` varchar(19000), `ordering` int(2) NOT NULL DEFAULT '0', `shared` tinyint(1) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_shipmentmethod_id`), KEY `idx_shipment_jplugin_id` (`shipment_jplugin_id`), KEY `idx_shipment_element` (shipment_element,`virtuemart_vendor_id`), KEY `idx_shipment_method_ordering` (`ordering`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Shipment created from the shipment plugins' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_shipmentmethods_shoppergroups` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_shipmentmethod_shoppergroups` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_shipmentmethod_id` mediumint(1) UNSIGNED, `virtuemart_shoppergroup_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_shipmentmethod_id` (`virtuemart_shipmentmethod_id`,`virtuemart_shoppergroup_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='xref table for shipment to shoppergroup' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_shoppergroups` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_shoppergroups` ( `virtuemart_shoppergroup_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(11) NOT NULL DEFAULT '1', `shopper_group_name` char(64), `shopper_group_desc` char(128), `custom_price_display` tinyint(1) NOT NULL DEFAULT '0', `price_display` blob, `default` tinyint(1) NOT NULL DEFAULT '0', `ordering` int(2) NOT NULL DEFAULT '0', `shared` tinyint(1) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_shoppergroup_id`), KEY `idx_shopper_group_virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `idx_shopper_group_name` (`shopper_group_name`), KEY `i_ordering` (`ordering`), KEY `i_shared` (`shared`), KEY `i_published` (`published`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Shopper Groups that users can be assigned to' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_states` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_states` ( `virtuemart_state_id` smallint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL DEFAULT '1', `virtuemart_country_id` smallint(1) UNSIGNED NOT NULL DEFAULT '1', `virtuemart_worldzone_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `state_name` char(64), `state_3_code` char(3), `state_2_code` char(2), `ordering` int(2) NOT NULL DEFAULT '0', `shared` tinyint(1) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_state_id`), KEY `i_virtuemart_vendor_id` (`virtuemart_vendor_id`), UNIQUE KEY `idx_state_3_code` (`virtuemart_vendor_id`,`virtuemart_country_id`,`state_3_code`), UNIQUE KEY `idx_state_2_code` (`virtuemart_vendor_id`,`virtuemart_country_id`,`state_2_code`), KEY `i_virtuemart_country_id` (`virtuemart_country_id`), KEY `i_ordering` (`ordering`), KEY `i_shared` (`shared`), KEY `i_published` (`published`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='States that are assigned to a country' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_vmusers` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_vmusers` ( `virtuemart_user_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `user_is_vendor` tinyint(1) NOT NULL DEFAULT '0', `customer_number` char(32), `virtuemart_paymentmethod_id` mediumint(1) UNSIGNED, `virtuemart_shipmentmethod_id` mediumint(1) UNSIGNED, `agreed` tinyint(1) NOT NULL DEFAULT '0', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_user_id`), KEY `i_virtuemart_vendor_id` (`virtuemart_vendor_id`), UNIQUE KEY `i_virtuemart_user_id` (`virtuemart_user_id`,`virtuemart_vendor_id`), KEY `i_user_is_vendor` (`user_is_vendor`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Holds the unique user data' ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_vmuser_shoppergroups` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_vmuser_shoppergroups` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_user_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_shoppergroup_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_user_id` (`virtuemart_user_id`,`virtuemart_shoppergroup_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='xref table for users to shopper group' ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_userfields` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_userfields` ( `virtuemart_userfield_id` smallint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL DEFAULT '1', `userfield_jplugin_id` int(11) NOT NULL DEFAULT '0', `name` char(255) NOT NULL DEFAULT '', `title` char(255) NOT NULL DEFAULT '', `description` mediumtext, `type` char(70) NOT NULL DEFAULT '', `maxlength` int(11), `size` int(11), `required` tinyint(4) NOT NULL DEFAULT '0', `cols` int(11), `rows` int(11), `value` char(255), `default` char(255), `registration` tinyint(1) NOT NULL DEFAULT '0', `shipment` tinyint(1) NOT NULL DEFAULT '0', `account` tinyint(1) NOT NULL DEFAULT '1', `cart` tinyint(1) NOT NULL DEFAULT '0', `readonly` tinyint(1) NOT NULL DEFAULT '0', `calculated` tinyint(1) NOT NULL DEFAULT '0', `sys` tinyint(4) NOT NULL DEFAULT '0', `userfield_params` varchar(17500) NOT NULL DEFAULT '', `ordering` int(2) NOT NULL DEFAULT '0', `shared` tinyint(1) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_userfield_id`), KEY `i_virtuemart_vendor_id` (`virtuemart_vendor_id`), KEY `i_ordering` (`ordering`), KEY `i_shared` (`shared`), KEY `i_published` (`published`), KEY `i_account` (`account`), KEY `i_shipment` (`shipment`), KEY `i_cart` (`cart`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Holds the fields for the user information' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_userfield_values` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_userfield_values` ( `virtuemart_userfield_value_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_userfield_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `fieldtitle` char(255) NOT NULL DEFAULT '', `fieldvalue` char(255) NOT NULL DEFAULT '', `sys` tinyint(4) NOT NULL DEFAULT '0', `ordering` int(2) NOT NULL DEFAULT '0', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_userfield_value_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Holds the different values for dropdown and radio lists' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_userinfos` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_userinfos` ( `virtuemart_userinfo_id` int(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_user_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `address_type` char(2) NOT NULL DEFAULT '', `address_type_name` char(32) NOT NULL DEFAULT '', `name` char(64), `company` char(64), `title` char(32), `last_name` char(48), `first_name` char(48), `middle_name` char(48), `phone_1` char(32), `phone_2` char(32), `fax` char(32), `address_1` char(64) NOT NULL DEFAULT '', `address_2` char(64), `city` char(64) NOT NULL DEFAULT '', `virtuemart_state_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_country_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `zip` char(32) NOT NULL DEFAULT '', `agreed` tinyint(1) NOT NULL DEFAULT '0', `tos` tinyint(1) NOT NULL DEFAULT '0', `customer_note` varchar(2500) NOT NULL DEFAULT '', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_userinfo_id`), KEY `idx_userinfo_virtuemart_user_id` (`virtuemart_userinfo_id`,`virtuemart_user_id`), KEY `address_type` (`address_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 COMMENT='Customer Information, BT = BillTo and ST = ShipTo'; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_vendors` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_vendors` ( `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `vendor_name` char(64), `vendor_currency` int(11), `vendor_accepted_currencies` varchar(1536) NOT NULL DEFAULT '', `vendor_params` varchar(17000), `metarobot` char(20), `metaauthor` char(64), `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_vendor_id`), KEY `idx_vendor_name` (`vendor_name`) -- KEY `idx_vendor_category_id` (`vendor_category_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Vendors manage their products in your store' AUTO_INCREMENT=1 ; -- -- Table structure for table `#__virtuemart_vendor_medias` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_vendor_medias` ( `id` smallint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_media_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `ordering` int(2) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `i_virtuemart_vendor_id` (`virtuemart_vendor_id`,`virtuemart_media_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_waitingusers` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_waitingusers` ( `virtuemart_waitinguser_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_product_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `virtuemart_user_id` int(1) UNSIGNED NOT NULL DEFAULT '0', `notify_email` char(150) NOT NULL DEFAULT '', `notified` tinyint(1) NOT NULL DEFAULT '0', `notify_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `ordering` int(2) NOT NULL DEFAULT '0', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_waitinguser_id`), KEY `virtuemart_product_id` (`virtuemart_product_id`), KEY `notify_email` (`notify_email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores notifications, users waiting f. products out of stock' AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `#__virtuemart_worldzones` -- CREATE TABLE IF NOT EXISTS `#__virtuemart_worldzones` ( `virtuemart_worldzone_id` smallint(1) UNSIGNED NOT NULL AUTO_INCREMENT, `virtuemart_vendor_id` smallint(1), `zone_name` char(255), `zone_cost` decimal(10,2), `zone_limit` decimal(10,2), `zone_description` varchar(18000), `zone_tax_rate` int(1) UNSIGNED NOT NULL DEFAULT '0', `ordering` int(2) NOT NULL DEFAULT '0', `shared` tinyint(1) NOT NULL DEFAULT '0', `published` tinyint(1) NOT NULL DEFAULT '1', `created_on` datetime NOT NULL default '0000-00-00 00:00:00', `created_by` int(11) NOT NULL DEFAULT '0', `modified_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `modified_by` int(11) NOT NULL DEFAULT '0', `locked_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `locked_by` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`virtuemart_worldzone_id`), KEY `i_virtuemart_vendor_id` (`virtuemart_vendor_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='The Zones managed by the Zone Shipment Module' AUTO_INCREMENT=1 ;
Jbouska419/craftsman
administrator/components/com_virtuemart/install/install.sql
SQL
gpl-2.0
57,936
42.397753
126
0.669221
false
#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: Eli # # Created: 06/04/2014 # Copyright: (c) Eli 2014 # Licence: <your licence> #------------------------------------------------------------------------------- def main(): pass if __name__ == '__main__': main() import sys #This script filters a data file by id's listed one per line in another file ids = open("C:/rnaseq/mirna_data/clusters/10rep_redo_deseq-edger/DEseq2_1cpm3redo_nopara2_logFCall.txt", "r") #Take header from ID file & initialize empty dict head_ids = ids.readline().strip("\n") idlist1 = {} #id_count = 0 #Make dict of ID's (key) & selected variables/annotations (values) for line in ids: name = line.strip('\n').split('\t')[0] #name = name[4:] #if len(name.split('-')) > 3: # name = '-'.join(name.split('-')[1:]) #arm = name.split('-')[-1] #name = '-'.join(['-'.join(name.split('-')[0:2]), arm]) name = name.strip('cin-') #print name #name = name[-5:] #values = '\t'.join(line.strip('\n').split('\t')[1:3]) values = '\t'.join(line.strip('\n').split('\t')[1:4]) #if "ENSCINP" in values: # values2 = values[7:] # values = "ENSCINT" + values2 #values = '\t'.join(line.strip('\n').split('\t')[2:]) #values = values[0:-3] if name in idlist1 and len(name) > 0: if values in idlist1[name]: continue else: idlist1[name].append(values) elif len(name) > 0: idlist1[name] = [values] #id_count+=1 #if id_count%1000==0: # print id_count ids.close #Debugging code below: #print 'idlist1:', len(idlist1) #sorted(idlist1) #print idlist1 idlist1 = ['miR-216'] data = open("C:/rnaseq/coexpression/mirna-mrna/logfc_pearson/1cpm3_5rpkm3_redo2_edger_logfcValues_pearson_targetscan_deseq2logfc_mirs2.txt", "r") #Output merged header & initialize retrieved list + row counter #sys.stdout.write("LogFC.consensus" + '\t' + data.readline()) #sys.stdout.write("LogFC.consensus" + '\t' + '\t'.join(data.readline().split('\t')[0:3]) + '\n') #sys.stdout.write(data.readline()) #data.readline() matched = 0 idlist2 = {} out = 0 #Match ID's between lists and return associated variables for line in data: #print line name = line.strip('\n').split('\t')[6] #print name #name = name.split('|')[3].split('.')[0] # for first ID from BLAST target #name = name[0:7] #if name[-1].isalpha(): # name = name[0:-1] #print name #variables = line.strip('\n').split('\t')[5,9,10] #idlist2[name] = line.split('\t')[1] descr = line.strip('\n').split('\t')[1] #if "," in descr: # descr = descr.split(',')[0] #name = line[1:20] # for trimmed encin gene name #kh = '.'.join(line.split('\t')[1].split(':')[1].split('.')[0:4]) #Loop through input dict ID's and search for "name" in associated variables #for item in idlist1: #Loop through keys (refseq) if name in idlist1: #match primary ID's #for item in idlist1[name].split(' '): sys.stdout.write('\t'.join(idlist1[0]) + '\t' + line) #EXCHANGE ID'S BUT KEEP REST OF LINE/DESCRIPTION # sys.stdout.write(descr + '\t' + '\t'.join(idlist1[name]) + '\n') #else: # sys.stdout.write(descr + '\t' + name + '\n') #print idlist1[name] #sys.stdout.write(line.strip('\n') + '\t' + '\t'.join(idlist1[name]) + '\n') #continue #matched +=1 else: sys.stdout.write(line) #if name in idlist1[item]: #Check for each ID in the name variable # idlist2[name] = variables # values = idlist1[item] # stop = 1 #while stop <= len(values): # if descr in idlist1[name]: # sys.stdout.write(line) # out+=1 #print out #Return items in matched list (idlist2) using associations from idlist1 #for mir in idlist1: # if mir in idlist2: # sys.stdout.write(mir + '\t' + '\t'.join(idlist2[mir]) + '\n') # for mrna in idlist1[mir]: # if mrna in idlist2: # sys.stdout.write(mrna+ '\t' + '\t'.join(idlist2[mrna]) + '\n') #if len(idlist1[name]) > 1: # for value in idlist1[name]: #Print all values on separate lines # sys.stdout.write(value + '\t' + line) #sys.stdout.write(descr + '\t' + value + '\t' + name + '\t' + '\t'.join(variables) + '\n') # sys.stdout.write(value + '\t' + '\t'.join(line.split('\t')[0:])) #sys.stdout.write(value + '\t' + '\t'.join(line.split('\t')[0:3]) + '\n') # out+=1 #else: # sys.stdout.write('\t'.join(idlist1[name]) + '\t' + line) #sys.stdout.write(descr + '\t' + ".\t".join(idlist1[name]) + '\t' + name + '\t' + '\t'.join(variables) + '\n') #print idlist1[name] # sys.stdout.write(('\t'.join(idlist1[name]) + '\t' + '\t'.join(line.split('\t')[0:]))) #sys.stdout.write(name + '\t' + '\t'.join(idlist1[name]) + '\t' + '\t'.join(line.split('\t')[2:])) # out+=1 #print matched, out #print gene #print idlist1[item] # sys.stdout.write(value + "\t" + name + '\t' + line)#'\t' + '\t'.join(line.split('\t')[2:])) # stop+=1 #continue #if name in idlist1: # if descr in idlist1[name]: # sys.stdout.write(line) # descr = idlist1[name] # sys.stdout.write('\t'.join(idlist1[name]) + '\t' + '\t'.join(line.split('\t')[2:])) #sys.stdout.write('\t'.join(line.split('\t')[0:2]) + '\t' + descr + '\n') #del idlist1[name] #else: # pass #sys.stdout.write(line + '\n') #if name in idlist2: # pass #else: #idlist2.append(name) #idlist1.remove(name) #print line #count+=1 #Code for checking remaining values in ID list #for item in idlist1: # print "bakow!" # sys.stdout.write(item + '\t' + idlist2[item] + '\t' + idlist1[item] + '\n') #else: # print line.split('\t')[0] #print len(idlist1), len(idlist2) #print len(idlist1)-len(idlist2) #print len(idlist1) #sorted(idlist2) #print idlist1 #for item in idlist2: # if item in idlist1: # idlist1.remove(item) #print 'idlist1-idlist2', len(idlist1) #for item in idlist1: # print item #cross check input and output lists #idlist3= [] #for thing in idlist1: # if thing in idlist2: # pass # else: # idlist3.append(thing) #print len(idlist3) #print len(idlist4) #idlist4 = [x for x in idlist1 if x not in idlist2]
ejspina/Gene_expression_tools
Python/FilterByID_dict_parse.py
Python
gpl-2.0
7,098
34.410256
145
0.506762
false
package org.mo.jfa.face.database.connector; import org.mo.web.core.container.AContainer; import org.mo.web.core.webform.IFormPage; import org.mo.web.protocol.context.IWebContext; public interface IConnectorAction { String catalog(IWebContext context, @AContainer(name = IFormPage.Page) FConnectorPage page); String list(IWebContext context, @AContainer(name = IFormPage.Page) FConnectorPage page); String sort(IWebContext context, @AContainer(name = IFormPage.Page) FConnectorPage page); String insert(IWebContext context, @AContainer(name = IFormPage.Page) FConnectorPage page); String update(IWebContext context, @AContainer(name = IFormPage.Page) FConnectorPage page); String delete(IWebContext context, @AContainer(name = IFormPage.Page) FConnectorPage page); }
favedit/MoPlatform
mo-4-web/src/web-face/org/mo/jfa/face/database/connector/IConnectorAction.java
Java
gpl-2.0
890
33.230769
74
0.702247
false
<?php /* * * Swift Page Builder - Default Shortcodes * ------------------------------------------------ * Swift Framework * Copyright Swift Ideas 2016 - http://www.swiftideas.com * */ /* TEXT BLOCK ASSET ================================================== */ class SwiftPageBuilderShortcode_spb_text_block extends SwiftPageBuilderShortcode { public function content( $atts, $content = null ) { $title = $el_class = $width = $el_position = $inline_style = $form_content = $custom_css = $bk_image_global = ''; extract( shortcode_atts( array( 'title' => '', 'icon' => '', 'padding_vertical' => '0', 'padding_horizontal' => '0', 'animation' => '', 'animation_delay' => '', 'el_class' => '', 'el_position' => '', 'form_content' => '', 'width' => '1/2', 'custom_css' => '', 'bk_image_global' => '', ), $atts ) ); if ( $form_content != '' ){ $content = html_entity_decode($form_content); } $output = ''; $el_class = $this->getExtraClass( $el_class ); $width = spb_translateColumnWidthToSpan( $width ); $el_class .= ' spb_text_column'; if( $custom_css != "" ){ $inline_style .= $custom_css; $img_url = wp_get_attachment_image_src( $bk_image_global, 'full' ); if( isset( $img_url ) && $img_url[0] != "" ) { $inline_style .= 'background-image: url(' . $img_url[0] . ');'; } }else{ if ( $padding_vertical != "" ) { $inline_style .= 'padding-top:' . $padding_vertical . '%;padding-bottom:' . $padding_vertical . '%;'; } if ( $padding_horizontal != "" ) { $inline_style .= 'padding-left:' . $padding_horizontal . '%;padding-right:' . $padding_horizontal . '%;'; } } $icon_output = ""; if ( $icon ) { $icon_output = '<i class="' . $icon . '"></i>'; } if ( $animation != "" && $animation != "none" ) { $output .= "\n\t" . '<div class="spb_content_element sf-animation ' . $width . $el_class . '" data-animation="' . $animation . '" data-delay="' . $animation_delay . '">'; } else { $output .= "\n\t" . '<div class="spb_content_element ' . $width . $el_class . '">'; } $output .= "\n\t\t" . '<div class="spb-asset-content" style="' . $inline_style . '">'; if ( $icon_output != "" ) { $output .= ( $title != '' ) ? "\n\t\t\t" . '<div class="title-wrap"><h3 class="spb-heading spb-icon-heading"><span>' . $icon_output . '' . $title . '</span></h3></div>' : ''; } else { $output .= ( $title != '' ) ? "\n\t\t\t" . $this->spb_title( $title, 'spb-text-heading' ) : ''; } $output .= "\n\t\t\t" . do_shortcode( $content ); $output .= "\n\t\t" . '</div>'; $output .= "\n\t" . '</div> ' . $this->endBlockComment( $width ); $output = $this->startRow( $el_position ) . $output . $this->endRow( $el_position ); return $output; } } SPBMap::map( 'spb_text_block', array( "name" => __( "Text Block", 'swift-framework-plugin' ), "base" => "spb_text_block", "class" => "spb_tab_media", "icon" => "icon-text-block", "wrapper_class" => "clearfix", "controls" => "full", "params" => array( array( "type" => "textfield", "holder" => "div", "heading" => __( "Widget title", 'swift-framework-plugin' ), "param_name" => "title", "value" => "", "description" => __( "Heading text. Leave it empty if not needed.", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Title icon", 'swift-framework-plugin' ), "param_name" => "icon", "value" => "", "description" => __( "Icon to the left of the title text. This is the class name for the icon, e.g. fa-cloud", 'swift-framework-plugin' ) ), array( "type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __( "Text", 'swift-framework-plugin' ), "param_name" => "content", "value" => '', //"value" => __("<p>This is a text block. Click the edit button to change this text.</p>", 'swift-framework-plugin'), "description" => __( "Enter your content.", 'swift-framework-plugin' ) ), array( "type" => "section_tab", "param_name" => "animation_options_tab", "heading" => __( "Animation", 'swift-framework-plugin' ), ), array( "type" => "dropdown", "heading" => __( "Intro Animation", 'swift-framework-plugin' ), "param_name" => "animation", "value" => spb_animations_list(), "description" => __( "Select an intro animation for the text block that will show it when it appears within the viewport.", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Animation Delay", 'swift-framework-plugin' ), "param_name" => "animation_delay", "value" => "0", "description" => __( "If you wish to add a delay to the animation, then you can set it here (ms).", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Data Form Content", 'swift-framework-plugin' ), "param_name" => "form_content", "value" => "", "description" => __( "This is a hidden field that is used to save the content when using forms inside the content.", 'swift-framework-plugin' ) ) ) ) ); /* BOXED CONTENT ASSET ================================================== */ class SwiftPageBuilderShortcode_spb_boxed_content extends SwiftPageBuilderShortcode { public function content( $atts, $content = null ) { $title = $type = $bg_style = $inline_style = $custom_bg_colour = $custom_text_colour = $padding_vertical = $padding_horizontal = $el_class = $width = $el_position = ''; extract( shortcode_atts( array( 'title' => '', 'type' => '', 'custom_bg_colour' => '', 'custom_text_colour' => '', 'box_link' => '', 'box_link_target' => '_self', 'padding_vertical' => '0', 'padding_horizontal' => '0', 'el_class' => '', 'el_position' => '', 'width' => '1/2' ), $atts ) ); $output = ''; $el_class = $this->getExtraClass( $el_class ); $width = spb_translateColumnWidthToSpan( $width ); if ( $custom_bg_colour != "" ) { $bg_style .= 'background: ' . $custom_bg_colour . '!important;'; } if ( $custom_text_colour != "" ) { $inline_style .= 'color: ' . $custom_text_colour . '!important;'; } if ( $padding_vertical != "" ) { $inline_style .= 'padding-top:' . $padding_vertical . '%;padding-bottom:' . $padding_vertical . '%;'; } if ( $padding_horizontal != "" ) { $inline_style .= 'padding-left:' . $padding_horizontal . '%;padding-right:' . $padding_horizontal . '%;'; } $output .= "\n\t" . '<div class="spb_content_element spb_box_content ' . $width . $el_class . '">'; $output .= ( $title != '' ) ? "\n\t\t\t" . $this->spb_title( $title, '' ) : ''; $output .= "\n\t" . '<div class="spb-bg-color-wrap ' . $type . '" style="' . $bg_style . '">'; $output .= "\n\t\t" . '<div class="spb-asset-content">'; if ( $box_link != "" ) { $output .= '<a href="' . $box_link . '" target="' . $box_link_target . '" class="box-link"></a>'; } $output .= "\n\t\t"; if ( $inline_style != "" ) { $output .= '<div class="box-content-wrap" style="' . $inline_style . '">' . do_shortcode( $content ) . '</div>'; } else { $output .= '<div class="box-content-wrap">' . do_shortcode( $content ) . '</div>'; } $output .= "\n\t\t" . '</div>'; $output .= "\n\t\t" . '</div>'; $output .= "\n\t" . '</div> ' . $this->endBlockComment( $width ); $output = $this->startRow( $el_position ) . $output . $this->endRow( $el_position ); return $output; } } $target_arr = array( __( "Same window", 'swift-framework-plugin' ) => "_self", __( "New window", 'swift-framework-plugin' ) => "_blank" ); SPBMap::map( 'spb_boxed_content', array( "name" => __( "Boxed Content", 'swift-framework-plugin' ), "base" => "spb_boxed_content", "class" => "spb_tab_media", "icon" => "icon-boxed-content", "wrapper_class" => "clearfix", "controls" => "full", "params" => array( array( "type" => "textfield", "holder" => "div", "heading" => __( "Widget title", 'swift-framework-plugin' ), "param_name" => "title", "value" => "", "description" => __( "Heading text. Leave it empty if not needed.", 'swift-framework-plugin' ) ), array( "type" => "textarea_html", "holder" => "div", "class" => "", "heading" => __( "Text", 'swift-framework-plugin' ), "param_name" => "content", "value" => __( "<p>This is a boxed content block. Click the edit button to edit this text.</p>", 'swift-framework-plugin' ), "description" => __( "Enter your content.", 'swift-framework-plugin' ) ), array( "type" => "dropdown", "heading" => __( "Box type", 'swift-framework-plugin' ), "param_name" => "type", "value" => array( __( 'Coloured', 'swift-framework-plugin' ) => "coloured", __( 'White with stroke', 'swift-framework-plugin' ) => "whitestroke" ), "description" => __( "Choose the surrounding box type for this content", 'swift-framework-plugin' ) ), array( "type" => "colorpicker", "heading" => __( "Background color", 'swift-framework-plugin' ), "param_name" => "custom_bg_colour", "value" => "", "description" => __( "Provide a background colour here. If blank, your colour customisaer settings will be used.", 'swift-framework-plugin' ) ), array( "type" => "colorpicker", "heading" => __( "Text colour", 'swift-framework-plugin' ), "param_name" => "custom_text_colour", "value" => "", "description" => __( "Provide a text colour here. If blank, your colour customisaer settings will be used.", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Overlay Link", 'swift-framework-plugin' ), "param_name" => "box_link", "value" => "", "description" => __( "Optionally provide a link here. This will overlay the boxed content and make the asset a whole clickable link.", 'swift-framework-plugin' ) ), array( "type" => "dropdown", "heading" => __( "Overlay Link Target", 'swift-framework-plugin' ), "param_name" => "box_link_target", "value" => $target_arr ), array( "type" => "uislider", "heading" => __( "Padding - Vertical", 'swift-framework-plugin' ), "param_name" => "padding_vertical", "value" => "0", "step" => "1", "min" => "0", "max" => "20", "description" => __( "Adjust the vertical padding for the text block (percentage).", 'swift-framework-plugin' ) ), array( "type" => "uislider", "heading" => __( "Padding - Horizontal", 'swift-framework-plugin' ), "param_name" => "padding_horizontal", "value" => "0", "step" => "1", "min" => "0", "max" => "20", "description" => __( "Adjust the horizontal padding for the text block (percentage).", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Extra class", 'swift-framework-plugin' ), "param_name" => "el_class", "value" => "", "description" => __( "If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin' ) ) ) ) ); /* DIVIDER ASSET ================================================== */ class SwiftPageBuilderShortcode_spb_divider extends SwiftPageBuilderShortcode { protected function content( $atts, $content = null ) { $with_line = $fullwidth = $type = $width = $el_class = $text = ''; extract( shortcode_atts( array( 'with_line' => '', 'type' => '', 'heading_text' => '', 'top_margin' => '0px', 'bottom_margin' => '30px', 'fullwidth' => '', 'text' => '', 'width' => '1/1', 'el_class' => '', 'el_position' => '' ), $atts ) ); $width = spb_translateColumnWidthToSpan( $width ); $up_icon = apply_filters( 'sf_up_icon' , '<i class="ss-up"></i>' ); $style = "margin-top: " . $top_margin . "; margin-bottom: " . $bottom_margin . ";"; $output = ''; $output .= '<div class="divider-wrap ' . $width . '">'; if ( $type == "heading" ) { $output .= '<div class="spb_divider ' . $el_class . '" style="' . $style . '">'; $output .= '<h3 class="divider-heading">' . $heading_text . '</h3>'; $output .= '</div>' . $this->endBlockComment( 'divider' ) . "\n"; } else { $output .= '<div class="spb_divider ' . $type . ' spb_content_element ' . $el_class . '" style="' . $style . '">'; if ( $type == "go_to_top" ) { $output .= '<a class="animate-top" href="#">' . $text . '</a>'; } else if ( $type == "go_to_top_icon1" ) { $output .= '<a class="animate-top" href="#">' . $up_icon . '</a>'; } else if ( $type == "go_to_top_icon2" ) { $output .= '<a class="animate-top" href="#">' . $text . $up_icon . '</a>'; } $output .= '</div>' . $this->endBlockComment( 'divider' ) . "\n"; } $output .= '</div>'; if ( $fullwidth == "yes" && $width == "col-sm-12" ) { $output = $this->startRow( $el_position, '', true ) . $output . $this->endRow( $el_position, '', true ); } else { $output = $this->startRow( $el_position ) . $output . $this->endRow( $el_position ); } return $output; } } SPBMap::map( 'spb_divider', array( "name" => __( "Divider", 'swift-framework-plugin' ), "base" => "spb_divider", "class" => "spb_divider", 'icon' => 'icon-divider', "controls" => '', "params" => array( array( "type" => "dropdown", "heading" => __( "Divider type", 'swift-framework-plugin' ), "param_name" => "type", "value" => array( __( 'Standard', 'swift-framework-plugin' ) => "standard", __( 'Thin', 'swift-framework-plugin' ) => "thin", __( 'Dotted', 'swift-framework-plugin' ) => "dotted", __( 'Heading', 'swift-framework-plugin' ) => "heading", __( 'Go to top (text)', 'swift-framework-plugin' ) => "go_to_top", __( 'Go to top (Icon 1)', 'swift-framework-plugin' ) => "go_to_top_icon1", __( 'Go to top (Icon 2)', 'swift-framework-plugin' ) => "go_to_top_icon2" ), "description" => __( "Select divider type.", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Divider Heading Text", 'swift-framework-plugin' ), "param_name" => "heading_text", "value" => '', "description" => __( "The text for the the 'Heading' divider type.", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Go to top text", 'swift-framework-plugin' ), "param_name" => "text", "value" => __( "Go to top", 'swift-framework-plugin' ), "required" => array("blog_type", "or", "go_to_top,go_to_top_icon1,go_to_top_icon2"), "description" => __( "The text for the 'Go to top (text)' divider type.", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Top Margin", 'swift-framework-plugin' ), "param_name" => "top_margin", "value" => __( "0px", 'swift-framework-plugin' ), "description" => __( "Set the margin above the divider (include px).", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Bottom Margin", 'swift-framework-plugin' ), "param_name" => "bottom_margin", "value" => __( "30px", 'swift-framework-plugin' ), "description" => __( "Set the margin below the divider (include px).", 'swift-framework-plugin' ) ), array( "type" => "buttonset", "heading" => __( "Full width", 'swift-framework-plugin' ), "param_name" => "fullwidth", "value" => array( __( 'No', 'swift-framework-plugin' ) => "no", __( 'Yes', 'swift-framework-plugin' ) => "yes" ), "buttonset_on" => "yes", "description" => __( "Select yes if you'd like the divider to be full width (only to be used with no sidebars, and with Standard/Thin/Dotted divider types).", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Extra class", 'swift-framework-plugin' ), "param_name" => "el_class", "value" => "", "description" => __( "If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin' ) ) ), "js_callback" => array( "init" => "spbTextSeparatorInitCallBack" ) ) ); /* BLANK SPACER ASSET ================================================== */ class SwiftPageBuilderShortcode_spb_blank_spacer extends SwiftPageBuilderShortcode { protected function content( $atts, $content = null ) { $height = $el_class = ''; extract( shortcode_atts( array( 'height' => '', 'width' => '', 'responsive_vis' => '', 'el_position' => '', 'el_class' => '', ), $atts ) ); $responsive_vis = str_replace( "_", " ", $responsive_vis ); $width = spb_translateColumnWidthToSpan( $width ); $el_class = $this->getExtraClass( $el_class ) . ' ' . $responsive_vis; $output = ''; $output .= '<div class="blank_spacer ' . $width . ' ' . $el_class . '" style="height:' . $height . ';">'; $output .= '</div>' . $this->endBlockComment( 'divider' ) . "\n"; $output = $this->startRow( $el_position ) . $output . $this->endRow( $el_position ); return $output; } } SPBMap::map( 'spb_blank_spacer', array( "name" => __( "Blank Spacer", 'swift-framework-plugin' ), "base" => "spb_blank_spacer", "class" => "spb_blank_spacer", 'icon' => 'icon-blank-spacer', "params" => array( array( "type" => "textfield", "heading" => __( "Height", 'swift-framework-plugin' ), "param_name" => "height", "value" => __( "30px", 'swift-framework-plugin' ), "description" => __( "The height of the spacer, in px (required).", 'swift-framework-plugin' ) ), array( "type" => "dropdown", "heading" => __( "Responsive Visiblity", 'swift-framework-plugin' ), "param_name" => "responsive_vis", "holder" => 'indicator', "value" => spb_responsive_vis_list(), "description" => __( "Set the responsive visiblity for the row, if you would only like it to display on certain display sizes.", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Extra class", 'swift-framework-plugin' ), "param_name" => "el_class", "value" => "", "description" => __( "If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin' ) ) ), ) ); /* MESSAGE BOX ASSET ================================================== */ class SwiftPageBuilderShortcode_spb_message extends SwiftPageBuilderShortcode { protected function content( $atts, $content = null ) { $color = ''; extract( shortcode_atts( array( 'color' => 'alert-info', 'el_position' => '' ), $atts ) ); $output = ''; if ( $color == "alert-block" ) { $color = ""; } $width = spb_translateColumnWidthToSpan( "1/1" ); $output .= '<div class="' . $width . '"><div class="alert spb_content_element ' . $color . '"><div class="messagebox_text">' . spb_format_content( $content ) . '</div></div></div>' . $this->endBlockComment( 'alert box' ) . "\n"; //$output .= '<div class="spb_messagebox message '.$color.'"><div class="messagebox_text">'.spb_format_content($content).'</div></div>'; $output = $this->startRow( $el_position ) . $output . $this->endRow( $el_position ); return $output; } } SPBMap::map( 'spb_message', array( "name" => __( "Message Box", 'swift-framework-plugin' ), "base" => "spb_message", "class" => "spb_messagebox spb_controls_top_right spb_tab_ui", "icon" => "icon-message-box", "wrapper_class" => "alert", "controls" => "edit_popup_delete", "params" => array( array( "type" => "dropdown", "heading" => __( "Message box type", 'swift-framework-plugin' ), "param_name" => "color", "value" => array( __( 'Informational', 'swift-framework-plugin' ) => "alert-info", __( 'Warning', 'swift-framework-plugin' ) => "alert-block", __( 'Success', 'swift-framework-plugin' ) => "alert-success", __( 'Error', 'swift-framework-plugin' ) => "alert-error" ), "description" => __( "Select message type.", 'swift-framework-plugin' ) ), array( "type" => "textarea_html", "holder" => "div", "class" => "messagebox_text", "heading" => __( "Message text", 'swift-framework-plugin' ), "param_name" => "content", "value" => __( "<p>This is a message box. Click the edit button to edit this text.</p>", 'swift-framework-plugin' ), "description" => __( "Message text.", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Extra class", 'swift-framework-plugin' ), "param_name" => "el_class", "value" => "", "description" => __( "If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin' ) ) ), "js_callback" => array( "init" => "spbMessageInitCallBack" ) ) ); /* TOGGLE ASSET ================================================== */ class SwiftPageBuilderShortcode_spb_toggle extends SwiftPageBuilderShortcode { protected function content( $atts, $content = null ) { $title = $el_class = $open = null; extract( shortcode_atts( array( 'title' => __( "Click to toggle", 'swift-framework-plugin' ), 'el_class' => '', 'open' => 'false', 'el_position' => '', 'width' => '1/1' ), $atts ) ); $output = ''; $width = spb_translateColumnWidthToSpan( $width ); $el_class = $this->getExtraClass( $el_class ); $open = ( $open == 'true' ) ? ' spb_toggle_title_active' : ''; $el_class .= ( $open == ' spb_toggle_title_active' ) ? ' spb_toggle_open' : ''; $output .= '<div class="toggle-wrap ' . $width . '">'; $output .= '<h4 class="spb_toggle' . $open . '">' . $title . '</h4><div class="spb_toggle_content' . $el_class . '">' . spb_format_content( $content ) . '</div>' . $this->endBlockComment( 'toggle' ) . "\n"; $output .= '</div>'; $output = $this->startRow( $el_position ) . $output . $this->endRow( $el_position ); return $output; } } SPBMap::map( 'spb_toggle', array( "name" => __( "Toggle", 'swift-framework-plugin' ), "base" => "spb_toggle", "class" => "spb_faq spb_tab_ui", "icon" => "icon-toggle", "params" => array( array( "type" => "textfield", "class" => "toggle_title", "heading" => __( "Toggle title", 'swift-framework-plugin' ), "param_name" => "title", "value" => __( "Toggle title", 'swift-framework-plugin' ), "description" => __( "Toggle block title.", 'swift-framework-plugin' ) ), array( "type" => "textarea_html", "holder" => "div", "class" => "toggle_content", "heading" => __( "Toggle content", 'swift-framework-plugin' ), "param_name" => "content", "value" => __( "<p>The toggle content goes here, click the edit button to change this text.</p>", 'swift-framework-plugin' ), "description" => __( "Toggle block content.", 'swift-framework-plugin' ) ), array( "type" => "dropdown", "heading" => __( "Default state", 'swift-framework-plugin' ), "param_name" => "open", "value" => array( __( "Closed", 'swift-framework-plugin' ) => "false", __( "Open", 'swift-framework-plugin' ) => "true" ), "description" => __( "Select this if you want toggle to be open by default.", 'swift-framework-plugin' ) ), array( "type" => "textfield", "heading" => __( "Extra class", 'swift-framework-plugin' ), "param_name" => "el_class", "value" => "", "description" => __( "If you wish to style this particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'swift-framework-plugin' ) ) ) ) );
tuffon/imaginewithus
wp-content/plugins/swift-framework/includes/page-builder/shortcodes/default.php
PHP
gpl-2.0
31,195
46.625954
240
0.422568
false
/* * ************************************************************************************* * Copyright (C) 2008 EsperTech, Inc. All rights reserved. * * http://esper.codehaus.org * * http://www.espertech.com * * ---------------------------------------------------------------------------------- * * The software in this package is published under the terms of the GPL license * * a copy of which has been included with this distribution in the license.txt file. * * ************************************************************************************* */ package com.espertech.esper.epl.join.rep; import com.espertech.esper.client.EventBean; import com.espertech.esper.support.epl.join.SupportJoinResultNodeFactory; import com.espertech.esper.support.event.SupportEventBeanFactory; import java.util.*; import junit.framework.TestCase; public class TestRepositoryImpl extends TestCase { private EventBean s0Event; private RepositoryImpl repository; public void setUp() { s0Event = SupportEventBeanFactory.createObject(new Object()); repository = new RepositoryImpl(0, s0Event, 6); } public void testGetCursors() { // get cursor for root stream lookup Iterator<Cursor> it = repository.getCursors(0); assertTrue(it.hasNext()); Cursor cursor = it.next(); assertSame(s0Event, cursor.getTheEvent()); assertSame(0, cursor.getStream()); assertFalse(it.hasNext()); tryIteratorEmpty(it); // try invalid get cursor for no results try { repository.getCursors(2); fail(); } catch (NullPointerException ex) { // expected } } public void testAddResult() { Set<EventBean> results = SupportJoinResultNodeFactory.makeEventSet(2); repository.addResult(repository.getCursors(0).next(), results, 1); assertEquals(1, repository.getNodesPerStream()[1].size()); try { repository.addResult(repository.getCursors(0).next(), new HashSet<EventBean>(), 1); fail(); } catch (IllegalArgumentException ex) { // expected } try { repository.addResult(repository.getCursors(0).next(), null, 1); fail(); } catch (NullPointerException ex) { // expected } } public void testFlow() { // Lookup from s0 Cursor cursors[] = read(repository.getCursors(0)); assertEquals(1, cursors.length); Set<EventBean> resultsS1 = SupportJoinResultNodeFactory.makeEventSet(2); repository.addResult(cursors[0], resultsS1, 1); // Lookup from s1 cursors = read(repository.getCursors(1)); assertEquals(2, cursors.length); Set<EventBean> resultsS2[] = SupportJoinResultNodeFactory.makeEventSets(new int[] {2, 3}); repository.addResult(cursors[0], resultsS2[0], 2); repository.addResult(cursors[1], resultsS2[1], 2); // Lookup from s2 cursors = read(repository.getCursors(2)); assertEquals(5, cursors.length); // 2 + 3 for s2 Set<EventBean> resultsS3[] = SupportJoinResultNodeFactory.makeEventSets(new int[] {2, 1, 3, 5, 1}); repository.addResult(cursors[0], resultsS3[0], 3); repository.addResult(cursors[1], resultsS3[1], 3); repository.addResult(cursors[2], resultsS3[2], 3); repository.addResult(cursors[3], resultsS3[3], 3); repository.addResult(cursors[4], resultsS3[4], 3); // Lookup from s3 cursors = read(repository.getCursors(3)); assertEquals(12, cursors.length); } private void tryIteratorEmpty(Iterator it) { try { it.next(); fail(); } catch (NoSuchElementException ex) { // expected } } private Cursor[] read(Iterator<Cursor> iterator) { List<Cursor> cursors = new ArrayList<Cursor>(); while (iterator.hasNext()) { Cursor cursor = iterator.next(); cursors.add(cursor); } return cursors.toArray(new Cursor[0]); } }
sungsoo/esper
esper/src/test/java/com/espertech/esper/epl/join/rep/TestRepositoryImpl.java
Java
gpl-2.0
4,571
30.884892
107
0.528987
false
/* * Copyright (c) 2009, Yauhen Kharuzhy <jekhor@gmail.com> * * See file CREDITS for list of people who contributed to this * project. * * 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 */ #include <common.h> #include <command.h> #include <mmc.h> #include <part.h> #include <fat.h> #include <firmware_update.h> #include <linux/mtd/mtd.h> #include <nand.h> #include <linux/mtd/partitions.h> #include <linux/list.h> #include <ubi_uboot.h> #include <jffs2/load_kernel.h> #include <i2c.h> #include <lcd.h> #include <linux/time.h> #ifdef crc32 #undef crc32 #endif #define N516_KEY_C 0x1d #define N516_KEY_MENU 0x0e #define N516_KEY_POWER 0x1c #define N516_KEY_1 0x04 #define KEY_RESERVED 0 #define KEY_ESC 1 #define KEY_1 2 #define KEY_2 3 #define KEY_3 4 #define KEY_4 5 #define KEY_5 6 #define KEY_6 7 #define KEY_7 8 #define KEY_8 9 #define KEY_9 10 #define KEY_0 11 #define KEY_ENTER 28 #define KEY_SPACE 57 #define KEY_UP 103 #define KEY_PAGEUP 104 #define KEY_LEFT 105 #define KEY_RIGHT 106 #define KEY_DOWN 108 #define KEY_PAGEDOWN 109 #define KEY_POWER 116 #define KEY_MENU 139 #define KEY_SLEEP 142 #define KEY_WAKEUP 143 #define KEY_DIRECTION 153 #define KEY_PLAYPAUSE 164 #define KEY_SEARCH 217 struct fw_update_head { char magic[4]; u32 header_size; } __attribute__((packed)); struct block_properties { unsigned int raw:1; u32 crc32; char *name; u64 offset; u64 size; }; static struct ubi_device *ubi; static u32 __get_unaligned_le32(unsigned char *p) { return (u32)p[0] | ((u32)p[1] << 8) | ((u32)p[2] << 16) | ((u32)p[3] << 24); } static u64 __get_unaligned_le64(unsigned char *p) { return (u64)p[0] | ((u64)p[1] << 8) | ((u64)p[2] << 16) | ((u64)p[3] << 24) | ((u64)p[4] << 32) | ((u64)p[5] << 40) | ((u64)p[6] << 48) | ((u64)p[7] << 56); } #define log(msg, args...) \ { \ eprintf(msg, ##args); \ printf(msg, ##args); \ } while (0) #define show_progress(msg, args...) \ { \ printf("\r" msg "\n", ##args); \ } while(0) static int ubi_initialize(void) { struct mtd_info *master; struct mtd_device *dev; struct mtd_partition mtd_part; struct part_info *part; char buffer[20]; u8 pnum; int err; if (ubi_devices[0]) { ubi = ubi_devices[0]; return 0; // ubi_exit(); // del_mtd_partitions(&nand_info[0]); } if (mtdparts_init() != 0) { printf("Error initializing mtdparts!\n"); return 1; } master = &nand_info[0]; if (find_dev_and_part(CONFIG_UBI_PARTITION, &dev, &pnum, &part) != 0) return 1; sprintf(buffer, "mtd=%d", pnum); memset(&mtd_part, 0, sizeof(mtd_part)); mtd_part.name = buffer; mtd_part.size = part->size; mtd_part.offset = part->offset; add_mtd_partitions(master, &mtd_part, 1); err = ubi_mtd_param_parse(buffer, NULL); if (err) { del_mtd_partitions(master); return err; } err = ubi_init(); if (err) { del_mtd_partitions(master); return err; } ubi = ubi_devices[0]; return 0; } static int init_fat(void) { block_dev_desc_t *dev_desc; int part = 1; struct mmc *mmc; mmc = find_mmc_device(0); if (!mmc) return -1; if (mmc_init(mmc)) return -1; dev_desc = get_dev("mmc", 0); if (dev_desc==NULL) { printf("\nERROR: Invalid mmc device. Please check your SD/MMC card.\n"); return -1; } if (fat_register_device(dev_desc, part)!=0) { printf("\nERROR: Unable to use %s %d:%d for update. Please check or replace your card.\n", "mmc", 0, part); return -1; } return 0; } static int fw_load(char *filename, unsigned char *buf, unsigned long size, unsigned long offset) { if (init_fat() < 0) return -1; printf("Reading file %s (0x%lx bytes from 0x%lx) offset\n", filename, size, offset); return file_fat_read(filename, buf, size, offset); } static int check_global_property(char *name, char *val, unsigned long len) { long t; char date[32]; if (!strcmp(name, "device")) { if (strcmp(val, CONFIG_BOARD_NAME)) return -1; } else if (!strcmp(name, "hwrev")) { if (strcmp(val, CONFIG_BOARD_HWREV)) return -1; } else if (!strcmp(name, "description")) { log("Description:\n %s\n", val); } else if (!strcmp(name, "date")) { t = simple_strtoul(val, NULL, 10); ctime_r(&t, date); log("Firmware date:\n %s\n", date); } else if (!strcmp(name, "epoch")) { if (strcmp(val, CONFIG_FIRMWARE_EPOCH)) return -1; } return 0; } static int check_block_property(char *block_name, char *name, char *val, unsigned long len, struct block_properties *block_prop) { if (!strcmp(name, "raw") && !strcmp(val, "yes")) block_prop->raw = 1; if (!strcmp(name, "crc32")) block_prop->crc32 = __get_unaligned_le32((unsigned char *)val); return 0; } static unsigned long process_all_properties(unsigned char *start, char *block_name, int dry_run, int *image_valid, struct block_properties *block_prop) { u32 property_name_len; u32 property_val_len; char *property_name, *property_val; unsigned char *buf = start; int res; property_name_len = __get_unaligned_le32(buf); buf += 4; property_val_len = __get_unaligned_le32(buf); buf += 4; while (property_name_len) { property_name = (char *)buf; buf += property_name_len; property_val = (char *)buf; buf += property_val_len; if ((property_name[property_name_len - 1] == '\0') && strncmp(property_name, "crc32", 5)) printf("%s: %s\n", property_name, property_val); else { int i; printf("%s:", property_name); for (i = 0; i < property_val_len; i++) printf(" %02x", (u8)property_val[i]); puts("\n"); } if (!block_name) res = check_global_property(property_name, property_val, property_val_len); else res = check_block_property(block_name, property_name, property_val, property_val_len, block_prop); if (res != 0) *image_valid = 0; property_name_len = __get_unaligned_le32(buf); buf += 4; property_val_len = __get_unaligned_le32(buf); buf += 4; } return buf - start; } static struct update_layout_entry *get_block_flash_layout(char *block_name) { int i; for (i = 0; i < ARRAY_SIZE(nand_layout); i++) { if (!strcmp(nand_layout[i].name, block_name)) return &nand_layout[i]; } return NULL; } static int flash_chunk(u64 offset, unsigned char *buf, size_t count) { nand_info_t *nand; #ifdef CONFIG_SYS_NAND_SELECT_DEVICE board_nand_select_device(nand_info[0].priv, 0); #endif nand = &nand_info[0]; count = roundup(count, nand->writesize); printf("Flashing chunk to offset 0x%08x, count 0x%x...\n", (u32)offset, count); return nand_write_skip_bad(nand, offset, &count, buf); } static int erase_flash(u64 offset, u64 size) { nand_erase_options_t opts; nand_info_t *nand; #ifdef CONFIG_SYS_NAND_SELECT_DEVICE board_nand_select_device(nand_info[0].priv, 0); #endif nand = &nand_info[0]; memset(&opts, 0, sizeof(opts)); opts.offset = offset; opts.length = size; opts.jffs2 = 0; opts.quiet = 0; opts.scrub = 0; return nand_erase_opts(nand, &opts); } static int process_block_raw(char *filename, struct block_properties *block_prop, int dry_run) { unsigned char *buf = (unsigned char *)CONFIG_UPDATE_TMPBUF; u64 bytes_read = 0, bytes_remain = block_prop->size; struct update_layout_entry *layout; u64 flash_address; u32 block_crc32; layout = get_block_flash_layout(block_prop->name); if (!layout) { log("Cannot find layout for block '%s', skipping it\n", block_prop->name); return 1; } log("Flashing `%s'", block_prop->name); show_progress("Erasing flash..."); if (!dry_run) erase_flash(layout->offset, layout->size); else printf("Not erasing flash (dry run)\n"); flash_address = layout->offset; block_crc32 = 0; while (bytes_remain) { unsigned long chunksize = min(CONFIG_UPDATE_CHUNKSIZE, bytes_remain); long res; if (bytes_remain < CONFIG_UPDATE_CHUNKSIZE) memset(buf, 0xff, CONFIG_UPDATE_CHUNKSIZE); show_progress("Reading...\t(%u%%)", (unsigned int)(bytes_read * 100 / block_prop->size)); res = fw_load(filename, buf, chunksize, block_prop->offset + bytes_read); if (res < 0) { log("\nFailed to read file %s\n", filename); return -1; } block_crc32 = crc32(block_crc32, buf, chunksize); bytes_read += res; bytes_remain -= res; show_progress("Flashing...\t(%u%%)", (unsigned int)(bytes_read * 100 / block_prop->size)); if (!dry_run) flash_chunk(flash_address, buf, res); else printf("Not flashing (dry run) chunk to offset 0x%08x...\n", (u32)flash_address); flash_address += res; } log("\n"); if (block_prop->crc32 != block_crc32) log("Invalid CRC for block %s\n", block_prop->name); return 0; } static int process_block_ubivol(char *filename, struct block_properties *block_prop, int dry_run) { unsigned char *buf = (unsigned char *)CONFIG_UPDATE_TMPBUF; u64 bytes_read = 0, bytes_remain = block_prop->size; int i = 0, err = 0; int rsvd_bytes = 0; int found = 0; struct ubi_volume *vol; u32 block_crc32; log("Flashing firmware part `%s':\n", block_prop->name); if (!ubi) { err = ubi_initialize(); if (err) { log("ERROR: UBI initialization failed\n"); return err; } } for (i = 0; i < ubi->vtbl_slots; i++) { vol = ubi->volumes[i]; if (vol && !strcmp(vol->name, block_prop->name)) { printf("Volume \"%s\" is found at volume id %d\n", block_prop->name, i); found = 1; break; } } if (!found) { log("ERROR: Volume \"%s\" is not found\n", block_prop->name); err = 1; goto out; } rsvd_bytes = vol->reserved_pebs * (ubi->leb_size - vol->data_pad); if (block_prop->size > rsvd_bytes) { printf("rsvd_bytes=%d vol->reserved_pebs=%d ubi->leb_size=%d\n", rsvd_bytes, vol->reserved_pebs, ubi->leb_size); printf("vol->data_pad=%d\n", vol->data_pad); log("ERROR: Size of block is greater than volume size.\n"); err = -1; goto out; } show_progress("Preparing..."); if (!dry_run) { err = ubi_start_update(ubi, vol, block_prop->size); if (err < 0) { log("Cannot start volume update\n"); goto out; } } block_crc32 = 0; while (bytes_remain) { unsigned long chunksize = min(CONFIG_UPDATE_CHUNKSIZE, bytes_remain); long res; show_progress("Reading...\t(%u%%)", (unsigned int)(bytes_read * 100 / block_prop->size)); res = fw_load(filename, buf, chunksize, block_prop->offset + bytes_read); if (res < 0) { log("\nERROR: Failed to read file %s\n", filename); return -1; } block_crc32 = crc32(block_crc32, buf, res); bytes_read += res; bytes_remain -= res; show_progress("Flashing...\t(%u%%)", (unsigned int)(bytes_read * 100 / block_prop->size)); if (!dry_run) { err = ubi_more_update_data(ubi, vol, buf, res); if (err < 0) { log("\nERROR: Failed to write data to UBI volume\n"); goto out; } } } log("\n"); if (block_prop->crc32 != block_crc32) log("ERROR: Invalid CRC for block %s\n", block_prop->name); if (err && !dry_run) { err = ubi_check_volume(ubi, vol->vol_id); if ( err < 0 ) goto out; if (err) { ubi_warn("volume %d on UBI device %d is corrupted", vol->vol_id, ubi->ubi_num); vol->corrupted = 1; } vol->checked = 1; ubi_gluebi_updated(vol); } out: return err; } static void ubi_cleanup(void) { ubi_exit(); del_mtd_partitions(&nand_info[0]); } static int process_update(char *filename, int dry_run) { struct fw_update_head fw_head; unsigned char *header; unsigned char *p; u32 block_name_len; u64 block_offset, block_size; char *block_name; int image_valid = 1; int ret = 0; if (fw_load(filename, (unsigned char *)&fw_head, sizeof(fw_head), 0) < 0) { log("Failed to load file %s\n", filename); return 1; } fw_head.header_size = __le32_to_cpu(fw_head.header_size); header = malloc(fw_head.header_size); if (!header) { puts("Failed to allocate memory for firmware update header\n"); return 1; } if (fw_load(filename, header, fw_head.header_size, 0) < 0) { log("Failed to load file %s\n", filename); return 1; } p = header + sizeof(fw_head); printf("Global properties:\n"); p += process_all_properties(p, NULL, dry_run, &image_valid, NULL); if (!image_valid) { log("Update image is not valid for this device\n"); ret = -1; goto out; } log("\n"); /* Empty line for better output */ while (p < header + fw_head.header_size) { struct block_properties block_prop; block_name_len = __get_unaligned_le32(p); p += 4; block_offset = __get_unaligned_le64(p); p += 8; block_size = __get_unaligned_le64(p); p += 8; if (!block_name_len) break; memset(&block_prop, 0x00, sizeof(block_prop)); block_name = (char *)p; p += block_name_len; printf("Block '%s', offset: %lu, size: %lu\n", block_name, (unsigned long)block_offset, (unsigned long)block_size); printf("Block properties:\n"); block_prop.name = block_name; block_prop.offset = block_offset; block_prop.size = block_size; p += process_all_properties(p, block_name, dry_run, &image_valid, &block_prop); if (image_valid) { if (block_prop.raw) ret = process_block_raw(filename, &block_prop, dry_run); else ret = process_block_ubivol(filename, &block_prop, dry_run); if (ret < 0) { log("Error occured during flashing block `%s'\n", block_name); goto out; } } else { printf("Block '%s' is not valid for this device, skipping it\n", block_name); image_valid = 1; } } out: // if (ubi) // ubi_cleanup(); // ubi = NULL; return ret; } int do_updatesim(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { return process_update(CONFIG_UPDATE_FILENAME, 1); } U_BOOT_CMD( updatesim, 1, 0, do_updatesim, "Simulate firmware update (dry run)", " - load firmware update file from SD card and parse it without flashing\n" ); int do_update(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { return process_update(CONFIG_UPDATE_FILENAME, 0); } U_BOOT_CMD( update, 1, 0, do_update, "Do firmware update", " - load firmware update file from SD card, parse and flash it\n" ); static const unsigned int keymap[][2] = { {0x05, KEY_0}, {0x04, KEY_1}, {0x03, KEY_2}, {0x02, KEY_3}, {0x01, KEY_4}, {0x0b, KEY_5}, {0x0a, KEY_6}, {0x09, KEY_7}, {0x08, KEY_8}, {0x07, KEY_9}, {0x1a, KEY_PAGEUP}, {0x19, KEY_PAGEDOWN}, {0x17, KEY_LEFT}, {0x16, KEY_RIGHT}, {0x14, KEY_UP}, {0x15, KEY_DOWN}, {0x13, KEY_ENTER}, {0x11, KEY_SPACE}, {0x0e, KEY_MENU}, {0x10, KEY_DIRECTION}, {0x0f, KEY_SEARCH}, {0x0d, KEY_PLAYPAUSE}, {0x1d, KEY_ESC}, {0x1c, KEY_POWER}, {0x1e, KEY_SLEEP}, {0x1f, KEY_WAKEUP}, }; static int find_key(unsigned char code) { int i; for (i = 0; i < ARRAY_SIZE(keymap); i++) { if (keymap[i][0] == code) { return keymap[i][1]; } } return -1; } static int key_to_number(int key) { if ((key >= KEY_1) && (key <= KEY_0)) return (key - KEY_1 + 1) % 10; else return -1; } #define KEYPRESS_TIMEOUT 5000000 #define BLINK_PERIOD 300000 #define I2C_DELAY 70000 static int check_for_menu_key(void) { uchar code; int key; unsigned int t; log(" Press any key to enter update mode\n"); /* Switch LPC to normal mode */ code = 0x02; i2c_write(CONFIG_LPC_I2C_ADDR, 0, 0, &code, 1); t = 0; while (t < KEYPRESS_TIMEOUT) { __gpio_clear_pin(GPIO_LED_EN); udelay(BLINK_PERIOD / 2); __gpio_set_pin(GPIO_LED_EN); udelay(BLINK_PERIOD / 2 - I2C_DELAY); t += BLINK_PERIOD; key = -1; do { char buf[30]; if (i2c_read(CONFIG_LPC_I2C_ADDR, 0, 0, &code, 1)) break; if ((code >= 0x81) && (code <= 0x87)) { sprintf(buf, "n516-lpc.batt_level=%d", code - 0x81); setenv("batt_level_param", buf); } key = find_key(code); } while ((key < 0) && code); if (key > 0) break; } if (key == KEY_POWER) { lcd_clear(); lcd_sync(); code = 0x01; __gpio_set_pin(GPIO_LED_EN); while (1) i2c_write(CONFIG_LPC_I2C_ADDR, 0, 0, &code, 1); } if (key > 0) return 0; else return -1; } extern void metronome_disable_sync(void); extern void metronome_enable_sync(void); static struct list_head found_files; struct file_entry { char filename[255]; struct list_head link; }; static void file_check(char *filename, struct file_stat *stat) { struct file_entry *f, *cur; char *c; if (stat->is_directory) return; c = strstr(filename, CONFIG_UPDATE_FILEEXT); if (c && *(c + sizeof(CONFIG_UPDATE_FILEEXT) - 1) == '\0') { f = malloc(sizeof(*f)); if (!f) { printf("Failed to allocate memory\n"); return; } strncpy(f->filename, filename, 254); if (!list_empty(&found_files)) { list_for_each_entry(cur, &found_files, link) { if (strcmp(cur->filename, f->filename) <= 0) break; } list_add_tail(&f->link, &cur->link); } else { list_add_tail(&f->link, &found_files); } } } static int ask_user(char *buf, unsigned int len) { uchar code; int i, n; int key, num; struct file_entry *cur; metronome_disable_sync(); lcd_clear(); eputs("Select firmware update file:\n\n"); n = 0; list_for_each_entry(cur, &found_files, link) { n++; log("%d. %s\n", n, cur->filename); if (n > 9) break; } log("\nC. Exit and continue booting\n"); metronome_enable_sync(); lcd_sync(); do { key = 0; num = -1; if (i2c_read(CONFIG_LPC_I2C_ADDR, 0, 0, &code, 1)) continue; key = find_key(code); num = key_to_number(key); } while ((key != KEY_ESC) && (num < 1)); if (num > 0) { i = 0; list_for_each_entry(cur, &found_files, link) { i++; if (i == num) { strncpy(buf, cur->filename, len - 1); break; } } if (i != num) return -1; } return num; } extern void _machine_restart(void); static int do_checkupdate(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { int choice; int res; int dry_run = 0; char filename[255]; struct file_entry *cur, *tmp; if (!strcmp(argv[0], "check_and_updatesim")) { dry_run = 1; printf("Dry run mode\n"); } INIT_LIST_HEAD(&found_files); if (init_fat() < 0) return 0; dir_fat_read("/", file_check); if (list_empty(&found_files)) return 0; if (check_for_menu_key()) { res = 0; goto out; } choice = ask_user(filename, 255); if (choice < 0) { log("Continue booting...\n"); res = 0; goto out; } saveenv(); lcd_clear(); log("\tStarting update...\n\n"); res = process_update(filename, dry_run); if (!res) { log("\nUpdate completed succesfully.\nRebooting...\n"); _machine_restart(); } out: list_for_each_entry_safe(cur, tmp, &found_files, link) { list_del(&cur->link); free(cur); } return res; } U_BOOT_CMD( check_and_update, 1, 0, do_checkupdate, "Check for firmware update, ask user and start\n", NULL ); U_BOOT_CMD( check_and_updatesim, 1, 0, do_checkupdate, "Check for firmware update, ask user and start update simulation\n", NULL );
OpenInkpot-archive/uboot-n516
common/cmd_update.c
C
gpl-2.0
19,636
21.062921
109
0.619831
false
package doodle; import java.io.Serializable; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Comparator; import java.util.Date; /** * A poll is made up of two or more time slots, which are voted on by poll * invitees. A time slot is defined by a start datetime and optionally an end * datetime. * * @author Jonas Michel * */ public class TimeSlot implements Serializable { private static final long serialVersionUID = -8690469227753138784L; /** The time slot's start time. */ private Date start = null; /** The time slot's end time (optional). */ private Date end = null; public TimeSlot(Date start, Date end) { this.start = start; this.end = end; } public TimeSlot(Date start) { this.start = start; } public TimeSlot(Date day, String timeStr) throws NumberFormatException { if (timeStr.contains("-")) initDoubleTime(day, timeStr); else initSingleTime(day, timeStr); } public Date getStart() { return start; } public Date getEnd() { return end; } private void initSingleTime(Date day, String timeStr) throws NumberFormatException { start = parseTimeString(day, timeStr); } private void initDoubleTime(Date day, String timeStr) throws NumberFormatException { String[] timeStrArr = timeStr.split("-"); start = parseTimeString(day, timeStrArr[0]); end = parseTimeString(day, timeStrArr[1]); } private Date parseTimeString(Date day, String timeStr) throws NumberFormatException { int hour = 0, minute = 0; if (timeStr.contains(":")) { hour = Integer.parseInt(timeStr.split(":")[0]); minute = Integer.parseInt(timeStr.split(":")[1]); } else { hour = Integer.parseInt(timeStr); } Calendar cal = Calendar.getInstance(); cal.setTime(day); cal.add(Calendar.HOUR_OF_DAY, hour); cal.add(Calendar.MINUTE, minute); return cal.getTime(); } public String toDayString() { SimpleDateFormat day = new SimpleDateFormat("MM/dd/yyyy"); return day.format(start); } public String toTimeString() { SimpleDateFormat time = new SimpleDateFormat("HH:mm"); StringBuilder sb = new StringBuilder(); sb.append(time.format(start)); if (end == null) return sb.toString(); sb.append("-" + time.format(end)); return sb.toString(); } @Override public String toString() { return toDayString() + " " + toTimeString(); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((end == null) ? 0 : end.hashCode()); result = prime * result + ((start == null) ? 0 : start.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof TimeSlot)) return false; TimeSlot other = (TimeSlot) obj; if (end == null) { if (other.end != null) return false; } else if (!end.equals(other.end)) return false; if (start == null) { if (other.start != null) return false; } else if (!start.equals(other.start)) return false; return true; } public static class TimeSlotComparator implements Comparator<TimeSlot> { @Override public int compare(TimeSlot ts1, TimeSlot ts2) { if (ts1.getStart().before(ts2.getStart())) return -1; else if (ts1.getStart().after(ts2.getStart())) return 1; else return 0; } } }
jonasrmichel/jms-doodle-poll
joram-jms/samples/src/joram/doodle/TimeSlot.java
Java
gpl-2.0
3,355
21.979452
77
0.674218
false
<?php /* * Fixed blog_media hash column * Add "level" to blogs posts, which will be used as previous priority column */ sql_query('ALTER TABLE `blogs_media` CHANGE COLUMN `hash` `hash` VARCHAR(64) NOT NULL'); $medias = sql_query('SELECT `id`, `file` FROM `blogs_media`'); $update = sql_prepare('UPDATE `blogs_media` SET `hash` = :hash WHERE `id` = :id'); log_console(tr('Updating all blog media hash values. This might take a little while. NOTE: Each following dot represents one file')); while($media = sql_fetch($medias)){ if(empty($media['file'])) continue; cli_dot(1); $hash = ''; $file = ROOT.'data/content/photos/'.$media['file'].'-original.jpg'; if(file_exists($file)){ $hash = hash('sha256', $file); } if($hash){ $update->execute(array(':id' => $media['id'], ':hash' => $hash)); } } cli_dot(false); sql_column_exists('blogs_posts', 'level', '!ALTER TABLE `blogs_posts` ADD COLUMN `level` INT(11) NOT NULL AFTER `priority`'); sql_index_exists ('blogs_posts', 'level', '!ALTER TABLE `blogs_posts` ADD INDEX `level` (`level`)'); sql_query('ALTER TABLE `blogs_posts` CHANGE COLUMN `priority` `priority` INT(11) NOT NULL'); sql_index_exists ('blogs_posts', 'priority', 'ALTER TABLE `blogs_posts` DROP KEY `priority`'); sql_query('UPDATE `blogs_posts` SET `level` = `priority`'); /* * Ensure that all priorities are unique per blog */ $blogs = sql_query('SELECT `id`, `name` FROM `blogs`'); $update = sql_prepare('UPDATE `blogs_posts` SET `priority` = :priority WHERE `id` = :id'); while($blog = sql_fetch($blogs)){ log_console(tr('Updating priorities for blog ":blog"', array(':blog' => $blog['name']))); $priority = 1; $posts = sql_query('SELECT `id`, `name` FROM `blogs_posts` WHERE `blogs_id` = :blogs_id ORDER BY `createdon` ASC', array(':blogs_id' => $blog['id'])); while($post = sql_fetch($posts)){ cli_dot(1); $update->execute(array(':id' => $post['id'], ':priority' => $priority++)); } cli_dot(false); } sql_query('ALTER TABLE `blogs_posts` ADD UNIQUE KEY `priority` (`priority`, `blogs_id`)'); ?>
phoenixz/base
init/framework/0.47.4.php
PHP
gpl-2.0
2,194
33.825397
157
0.605743
false
/* Do not modify this file. Changes will be overwritten. */ /* Generated automatically by the ASN.1 to Wireshark dissector compiler */ /* packet-ranap.c */ /* ../../tools/asn2wrs.py -p ranap -c ./ranap.cnf -s ./packet-ranap-template -D . -O ../../epan/dissectors RANAP-CommonDataTypes.asn RANAP-Constants.asn RANAP-Containers.asn RANAP-IEs.asn RANAP-PDU-Contents.asn RANAP-PDU-Descriptions.asn */ /* Input file: packet-ranap-template.c */ #line 1 "../../asn1/ranap/packet-ranap-template.c" /* packet-ranap.c * Routines for UMTS Node B Application Part(RANAP) packet dissection * Copyright 2005 - 2010, Anders Broman <anders.broman[AT]ericsson.com> * * Wireshark - Network traffic analyzer * By Gerald Combs <gerald@wireshark.org> * Copyright 1998 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * References: 3GPP TS 25.413 version 10.4.0 Release 10 */ #include "config.h" #include <glib.h> #include <epan/packet.h> #include <epan/wmem/wmem.h> #include <epan/strutil.h> #include <epan/asn1.h> #include <epan/prefs.h> #include "packet-ber.h" #include "packet-per.h" #include "packet-gsm_map.h" #include "packet-ranap.h" #include "packet-e212.h" #include "packet-sccp.h" #include "packet-gsm_a_common.h" #include "packet-isup.h" #ifdef _MSC_VER /* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */ #pragma warning(disable:4146) #endif #define SCCP_SSN_RANAP 142 #define PNAME "Radio Access Network Application Part" #define PSNAME "RANAP" #define PFNAME "ranap" /* Higest Ranap_ProcedureCode_value, use in heuristics */ #define RANAP_MAX_PC 45 /* id_RANAPenhancedRelocation = 45 */ /*--- Included file: packet-ranap-val.h ---*/ #line 1 "../../asn1/ranap/packet-ranap-val.h" #define maxPrivateIEs 65535 #define maxProtocolExtensions 65535 #define maxProtocolIEs 65535 #define maxNrOfDTs 15 #define maxNrOfErrors 256 #define maxNrOfIuSigConIds 250 #define maxNrOfPDPDirections 2 #define maxNrOfPoints 15 #define maxNrOfRABs 256 #define maxNrOfSeparateTrafficDirections 2 #define maxNrOfSRBs 8 #define maxNrOfVol 2 #define maxNrOfLevels 256 #define maxNrOfAltValues 16 #define maxNrOfPLMNsSN 32 #define maxNrOfLAs 65536 #define maxNrOfSNAs 65536 #define maxNrOfUEsToBeTraced 64 #define maxNrOfInterfaces 16 #define maxRAB_Subflows 7 #define maxRAB_SubflowCombination 64 #define maxSet 9 #define maxNrOfHSDSCHMACdFlows_1 7 #define maxnoofMulticastServicesPerUE 128 #define maxnoofMulticastServicesPerRNC 512 #define maxMBMSSA 256 #define maxMBMSRA 65536 #define maxNrOfEDCHMACdFlows_1 7 #define maxGANSSSet 9 #define maxNrOfCSGs 256 #define maxNrOfEUTRAFreqs 8 #define maxNrOfCellIds 32 #define maxNrOfRAIs 8 #define maxNrOfLAIs 8 typedef enum _ProcedureCode_enum { id_RAB_Assignment = 0, id_Iu_Release = 1, id_RelocationPreparation = 2, id_RelocationResourceAllocation = 3, id_RelocationCancel = 4, id_SRNS_ContextTransfer = 5, id_SecurityModeControl = 6, id_DataVolumeReport = 7, id_Not_Used_8 = 8, id_Reset = 9, id_RAB_ReleaseRequest = 10, id_Iu_ReleaseRequest = 11, id_RelocationDetect = 12, id_RelocationComplete = 13, id_Paging = 14, id_CommonID = 15, id_CN_InvokeTrace = 16, id_LocationReportingControl = 17, id_LocationReport = 18, id_InitialUE_Message = 19, id_DirectTransfer = 20, id_OverloadControl = 21, id_ErrorIndication = 22, id_SRNS_DataForward = 23, id_ForwardSRNS_Context = 24, id_privateMessage = 25, id_CN_DeactivateTrace = 26, id_ResetResource = 27, id_RANAP_Relocation = 28, id_RAB_ModifyRequest = 29, id_LocationRelatedData = 30, id_InformationTransfer = 31, id_UESpecificInformation = 32, id_UplinkInformationExchange = 33, id_DirectInformationTransfer = 34, id_MBMSSessionStart = 35, id_MBMSSessionUpdate = 36, id_MBMSSessionStop = 37, id_MBMSUELinking = 38, id_MBMSRegistration = 39, id_MBMSCNDe_Registration_Procedure = 40, id_MBMSRABEstablishmentIndication = 41, id_MBMSRABRelease = 42, id_enhancedRelocationComplete = 43, id_enhancedRelocationCompleteConfirm = 44, id_RANAPenhancedRelocation = 45, id_SRVCCPreparation = 46 } ProcedureCode_enum; typedef enum _ProtocolIE_ID_enum { id_AreaIdentity = 0, id_Not_Used_1 = 1, id_Not_Used_2 = 2, id_CN_DomainIndicator = 3, id_Cause = 4, id_ChosenEncryptionAlgorithm = 5, id_ChosenIntegrityProtectionAlgorithm = 6, id_ClassmarkInformation2 = 7, id_ClassmarkInformation3 = 8, id_CriticalityDiagnostics = 9, id_DL_GTP_PDU_SequenceNumber = 10, id_EncryptionInformation = 11, id_IntegrityProtectionInformation = 12, id_IuTransportAssociation = 13, id_L3_Information = 14, id_LAI = 15, id_NAS_PDU = 16, id_NonSearchingIndication = 17, id_NumberOfSteps = 18, id_OMC_ID = 19, id_OldBSS_ToNewBSS_Information = 20, id_PagingAreaID = 21, id_PagingCause = 22, id_PermanentNAS_UE_ID = 23, id_RAB_ContextItem = 24, id_RAB_ContextList = 25, id_RAB_DataForwardingItem = 26, id_RAB_DataForwardingItem_SRNS_CtxReq = 27, id_RAB_DataForwardingList = 28, id_RAB_DataForwardingList_SRNS_CtxReq = 29, id_RAB_DataVolumeReportItem = 30, id_RAB_DataVolumeReportList = 31, id_RAB_DataVolumeReportRequestItem = 32, id_RAB_DataVolumeReportRequestList = 33, id_RAB_FailedItem = 34, id_RAB_FailedList = 35, id_RAB_ID = 36, id_RAB_QueuedItem = 37, id_RAB_QueuedList = 38, id_RAB_ReleaseFailedList = 39, id_RAB_ReleaseItem = 40, id_RAB_ReleaseList = 41, id_RAB_ReleasedItem = 42, id_RAB_ReleasedList = 43, id_RAB_ReleasedList_IuRelComp = 44, id_RAB_RelocationReleaseItem = 45, id_RAB_RelocationReleaseList = 46, id_RAB_SetupItem_RelocReq = 47, id_RAB_SetupItem_RelocReqAck = 48, id_RAB_SetupList_RelocReq = 49, id_RAB_SetupList_RelocReqAck = 50, id_RAB_SetupOrModifiedItem = 51, id_RAB_SetupOrModifiedList = 52, id_RAB_SetupOrModifyItem = 53, id_RAB_SetupOrModifyList = 54, id_RAC = 55, id_RelocationType = 56, id_RequestType = 57, id_SAI = 58, id_SAPI = 59, id_SourceID = 60, id_Source_ToTarget_TransparentContainer = 61, id_TargetID = 62, id_Target_ToSource_TransparentContainer = 63, id_TemporaryUE_ID = 64, id_TraceReference = 65, id_TraceType = 66, id_TransportLayerAddress = 67, id_TriggerID = 68, id_UE_ID = 69, id_UL_GTP_PDU_SequenceNumber = 70, id_RAB_FailedtoReportItem = 71, id_RAB_FailedtoReportList = 72, id_Not_Used_73 = 73, id_Not_Used_74 = 74, id_KeyStatus = 75, id_DRX_CycleLengthCoefficient = 76, id_IuSigConIdList = 77, id_IuSigConIdItem = 78, id_IuSigConId = 79, id_DirectTransferInformationItem_RANAP_RelocInf = 80, id_DirectTransferInformationList_RANAP_RelocInf = 81, id_RAB_ContextItem_RANAP_RelocInf = 82, id_RAB_ContextList_RANAP_RelocInf = 83, id_RAB_ContextFailedtoTransferItem = 84, id_RAB_ContextFailedtoTransferList = 85, id_GlobalRNC_ID = 86, id_RAB_ReleasedItem_IuRelComp = 87, id_MessageStructure = 88, id_Alt_RAB_Parameters = 89, id_Ass_RAB_Parameters = 90, id_RAB_ModifyList = 91, id_RAB_ModifyItem = 92, id_TypeOfError = 93, id_BroadcastAssistanceDataDecipheringKeys = 94, id_LocationRelatedDataRequestType = 95, id_GlobalCN_ID = 96, id_LastKnownServiceArea = 97, id_SRB_TrCH_Mapping = 98, id_InterSystemInformation_TransparentContainer = 99, id_NewBSS_To_OldBSS_Information = 100, id_Not_Used_101 = 101, id_Not_Used_102 = 102, id_SourceRNC_PDCP_context_info = 103, id_InformationTransferID = 104, id_SNA_Access_Information = 105, id_ProvidedData = 106, id_GERAN_BSC_Container = 107, id_GERAN_Classmark = 108, id_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item = 109, id_GERAN_Iumode_RAB_FailedList_RABAssgntResponse = 110, id_VerticalAccuracyCode = 111, id_ResponseTime = 112, id_PositioningPriority = 113, id_ClientType = 114, id_LocationRelatedDataRequestTypeSpecificToGERANIuMode = 115, id_SignallingIndication = 116, id_hS_DSCH_MAC_d_Flow_ID = 117, id_UESBI_Iu = 118, id_PositionData = 119, id_PositionDataSpecificToGERANIuMode = 120, id_CellLoadInformationGroup = 121, id_AccuracyFulfilmentIndicator = 122, id_InformationTransferType = 123, id_TraceRecordingSessionInformation = 124, id_TracePropagationParameters = 125, id_InterSystemInformationTransferType = 126, id_SelectedPLMN_ID = 127, id_RedirectionCompleted = 128, id_RedirectionIndication = 129, id_NAS_SequenceNumber = 130, id_RejectCauseValue = 131, id_APN = 132, id_CNMBMSLinkingInformation = 133, id_DeltaRAListofIdleModeUEs = 134, id_FrequenceLayerConvergenceFlag = 135, id_InformationExchangeID = 136, id_InformationExchangeType = 137, id_InformationRequested = 138, id_InformationRequestType = 139, id_IPMulticastAddress = 140, id_JoinedMBMSBearerServicesList = 141, id_LeftMBMSBearerServicesList = 142, id_MBMSBearerServiceType = 143, id_MBMSCNDe_Registration = 144, id_MBMSServiceArea = 145, id_MBMSSessionDuration = 146, id_MBMSSessionIdentity = 147, id_PDP_TypeInformation = 148, id_RAB_Parameters = 149, id_RAListofIdleModeUEs = 150, id_MBMSRegistrationRequestType = 151, id_SessionUpdateID = 152, id_TMGI = 153, id_TransportLayerInformation = 154, id_UnsuccessfulLinkingList = 155, id_MBMSLinkingInformation = 156, id_MBMSSessionRepetitionNumber = 157, id_AlternativeRABConfiguration = 158, id_AlternativeRABConfigurationRequest = 159, id_E_DCH_MAC_d_Flow_ID = 160, id_SourceBSS_ToTargetBSS_TransparentContainer = 161, id_TargetBSS_ToSourceBSS_TransparentContainer = 162, id_TimeToMBMSDataTransfer = 163, id_IncludeVelocity = 164, id_VelocityEstimate = 165, id_RedirectAttemptFlag = 166, id_RAT_Type = 167, id_PeriodicLocationInfo = 168, id_MBMSCountingInformation = 169, id_170_not_to_be_used_for_IE_ids = 170, id_ExtendedRNC_ID = 171, id_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf = 172, id_Alt_RAB_Parameter_ExtendedMaxBitrateInf = 173, id_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList = 174, id_Ass_RAB_Parameter_ExtendedMaxBitrateList = 175, id_RAB_Parameter_ExtendedGuaranteedBitrateList = 176, id_RAB_Parameter_ExtendedMaxBitrateList = 177, id_Requested_RAB_Parameter_ExtendedMaxBitrateList = 178, id_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList = 179, id_LAofIdleModeUEs = 180, id_newLAListofIdleModeUEs = 181, id_LAListwithNoIdleModeUEsAnyMore = 182, id_183_not_to_be_used_for_IE_ids = 183, id_GANSS_PositioningDataSet = 184, id_RequestedGANSSAssistanceData = 185, id_BroadcastGANSSAssistanceDataDecipheringKeys = 186, id_d_RNTI_for_NoIuCSUP = 187, id_RAB_SetupList_EnhancedRelocCompleteReq = 188, id_RAB_SetupItem_EnhancedRelocCompleteReq = 189, id_RAB_SetupList_EnhancedRelocCompleteRes = 190, id_RAB_SetupItem_EnhancedRelocCompleteRes = 191, id_RAB_SetupList_EnhRelocInfoReq = 192, id_RAB_SetupItem_EnhRelocInfoReq = 193, id_RAB_SetupList_EnhRelocInfoRes = 194, id_RAB_SetupItem_EnhRelocInfoRes = 195, id_OldIuSigConId = 196, id_RAB_FailedList_EnhRelocInfoRes = 197, id_RAB_FailedItem_EnhRelocInfoRes = 198, id_Global_ENB_ID = 199, id_UE_History_Information = 200, id_MBMSSynchronisationInformation = 201, id_SubscriberProfileIDforRFP = 202, id_CSG_Id = 203, id_OldIuSigConIdCS = 204, id_OldIuSigConIdPS = 205, id_GlobalCN_IDCS = 206, id_GlobalCN_IDPS = 207, id_SourceExtendedRNC_ID = 208, id_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes = 209, id_RAB_ToBeReleasedList_EnhancedRelocCompleteRes = 210, id_SourceRNC_ID = 211, id_Relocation_TargetRNC_ID = 212, id_Relocation_TargetExtendedRNC_ID = 213, id_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf = 214, id_Alt_RAB_Parameter_SupportedMaxBitrateInf = 215, id_Ass_RAB_Parameter_SupportedGuaranteedBitrateList = 216, id_Ass_RAB_Parameter_SupportedMaxBitrateList = 217, id_RAB_Parameter_SupportedGuaranteedBitrateList = 218, id_RAB_Parameter_SupportedMaxBitrateList = 219, id_Requested_RAB_Parameter_SupportedMaxBitrateList = 220, id_Requested_RAB_Parameter_SupportedGuaranteedBitrateList = 221, id_Relocation_SourceRNC_ID = 222, id_Relocation_SourceExtendedRNC_ID = 223, id_EncryptionKey = 224, id_IntegrityProtectionKey = 225, id_SRVCC_HO_Indication = 226, id_SRVCC_Information = 227, id_SRVCC_Operation_Possible = 228, id_CSG_Id_List = 229, id_PSRABtobeReplaced = 230, id_E_UTRAN_Service_Handover = 231, id_Not_Used_232 = 232, id_UE_AggregateMaximumBitRate = 233, id_CSG_Membership_Status = 234, id_Cell_Access_Mode = 235, id_IP_Source_Address = 236, id_CSFB_Information = 237, id_PDP_TypeInformation_extension = 238, id_MSISDN = 239, id_Offload_RAB_Parameters = 240, id_LGW_TransportLayerAddress = 241, id_Correlation_ID = 242, id_IRAT_Measurement_Configuration = 243, id_MDT_Configuration = 244, id_Priority_Class_Indicator = 245, id_Not_Used_246 = 246, id_RNSAPRelocationParameters = 247, id_RABParametersList = 248, id_Management_Based_MDT_Allowed = 249, id_HigherBitratesThan16MbpsFlag = 250, id_Trace_Collection_Entity_IP_Addess = 251, id_End_Of_CSFB = 252 } ProtocolIE_ID_enum; /*--- End of included file: packet-ranap-val.h ---*/ #line 60 "../../asn1/ranap/packet-ranap-template.c" void proto_register_ranap(void); void proto_reg_handoff_ranap(void); /* Initialize the protocol and registered fields */ static int proto_ranap = -1; /* initialise sub-dissector handles */ static dissector_handle_t rrc_s_to_trnc_handle = NULL; static dissector_handle_t rrc_t_to_srnc_handle = NULL; static dissector_handle_t rrc_ho_to_utran_cmd = NULL; static int hf_ranap_imsi_digits = -1; static int hf_ranap_transportLayerAddress_ipv4 = -1; static int hf_ranap_transportLayerAddress_ipv6 = -1; static int hf_ranap_transportLayerAddress_nsap = -1; /*--- Included file: packet-ranap-hf.c ---*/ #line 1 "../../asn1/ranap/packet-ranap-hf.c" static int hf_ranap_AccuracyFulfilmentIndicator_PDU = -1; /* AccuracyFulfilmentIndicator */ static int hf_ranap_Alt_RAB_Parameters_PDU = -1; /* Alt_RAB_Parameters */ static int hf_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf_PDU = -1; /* Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf */ static int hf_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf_PDU = -1; /* Alt_RAB_Parameter_SupportedGuaranteedBitrateInf */ static int hf_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateInf_PDU = -1; /* Alt_RAB_Parameter_ExtendedMaxBitrateInf */ static int hf_ranap_Alt_RAB_Parameter_SupportedMaxBitrateInf_PDU = -1; /* Alt_RAB_Parameter_SupportedMaxBitrateInf */ static int hf_ranap_AlternativeRABConfigurationRequest_PDU = -1; /* AlternativeRABConfigurationRequest */ static int hf_ranap_APN_PDU = -1; /* APN */ static int hf_ranap_AreaIdentity_PDU = -1; /* AreaIdentity */ static int hf_ranap_Ass_RAB_Parameters_PDU = -1; /* Ass_RAB_Parameters */ static int hf_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU = -1; /* Ass_RAB_Parameter_ExtendedGuaranteedBitrateList */ static int hf_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList_PDU = -1; /* Ass_RAB_Parameter_ExtendedMaxBitrateList */ static int hf_ranap_BroadcastAssistanceDataDecipheringKeys_PDU = -1; /* BroadcastAssistanceDataDecipheringKeys */ static int hf_ranap_Cause_PDU = -1; /* Cause */ static int hf_ranap_Cell_Access_Mode_PDU = -1; /* Cell_Access_Mode */ static int hf_ranap_CellLoadInformationGroup_PDU = -1; /* CellLoadInformationGroup */ static int hf_ranap_ClientType_PDU = -1; /* ClientType */ static int hf_ranap_CriticalityDiagnostics_PDU = -1; /* CriticalityDiagnostics */ static int hf_ranap_MessageStructure_PDU = -1; /* MessageStructure */ static int hf_ranap_ChosenEncryptionAlgorithm_PDU = -1; /* ChosenEncryptionAlgorithm */ static int hf_ranap_ChosenIntegrityProtectionAlgorithm_PDU = -1; /* ChosenIntegrityProtectionAlgorithm */ static int hf_ranap_ClassmarkInformation2_PDU = -1; /* ClassmarkInformation2 */ static int hf_ranap_ClassmarkInformation3_PDU = -1; /* ClassmarkInformation3 */ static int hf_ranap_CN_DomainIndicator_PDU = -1; /* CN_DomainIndicator */ static int hf_ranap_Correlation_ID_PDU = -1; /* Correlation_ID */ static int hf_ranap_CSFB_Information_PDU = -1; /* CSFB_Information */ static int hf_ranap_CSG_Id_PDU = -1; /* CSG_Id */ static int hf_ranap_CSG_Id_List_PDU = -1; /* CSG_Id_List */ static int hf_ranap_CSG_Membership_Status_PDU = -1; /* CSG_Membership_Status */ static int hf_ranap_DeltaRAListofIdleModeUEs_PDU = -1; /* DeltaRAListofIdleModeUEs */ static int hf_ranap_DRX_CycleLengthCoefficient_PDU = -1; /* DRX_CycleLengthCoefficient */ static int hf_ranap_E_DCH_MAC_d_Flow_ID_PDU = -1; /* E_DCH_MAC_d_Flow_ID */ static int hf_ranap_EncryptionInformation_PDU = -1; /* EncryptionInformation */ static int hf_ranap_EncryptionKey_PDU = -1; /* EncryptionKey */ static int hf_ranap_End_Of_CSFB_PDU = -1; /* End_Of_CSFB */ static int hf_ranap_E_UTRAN_Service_Handover_PDU = -1; /* E_UTRAN_Service_Handover */ static int hf_ranap_ExtendedRNC_ID_PDU = -1; /* ExtendedRNC_ID */ static int hf_ranap_FrequenceLayerConvergenceFlag_PDU = -1; /* FrequenceLayerConvergenceFlag */ static int hf_ranap_GANSS_PositioningDataSet_PDU = -1; /* GANSS_PositioningDataSet */ static int hf_ranap_GERAN_BSC_Container_PDU = -1; /* GERAN_BSC_Container */ static int hf_ranap_GERAN_Classmark_PDU = -1; /* GERAN_Classmark */ static int hf_ranap_GlobalCN_ID_PDU = -1; /* GlobalCN_ID */ static int hf_ranap_GlobalRNC_ID_PDU = -1; /* GlobalRNC_ID */ static int hf_ranap_HigherBitratesThan16MbpsFlag_PDU = -1; /* HigherBitratesThan16MbpsFlag */ static int hf_ranap_HS_DSCH_MAC_d_Flow_ID_PDU = -1; /* HS_DSCH_MAC_d_Flow_ID */ static int hf_ranap_IncludeVelocity_PDU = -1; /* IncludeVelocity */ static int hf_ranap_InformationExchangeID_PDU = -1; /* InformationExchangeID */ static int hf_ranap_InformationExchangeType_PDU = -1; /* InformationExchangeType */ static int hf_ranap_InformationRequested_PDU = -1; /* InformationRequested */ static int hf_ranap_InformationRequestType_PDU = -1; /* InformationRequestType */ static int hf_ranap_InformationTransferID_PDU = -1; /* InformationTransferID */ static int hf_ranap_InformationTransferType_PDU = -1; /* InformationTransferType */ static int hf_ranap_IntegrityProtectionInformation_PDU = -1; /* IntegrityProtectionInformation */ static int hf_ranap_IntegrityProtectionKey_PDU = -1; /* IntegrityProtectionKey */ static int hf_ranap_InterSystemInformationTransferType_PDU = -1; /* InterSystemInformationTransferType */ static int hf_ranap_ranap_InterSystemInformation_TransparentContainer_PDU = -1; /* InterSystemInformation_TransparentContainer */ static int hf_ranap_IPMulticastAddress_PDU = -1; /* IPMulticastAddress */ static int hf_ranap_IuSignallingConnectionIdentifier_PDU = -1; /* IuSignallingConnectionIdentifier */ static int hf_ranap_IuTransportAssociation_PDU = -1; /* IuTransportAssociation */ static int hf_ranap_KeyStatus_PDU = -1; /* KeyStatus */ static int hf_ranap_LAI_PDU = -1; /* LAI */ static int hf_ranap_LastKnownServiceArea_PDU = -1; /* LastKnownServiceArea */ static int hf_ranap_LocationRelatedDataRequestType_PDU = -1; /* LocationRelatedDataRequestType */ static int hf_ranap_LocationRelatedDataRequestTypeSpecificToGERANIuMode_PDU = -1; /* LocationRelatedDataRequestTypeSpecificToGERANIuMode */ static int hf_ranap_L3_Information_PDU = -1; /* L3_Information */ static int hf_ranap_Management_Based_MDT_Allowed_PDU = -1; /* Management_Based_MDT_Allowed */ static int hf_ranap_MBMSBearerServiceType_PDU = -1; /* MBMSBearerServiceType */ static int hf_ranap_MBMSCNDe_Registration_PDU = -1; /* MBMSCNDe_Registration */ static int hf_ranap_MBMSCountingInformation_PDU = -1; /* MBMSCountingInformation */ static int hf_ranap_MBMSLinkingInformation_PDU = -1; /* MBMSLinkingInformation */ static int hf_ranap_MBMSRegistrationRequestType_PDU = -1; /* MBMSRegistrationRequestType */ static int hf_ranap_MBMSServiceArea_PDU = -1; /* MBMSServiceArea */ static int hf_ranap_MBMSSessionDuration_PDU = -1; /* MBMSSessionDuration */ static int hf_ranap_MBMSSessionIdentity_PDU = -1; /* MBMSSessionIdentity */ static int hf_ranap_MBMSSessionRepetitionNumber_PDU = -1; /* MBMSSessionRepetitionNumber */ static int hf_ranap_MDT_Configuration_PDU = -1; /* MDT_Configuration */ static int hf_ranap_MSISDN_PDU = -1; /* MSISDN */ static int hf_ranap_NAS_PDU_PDU = -1; /* NAS_PDU */ static int hf_ranap_NAS_SequenceNumber_PDU = -1; /* NAS_SequenceNumber */ static int hf_ranap_NewBSS_To_OldBSS_Information_PDU = -1; /* NewBSS_To_OldBSS_Information */ static int hf_ranap_NonSearchingIndication_PDU = -1; /* NonSearchingIndication */ static int hf_ranap_NumberOfSteps_PDU = -1; /* NumberOfSteps */ static int hf_ranap_Offload_RAB_Parameters_PDU = -1; /* Offload_RAB_Parameters */ static int hf_ranap_OldBSS_ToNewBSS_Information_PDU = -1; /* OldBSS_ToNewBSS_Information */ static int hf_ranap_OMC_ID_PDU = -1; /* OMC_ID */ static int hf_ranap_PagingAreaID_PDU = -1; /* PagingAreaID */ static int hf_ranap_PagingCause_PDU = -1; /* PagingCause */ static int hf_ranap_PDP_TypeInformation_PDU = -1; /* PDP_TypeInformation */ static int hf_ranap_PDP_TypeInformation_extension_PDU = -1; /* PDP_TypeInformation_extension */ static int hf_ranap_PeriodicLocationInfo_PDU = -1; /* PeriodicLocationInfo */ static int hf_ranap_PermanentNAS_UE_ID_PDU = -1; /* PermanentNAS_UE_ID */ static int hf_ranap_PLMNidentity_PDU = -1; /* PLMNidentity */ static int hf_ranap_PositioningPriority_PDU = -1; /* PositioningPriority */ static int hf_ranap_PositionData_PDU = -1; /* PositionData */ static int hf_ranap_PositionDataSpecificToGERANIuMode_PDU = -1; /* PositionDataSpecificToGERANIuMode */ static int hf_ranap_Priority_Class_Indicator_PDU = -1; /* Priority_Class_Indicator */ static int hf_ranap_ProvidedData_PDU = -1; /* ProvidedData */ static int hf_ranap_RAB_ID_PDU = -1; /* RAB_ID */ static int hf_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU = -1; /* RAB_Parameter_ExtendedGuaranteedBitrateList */ static int hf_ranap_RAB_Parameter_ExtendedMaxBitrateList_PDU = -1; /* RAB_Parameter_ExtendedMaxBitrateList */ static int hf_ranap_RAB_Parameters_PDU = -1; /* RAB_Parameters */ static int hf_ranap_RABParametersList_PDU = -1; /* RABParametersList */ static int hf_ranap_RAC_PDU = -1; /* RAC */ static int hf_ranap_RAListofIdleModeUEs_PDU = -1; /* RAListofIdleModeUEs */ static int hf_ranap_LAListofIdleModeUEs_PDU = -1; /* LAListofIdleModeUEs */ static int hf_ranap_RAT_Type_PDU = -1; /* RAT_Type */ static int hf_ranap_RedirectAttemptFlag_PDU = -1; /* RedirectAttemptFlag */ static int hf_ranap_RedirectionCompleted_PDU = -1; /* RedirectionCompleted */ static int hf_ranap_RejectCauseValue_PDU = -1; /* RejectCauseValue */ static int hf_ranap_RelocationType_PDU = -1; /* RelocationType */ static int hf_ranap_RequestedGANSSAssistanceData_PDU = -1; /* RequestedGANSSAssistanceData */ static int hf_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList_PDU = -1; /* Requested_RAB_Parameter_ExtendedMaxBitrateList */ static int hf_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU = -1; /* Requested_RAB_Parameter_ExtendedGuaranteedBitrateList */ static int hf_ranap_RequestType_PDU = -1; /* RequestType */ static int hf_ranap_ResponseTime_PDU = -1; /* ResponseTime */ static int hf_ranap_RNSAPRelocationParameters_PDU = -1; /* RNSAPRelocationParameters */ static int hf_ranap_RRC_Container_PDU = -1; /* RRC_Container */ static int hf_ranap_SAI_PDU = -1; /* SAI */ static int hf_ranap_SAPI_PDU = -1; /* SAPI */ static int hf_ranap_SessionUpdateID_PDU = -1; /* SessionUpdateID */ static int hf_ranap_SignallingIndication_PDU = -1; /* SignallingIndication */ static int hf_ranap_SNA_Access_Information_PDU = -1; /* SNA_Access_Information */ static int hf_ranap_Source_ToTarget_TransparentContainer_PDU = -1; /* Source_ToTarget_TransparentContainer */ static int hf_ranap_ranap_SourceCellID_PDU = -1; /* SourceCellID */ static int hf_ranap_SourceBSS_ToTargetBSS_TransparentContainer_PDU = -1; /* SourceBSS_ToTargetBSS_TransparentContainer */ static int hf_ranap_SourceID_PDU = -1; /* SourceID */ static int hf_ranap_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU = -1; /* SourceRNC_ToTargetRNC_TransparentContainer */ static int hf_ranap_IRAT_Measurement_Configuration_PDU = -1; /* IRAT_Measurement_Configuration */ static int hf_ranap_SubscriberProfileIDforRFP_PDU = -1; /* SubscriberProfileIDforRFP */ static int hf_ranap_SupportedRAB_ParameterBitrateList_PDU = -1; /* SupportedRAB_ParameterBitrateList */ static int hf_ranap_SRB_TrCH_Mapping_PDU = -1; /* SRB_TrCH_Mapping */ static int hf_ranap_SRVCC_HO_Indication_PDU = -1; /* SRVCC_HO_Indication */ static int hf_ranap_SRVCC_Information_PDU = -1; /* SRVCC_Information */ static int hf_ranap_SRVCC_Operation_Possible_PDU = -1; /* SRVCC_Operation_Possible */ static int hf_ranap_Target_ToSource_TransparentContainer_PDU = -1; /* Target_ToSource_TransparentContainer */ static int hf_ranap_TargetBSS_ToSourceBSS_TransparentContainer_PDU = -1; /* TargetBSS_ToSourceBSS_TransparentContainer */ static int hf_ranap_TargetID_PDU = -1; /* TargetID */ static int hf_ranap_ranap_TargetRNC_ID_PDU = -1; /* TargetRNC_ID */ static int hf_ranap_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU = -1; /* TargetRNC_ToSourceRNC_TransparentContainer */ static int hf_ranap_TemporaryUE_ID_PDU = -1; /* TemporaryUE_ID */ static int hf_ranap_TimeToMBMSDataTransfer_PDU = -1; /* TimeToMBMSDataTransfer */ static int hf_ranap_TMGI_PDU = -1; /* TMGI */ static int hf_ranap_TracePropagationParameters_PDU = -1; /* TracePropagationParameters */ static int hf_ranap_TraceRecordingSessionInformation_PDU = -1; /* TraceRecordingSessionInformation */ static int hf_ranap_TraceReference_PDU = -1; /* TraceReference */ static int hf_ranap_TraceType_PDU = -1; /* TraceType */ static int hf_ranap_TransportLayerAddress_PDU = -1; /* TransportLayerAddress */ static int hf_ranap_TriggerID_PDU = -1; /* TriggerID */ static int hf_ranap_TypeOfError_PDU = -1; /* TypeOfError */ static int hf_ranap_UE_AggregateMaximumBitRate_PDU = -1; /* UE_AggregateMaximumBitRate */ static int hf_ranap_UE_History_Information_PDU = -1; /* UE_History_Information */ static int hf_ranap_UE_ID_PDU = -1; /* UE_ID */ static int hf_ranap_UESBI_Iu_PDU = -1; /* UESBI_Iu */ static int hf_ranap_VelocityEstimate_PDU = -1; /* VelocityEstimate */ static int hf_ranap_VerticalAccuracyCode_PDU = -1; /* VerticalAccuracyCode */ static int hf_ranap_Iu_ReleaseCommand_PDU = -1; /* Iu_ReleaseCommand */ static int hf_ranap_Iu_ReleaseComplete_PDU = -1; /* Iu_ReleaseComplete */ static int hf_ranap_RAB_DataVolumeReportList_PDU = -1; /* RAB_DataVolumeReportList */ static int hf_ranap_RAB_DataVolumeReportItem_PDU = -1; /* RAB_DataVolumeReportItem */ static int hf_ranap_RAB_ReleasedList_IuRelComp_PDU = -1; /* RAB_ReleasedList_IuRelComp */ static int hf_ranap_RAB_ReleasedItem_IuRelComp_PDU = -1; /* RAB_ReleasedItem_IuRelComp */ static int hf_ranap_RelocationRequired_PDU = -1; /* RelocationRequired */ static int hf_ranap_RelocationCommand_PDU = -1; /* RelocationCommand */ static int hf_ranap_RAB_RelocationReleaseList_PDU = -1; /* RAB_RelocationReleaseList */ static int hf_ranap_RAB_RelocationReleaseItem_PDU = -1; /* RAB_RelocationReleaseItem */ static int hf_ranap_RAB_DataForwardingList_PDU = -1; /* RAB_DataForwardingList */ static int hf_ranap_RAB_DataForwardingItem_PDU = -1; /* RAB_DataForwardingItem */ static int hf_ranap_RelocationPreparationFailure_PDU = -1; /* RelocationPreparationFailure */ static int hf_ranap_RelocationRequest_PDU = -1; /* RelocationRequest */ static int hf_ranap_RAB_SetupList_RelocReq_PDU = -1; /* RAB_SetupList_RelocReq */ static int hf_ranap_RAB_SetupItem_RelocReq_PDU = -1; /* RAB_SetupItem_RelocReq */ static int hf_ranap_CNMBMSLinkingInformation_PDU = -1; /* CNMBMSLinkingInformation */ static int hf_ranap_JoinedMBMSBearerService_IEs_PDU = -1; /* JoinedMBMSBearerService_IEs */ static int hf_ranap_RelocationRequestAcknowledge_PDU = -1; /* RelocationRequestAcknowledge */ static int hf_ranap_RAB_SetupList_RelocReqAck_PDU = -1; /* RAB_SetupList_RelocReqAck */ static int hf_ranap_RAB_SetupItem_RelocReqAck_PDU = -1; /* RAB_SetupItem_RelocReqAck */ static int hf_ranap_RAB_FailedList_PDU = -1; /* RAB_FailedList */ static int hf_ranap_RAB_FailedItem_PDU = -1; /* RAB_FailedItem */ static int hf_ranap_RelocationFailure_PDU = -1; /* RelocationFailure */ static int hf_ranap_RelocationCancel_PDU = -1; /* RelocationCancel */ static int hf_ranap_RelocationCancelAcknowledge_PDU = -1; /* RelocationCancelAcknowledge */ static int hf_ranap_SRNS_ContextRequest_PDU = -1; /* SRNS_ContextRequest */ static int hf_ranap_RAB_DataForwardingList_SRNS_CtxReq_PDU = -1; /* RAB_DataForwardingList_SRNS_CtxReq */ static int hf_ranap_RAB_DataForwardingItem_SRNS_CtxReq_PDU = -1; /* RAB_DataForwardingItem_SRNS_CtxReq */ static int hf_ranap_SRNS_ContextResponse_PDU = -1; /* SRNS_ContextResponse */ static int hf_ranap_RAB_ContextList_PDU = -1; /* RAB_ContextList */ static int hf_ranap_RAB_ContextItem_PDU = -1; /* RAB_ContextItem */ static int hf_ranap_RAB_ContextFailedtoTransferList_PDU = -1; /* RAB_ContextFailedtoTransferList */ static int hf_ranap_RABs_ContextFailedtoTransferItem_PDU = -1; /* RABs_ContextFailedtoTransferItem */ static int hf_ranap_SecurityModeCommand_PDU = -1; /* SecurityModeCommand */ static int hf_ranap_SecurityModeComplete_PDU = -1; /* SecurityModeComplete */ static int hf_ranap_SecurityModeReject_PDU = -1; /* SecurityModeReject */ static int hf_ranap_DataVolumeReportRequest_PDU = -1; /* DataVolumeReportRequest */ static int hf_ranap_RAB_DataVolumeReportRequestList_PDU = -1; /* RAB_DataVolumeReportRequestList */ static int hf_ranap_RAB_DataVolumeReportRequestItem_PDU = -1; /* RAB_DataVolumeReportRequestItem */ static int hf_ranap_DataVolumeReport_PDU = -1; /* DataVolumeReport */ static int hf_ranap_RAB_FailedtoReportList_PDU = -1; /* RAB_FailedtoReportList */ static int hf_ranap_RABs_failed_to_reportItem_PDU = -1; /* RABs_failed_to_reportItem */ static int hf_ranap_Reset_PDU = -1; /* Reset */ static int hf_ranap_ResetAcknowledge_PDU = -1; /* ResetAcknowledge */ static int hf_ranap_ResetResource_PDU = -1; /* ResetResource */ static int hf_ranap_ResetResourceList_PDU = -1; /* ResetResourceList */ static int hf_ranap_ResetResourceItem_PDU = -1; /* ResetResourceItem */ static int hf_ranap_ResetResourceAcknowledge_PDU = -1; /* ResetResourceAcknowledge */ static int hf_ranap_ResetResourceAckList_PDU = -1; /* ResetResourceAckList */ static int hf_ranap_ResetResourceAckItem_PDU = -1; /* ResetResourceAckItem */ static int hf_ranap_RAB_ReleaseRequest_PDU = -1; /* RAB_ReleaseRequest */ static int hf_ranap_RAB_ReleaseList_PDU = -1; /* RAB_ReleaseList */ static int hf_ranap_RAB_ReleaseItem_PDU = -1; /* RAB_ReleaseItem */ static int hf_ranap_Iu_ReleaseRequest_PDU = -1; /* Iu_ReleaseRequest */ static int hf_ranap_RelocationDetect_PDU = -1; /* RelocationDetect */ static int hf_ranap_RelocationComplete_PDU = -1; /* RelocationComplete */ static int hf_ranap_EnhancedRelocationCompleteRequest_PDU = -1; /* EnhancedRelocationCompleteRequest */ static int hf_ranap_RAB_SetupList_EnhancedRelocCompleteReq_PDU = -1; /* RAB_SetupList_EnhancedRelocCompleteReq */ static int hf_ranap_RAB_SetupItem_EnhancedRelocCompleteReq_PDU = -1; /* RAB_SetupItem_EnhancedRelocCompleteReq */ static int hf_ranap_EnhancedRelocationCompleteResponse_PDU = -1; /* EnhancedRelocationCompleteResponse */ static int hf_ranap_RAB_SetupList_EnhancedRelocCompleteRes_PDU = -1; /* RAB_SetupList_EnhancedRelocCompleteRes */ static int hf_ranap_RAB_SetupItem_EnhancedRelocCompleteRes_PDU = -1; /* RAB_SetupItem_EnhancedRelocCompleteRes */ static int hf_ranap_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_PDU = -1; /* RAB_ToBeReleasedList_EnhancedRelocCompleteRes */ static int hf_ranap_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_PDU = -1; /* RAB_ToBeReleasedItem_EnhancedRelocCompleteRes */ static int hf_ranap_EnhancedRelocationCompleteFailure_PDU = -1; /* EnhancedRelocationCompleteFailure */ static int hf_ranap_EnhancedRelocationCompleteConfirm_PDU = -1; /* EnhancedRelocationCompleteConfirm */ static int hf_ranap_Paging_PDU = -1; /* Paging */ static int hf_ranap_CommonID_PDU = -1; /* CommonID */ static int hf_ranap_CN_InvokeTrace_PDU = -1; /* CN_InvokeTrace */ static int hf_ranap_CN_DeactivateTrace_PDU = -1; /* CN_DeactivateTrace */ static int hf_ranap_LocationReportingControl_PDU = -1; /* LocationReportingControl */ static int hf_ranap_LocationReport_PDU = -1; /* LocationReport */ static int hf_ranap_InitialUE_Message_PDU = -1; /* InitialUE_Message */ static int hf_ranap_DirectTransfer_PDU = -1; /* DirectTransfer */ static int hf_ranap_RedirectionIndication_PDU = -1; /* RedirectionIndication */ static int hf_ranap_Overload_PDU = -1; /* Overload */ static int hf_ranap_ErrorIndication_PDU = -1; /* ErrorIndication */ static int hf_ranap_SRNS_DataForwardCommand_PDU = -1; /* SRNS_DataForwardCommand */ static int hf_ranap_ForwardSRNS_Context_PDU = -1; /* ForwardSRNS_Context */ static int hf_ranap_RAB_AssignmentRequest_PDU = -1; /* RAB_AssignmentRequest */ static int hf_ranap_RAB_SetupOrModifyList_PDU = -1; /* RAB_SetupOrModifyList */ static int hf_ranap_RAB_SetupOrModifyItemFirst_PDU = -1; /* RAB_SetupOrModifyItemFirst */ static int hf_ranap_TransportLayerInformation_PDU = -1; /* TransportLayerInformation */ static int hf_ranap_RAB_SetupOrModifyItemSecond_PDU = -1; /* RAB_SetupOrModifyItemSecond */ static int hf_ranap_RAB_AssignmentResponse_PDU = -1; /* RAB_AssignmentResponse */ static int hf_ranap_RAB_SetupOrModifiedList_PDU = -1; /* RAB_SetupOrModifiedList */ static int hf_ranap_RAB_SetupOrModifiedItem_PDU = -1; /* RAB_SetupOrModifiedItem */ static int hf_ranap_RAB_ReleasedList_PDU = -1; /* RAB_ReleasedList */ static int hf_ranap_RAB_ReleasedItem_PDU = -1; /* RAB_ReleasedItem */ static int hf_ranap_RAB_QueuedList_PDU = -1; /* RAB_QueuedList */ static int hf_ranap_RAB_QueuedItem_PDU = -1; /* RAB_QueuedItem */ static int hf_ranap_RAB_ReleaseFailedList_PDU = -1; /* RAB_ReleaseFailedList */ static int hf_ranap_GERAN_Iumode_RAB_FailedList_RABAssgntResponse_PDU = -1; /* GERAN_Iumode_RAB_FailedList_RABAssgntResponse */ static int hf_ranap_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_PDU = -1; /* GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item */ static int hf_ranap_PrivateMessage_PDU = -1; /* PrivateMessage */ static int hf_ranap_RANAP_RelocationInformation_PDU = -1; /* RANAP_RelocationInformation */ static int hf_ranap_DirectTransferInformationList_RANAP_RelocInf_PDU = -1; /* DirectTransferInformationList_RANAP_RelocInf */ static int hf_ranap_DirectTransferInformationItem_RANAP_RelocInf_PDU = -1; /* DirectTransferInformationItem_RANAP_RelocInf */ static int hf_ranap_RAB_ContextList_RANAP_RelocInf_PDU = -1; /* RAB_ContextList_RANAP_RelocInf */ static int hf_ranap_RAB_ContextItem_RANAP_RelocInf_PDU = -1; /* RAB_ContextItem_RANAP_RelocInf */ static int hf_ranap_RANAP_EnhancedRelocationInformationRequest_PDU = -1; /* RANAP_EnhancedRelocationInformationRequest */ static int hf_ranap_RAB_SetupList_EnhRelocInfoReq_PDU = -1; /* RAB_SetupList_EnhRelocInfoReq */ static int hf_ranap_RAB_SetupItem_EnhRelocInfoReq_PDU = -1; /* RAB_SetupItem_EnhRelocInfoReq */ static int hf_ranap_RANAP_EnhancedRelocationInformationResponse_PDU = -1; /* RANAP_EnhancedRelocationInformationResponse */ static int hf_ranap_RAB_SetupList_EnhRelocInfoRes_PDU = -1; /* RAB_SetupList_EnhRelocInfoRes */ static int hf_ranap_RAB_SetupItem_EnhRelocInfoRes_PDU = -1; /* RAB_SetupItem_EnhRelocInfoRes */ static int hf_ranap_RAB_FailedList_EnhRelocInfoRes_PDU = -1; /* RAB_FailedList_EnhRelocInfoRes */ static int hf_ranap_RAB_FailedItem_EnhRelocInfoRes_PDU = -1; /* RAB_FailedItem_EnhRelocInfoRes */ static int hf_ranap_RAB_ModifyRequest_PDU = -1; /* RAB_ModifyRequest */ static int hf_ranap_RAB_ModifyList_PDU = -1; /* RAB_ModifyList */ static int hf_ranap_RAB_ModifyItem_PDU = -1; /* RAB_ModifyItem */ static int hf_ranap_LocationRelatedDataRequest_PDU = -1; /* LocationRelatedDataRequest */ static int hf_ranap_LocationRelatedDataResponse_PDU = -1; /* LocationRelatedDataResponse */ static int hf_ranap_LocationRelatedDataFailure_PDU = -1; /* LocationRelatedDataFailure */ static int hf_ranap_InformationTransferIndication_PDU = -1; /* InformationTransferIndication */ static int hf_ranap_InformationTransferConfirmation_PDU = -1; /* InformationTransferConfirmation */ static int hf_ranap_InformationTransferFailure_PDU = -1; /* InformationTransferFailure */ static int hf_ranap_UESpecificInformationIndication_PDU = -1; /* UESpecificInformationIndication */ static int hf_ranap_DirectInformationTransfer_PDU = -1; /* DirectInformationTransfer */ static int hf_ranap_UplinkInformationExchangeRequest_PDU = -1; /* UplinkInformationExchangeRequest */ static int hf_ranap_UplinkInformationExchangeResponse_PDU = -1; /* UplinkInformationExchangeResponse */ static int hf_ranap_UplinkInformationExchangeFailure_PDU = -1; /* UplinkInformationExchangeFailure */ static int hf_ranap_MBMSSessionStart_PDU = -1; /* MBMSSessionStart */ static int hf_ranap_MBMSSynchronisationInformation_PDU = -1; /* MBMSSynchronisationInformation */ static int hf_ranap_MBMSSessionStartResponse_PDU = -1; /* MBMSSessionStartResponse */ static int hf_ranap_MBMSSessionStartFailure_PDU = -1; /* MBMSSessionStartFailure */ static int hf_ranap_MBMSSessionUpdate_PDU = -1; /* MBMSSessionUpdate */ static int hf_ranap_MBMSSessionUpdateResponse_PDU = -1; /* MBMSSessionUpdateResponse */ static int hf_ranap_MBMSSessionUpdateFailure_PDU = -1; /* MBMSSessionUpdateFailure */ static int hf_ranap_MBMSSessionStop_PDU = -1; /* MBMSSessionStop */ static int hf_ranap_MBMSSessionStopResponse_PDU = -1; /* MBMSSessionStopResponse */ static int hf_ranap_MBMSUELinkingRequest_PDU = -1; /* MBMSUELinkingRequest */ static int hf_ranap_LeftMBMSBearerService_IEs_PDU = -1; /* LeftMBMSBearerService_IEs */ static int hf_ranap_MBMSUELinkingResponse_PDU = -1; /* MBMSUELinkingResponse */ static int hf_ranap_UnsuccessfulLinking_IEs_PDU = -1; /* UnsuccessfulLinking_IEs */ static int hf_ranap_MBMSRegistrationRequest_PDU = -1; /* MBMSRegistrationRequest */ static int hf_ranap_MBMSRegistrationResponse_PDU = -1; /* MBMSRegistrationResponse */ static int hf_ranap_MBMSRegistrationFailure_PDU = -1; /* MBMSRegistrationFailure */ static int hf_ranap_MBMSCNDe_RegistrationRequest_PDU = -1; /* MBMSCNDe_RegistrationRequest */ static int hf_ranap_MBMSCNDe_RegistrationResponse_PDU = -1; /* MBMSCNDe_RegistrationResponse */ static int hf_ranap_MBMSRABEstablishmentIndication_PDU = -1; /* MBMSRABEstablishmentIndication */ static int hf_ranap_MBMSRABReleaseRequest_PDU = -1; /* MBMSRABReleaseRequest */ static int hf_ranap_MBMSRABRelease_PDU = -1; /* MBMSRABRelease */ static int hf_ranap_MBMSRABReleaseFailure_PDU = -1; /* MBMSRABReleaseFailure */ static int hf_ranap_SRVCC_CSKeysRequest_PDU = -1; /* SRVCC_CSKeysRequest */ static int hf_ranap_SRVCC_CSKeysResponse_PDU = -1; /* SRVCC_CSKeysResponse */ static int hf_ranap_RANAP_PDU_PDU = -1; /* RANAP_PDU */ static int hf_ranap_local = -1; /* INTEGER_0_65535 */ static int hf_ranap_global = -1; /* OBJECT_IDENTIFIER */ static int hf_ranap_ProtocolIE_Container_item = -1; /* ProtocolIE_Field */ static int hf_ranap_id = -1; /* ProtocolIE_ID */ static int hf_ranap_criticality = -1; /* Criticality */ static int hf_ranap_ie_field_value = -1; /* T_ie_field_value */ static int hf_ranap_ProtocolIE_ContainerPair_item = -1; /* ProtocolIE_FieldPair */ static int hf_ranap_firstCriticality = -1; /* Criticality */ static int hf_ranap_firstValue = -1; /* T_firstValue */ static int hf_ranap_secondCriticality = -1; /* Criticality */ static int hf_ranap_secondValue = -1; /* T_secondValue */ static int hf_ranap_ProtocolIE_ContainerList_item = -1; /* ProtocolIE_Container */ static int hf_ranap_ProtocolIE_ContainerPairList_item = -1; /* ProtocolIE_ContainerPair */ static int hf_ranap_ProtocolExtensionContainer_item = -1; /* ProtocolExtensionField */ static int hf_ranap_ext_id = -1; /* ProtocolExtensionID */ static int hf_ranap_extensionValue = -1; /* T_extensionValue */ static int hf_ranap_PrivateIE_Container_item = -1; /* PrivateIE_Field */ static int hf_ranap_private_id = -1; /* PrivateIE_ID */ static int hf_ranap_private_value = -1; /* T_private_value */ static int hf_ranap_priorityLevel = -1; /* PriorityLevel */ static int hf_ranap_pre_emptionCapability = -1; /* Pre_emptionCapability */ static int hf_ranap_pre_emptionVulnerability = -1; /* Pre_emptionVulnerability */ static int hf_ranap_queuingAllowed = -1; /* QueuingAllowed */ static int hf_ranap_iE_Extensions = -1; /* ProtocolExtensionContainer */ static int hf_ranap_altMaxBitrateInf = -1; /* Alt_RAB_Parameter_MaxBitrateInf */ static int hf_ranap_altGuaranteedBitRateInf = -1; /* Alt_RAB_Parameter_GuaranteedBitrateInf */ static int hf_ranap_altExtendedGuaranteedBitrateType = -1; /* Alt_RAB_Parameter_GuaranteedBitrateType */ static int hf_ranap_altExtendedGuaranteedBitrates = -1; /* Alt_RAB_Parameter_ExtendedGuaranteedBitrates */ static int hf_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrates_item = -1; /* Alt_RAB_Parameter_ExtendedGuaranteedBitrateList */ static int hf_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateList_item = -1; /* ExtendedGuaranteedBitrate */ static int hf_ranap_altGuaranteedBitrateType = -1; /* Alt_RAB_Parameter_GuaranteedBitrateType */ static int hf_ranap_altGuaranteedBitrates = -1; /* Alt_RAB_Parameter_GuaranteedBitrates */ static int hf_ranap_Alt_RAB_Parameter_GuaranteedBitrates_item = -1; /* Alt_RAB_Parameter_GuaranteedBitrateList */ static int hf_ranap_Alt_RAB_Parameter_GuaranteedBitrateList_item = -1; /* GuaranteedBitrate */ static int hf_ranap_altSupportedGuaranteedBitrateType = -1; /* Alt_RAB_Parameter_GuaranteedBitrateType */ static int hf_ranap_altSupportedGuaranteedBitrates = -1; /* Alt_RAB_Parameter_SupportedGuaranteedBitrates */ static int hf_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrates_item = -1; /* SupportedRAB_ParameterBitrateList */ static int hf_ranap_altExtendedMaxBitrateType = -1; /* Alt_RAB_Parameter_MaxBitrateType */ static int hf_ranap_altExtendedMaxBitrates = -1; /* Alt_RAB_Parameter_ExtendedMaxBitrates */ static int hf_ranap_Alt_RAB_Parameter_ExtendedMaxBitrates_item = -1; /* Alt_RAB_Parameter_ExtendedMaxBitrateList */ static int hf_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateList_item = -1; /* ExtendedMaxBitrate */ static int hf_ranap_altMaxBitrateType = -1; /* Alt_RAB_Parameter_MaxBitrateType */ static int hf_ranap_altMaxBitrates = -1; /* Alt_RAB_Parameter_MaxBitrates */ static int hf_ranap_Alt_RAB_Parameter_MaxBitrates_item = -1; /* Alt_RAB_Parameter_MaxBitrateList */ static int hf_ranap_Alt_RAB_Parameter_MaxBitrateList_item = -1; /* MaxBitrate */ static int hf_ranap_altSupportedMaxBitrateType = -1; /* Alt_RAB_Parameter_MaxBitrateType */ static int hf_ranap_altSupportedMaxBitrates = -1; /* Alt_RAB_Parameter_SupportedMaxBitrates */ static int hf_ranap_Alt_RAB_Parameter_SupportedMaxBitrates_item = -1; /* SupportedRAB_ParameterBitrateList */ static int hf_ranap_sAI = -1; /* SAI */ static int hf_ranap_geographicalArea = -1; /* GeographicalArea */ static int hf_ranap_assMaxBitrateInf = -1; /* Ass_RAB_Parameter_MaxBitrateList */ static int hf_ranap_assGuaranteedBitRateInf = -1; /* Ass_RAB_Parameter_GuaranteedBitrateList */ static int hf_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList_item = -1; /* ExtendedGuaranteedBitrate */ static int hf_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList_item = -1; /* ExtendedMaxBitrate */ static int hf_ranap_Ass_RAB_Parameter_GuaranteedBitrateList_item = -1; /* GuaranteedBitrate */ static int hf_ranap_Ass_RAB_Parameter_MaxBitrateList_item = -1; /* MaxBitrate */ static int hf_ranap_AuthorisedPLMNs_item = -1; /* AuthorisedPLMNs_item */ static int hf_ranap_pLMNidentity = -1; /* PLMNidentity */ static int hf_ranap_authorisedSNAsList = -1; /* AuthorisedSNAs */ static int hf_ranap_AuthorisedSNAs_item = -1; /* SNAC */ static int hf_ranap_cipheringKeyFlag = -1; /* BIT_STRING_SIZE_1 */ static int hf_ranap_currentDecipheringKey = -1; /* BIT_STRING_SIZE_56 */ static int hf_ranap_nextDecipheringKey = -1; /* BIT_STRING_SIZE_56 */ static int hf_ranap_radioNetwork = -1; /* CauseRadioNetwork */ static int hf_ranap_transmissionNetwork = -1; /* CauseTransmissionNetwork */ static int hf_ranap_nAS = -1; /* CauseNAS */ static int hf_ranap_protocol = -1; /* CauseProtocol */ static int hf_ranap_misc = -1; /* CauseMisc */ static int hf_ranap_non_Standard = -1; /* CauseNon_Standard */ static int hf_ranap_radioNetworkExtension = -1; /* CauseRadioNetworkExtension */ static int hf_ranap_cellIdList = -1; /* CellIdList */ static int hf_ranap_CellIdList_item = -1; /* Cell_Id */ static int hf_ranap_cell_Capacity_Class_Value = -1; /* Cell_Capacity_Class_Value */ static int hf_ranap_loadValue = -1; /* LoadValue */ static int hf_ranap_rTLoadValue = -1; /* RTLoadValue */ static int hf_ranap_nRTLoadInformationValue = -1; /* NRTLoadInformationValue */ static int hf_ranap_sourceCellID = -1; /* SourceCellID */ static int hf_ranap_uplinkCellLoadInformation = -1; /* CellLoadInformation */ static int hf_ranap_downlinkCellLoadInformation = -1; /* CellLoadInformation */ static int hf_ranap_procedureCode = -1; /* ProcedureCode */ static int hf_ranap_triggeringMessage = -1; /* TriggeringMessage */ static int hf_ranap_procedureCriticality = -1; /* Criticality */ static int hf_ranap_iEsCriticalityDiagnostics = -1; /* CriticalityDiagnostics_IE_List */ static int hf_ranap_CriticalityDiagnostics_IE_List_item = -1; /* CriticalityDiagnostics_IE_List_item */ static int hf_ranap_iECriticality = -1; /* Criticality */ static int hf_ranap_iE_ID = -1; /* ProtocolIE_ID */ static int hf_ranap_repetitionNumber = -1; /* RepetitionNumber0 */ static int hf_ranap_MessageStructure_item = -1; /* MessageStructure_item */ static int hf_ranap_item_repetitionNumber = -1; /* RepetitionNumber1 */ static int hf_ranap_lAC = -1; /* LAC */ static int hf_ranap_cI = -1; /* CI */ static int hf_ranap_CSG_Id_List_item = -1; /* CSG_Id */ static int hf_ranap_newRAListofIdleModeUEs = -1; /* NewRAListofIdleModeUEs */ static int hf_ranap_rAListwithNoIdleModeUEsAnyMore = -1; /* RAListwithNoIdleModeUEsAnyMore */ static int hf_ranap_NewRAListofIdleModeUEs_item = -1; /* RAC */ static int hf_ranap_RAListwithNoIdleModeUEsAnyMore_item = -1; /* RAC */ static int hf_ranap_macroENB_ID = -1; /* BIT_STRING_SIZE_20 */ static int hf_ranap_homeENB_ID = -1; /* BIT_STRING_SIZE_28 */ static int hf_ranap_permittedAlgorithms = -1; /* PermittedEncryptionAlgorithms */ static int hf_ranap_key = -1; /* EncryptionKey */ static int hf_ranap_iMEIlist = -1; /* IMEIList */ static int hf_ranap_iMEISVlist = -1; /* IMEISVList */ static int hf_ranap_iMEIgroup = -1; /* IMEIGroup */ static int hf_ranap_iMEISVgroup = -1; /* IMEISVGroup */ static int hf_ranap_measurementQuantity = -1; /* MeasurementQuantity */ static int hf_ranap_threshold = -1; /* INTEGER_M120_165 */ static int hf_ranap_threshold_01 = -1; /* INTEGER_M120_M25 */ static int hf_ranap_GANSS_PositioningDataSet_item = -1; /* GANSS_PositioningMethodAndUsage */ static int hf_ranap_point = -1; /* GA_Point */ static int hf_ranap_pointWithUnCertainty = -1; /* GA_PointWithUnCertainty */ static int hf_ranap_polygon = -1; /* GA_Polygon */ static int hf_ranap_pointWithUncertaintyEllipse = -1; /* GA_PointWithUnCertaintyEllipse */ static int hf_ranap_pointWithAltitude = -1; /* GA_PointWithAltitude */ static int hf_ranap_pointWithAltitudeAndUncertaintyEllipsoid = -1; /* GA_PointWithAltitudeAndUncertaintyEllipsoid */ static int hf_ranap_ellipsoidArc = -1; /* GA_EllipsoidArc */ static int hf_ranap_latitudeSign = -1; /* T_latitudeSign */ static int hf_ranap_latitude = -1; /* INTEGER_0_8388607 */ static int hf_ranap_longitude = -1; /* INTEGER_M8388608_8388607 */ static int hf_ranap_directionOfAltitude = -1; /* T_directionOfAltitude */ static int hf_ranap_altitude = -1; /* INTEGER_0_32767 */ static int hf_ranap_geographicalCoordinates = -1; /* GeographicalCoordinates */ static int hf_ranap_innerRadius = -1; /* INTEGER_0_65535 */ static int hf_ranap_uncertaintyRadius = -1; /* INTEGER_0_127 */ static int hf_ranap_offsetAngle = -1; /* INTEGER_0_179 */ static int hf_ranap_includedAngle = -1; /* INTEGER_0_179 */ static int hf_ranap_confidence = -1; /* INTEGER_0_127 */ static int hf_ranap_altitudeAndDirection = -1; /* GA_AltitudeAndDirection */ static int hf_ranap_uncertaintyEllipse = -1; /* GA_UncertaintyEllipse */ static int hf_ranap_uncertaintyAltitude = -1; /* INTEGER_0_127 */ static int hf_ranap_uncertaintyCode = -1; /* INTEGER_0_127 */ static int hf_ranap_GA_Polygon_item = -1; /* GA_Polygon_item */ static int hf_ranap_uncertaintySemi_major = -1; /* INTEGER_0_127 */ static int hf_ranap_uncertaintySemi_minor = -1; /* INTEGER_0_127 */ static int hf_ranap_orientationOfMajorAxis = -1; /* INTEGER_0_179 */ static int hf_ranap_lAI = -1; /* LAI */ static int hf_ranap_rAC = -1; /* RAC */ static int hf_ranap_cN_ID = -1; /* CN_ID */ static int hf_ranap_rNC_ID = -1; /* RNC_ID */ static int hf_ranap_iMEI = -1; /* IMEI */ static int hf_ranap_iMEIMask = -1; /* BIT_STRING_SIZE_7 */ static int hf_ranap_IMEIList_item = -1; /* IMEI */ static int hf_ranap_iMEISV = -1; /* IMEISV */ static int hf_ranap_iMEISVMask = -1; /* BIT_STRING_SIZE_7 */ static int hf_ranap_IMEISVList_item = -1; /* IMEISV */ static int hf_ranap_measurementsToActivate = -1; /* MeasurementsToActivate */ static int hf_ranap_m1report = -1; /* M1Report */ static int hf_ranap_m2report = -1; /* M2Report */ static int hf_ranap_requestedMBMSIPMulticastAddressandAPNRequest = -1; /* RequestedMBMSIPMulticastAddressandAPNRequest */ static int hf_ranap_requestedMulticastServiceList = -1; /* RequestedMulticastServiceList */ static int hf_ranap_mBMSIPMulticastAddressandAPNRequest = -1; /* MBMSIPMulticastAddressandAPNRequest */ static int hf_ranap_permanentNAS_UE_ID = -1; /* PermanentNAS_UE_ID */ static int hf_ranap_rNCTraceInformation = -1; /* RNCTraceInformation */ static int hf_ranap_permittedAlgorithms_01 = -1; /* PermittedIntegrityProtectionAlgorithms */ static int hf_ranap_key_01 = -1; /* IntegrityProtectionKey */ static int hf_ranap_rIM_Transfer = -1; /* RIM_Transfer */ static int hf_ranap_gTP_TEI = -1; /* GTP_TEI */ static int hf_ranap_bindingID = -1; /* BindingID */ static int hf_ranap_LA_LIST_item = -1; /* LA_LIST_item */ static int hf_ranap_listOF_SNAs = -1; /* ListOF_SNAs */ static int hf_ranap_ageOfSAI = -1; /* INTEGER_0_32767 */ static int hf_ranap_ListOF_SNAs_item = -1; /* SNAC */ static int hf_ranap_ListOfInterfacesToTrace_item = -1; /* InterfacesToTraceItem */ static int hf_ranap_interface = -1; /* T_interface */ static int hf_ranap_requestedLocationRelatedDataType = -1; /* RequestedLocationRelatedDataType */ static int hf_ranap_requestedGPSAssistanceData = -1; /* RequestedGPSAssistanceData */ static int hf_ranap_reportChangeOfSAI = -1; /* ReportChangeOfSAI */ static int hf_ranap_periodicReportingIndicator = -1; /* PeriodicReportingIndicator */ static int hf_ranap_directReportingIndicator = -1; /* DirectReportingIndicator */ static int hf_ranap_verticalAccuracyCode = -1; /* VerticalAccuracyCode */ static int hf_ranap_positioningPriorityChangeSAI = -1; /* PositioningPriority */ static int hf_ranap_positioningPriorityDirect = -1; /* PositioningPriority */ static int hf_ranap_clientTypePeriodic = -1; /* ClientType */ static int hf_ranap_clientTypeDirect = -1; /* ClientType */ static int hf_ranap_responseTime = -1; /* ResponseTime */ static int hf_ranap_includeVelocity = -1; /* IncludeVelocity */ static int hf_ranap_periodicLocationInfo = -1; /* PeriodicLocationInfo */ static int hf_ranap_periodic = -1; /* MDT_Report_Parameters */ static int hf_ranap_event1F = -1; /* Event1F_Parameters */ static int hf_ranap_event1I = -1; /* Event1I_Parameters */ static int hf_ranap_MBMSIPMulticastAddressandAPNRequest_item = -1; /* TMGI */ static int hf_ranap_cellbased = -1; /* CellBased */ static int hf_ranap_labased = -1; /* LABased */ static int hf_ranap_rabased = -1; /* RABased */ static int hf_ranap_plmn_area_based = -1; /* NULL */ static int hf_ranap_mdtActivation = -1; /* MDT_Activation */ static int hf_ranap_mdtAreaScope = -1; /* MDTAreaScope */ static int hf_ranap_mdtMode = -1; /* MDTMode */ static int hf_ranap_immediateMDT = -1; /* ImmediateMDT */ static int hf_ranap_loggedMDT = -1; /* LoggedMDT */ static int hf_ranap_reportInterval = -1; /* ReportInterval */ static int hf_ranap_reportAmount = -1; /* ReportAmount */ static int hf_ranap_accessPointName = -1; /* Offload_RAB_Parameters_APN */ static int hf_ranap_chargingCharacteristics = -1; /* Offload_RAB_Parameters_ChargingCharacteristics */ static int hf_ranap_rAI = -1; /* RAI */ static int hf_ranap_PDP_TypeInformation_item = -1; /* PDP_Type */ static int hf_ranap_PDP_TypeInformation_extension_item = -1; /* PDP_Type_extension */ static int hf_ranap_reportingAmount = -1; /* INTEGER_1_8639999_ */ static int hf_ranap_reportingInterval = -1; /* INTEGER_1_8639999_ */ static int hf_ranap_iMSI = -1; /* IMSI */ static int hf_ranap_PermittedEncryptionAlgorithms_item = -1; /* EncryptionAlgorithm */ static int hf_ranap_PermittedIntegrityProtectionAlgorithms_item = -1; /* IntegrityProtectionAlgorithm */ static int hf_ranap_laiList = -1; /* LAI_List */ static int hf_ranap_LAI_List_item = -1; /* LAI */ static int hf_ranap_loggingInterval = -1; /* LoggingInterval */ static int hf_ranap_loggingDuration = -1; /* LoggingDuration */ static int hf_ranap_PLMNs_in_shared_network_item = -1; /* PLMNs_in_shared_network_item */ static int hf_ranap_lA_LIST = -1; /* LA_LIST */ static int hf_ranap_PositioningDataSet_item = -1; /* PositioningMethodAndUsage */ static int hf_ranap_positioningDataDiscriminator = -1; /* PositioningDataDiscriminator */ static int hf_ranap_positioningDataSet = -1; /* PositioningDataSet */ static int hf_ranap_shared_network_information = -1; /* Shared_Network_Information */ static int hf_ranap_raiList = -1; /* RAI_List */ static int hf_ranap_RAI_List_item = -1; /* RAI */ static int hf_ranap_RABDataVolumeReport_item = -1; /* RABDataVolumeReport_item */ static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume = -1; /* UnsuccessfullyTransmittedDataVolume */ static int hf_ranap_dataVolumeReference = -1; /* DataVolumeReference */ static int hf_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList_item = -1; /* ExtendedGuaranteedBitrate */ static int hf_ranap_RAB_Parameter_ExtendedMaxBitrateList_item = -1; /* ExtendedMaxBitrate */ static int hf_ranap_RAB_Parameter_GuaranteedBitrateList_item = -1; /* GuaranteedBitrate */ static int hf_ranap_RAB_Parameter_MaxBitrateList_item = -1; /* MaxBitrate */ static int hf_ranap_trafficClass = -1; /* TrafficClass */ static int hf_ranap_rAB_AsymmetryIndicator = -1; /* RAB_AsymmetryIndicator */ static int hf_ranap_maxBitrate = -1; /* RAB_Parameter_MaxBitrateList */ static int hf_ranap_guaranteedBitRate = -1; /* RAB_Parameter_GuaranteedBitrateList */ static int hf_ranap_deliveryOrder = -1; /* DeliveryOrder */ static int hf_ranap_maxSDU_Size = -1; /* MaxSDU_Size */ static int hf_ranap_sDU_Parameters = -1; /* SDU_Parameters */ static int hf_ranap_transferDelay = -1; /* TransferDelay */ static int hf_ranap_trafficHandlingPriority = -1; /* TrafficHandlingPriority */ static int hf_ranap_allocationOrRetentionPriority = -1; /* AllocationOrRetentionPriority */ static int hf_ranap_sourceStatisticsDescriptor = -1; /* SourceStatisticsDescriptor */ static int hf_ranap_relocationRequirement = -1; /* RelocationRequirement */ static int hf_ranap_RABParametersList_item = -1; /* RABParametersList_item */ static int hf_ranap_rab_Id = -1; /* RAB_ID */ static int hf_ranap_cn_domain = -1; /* CN_DomainIndicator */ static int hf_ranap_rabDataVolumeReport = -1; /* RABDataVolumeReport */ static int hf_ranap_upInformation = -1; /* UPInformation */ static int hf_ranap_RAB_TrCH_Mapping_item = -1; /* RAB_TrCH_MappingItem */ static int hf_ranap_rAB_ID = -1; /* RAB_ID */ static int hf_ranap_trCH_ID_List = -1; /* TrCH_ID_List */ static int hf_ranap_notEmptyRAListofIdleModeUEs = -1; /* NotEmptyRAListofIdleModeUEs */ static int hf_ranap_emptyFullRAListofIdleModeUEs = -1; /* T_emptyFullRAListofIdleModeUEs */ static int hf_ranap_rAofIdleModeUEs = -1; /* RAofIdleModeUEs */ static int hf_ranap_RAofIdleModeUEs_item = -1; /* RAC */ static int hf_ranap_LAListofIdleModeUEs_item = -1; /* LAI */ static int hf_ranap_RequestedMBMSIPMulticastAddressandAPNRequest_item = -1; /* MBMSIPMulticastAddressandAPNlist */ static int hf_ranap_tMGI = -1; /* TMGI */ static int hf_ranap_iPMulticastAddress = -1; /* IPMulticastAddress */ static int hf_ranap_aPN = -1; /* APN */ static int hf_ranap_RequestedMulticastServiceList_item = -1; /* TMGI */ static int hf_ranap_requestedMaxBitrates = -1; /* Requested_RAB_Parameter_MaxBitrateList */ static int hf_ranap_requestedGuaranteedBitrates = -1; /* Requested_RAB_Parameter_GuaranteedBitrateList */ static int hf_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList_item = -1; /* ExtendedMaxBitrate */ static int hf_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList_item = -1; /* ExtendedGuaranteedBitrate */ static int hf_ranap_Requested_RAB_Parameter_MaxBitrateList_item = -1; /* MaxBitrate */ static int hf_ranap_Requested_RAB_Parameter_GuaranteedBitrateList_item = -1; /* GuaranteedBitrate */ static int hf_ranap_event = -1; /* Event */ static int hf_ranap_reportArea = -1; /* ReportArea */ static int hf_ranap_accuracyCode = -1; /* INTEGER_0_127 */ static int hf_ranap_mantissa = -1; /* INTEGER_1_9 */ static int hf_ranap_exponent = -1; /* INTEGER_1_8 */ static int hf_ranap_rIMInformation = -1; /* RIMInformation */ static int hf_ranap_rIMRoutingAddress = -1; /* RIMRoutingAddress */ static int hf_ranap_targetRNC_ID = -1; /* TargetRNC_ID */ static int hf_ranap_gERAN_Cell_ID = -1; /* GERAN_Cell_ID */ static int hf_ranap_targeteNB_ID = -1; /* TargetENB_ID */ static int hf_ranap_traceReference = -1; /* TraceReference */ static int hf_ranap_traceActivationIndicator = -1; /* T_traceActivationIndicator */ static int hf_ranap_equipmentsToBeTraced = -1; /* EquipmentsToBeTraced */ static int hf_ranap_rabParmetersList = -1; /* RABParametersList */ static int hf_ranap_locationReporting = -1; /* LocationReportingTransferInformation */ static int hf_ranap_traceInformation = -1; /* TraceInformation */ static int hf_ranap_sourceSAI = -1; /* SAI */ static int hf_ranap_sAC = -1; /* SAC */ static int hf_ranap_pLMNs_in_shared_network = -1; /* PLMNs_in_shared_network */ static int hf_ranap_exponent_1_8 = -1; /* INTEGER_1_6 */ static int hf_ranap_SDU_FormatInformationParameters_item = -1; /* SDU_FormatInformationParameters_item */ static int hf_ranap_subflowSDU_Size = -1; /* SubflowSDU_Size */ static int hf_ranap_rAB_SubflowCombinationBitRate = -1; /* RAB_SubflowCombinationBitRate */ static int hf_ranap_SDU_Parameters_item = -1; /* SDU_Parameters_item */ static int hf_ranap_sDU_ErrorRatio = -1; /* SDU_ErrorRatio */ static int hf_ranap_residualBitErrorRatio = -1; /* ResidualBitErrorRatio */ static int hf_ranap_deliveryOfErroneousSDU = -1; /* DeliveryOfErroneousSDU */ static int hf_ranap_sDU_FormatInformationParameters = -1; /* SDU_FormatInformationParameters */ static int hf_ranap_authorisedPLMNs = -1; /* AuthorisedPLMNs */ static int hf_ranap_sourceUTRANCellID = -1; /* SourceUTRANCellID */ static int hf_ranap_sourceGERANCellID = -1; /* CGI */ static int hf_ranap_sourceRNC_ID = -1; /* SourceRNC_ID */ static int hf_ranap_rRC_Container = -1; /* RRC_Container */ static int hf_ranap_numberOfIuInstances = -1; /* NumberOfIuInstances */ static int hf_ranap_relocationType = -1; /* RelocationType */ static int hf_ranap_chosenIntegrityProtectionAlgorithm = -1; /* ChosenIntegrityProtectionAlgorithm */ static int hf_ranap_integrityProtectionKey = -1; /* IntegrityProtectionKey */ static int hf_ranap_chosenEncryptionAlgorithForSignalling = -1; /* ChosenEncryptionAlgorithm */ static int hf_ranap_cipheringKey = -1; /* EncryptionKey */ static int hf_ranap_chosenEncryptionAlgorithForCS = -1; /* ChosenEncryptionAlgorithm */ static int hf_ranap_chosenEncryptionAlgorithForPS = -1; /* ChosenEncryptionAlgorithm */ static int hf_ranap_d_RNTI = -1; /* D_RNTI */ static int hf_ranap_targetCellId = -1; /* TargetCellId */ static int hf_ranap_rAB_TrCH_Mapping = -1; /* RAB_TrCH_Mapping */ static int hf_ranap_rSRP = -1; /* INTEGER_0_97 */ static int hf_ranap_rSRQ = -1; /* INTEGER_0_34 */ static int hf_ranap_iRATmeasurementParameters = -1; /* IRATmeasurementParameters */ static int hf_ranap_measurementDuration = -1; /* INTEGER_1_100 */ static int hf_ranap_eUTRANFrequencies = -1; /* EUTRANFrequencies */ static int hf_ranap_EUTRANFrequencies_item = -1; /* EUTRANFrequencies_item */ static int hf_ranap_earfcn = -1; /* INTEGER_0_65535 */ static int hf_ranap_measBand = -1; /* MeasBand */ static int hf_ranap_SupportedRAB_ParameterBitrateList_item = -1; /* SupportedBitrate */ static int hf_ranap_uTRANcellID = -1; /* TargetCellId */ static int hf_ranap_SRB_TrCH_Mapping_item = -1; /* SRB_TrCH_MappingItem */ static int hf_ranap_sRB_ID = -1; /* SRB_ID */ static int hf_ranap_trCH_ID = -1; /* TrCH_ID */ static int hf_ranap_nonce = -1; /* BIT_STRING_SIZE_128 */ static int hf_ranap_tAC = -1; /* TAC */ static int hf_ranap_cGI = -1; /* CGI */ static int hf_ranap_eNB_ID = -1; /* ENB_ID */ static int hf_ranap_selectedTAI = -1; /* TAI */ static int hf_ranap_tMSI = -1; /* TMSI */ static int hf_ranap_p_TMSI = -1; /* P_TMSI */ static int hf_ranap_serviceID = -1; /* OCTET_STRING_SIZE_3 */ static int hf_ranap_ue_identity = -1; /* UE_ID */ static int hf_ranap_tracePropagationParameters = -1; /* TracePropagationParameters */ static int hf_ranap_traceRecordingSessionReference = -1; /* TraceRecordingSessionReference */ static int hf_ranap_traceDepth = -1; /* TraceDepth */ static int hf_ranap_listOfInterfacesToTrace = -1; /* ListOfInterfacesToTrace */ static int hf_ranap_dCH_ID = -1; /* DCH_ID */ static int hf_ranap_dSCH_ID = -1; /* DSCH_ID */ static int hf_ranap_uSCH_ID = -1; /* USCH_ID */ static int hf_ranap_TrCH_ID_List_item = -1; /* TrCH_ID */ static int hf_ranap_uE_AggregateMaximumBitRateDownlink = -1; /* UE_AggregateMaximumBitRateDownlink */ static int hf_ranap_uE_AggregateMaximumBitRateUplink = -1; /* UE_AggregateMaximumBitRateUplink */ static int hf_ranap_imsi = -1; /* IMSI */ static int hf_ranap_imei = -1; /* IMEI */ static int hf_ranap_imeisv = -1; /* IMEISV */ static int hf_ranap_uESBI_IuA = -1; /* UESBI_IuA */ static int hf_ranap_uESBI_IuB = -1; /* UESBI_IuB */ static int hf_ranap_frameSeqNoUL = -1; /* FrameSequenceNumber */ static int hf_ranap_frameSeqNoDL = -1; /* FrameSequenceNumber */ static int hf_ranap_pdu14FrameSeqNoUL = -1; /* PDUType14FrameSequenceNumber */ static int hf_ranap_pdu14FrameSeqNoDL = -1; /* PDUType14FrameSequenceNumber */ static int hf_ranap_dataPDUType = -1; /* DataPDUType */ static int hf_ranap_upinitialisationFrame = -1; /* UPInitialisationFrame */ static int hf_ranap_horizontalVelocity = -1; /* HorizontalVelocity */ static int hf_ranap_horizontalWithVerticalVelocity = -1; /* HorizontalWithVerticalVelocity */ static int hf_ranap_horizontalVelocityWithUncertainty = -1; /* HorizontalVelocityWithUncertainty */ static int hf_ranap_horizontalWithVeritcalVelocityAndUncertainty = -1; /* HorizontalWithVerticalVelocityAndUncertainty */ static int hf_ranap_horizontalSpeedAndBearing = -1; /* HorizontalSpeedAndBearing */ static int hf_ranap_veritcalVelocity = -1; /* VerticalVelocity */ static int hf_ranap_uncertaintySpeed = -1; /* INTEGER_0_255 */ static int hf_ranap_horizontalUncertaintySpeed = -1; /* INTEGER_0_255 */ static int hf_ranap_verticalUncertaintySpeed = -1; /* INTEGER_0_255 */ static int hf_ranap_bearing = -1; /* INTEGER_0_359 */ static int hf_ranap_horizontalSpeed = -1; /* INTEGER_0_2047 */ static int hf_ranap_veritcalSpeed = -1; /* INTEGER_0_255 */ static int hf_ranap_veritcalSpeedDirection = -1; /* VerticalSpeedDirection */ static int hf_ranap_protocolIEs = -1; /* ProtocolIE_Container */ static int hf_ranap_protocolExtensions = -1; /* ProtocolExtensionContainer */ static int hf_ranap_rab_dl_UnsuccessfullyTransmittedDataVolume = -1; /* DataVolumeList */ static int hf_ranap_dL_GTP_PDU_SequenceNumber = -1; /* DL_GTP_PDU_SequenceNumber */ static int hf_ranap_uL_GTP_PDU_SequenceNumber = -1; /* UL_GTP_PDU_SequenceNumber */ static int hf_ranap_transportLayerAddress = -1; /* TransportLayerAddress */ static int hf_ranap_iuTransportAssociation = -1; /* IuTransportAssociation */ static int hf_ranap_nAS_SynchronisationIndicator = -1; /* NAS_SynchronisationIndicator */ static int hf_ranap_rAB_Parameters = -1; /* RAB_Parameters */ static int hf_ranap_dataVolumeReportingIndication = -1; /* DataVolumeReportingIndication */ static int hf_ranap_pDP_TypeInformation = -1; /* PDP_TypeInformation */ static int hf_ranap_userPlaneInformation = -1; /* UserPlaneInformation */ static int hf_ranap_service_Handover = -1; /* Service_Handover */ static int hf_ranap_userPlaneMode = -1; /* UserPlaneMode */ static int hf_ranap_uP_ModeVersions = -1; /* UP_ModeVersions */ static int hf_ranap_joinedMBMSBearerService_IEs = -1; /* JoinedMBMSBearerService_IEs */ static int hf_ranap_JoinedMBMSBearerService_IEs_item = -1; /* JoinedMBMSBearerService_IEs_item */ static int hf_ranap_mBMS_PTP_RAB_ID = -1; /* MBMS_PTP_RAB_ID */ static int hf_ranap_cause = -1; /* Cause */ static int hf_ranap_dl_GTP_PDU_SequenceNumber = -1; /* DL_GTP_PDU_SequenceNumber */ static int hf_ranap_ul_GTP_PDU_SequenceNumber = -1; /* UL_GTP_PDU_SequenceNumber */ static int hf_ranap_dl_N_PDU_SequenceNumber = -1; /* DL_N_PDU_SequenceNumber */ static int hf_ranap_ul_N_PDU_SequenceNumber = -1; /* UL_N_PDU_SequenceNumber */ static int hf_ranap_iuSigConId = -1; /* IuSignallingConnectionIdentifier */ static int hf_ranap_transportLayerAddressReq1 = -1; /* TransportLayerAddress */ static int hf_ranap_iuTransportAssociationReq1 = -1; /* IuTransportAssociation */ static int hf_ranap_ass_RAB_Parameters = -1; /* Ass_RAB_Parameters */ static int hf_ranap_transportLayerAddressRes1 = -1; /* TransportLayerAddress */ static int hf_ranap_iuTransportAssociationRes1 = -1; /* IuTransportAssociation */ static int hf_ranap_rab2beReleasedList = -1; /* RAB_ToBeReleasedList_EnhancedRelocCompleteRes */ static int hf_ranap_transportLayerInformation = -1; /* TransportLayerInformation */ static int hf_ranap_dl_dataVolumes = -1; /* DataVolumeList */ static int hf_ranap_DataVolumeList_item = -1; /* DataVolumeList_item */ static int hf_ranap_gERAN_Classmark = -1; /* GERAN_Classmark */ static int hf_ranap_privateIEs = -1; /* PrivateIE_Container */ static int hf_ranap_nAS_PDU = -1; /* NAS_PDU */ static int hf_ranap_sAPI = -1; /* SAPI */ static int hf_ranap_cN_DomainIndicator = -1; /* CN_DomainIndicator */ static int hf_ranap_dataForwardingInformation = -1; /* TNLInformationEnhRelInfoReq */ static int hf_ranap_sourceSideIuULTNLInfo = -1; /* TNLInformationEnhRelInfoReq */ static int hf_ranap_alt_RAB_Parameters = -1; /* Alt_RAB_Parameters */ static int hf_ranap_dataForwardingInformation_01 = -1; /* TNLInformationEnhRelInfoRes */ static int hf_ranap_dl_forwardingTransportLayerAddress = -1; /* TransportLayerAddress */ static int hf_ranap_dl_forwardingTransportAssociation = -1; /* IuTransportAssociation */ static int hf_ranap_requested_RAB_Parameter_Values = -1; /* Requested_RAB_Parameter_Values */ static int hf_ranap_mBMSHCIndicator = -1; /* MBMSHCIndicator */ static int hf_ranap_gTPDLTEID = -1; /* GTP_TEI */ static int hf_ranap_LeftMBMSBearerService_IEs_item = -1; /* LeftMBMSBearerService_IEs_item */ static int hf_ranap_UnsuccessfulLinking_IEs_item = -1; /* UnsuccessfulLinking_IEs_item */ static int hf_ranap_initiatingMessage = -1; /* InitiatingMessage */ static int hf_ranap_successfulOutcome = -1; /* SuccessfulOutcome */ static int hf_ranap_unsuccessfulOutcome = -1; /* UnsuccessfulOutcome */ static int hf_ranap_outcome = -1; /* Outcome */ static int hf_ranap_initiatingMessagevalue = -1; /* InitiatingMessage_value */ static int hf_ranap_successfulOutcome_value = -1; /* SuccessfulOutcome_value */ static int hf_ranap_unsuccessfulOutcome_value = -1; /* UnsuccessfulOutcome_value */ static int hf_ranap_value = -1; /* T_value */ /*--- End of included file: packet-ranap-hf.c ---*/ #line 78 "../../asn1/ranap/packet-ranap-template.c" /* Initialize the subtree pointers */ static int ett_ranap = -1; static int ett_ranap_TransportLayerAddress = -1; static int ett_ranap_TransportLayerAddress_nsap = -1; /*--- Included file: packet-ranap-ett.c ---*/ #line 1 "../../asn1/ranap/packet-ranap-ett.c" static gint ett_ranap_PrivateIE_ID = -1; static gint ett_ranap_ProtocolIE_Container = -1; static gint ett_ranap_ProtocolIE_Field = -1; static gint ett_ranap_ProtocolIE_ContainerPair = -1; static gint ett_ranap_ProtocolIE_FieldPair = -1; static gint ett_ranap_ProtocolIE_ContainerList = -1; static gint ett_ranap_ProtocolIE_ContainerPairList = -1; static gint ett_ranap_ProtocolExtensionContainer = -1; static gint ett_ranap_ProtocolExtensionField = -1; static gint ett_ranap_PrivateIE_Container = -1; static gint ett_ranap_PrivateIE_Field = -1; static gint ett_ranap_AllocationOrRetentionPriority = -1; static gint ett_ranap_Alt_RAB_Parameters = -1; static gint ett_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf = -1; static gint ett_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrates = -1; static gint ett_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateList = -1; static gint ett_ranap_Alt_RAB_Parameter_GuaranteedBitrateInf = -1; static gint ett_ranap_Alt_RAB_Parameter_GuaranteedBitrates = -1; static gint ett_ranap_Alt_RAB_Parameter_GuaranteedBitrateList = -1; static gint ett_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf = -1; static gint ett_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrates = -1; static gint ett_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateInf = -1; static gint ett_ranap_Alt_RAB_Parameter_ExtendedMaxBitrates = -1; static gint ett_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateList = -1; static gint ett_ranap_Alt_RAB_Parameter_MaxBitrateInf = -1; static gint ett_ranap_Alt_RAB_Parameter_MaxBitrates = -1; static gint ett_ranap_Alt_RAB_Parameter_MaxBitrateList = -1; static gint ett_ranap_Alt_RAB_Parameter_SupportedMaxBitrateInf = -1; static gint ett_ranap_Alt_RAB_Parameter_SupportedMaxBitrates = -1; static gint ett_ranap_AreaIdentity = -1; static gint ett_ranap_Ass_RAB_Parameters = -1; static gint ett_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList = -1; static gint ett_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList = -1; static gint ett_ranap_Ass_RAB_Parameter_GuaranteedBitrateList = -1; static gint ett_ranap_Ass_RAB_Parameter_MaxBitrateList = -1; static gint ett_ranap_AuthorisedPLMNs = -1; static gint ett_ranap_AuthorisedPLMNs_item = -1; static gint ett_ranap_AuthorisedSNAs = -1; static gint ett_ranap_BroadcastAssistanceDataDecipheringKeys = -1; static gint ett_ranap_Cause = -1; static gint ett_ranap_CellBased = -1; static gint ett_ranap_CellIdList = -1; static gint ett_ranap_CellLoadInformation = -1; static gint ett_ranap_CellLoadInformationGroup = -1; static gint ett_ranap_CriticalityDiagnostics = -1; static gint ett_ranap_CriticalityDiagnostics_IE_List = -1; static gint ett_ranap_CriticalityDiagnostics_IE_List_item = -1; static gint ett_ranap_MessageStructure = -1; static gint ett_ranap_MessageStructure_item = -1; static gint ett_ranap_CGI = -1; static gint ett_ranap_CSG_Id_List = -1; static gint ett_ranap_DeltaRAListofIdleModeUEs = -1; static gint ett_ranap_NewRAListofIdleModeUEs = -1; static gint ett_ranap_RAListwithNoIdleModeUEsAnyMore = -1; static gint ett_ranap_ENB_ID = -1; static gint ett_ranap_EncryptionInformation = -1; static gint ett_ranap_EquipmentsToBeTraced = -1; static gint ett_ranap_Event1F_Parameters = -1; static gint ett_ranap_Event1I_Parameters = -1; static gint ett_ranap_GANSS_PositioningDataSet = -1; static gint ett_ranap_GeographicalArea = -1; static gint ett_ranap_GeographicalCoordinates = -1; static gint ett_ranap_GA_AltitudeAndDirection = -1; static gint ett_ranap_GA_EllipsoidArc = -1; static gint ett_ranap_GA_Point = -1; static gint ett_ranap_GA_PointWithAltitude = -1; static gint ett_ranap_GA_PointWithAltitudeAndUncertaintyEllipsoid = -1; static gint ett_ranap_GA_PointWithUnCertainty = -1; static gint ett_ranap_GA_PointWithUnCertaintyEllipse = -1; static gint ett_ranap_GA_Polygon = -1; static gint ett_ranap_GA_Polygon_item = -1; static gint ett_ranap_GA_UncertaintyEllipse = -1; static gint ett_ranap_GERAN_Cell_ID = -1; static gint ett_ranap_GlobalCN_ID = -1; static gint ett_ranap_GlobalRNC_ID = -1; static gint ett_ranap_IMEIGroup = -1; static gint ett_ranap_IMEIList = -1; static gint ett_ranap_IMEISVGroup = -1; static gint ett_ranap_IMEISVList = -1; static gint ett_ranap_ImmediateMDT = -1; static gint ett_ranap_InformationRequested = -1; static gint ett_ranap_InformationRequestType = -1; static gint ett_ranap_InformationTransferType = -1; static gint ett_ranap_IntegrityProtectionInformation = -1; static gint ett_ranap_InterSystemInformationTransferType = -1; static gint ett_ranap_InterSystemInformation_TransparentContainer = -1; static gint ett_ranap_IuTransportAssociation = -1; static gint ett_ranap_LA_LIST = -1; static gint ett_ranap_LA_LIST_item = -1; static gint ett_ranap_LAI = -1; static gint ett_ranap_LastKnownServiceArea = -1; static gint ett_ranap_ListOF_SNAs = -1; static gint ett_ranap_ListOfInterfacesToTrace = -1; static gint ett_ranap_InterfacesToTraceItem = -1; static gint ett_ranap_LocationRelatedDataRequestType = -1; static gint ett_ranap_LocationReportingTransferInformation = -1; static gint ett_ranap_M1Report = -1; static gint ett_ranap_M2Report = -1; static gint ett_ranap_MBMSIPMulticastAddressandAPNRequest = -1; static gint ett_ranap_MDTAreaScope = -1; static gint ett_ranap_MDT_Configuration = -1; static gint ett_ranap_MDTMode = -1; static gint ett_ranap_MDT_Report_Parameters = -1; static gint ett_ranap_Offload_RAB_Parameters = -1; static gint ett_ranap_PagingAreaID = -1; static gint ett_ranap_PDP_TypeInformation = -1; static gint ett_ranap_PDP_TypeInformation_extension = -1; static gint ett_ranap_PeriodicLocationInfo = -1; static gint ett_ranap_PermanentNAS_UE_ID = -1; static gint ett_ranap_PermittedEncryptionAlgorithms = -1; static gint ett_ranap_PermittedIntegrityProtectionAlgorithms = -1; static gint ett_ranap_LABased = -1; static gint ett_ranap_LAI_List = -1; static gint ett_ranap_LoggedMDT = -1; static gint ett_ranap_PLMNs_in_shared_network = -1; static gint ett_ranap_PLMNs_in_shared_network_item = -1; static gint ett_ranap_PositioningDataSet = -1; static gint ett_ranap_PositionData = -1; static gint ett_ranap_ProvidedData = -1; static gint ett_ranap_RABased = -1; static gint ett_ranap_RAI_List = -1; static gint ett_ranap_RABDataVolumeReport = -1; static gint ett_ranap_RABDataVolumeReport_item = -1; static gint ett_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList = -1; static gint ett_ranap_RAB_Parameter_ExtendedMaxBitrateList = -1; static gint ett_ranap_RAB_Parameter_GuaranteedBitrateList = -1; static gint ett_ranap_RAB_Parameter_MaxBitrateList = -1; static gint ett_ranap_RAB_Parameters = -1; static gint ett_ranap_RABParametersList = -1; static gint ett_ranap_RABParametersList_item = -1; static gint ett_ranap_RAB_TrCH_Mapping = -1; static gint ett_ranap_RAB_TrCH_MappingItem = -1; static gint ett_ranap_RAI = -1; static gint ett_ranap_RAListofIdleModeUEs = -1; static gint ett_ranap_NotEmptyRAListofIdleModeUEs = -1; static gint ett_ranap_RAofIdleModeUEs = -1; static gint ett_ranap_LAListofIdleModeUEs = -1; static gint ett_ranap_RequestedMBMSIPMulticastAddressandAPNRequest = -1; static gint ett_ranap_MBMSIPMulticastAddressandAPNlist = -1; static gint ett_ranap_RequestedMulticastServiceList = -1; static gint ett_ranap_Requested_RAB_Parameter_Values = -1; static gint ett_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList = -1; static gint ett_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList = -1; static gint ett_ranap_Requested_RAB_Parameter_MaxBitrateList = -1; static gint ett_ranap_Requested_RAB_Parameter_GuaranteedBitrateList = -1; static gint ett_ranap_RequestType = -1; static gint ett_ranap_ResidualBitErrorRatio = -1; static gint ett_ranap_RIM_Transfer = -1; static gint ett_ranap_RIMRoutingAddress = -1; static gint ett_ranap_RNCTraceInformation = -1; static gint ett_ranap_RNSAPRelocationParameters = -1; static gint ett_ranap_SAI = -1; static gint ett_ranap_Shared_Network_Information = -1; static gint ett_ranap_SDU_ErrorRatio = -1; static gint ett_ranap_SDU_FormatInformationParameters = -1; static gint ett_ranap_SDU_FormatInformationParameters_item = -1; static gint ett_ranap_SDU_Parameters = -1; static gint ett_ranap_SDU_Parameters_item = -1; static gint ett_ranap_SNA_Access_Information = -1; static gint ett_ranap_SourceCellID = -1; static gint ett_ranap_SourceID = -1; static gint ett_ranap_SourceRNC_ID = -1; static gint ett_ranap_SourceRNC_ToTargetRNC_TransparentContainer = -1; static gint ett_ranap_IRAT_Measurement_Configuration = -1; static gint ett_ranap_IRATmeasurementParameters = -1; static gint ett_ranap_EUTRANFrequencies = -1; static gint ett_ranap_EUTRANFrequencies_item = -1; static gint ett_ranap_SupportedRAB_ParameterBitrateList = -1; static gint ett_ranap_SourceUTRANCellID = -1; static gint ett_ranap_SRB_TrCH_Mapping = -1; static gint ett_ranap_SRB_TrCH_MappingItem = -1; static gint ett_ranap_SRVCC_Information = -1; static gint ett_ranap_TAI = -1; static gint ett_ranap_TargetID = -1; static gint ett_ranap_TargetENB_ID = -1; static gint ett_ranap_TargetRNC_ID = -1; static gint ett_ranap_TargetRNC_ToSourceRNC_TransparentContainer = -1; static gint ett_ranap_TemporaryUE_ID = -1; static gint ett_ranap_TMGI = -1; static gint ett_ranap_TraceInformation = -1; static gint ett_ranap_TracePropagationParameters = -1; static gint ett_ranap_TraceRecordingSessionInformation = -1; static gint ett_ranap_TrCH_ID = -1; static gint ett_ranap_TrCH_ID_List = -1; static gint ett_ranap_UE_AggregateMaximumBitRate = -1; static gint ett_ranap_UE_ID = -1; static gint ett_ranap_UESBI_Iu = -1; static gint ett_ranap_UPInformation = -1; static gint ett_ranap_VelocityEstimate = -1; static gint ett_ranap_HorizontalVelocity = -1; static gint ett_ranap_HorizontalWithVerticalVelocity = -1; static gint ett_ranap_HorizontalVelocityWithUncertainty = -1; static gint ett_ranap_HorizontalWithVerticalVelocityAndUncertainty = -1; static gint ett_ranap_HorizontalSpeedAndBearing = -1; static gint ett_ranap_VerticalVelocity = -1; static gint ett_ranap_Iu_ReleaseCommand = -1; static gint ett_ranap_Iu_ReleaseComplete = -1; static gint ett_ranap_RAB_DataVolumeReportItem = -1; static gint ett_ranap_RAB_ReleasedItem_IuRelComp = -1; static gint ett_ranap_RelocationRequired = -1; static gint ett_ranap_RelocationCommand = -1; static gint ett_ranap_RAB_RelocationReleaseItem = -1; static gint ett_ranap_RAB_DataForwardingItem = -1; static gint ett_ranap_RelocationPreparationFailure = -1; static gint ett_ranap_RelocationRequest = -1; static gint ett_ranap_RAB_SetupItem_RelocReq = -1; static gint ett_ranap_UserPlaneInformation = -1; static gint ett_ranap_CNMBMSLinkingInformation = -1; static gint ett_ranap_JoinedMBMSBearerService_IEs = -1; static gint ett_ranap_JoinedMBMSBearerService_IEs_item = -1; static gint ett_ranap_RelocationRequestAcknowledge = -1; static gint ett_ranap_RAB_SetupItem_RelocReqAck = -1; static gint ett_ranap_RAB_FailedItem = -1; static gint ett_ranap_RelocationFailure = -1; static gint ett_ranap_RelocationCancel = -1; static gint ett_ranap_RelocationCancelAcknowledge = -1; static gint ett_ranap_SRNS_ContextRequest = -1; static gint ett_ranap_RAB_DataForwardingItem_SRNS_CtxReq = -1; static gint ett_ranap_SRNS_ContextResponse = -1; static gint ett_ranap_RAB_ContextItem = -1; static gint ett_ranap_RABs_ContextFailedtoTransferItem = -1; static gint ett_ranap_SecurityModeCommand = -1; static gint ett_ranap_SecurityModeComplete = -1; static gint ett_ranap_SecurityModeReject = -1; static gint ett_ranap_DataVolumeReportRequest = -1; static gint ett_ranap_RAB_DataVolumeReportRequestItem = -1; static gint ett_ranap_DataVolumeReport = -1; static gint ett_ranap_RABs_failed_to_reportItem = -1; static gint ett_ranap_Reset = -1; static gint ett_ranap_ResetAcknowledge = -1; static gint ett_ranap_ResetResource = -1; static gint ett_ranap_ResetResourceItem = -1; static gint ett_ranap_ResetResourceAcknowledge = -1; static gint ett_ranap_ResetResourceAckItem = -1; static gint ett_ranap_RAB_ReleaseRequest = -1; static gint ett_ranap_RAB_ReleaseItem = -1; static gint ett_ranap_Iu_ReleaseRequest = -1; static gint ett_ranap_RelocationDetect = -1; static gint ett_ranap_RelocationComplete = -1; static gint ett_ranap_EnhancedRelocationCompleteRequest = -1; static gint ett_ranap_RAB_SetupItem_EnhancedRelocCompleteReq = -1; static gint ett_ranap_EnhancedRelocationCompleteResponse = -1; static gint ett_ranap_RAB_SetupItem_EnhancedRelocCompleteRes = -1; static gint ett_ranap_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes = -1; static gint ett_ranap_EnhancedRelocationCompleteFailure = -1; static gint ett_ranap_EnhancedRelocationCompleteConfirm = -1; static gint ett_ranap_Paging = -1; static gint ett_ranap_CommonID = -1; static gint ett_ranap_CN_InvokeTrace = -1; static gint ett_ranap_CN_DeactivateTrace = -1; static gint ett_ranap_LocationReportingControl = -1; static gint ett_ranap_LocationReport = -1; static gint ett_ranap_InitialUE_Message = -1; static gint ett_ranap_DirectTransfer = -1; static gint ett_ranap_Overload = -1; static gint ett_ranap_ErrorIndication = -1; static gint ett_ranap_SRNS_DataForwardCommand = -1; static gint ett_ranap_ForwardSRNS_Context = -1; static gint ett_ranap_RAB_AssignmentRequest = -1; static gint ett_ranap_RAB_SetupOrModifyItemFirst = -1; static gint ett_ranap_TransportLayerInformation = -1; static gint ett_ranap_RAB_SetupOrModifyItemSecond = -1; static gint ett_ranap_RAB_AssignmentResponse = -1; static gint ett_ranap_RAB_SetupOrModifiedItem = -1; static gint ett_ranap_RAB_ReleasedItem = -1; static gint ett_ranap_DataVolumeList = -1; static gint ett_ranap_DataVolumeList_item = -1; static gint ett_ranap_RAB_QueuedItem = -1; static gint ett_ranap_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item = -1; static gint ett_ranap_PrivateMessage = -1; static gint ett_ranap_RANAP_RelocationInformation = -1; static gint ett_ranap_DirectTransferInformationItem_RANAP_RelocInf = -1; static gint ett_ranap_RAB_ContextItem_RANAP_RelocInf = -1; static gint ett_ranap_RANAP_EnhancedRelocationInformationRequest = -1; static gint ett_ranap_RAB_SetupItem_EnhRelocInfoReq = -1; static gint ett_ranap_TNLInformationEnhRelInfoReq = -1; static gint ett_ranap_RANAP_EnhancedRelocationInformationResponse = -1; static gint ett_ranap_RAB_SetupItem_EnhRelocInfoRes = -1; static gint ett_ranap_RAB_FailedItem_EnhRelocInfoRes = -1; static gint ett_ranap_TNLInformationEnhRelInfoRes = -1; static gint ett_ranap_RAB_ModifyRequest = -1; static gint ett_ranap_RAB_ModifyItem = -1; static gint ett_ranap_LocationRelatedDataRequest = -1; static gint ett_ranap_LocationRelatedDataResponse = -1; static gint ett_ranap_LocationRelatedDataFailure = -1; static gint ett_ranap_InformationTransferIndication = -1; static gint ett_ranap_InformationTransferConfirmation = -1; static gint ett_ranap_InformationTransferFailure = -1; static gint ett_ranap_UESpecificInformationIndication = -1; static gint ett_ranap_DirectInformationTransfer = -1; static gint ett_ranap_UplinkInformationExchangeRequest = -1; static gint ett_ranap_UplinkInformationExchangeResponse = -1; static gint ett_ranap_UplinkInformationExchangeFailure = -1; static gint ett_ranap_MBMSSessionStart = -1; static gint ett_ranap_MBMSSynchronisationInformation = -1; static gint ett_ranap_MBMSSessionStartResponse = -1; static gint ett_ranap_MBMSSessionStartFailure = -1; static gint ett_ranap_MBMSSessionUpdate = -1; static gint ett_ranap_MBMSSessionUpdateResponse = -1; static gint ett_ranap_MBMSSessionUpdateFailure = -1; static gint ett_ranap_MBMSSessionStop = -1; static gint ett_ranap_MBMSSessionStopResponse = -1; static gint ett_ranap_MBMSUELinkingRequest = -1; static gint ett_ranap_LeftMBMSBearerService_IEs = -1; static gint ett_ranap_LeftMBMSBearerService_IEs_item = -1; static gint ett_ranap_MBMSUELinkingResponse = -1; static gint ett_ranap_UnsuccessfulLinking_IEs = -1; static gint ett_ranap_UnsuccessfulLinking_IEs_item = -1; static gint ett_ranap_MBMSRegistrationRequest = -1; static gint ett_ranap_MBMSRegistrationResponse = -1; static gint ett_ranap_MBMSRegistrationFailure = -1; static gint ett_ranap_MBMSCNDe_RegistrationRequest = -1; static gint ett_ranap_MBMSCNDe_RegistrationResponse = -1; static gint ett_ranap_MBMSRABEstablishmentIndication = -1; static gint ett_ranap_MBMSRABReleaseRequest = -1; static gint ett_ranap_MBMSRABRelease = -1; static gint ett_ranap_MBMSRABReleaseFailure = -1; static gint ett_ranap_SRVCC_CSKeysRequest = -1; static gint ett_ranap_SRVCC_CSKeysResponse = -1; static gint ett_ranap_RANAP_PDU = -1; static gint ett_ranap_InitiatingMessage = -1; static gint ett_ranap_SuccessfulOutcome = -1; static gint ett_ranap_UnsuccessfulOutcome = -1; static gint ett_ranap_Outcome = -1; /*--- End of included file: packet-ranap-ett.c ---*/ #line 85 "../../asn1/ranap/packet-ranap-template.c" /* Global variables */ static guint32 ProcedureCode; static guint32 ProtocolIE_ID; static guint32 ProtocolExtensionID; static gboolean glbl_dissect_container = FALSE; /* Some IE:s identities uses the same value for different IE:s * depending on PDU type: * InitiatingMessage * SuccessfulOutcome * UnsuccessfulOutcome * Outcome * As a workarond a value is added to the IE:id in the .cnf file. * Example: * ResetResourceList N rnsap.ies IMSG||id-IuSigConIdList # no spaces are allowed in value as a space is delimiter * PDU type is stored in a global variable and can is used in the IE decoding section. */ /* * &InitiatingMessage , * &SuccessfulOutcome OPTIONAL, * &UnsuccessfulOutcome OPTIONAL, * &Outcome OPTIONAL, * * Only these two needed currently */ #define IMSG (1<<16) #define SOUT (2<<16) #define SPECIAL (4<<16) int pdu_type = 0; /* 0 means wildcard */ /* Initialise the Preferences */ static gint global_ranap_sccp_ssn = SCCP_SSN_RANAP; /* Dissector tables */ static dissector_table_t ranap_ies_dissector_table; static dissector_table_t ranap_ies_p1_dissector_table; static dissector_table_t ranap_ies_p2_dissector_table; static dissector_table_t ranap_extension_dissector_table; static dissector_table_t ranap_proc_imsg_dissector_table; static dissector_table_t ranap_proc_sout_dissector_table; static dissector_table_t ranap_proc_uout_dissector_table; static dissector_table_t ranap_proc_out_dissector_table; static dissector_table_t nas_pdu_dissector_table; static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); static int dissect_ProtocolIEFieldPairFirstValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); static int dissect_ProtocolIEFieldPairSecondValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); static int dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); static int dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index); static int dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index); /*--- Included file: packet-ranap-fn.c ---*/ #line 1 "../../asn1/ranap/packet-ranap-fn.c" static const value_string ranap_Criticality_vals[] = { { 0, "reject" }, { 1, "ignore" }, { 2, "notify" }, { 0, NULL } }; static int dissect_ranap_Criticality(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 3, NULL, FALSE, 0, NULL); return offset; } static int dissect_ranap_INTEGER_0_65535(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, NULL, FALSE); return offset; } static int dissect_ranap_OBJECT_IDENTIFIER(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_object_identifier(tvb, offset, actx, tree, hf_index, NULL); return offset; } static const value_string ranap_PrivateIE_ID_vals[] = { { 0, "local" }, { 1, "global" }, { 0, NULL } }; static const per_choice_t PrivateIE_ID_choice[] = { { 0, &hf_ranap_local , ASN1_NO_EXTENSIONS , dissect_ranap_INTEGER_0_65535 }, { 1, &hf_ranap_global , ASN1_NO_EXTENSIONS , dissect_ranap_OBJECT_IDENTIFIER }, { 0, NULL, 0, NULL } }; static int dissect_ranap_PrivateIE_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_PrivateIE_ID, PrivateIE_ID_choice, NULL); return offset; } static const value_string ranap_ProcedureCode_vals[] = { { id_RAB_Assignment, "id-RAB-Assignment" }, { id_Iu_Release, "id-Iu-Release" }, { id_RelocationPreparation, "id-RelocationPreparation" }, { id_RelocationResourceAllocation, "id-RelocationResourceAllocation" }, { id_RelocationCancel, "id-RelocationCancel" }, { id_SRNS_ContextTransfer, "id-SRNS-ContextTransfer" }, { id_SecurityModeControl, "id-SecurityModeControl" }, { id_DataVolumeReport, "id-DataVolumeReport" }, { id_Not_Used_8, "id-Not-Used-8" }, { id_Reset, "id-Reset" }, { id_RAB_ReleaseRequest, "id-RAB-ReleaseRequest" }, { id_Iu_ReleaseRequest, "id-Iu-ReleaseRequest" }, { id_RelocationDetect, "id-RelocationDetect" }, { id_RelocationComplete, "id-RelocationComplete" }, { id_Paging, "id-Paging" }, { id_CommonID, "id-CommonID" }, { id_CN_InvokeTrace, "id-CN-InvokeTrace" }, { id_LocationReportingControl, "id-LocationReportingControl" }, { id_LocationReport, "id-LocationReport" }, { id_InitialUE_Message, "id-InitialUE-Message" }, { id_DirectTransfer, "id-DirectTransfer" }, { id_OverloadControl, "id-OverloadControl" }, { id_ErrorIndication, "id-ErrorIndication" }, { id_SRNS_DataForward, "id-SRNS-DataForward" }, { id_ForwardSRNS_Context, "id-ForwardSRNS-Context" }, { id_privateMessage, "id-privateMessage" }, { id_CN_DeactivateTrace, "id-CN-DeactivateTrace" }, { id_ResetResource, "id-ResetResource" }, { id_RANAP_Relocation, "id-RANAP-Relocation" }, { id_RAB_ModifyRequest, "id-RAB-ModifyRequest" }, { id_LocationRelatedData, "id-LocationRelatedData" }, { id_InformationTransfer, "id-InformationTransfer" }, { id_UESpecificInformation, "id-UESpecificInformation" }, { id_UplinkInformationExchange, "id-UplinkInformationExchange" }, { id_DirectInformationTransfer, "id-DirectInformationTransfer" }, { id_MBMSSessionStart, "id-MBMSSessionStart" }, { id_MBMSSessionUpdate, "id-MBMSSessionUpdate" }, { id_MBMSSessionStop, "id-MBMSSessionStop" }, { id_MBMSUELinking, "id-MBMSUELinking" }, { id_MBMSRegistration, "id-MBMSRegistration" }, { id_MBMSCNDe_Registration_Procedure, "id-MBMSCNDe-Registration-Procedure" }, { id_MBMSRABEstablishmentIndication, "id-MBMSRABEstablishmentIndication" }, { id_MBMSRABRelease, "id-MBMSRABRelease" }, { id_enhancedRelocationComplete, "id-enhancedRelocationComplete" }, { id_enhancedRelocationCompleteConfirm, "id-enhancedRelocationCompleteConfirm" }, { id_RANAPenhancedRelocation, "id-RANAPenhancedRelocation" }, { id_SRVCCPreparation, "id-SRVCCPreparation" }, { 0, NULL } }; static value_string_ext ranap_ProcedureCode_vals_ext = VALUE_STRING_EXT_INIT(ranap_ProcedureCode_vals); static int dissect_ranap_ProcedureCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, &ProcedureCode, FALSE); #line 92 "../../asn1/ranap/ranap.cnf" col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", val_to_str_ext_const(ProcedureCode, &ranap_ProcedureCode_vals_ext, "unknown message")); return offset; } static int dissect_ranap_ProtocolExtensionID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, &ProtocolExtensionID, FALSE); return offset; } static const value_string ranap_ProtocolIE_ID_vals[] = { { id_AreaIdentity, "id-AreaIdentity" }, { id_Not_Used_1, "id-Not-Used-1" }, { id_Not_Used_2, "id-Not-Used-2" }, { id_CN_DomainIndicator, "id-CN-DomainIndicator" }, { id_Cause, "id-Cause" }, { id_ChosenEncryptionAlgorithm, "id-ChosenEncryptionAlgorithm" }, { id_ChosenIntegrityProtectionAlgorithm, "id-ChosenIntegrityProtectionAlgorithm" }, { id_ClassmarkInformation2, "id-ClassmarkInformation2" }, { id_ClassmarkInformation3, "id-ClassmarkInformation3" }, { id_CriticalityDiagnostics, "id-CriticalityDiagnostics" }, { id_DL_GTP_PDU_SequenceNumber, "id-DL-GTP-PDU-SequenceNumber" }, { id_EncryptionInformation, "id-EncryptionInformation" }, { id_IntegrityProtectionInformation, "id-IntegrityProtectionInformation" }, { id_IuTransportAssociation, "id-IuTransportAssociation" }, { id_L3_Information, "id-L3-Information" }, { id_LAI, "id-LAI" }, { id_NAS_PDU, "id-NAS-PDU" }, { id_NonSearchingIndication, "id-NonSearchingIndication" }, { id_NumberOfSteps, "id-NumberOfSteps" }, { id_OMC_ID, "id-OMC-ID" }, { id_OldBSS_ToNewBSS_Information, "id-OldBSS-ToNewBSS-Information" }, { id_PagingAreaID, "id-PagingAreaID" }, { id_PagingCause, "id-PagingCause" }, { id_PermanentNAS_UE_ID, "id-PermanentNAS-UE-ID" }, { id_RAB_ContextItem, "id-RAB-ContextItem" }, { id_RAB_ContextList, "id-RAB-ContextList" }, { id_RAB_DataForwardingItem, "id-RAB-DataForwardingItem" }, { id_RAB_DataForwardingItem_SRNS_CtxReq, "id-RAB-DataForwardingItem-SRNS-CtxReq" }, { id_RAB_DataForwardingList, "id-RAB-DataForwardingList" }, { id_RAB_DataForwardingList_SRNS_CtxReq, "id-RAB-DataForwardingList-SRNS-CtxReq" }, { id_RAB_DataVolumeReportItem, "id-RAB-DataVolumeReportItem" }, { id_RAB_DataVolumeReportList, "id-RAB-DataVolumeReportList" }, { id_RAB_DataVolumeReportRequestItem, "id-RAB-DataVolumeReportRequestItem" }, { id_RAB_DataVolumeReportRequestList, "id-RAB-DataVolumeReportRequestList" }, { id_RAB_FailedItem, "id-RAB-FailedItem" }, { id_RAB_FailedList, "id-RAB-FailedList" }, { id_RAB_ID, "id-RAB-ID" }, { id_RAB_QueuedItem, "id-RAB-QueuedItem" }, { id_RAB_QueuedList, "id-RAB-QueuedList" }, { id_RAB_ReleaseFailedList, "id-RAB-ReleaseFailedList" }, { id_RAB_ReleaseItem, "id-RAB-ReleaseItem" }, { id_RAB_ReleaseList, "id-RAB-ReleaseList" }, { id_RAB_ReleasedItem, "id-RAB-ReleasedItem" }, { id_RAB_ReleasedList, "id-RAB-ReleasedList" }, { id_RAB_ReleasedList_IuRelComp, "id-RAB-ReleasedList-IuRelComp" }, { id_RAB_RelocationReleaseItem, "id-RAB-RelocationReleaseItem" }, { id_RAB_RelocationReleaseList, "id-RAB-RelocationReleaseList" }, { id_RAB_SetupItem_RelocReq, "id-RAB-SetupItem-RelocReq" }, { id_RAB_SetupItem_RelocReqAck, "id-RAB-SetupItem-RelocReqAck" }, { id_RAB_SetupList_RelocReq, "id-RAB-SetupList-RelocReq" }, { id_RAB_SetupList_RelocReqAck, "id-RAB-SetupList-RelocReqAck" }, { id_RAB_SetupOrModifiedItem, "id-RAB-SetupOrModifiedItem" }, { id_RAB_SetupOrModifiedList, "id-RAB-SetupOrModifiedList" }, { id_RAB_SetupOrModifyItem, "id-RAB-SetupOrModifyItem" }, { id_RAB_SetupOrModifyList, "id-RAB-SetupOrModifyList" }, { id_RAC, "id-RAC" }, { id_RelocationType, "id-RelocationType" }, { id_RequestType, "id-RequestType" }, { id_SAI, "id-SAI" }, { id_SAPI, "id-SAPI" }, { id_SourceID, "id-SourceID" }, { id_Source_ToTarget_TransparentContainer, "id-Source-ToTarget-TransparentContainer" }, { id_TargetID, "id-TargetID" }, { id_Target_ToSource_TransparentContainer, "id-Target-ToSource-TransparentContainer" }, { id_TemporaryUE_ID, "id-TemporaryUE-ID" }, { id_TraceReference, "id-TraceReference" }, { id_TraceType, "id-TraceType" }, { id_TransportLayerAddress, "id-TransportLayerAddress" }, { id_TriggerID, "id-TriggerID" }, { id_UE_ID, "id-UE-ID" }, { id_UL_GTP_PDU_SequenceNumber, "id-UL-GTP-PDU-SequenceNumber" }, { id_RAB_FailedtoReportItem, "id-RAB-FailedtoReportItem" }, { id_RAB_FailedtoReportList, "id-RAB-FailedtoReportList" }, { id_Not_Used_73, "id-Not-Used-73" }, { id_Not_Used_74, "id-Not-Used-74" }, { id_KeyStatus, "id-KeyStatus" }, { id_DRX_CycleLengthCoefficient, "id-DRX-CycleLengthCoefficient" }, { id_IuSigConIdList, "id-IuSigConIdList" }, { id_IuSigConIdItem, "id-IuSigConIdItem" }, { id_IuSigConId, "id-IuSigConId" }, { id_DirectTransferInformationItem_RANAP_RelocInf, "id-DirectTransferInformationItem-RANAP-RelocInf" }, { id_DirectTransferInformationList_RANAP_RelocInf, "id-DirectTransferInformationList-RANAP-RelocInf" }, { id_RAB_ContextItem_RANAP_RelocInf, "id-RAB-ContextItem-RANAP-RelocInf" }, { id_RAB_ContextList_RANAP_RelocInf, "id-RAB-ContextList-RANAP-RelocInf" }, { id_RAB_ContextFailedtoTransferItem, "id-RAB-ContextFailedtoTransferItem" }, { id_RAB_ContextFailedtoTransferList, "id-RAB-ContextFailedtoTransferList" }, { id_GlobalRNC_ID, "id-GlobalRNC-ID" }, { id_RAB_ReleasedItem_IuRelComp, "id-RAB-ReleasedItem-IuRelComp" }, { id_MessageStructure, "id-MessageStructure" }, { id_Alt_RAB_Parameters, "id-Alt-RAB-Parameters" }, { id_Ass_RAB_Parameters, "id-Ass-RAB-Parameters" }, { id_RAB_ModifyList, "id-RAB-ModifyList" }, { id_RAB_ModifyItem, "id-RAB-ModifyItem" }, { id_TypeOfError, "id-TypeOfError" }, { id_BroadcastAssistanceDataDecipheringKeys, "id-BroadcastAssistanceDataDecipheringKeys" }, { id_LocationRelatedDataRequestType, "id-LocationRelatedDataRequestType" }, { id_GlobalCN_ID, "id-GlobalCN-ID" }, { id_LastKnownServiceArea, "id-LastKnownServiceArea" }, { id_SRB_TrCH_Mapping, "id-SRB-TrCH-Mapping" }, { id_InterSystemInformation_TransparentContainer, "id-InterSystemInformation-TransparentContainer" }, { id_NewBSS_To_OldBSS_Information, "id-NewBSS-To-OldBSS-Information" }, { id_Not_Used_101, "id-Not-Used-101" }, { id_Not_Used_102, "id-Not-Used-102" }, { id_SourceRNC_PDCP_context_info, "id-SourceRNC-PDCP-context-info" }, { id_InformationTransferID, "id-InformationTransferID" }, { id_SNA_Access_Information, "id-SNA-Access-Information" }, { id_ProvidedData, "id-ProvidedData" }, { id_GERAN_BSC_Container, "id-GERAN-BSC-Container" }, { id_GERAN_Classmark, "id-GERAN-Classmark" }, { id_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item, "id-GERAN-Iumode-RAB-Failed-RABAssgntResponse-Item" }, { id_GERAN_Iumode_RAB_FailedList_RABAssgntResponse, "id-GERAN-Iumode-RAB-FailedList-RABAssgntResponse" }, { id_VerticalAccuracyCode, "id-VerticalAccuracyCode" }, { id_ResponseTime, "id-ResponseTime" }, { id_PositioningPriority, "id-PositioningPriority" }, { id_ClientType, "id-ClientType" }, { id_LocationRelatedDataRequestTypeSpecificToGERANIuMode, "id-LocationRelatedDataRequestTypeSpecificToGERANIuMode" }, { id_SignallingIndication, "id-SignallingIndication" }, { id_hS_DSCH_MAC_d_Flow_ID, "id-hS-DSCH-MAC-d-Flow-ID" }, { id_UESBI_Iu, "id-UESBI-Iu" }, { id_PositionData, "id-PositionData" }, { id_PositionDataSpecificToGERANIuMode, "id-PositionDataSpecificToGERANIuMode" }, { id_CellLoadInformationGroup, "id-CellLoadInformationGroup" }, { id_AccuracyFulfilmentIndicator, "id-AccuracyFulfilmentIndicator" }, { id_InformationTransferType, "id-InformationTransferType" }, { id_TraceRecordingSessionInformation, "id-TraceRecordingSessionInformation" }, { id_TracePropagationParameters, "id-TracePropagationParameters" }, { id_InterSystemInformationTransferType, "id-InterSystemInformationTransferType" }, { id_SelectedPLMN_ID, "id-SelectedPLMN-ID" }, { id_RedirectionCompleted, "id-RedirectionCompleted" }, { id_RedirectionIndication, "id-RedirectionIndication" }, { id_NAS_SequenceNumber, "id-NAS-SequenceNumber" }, { id_RejectCauseValue, "id-RejectCauseValue" }, { id_APN, "id-APN" }, { id_CNMBMSLinkingInformation, "id-CNMBMSLinkingInformation" }, { id_DeltaRAListofIdleModeUEs, "id-DeltaRAListofIdleModeUEs" }, { id_FrequenceLayerConvergenceFlag, "id-FrequenceLayerConvergenceFlag" }, { id_InformationExchangeID, "id-InformationExchangeID" }, { id_InformationExchangeType, "id-InformationExchangeType" }, { id_InformationRequested, "id-InformationRequested" }, { id_InformationRequestType, "id-InformationRequestType" }, { id_IPMulticastAddress, "id-IPMulticastAddress" }, { id_JoinedMBMSBearerServicesList, "id-JoinedMBMSBearerServicesList" }, { id_LeftMBMSBearerServicesList, "id-LeftMBMSBearerServicesList" }, { id_MBMSBearerServiceType, "id-MBMSBearerServiceType" }, { id_MBMSCNDe_Registration, "id-MBMSCNDe-Registration" }, { id_MBMSServiceArea, "id-MBMSServiceArea" }, { id_MBMSSessionDuration, "id-MBMSSessionDuration" }, { id_MBMSSessionIdentity, "id-MBMSSessionIdentity" }, { id_PDP_TypeInformation, "id-PDP-TypeInformation" }, { id_RAB_Parameters, "id-RAB-Parameters" }, { id_RAListofIdleModeUEs, "id-RAListofIdleModeUEs" }, { id_MBMSRegistrationRequestType, "id-MBMSRegistrationRequestType" }, { id_SessionUpdateID, "id-SessionUpdateID" }, { id_TMGI, "id-TMGI" }, { id_TransportLayerInformation, "id-TransportLayerInformation" }, { id_UnsuccessfulLinkingList, "id-UnsuccessfulLinkingList" }, { id_MBMSLinkingInformation, "id-MBMSLinkingInformation" }, { id_MBMSSessionRepetitionNumber, "id-MBMSSessionRepetitionNumber" }, { id_AlternativeRABConfiguration, "id-AlternativeRABConfiguration" }, { id_AlternativeRABConfigurationRequest, "id-AlternativeRABConfigurationRequest" }, { id_E_DCH_MAC_d_Flow_ID, "id-E-DCH-MAC-d-Flow-ID" }, { id_SourceBSS_ToTargetBSS_TransparentContainer, "id-SourceBSS-ToTargetBSS-TransparentContainer" }, { id_TargetBSS_ToSourceBSS_TransparentContainer, "id-TargetBSS-ToSourceBSS-TransparentContainer" }, { id_TimeToMBMSDataTransfer, "id-TimeToMBMSDataTransfer" }, { id_IncludeVelocity, "id-IncludeVelocity" }, { id_VelocityEstimate, "id-VelocityEstimate" }, { id_RedirectAttemptFlag, "id-RedirectAttemptFlag" }, { id_RAT_Type, "id-RAT-Type" }, { id_PeriodicLocationInfo, "id-PeriodicLocationInfo" }, { id_MBMSCountingInformation, "id-MBMSCountingInformation" }, { id_170_not_to_be_used_for_IE_ids, "id-170-not-to-be-used-for-IE-ids" }, { id_ExtendedRNC_ID, "id-ExtendedRNC-ID" }, { id_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf, "id-Alt-RAB-Parameter-ExtendedGuaranteedBitrateInf" }, { id_Alt_RAB_Parameter_ExtendedMaxBitrateInf, "id-Alt-RAB-Parameter-ExtendedMaxBitrateInf" }, { id_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList, "id-Ass-RAB-Parameter-ExtendedGuaranteedBitrateList" }, { id_Ass_RAB_Parameter_ExtendedMaxBitrateList, "id-Ass-RAB-Parameter-ExtendedMaxBitrateList" }, { id_RAB_Parameter_ExtendedGuaranteedBitrateList, "id-RAB-Parameter-ExtendedGuaranteedBitrateList" }, { id_RAB_Parameter_ExtendedMaxBitrateList, "id-RAB-Parameter-ExtendedMaxBitrateList" }, { id_Requested_RAB_Parameter_ExtendedMaxBitrateList, "id-Requested-RAB-Parameter-ExtendedMaxBitrateList" }, { id_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList, "id-Requested-RAB-Parameter-ExtendedGuaranteedBitrateList" }, { id_LAofIdleModeUEs, "id-LAofIdleModeUEs" }, { id_newLAListofIdleModeUEs, "id-newLAListofIdleModeUEs" }, { id_LAListwithNoIdleModeUEsAnyMore, "id-LAListwithNoIdleModeUEsAnyMore" }, { id_183_not_to_be_used_for_IE_ids, "id-183-not-to-be-used-for-IE-ids" }, { id_GANSS_PositioningDataSet, "id-GANSS-PositioningDataSet" }, { id_RequestedGANSSAssistanceData, "id-RequestedGANSSAssistanceData" }, { id_BroadcastGANSSAssistanceDataDecipheringKeys, "id-BroadcastGANSSAssistanceDataDecipheringKeys" }, { id_d_RNTI_for_NoIuCSUP, "id-d-RNTI-for-NoIuCSUP" }, { id_RAB_SetupList_EnhancedRelocCompleteReq, "id-RAB-SetupList-EnhancedRelocCompleteReq" }, { id_RAB_SetupItem_EnhancedRelocCompleteReq, "id-RAB-SetupItem-EnhancedRelocCompleteReq" }, { id_RAB_SetupList_EnhancedRelocCompleteRes, "id-RAB-SetupList-EnhancedRelocCompleteRes" }, { id_RAB_SetupItem_EnhancedRelocCompleteRes, "id-RAB-SetupItem-EnhancedRelocCompleteRes" }, { id_RAB_SetupList_EnhRelocInfoReq, "id-RAB-SetupList-EnhRelocInfoReq" }, { id_RAB_SetupItem_EnhRelocInfoReq, "id-RAB-SetupItem-EnhRelocInfoReq" }, { id_RAB_SetupList_EnhRelocInfoRes, "id-RAB-SetupList-EnhRelocInfoRes" }, { id_RAB_SetupItem_EnhRelocInfoRes, "id-RAB-SetupItem-EnhRelocInfoRes" }, { id_OldIuSigConId, "id-OldIuSigConId" }, { id_RAB_FailedList_EnhRelocInfoRes, "id-RAB-FailedList-EnhRelocInfoRes" }, { id_RAB_FailedItem_EnhRelocInfoRes, "id-RAB-FailedItem-EnhRelocInfoRes" }, { id_Global_ENB_ID, "id-Global-ENB-ID" }, { id_UE_History_Information, "id-UE-History-Information" }, { id_MBMSSynchronisationInformation, "id-MBMSSynchronisationInformation" }, { id_SubscriberProfileIDforRFP, "id-SubscriberProfileIDforRFP" }, { id_CSG_Id, "id-CSG-Id" }, { id_OldIuSigConIdCS, "id-OldIuSigConIdCS" }, { id_OldIuSigConIdPS, "id-OldIuSigConIdPS" }, { id_GlobalCN_IDCS, "id-GlobalCN-IDCS" }, { id_GlobalCN_IDPS, "id-GlobalCN-IDPS" }, { id_SourceExtendedRNC_ID, "id-SourceExtendedRNC-ID" }, { id_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes, "id-RAB-ToBeReleasedItem-EnhancedRelocCompleteRes" }, { id_RAB_ToBeReleasedList_EnhancedRelocCompleteRes, "id-RAB-ToBeReleasedList-EnhancedRelocCompleteRes" }, { id_SourceRNC_ID, "id-SourceRNC-ID" }, { id_Relocation_TargetRNC_ID, "id-Relocation-TargetRNC-ID" }, { id_Relocation_TargetExtendedRNC_ID, "id-Relocation-TargetExtendedRNC-ID" }, { id_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf, "id-Alt-RAB-Parameter-SupportedGuaranteedBitrateInf" }, { id_Alt_RAB_Parameter_SupportedMaxBitrateInf, "id-Alt-RAB-Parameter-SupportedMaxBitrateInf" }, { id_Ass_RAB_Parameter_SupportedGuaranteedBitrateList, "id-Ass-RAB-Parameter-SupportedGuaranteedBitrateList" }, { id_Ass_RAB_Parameter_SupportedMaxBitrateList, "id-Ass-RAB-Parameter-SupportedMaxBitrateList" }, { id_RAB_Parameter_SupportedGuaranteedBitrateList, "id-RAB-Parameter-SupportedGuaranteedBitrateList" }, { id_RAB_Parameter_SupportedMaxBitrateList, "id-RAB-Parameter-SupportedMaxBitrateList" }, { id_Requested_RAB_Parameter_SupportedMaxBitrateList, "id-Requested-RAB-Parameter-SupportedMaxBitrateList" }, { id_Requested_RAB_Parameter_SupportedGuaranteedBitrateList, "id-Requested-RAB-Parameter-SupportedGuaranteedBitrateList" }, { id_Relocation_SourceRNC_ID, "id-Relocation-SourceRNC-ID" }, { id_Relocation_SourceExtendedRNC_ID, "id-Relocation-SourceExtendedRNC-ID" }, { id_EncryptionKey, "id-EncryptionKey" }, { id_IntegrityProtectionKey, "id-IntegrityProtectionKey" }, { id_SRVCC_HO_Indication, "id-SRVCC-HO-Indication" }, { id_SRVCC_Information, "id-SRVCC-Information" }, { id_SRVCC_Operation_Possible, "id-SRVCC-Operation-Possible" }, { id_CSG_Id_List, "id-CSG-Id-List" }, { id_PSRABtobeReplaced, "id-PSRABtobeReplaced" }, { id_E_UTRAN_Service_Handover, "id-E-UTRAN-Service-Handover" }, { id_Not_Used_232, "id-Not-Used-232" }, { id_UE_AggregateMaximumBitRate, "id-UE-AggregateMaximumBitRate" }, { id_CSG_Membership_Status, "id-CSG-Membership-Status" }, { id_Cell_Access_Mode, "id-Cell-Access-Mode" }, { id_IP_Source_Address, "id-IP-Source-Address" }, { id_CSFB_Information, "id-CSFB-Information" }, { id_PDP_TypeInformation_extension, "id-PDP-TypeInformation-extension" }, { id_MSISDN, "id-MSISDN" }, { id_Offload_RAB_Parameters, "id-Offload-RAB-Parameters" }, { id_LGW_TransportLayerAddress, "id-LGW-TransportLayerAddress" }, { id_Correlation_ID, "id-Correlation-ID" }, { id_IRAT_Measurement_Configuration, "id-IRAT-Measurement-Configuration" }, { id_MDT_Configuration, "id-MDT-Configuration" }, { id_Priority_Class_Indicator, "id-Priority-Class-Indicator" }, { id_Not_Used_246, "id-Not-Used-246" }, { id_RNSAPRelocationParameters, "id-RNSAPRelocationParameters" }, { id_RABParametersList, "id-RABParametersList" }, { id_Management_Based_MDT_Allowed, "id-Management-Based-MDT-Allowed" }, { id_HigherBitratesThan16MbpsFlag, "id-HigherBitratesThan16MbpsFlag" }, { id_Trace_Collection_Entity_IP_Addess, "id-Trace-Collection-Entity-IP-Addess" }, { id_End_Of_CSFB, "id-End-Of-CSFB" }, { 0, NULL } }; static value_string_ext ranap_ProtocolIE_ID_vals_ext = VALUE_STRING_EXT_INIT(ranap_ProtocolIE_ID_vals); static int dissect_ranap_ProtocolIE_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, &ProtocolIE_ID, FALSE); #line 76 "../../asn1/ranap/ranap.cnf" if (tree) { proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", val_to_str_ext(ProtocolIE_ID, &ranap_ProtocolIE_ID_vals_ext, "unknown (%d)")); } return offset; } static const value_string ranap_TriggeringMessage_vals[] = { { 0, "initiating-message" }, { 1, "successful-outcome" }, { 2, "unsuccessfull-outcome" }, { 3, "outcome" }, { 0, NULL } }; static int dissect_ranap_TriggeringMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 4, NULL, FALSE, 0, NULL); return offset; } static int dissect_ranap_T_ie_field_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_ProtocolIEFieldValue); return offset; } static const per_sequence_t ProtocolIE_Field_sequence[] = { { &hf_ranap_id , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_ID }, { &hf_ranap_criticality , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Criticality }, { &hf_ranap_ie_field_value, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_T_ie_field_value }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ProtocolIE_Field(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ProtocolIE_Field, ProtocolIE_Field_sequence); return offset; } static const per_sequence_t ProtocolIE_Container_sequence_of[1] = { { &hf_ranap_ProtocolIE_Container_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Field }, }; static int dissect_ranap_ProtocolIE_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_ProtocolIE_Container, ProtocolIE_Container_sequence_of, 0, maxProtocolIEs, FALSE); return offset; } static int dissect_ranap_T_firstValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_ProtocolIEFieldPairFirstValue); return offset; } static int dissect_ranap_T_secondValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_ProtocolIEFieldPairSecondValue); return offset; } static const per_sequence_t ProtocolIE_FieldPair_sequence[] = { { &hf_ranap_id , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_ID }, { &hf_ranap_firstCriticality, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Criticality }, { &hf_ranap_firstValue , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_T_firstValue }, { &hf_ranap_secondCriticality, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Criticality }, { &hf_ranap_secondValue , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_T_secondValue }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ProtocolIE_FieldPair(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ProtocolIE_FieldPair, ProtocolIE_FieldPair_sequence); return offset; } static const per_sequence_t ProtocolIE_ContainerPair_sequence_of[1] = { { &hf_ranap_ProtocolIE_ContainerPair_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_FieldPair }, }; static int dissect_ranap_ProtocolIE_ContainerPair(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_ProtocolIE_ContainerPair, ProtocolIE_ContainerPair_sequence_of, 0, maxProtocolIEs, FALSE); return offset; } static const per_sequence_t ProtocolIE_ContainerList_sequence_of[1] = { { &hf_ranap_ProtocolIE_ContainerList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, }; static int dissect_ranap_ProtocolIE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 116 "../../asn1/ranap/ranap.cnf" static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = { { "lowerBound", ASN1_PAR_INTEGER }, { "upperBound", ASN1_PAR_INTEGER }, { NULL, (asn1_par_type)0 } }; asn1_stack_frame_check(actx, "ProtocolIE-ContainerList", ProtocolIE_ContainerList_pars); offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_ProtocolIE_ContainerList, ProtocolIE_ContainerList_sequence_of, asn1_param_get_integer(actx,"lowerBound"), asn1_param_get_integer(actx,"upperBound"), FALSE); return offset; } static const per_sequence_t ProtocolIE_ContainerPairList_sequence_of[1] = { { &hf_ranap_ProtocolIE_ContainerPairList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_ContainerPair }, }; static int dissect_ranap_ProtocolIE_ContainerPairList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 132 "../../asn1/ranap/ranap.cnf" static const asn1_par_def_t ProtocolIE_ContainerPairList_pars[] = { { "lowerBound", ASN1_PAR_INTEGER }, { "upperBound", ASN1_PAR_INTEGER }, { NULL, (asn1_par_type)0 } }; asn1_stack_frame_check(actx, "ProtocolIE-ContainerPairList", ProtocolIE_ContainerPairList_pars); offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_ProtocolIE_ContainerPairList, ProtocolIE_ContainerPairList_sequence_of, asn1_param_get_integer(actx,"lowerBound"), asn1_param_get_integer(actx,"upperBound"), FALSE); return offset; } static int dissect_ranap_T_extensionValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_ProtocolExtensionFieldExtensionValue); return offset; } static const per_sequence_t ProtocolExtensionField_sequence[] = { { &hf_ranap_ext_id , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolExtensionID }, { &hf_ranap_criticality , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Criticality }, { &hf_ranap_extensionValue, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_T_extensionValue }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ProtocolExtensionField(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ProtocolExtensionField, ProtocolExtensionField_sequence); return offset; } static const per_sequence_t ProtocolExtensionContainer_sequence_of[1] = { { &hf_ranap_ProtocolExtensionContainer_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolExtensionField }, }; static int dissect_ranap_ProtocolExtensionContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_ProtocolExtensionContainer, ProtocolExtensionContainer_sequence_of, 1, maxProtocolExtensions, FALSE); return offset; } static int dissect_ranap_T_private_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_open_type(tvb, offset, actx, tree, hf_index, NULL); return offset; } static const per_sequence_t PrivateIE_Field_sequence[] = { { &hf_ranap_private_id , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PrivateIE_ID }, { &hf_ranap_criticality , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Criticality }, { &hf_ranap_private_value , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_T_private_value }, { NULL, 0, 0, NULL } }; static int dissect_ranap_PrivateIE_Field(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_PrivateIE_Field, PrivateIE_Field_sequence); return offset; } static const per_sequence_t PrivateIE_Container_sequence_of[1] = { { &hf_ranap_PrivateIE_Container_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PrivateIE_Field }, }; static int dissect_ranap_PrivateIE_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_PrivateIE_Container, PrivateIE_Container_sequence_of, 1, maxPrivateIEs, FALSE); return offset; } static const value_string ranap_AccuracyFulfilmentIndicator_vals[] = { { 0, "requested-Accuracy-Fulfilled" }, { 1, "requested-Accuracy-Not-Fulfilled" }, { 0, NULL } }; static int dissect_ranap_AccuracyFulfilmentIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_PriorityLevel_vals[] = { { 0, "spare" }, { 1, "highest" }, { 14, "lowest" }, { 15, "no-priority" }, { 0, NULL } }; static int dissect_ranap_PriorityLevel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 15U, NULL, FALSE); return offset; } static const value_string ranap_Pre_emptionCapability_vals[] = { { 0, "shall-not-trigger-pre-emption" }, { 1, "may-trigger-pre-emption" }, { 0, NULL } }; static int dissect_ranap_Pre_emptionCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static const value_string ranap_Pre_emptionVulnerability_vals[] = { { 0, "not-pre-emptable" }, { 1, "pre-emptable" }, { 0, NULL } }; static int dissect_ranap_Pre_emptionVulnerability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static const value_string ranap_QueuingAllowed_vals[] = { { 0, "queueing-not-allowed" }, { 1, "queueing-allowed" }, { 0, NULL } }; static int dissect_ranap_QueuingAllowed(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static const per_sequence_t AllocationOrRetentionPriority_sequence[] = { { &hf_ranap_priorityLevel , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_PriorityLevel }, { &hf_ranap_pre_emptionCapability, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Pre_emptionCapability }, { &hf_ranap_pre_emptionVulnerability, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Pre_emptionVulnerability }, { &hf_ranap_queuingAllowed, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_QueuingAllowed }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_AllocationOrRetentionPriority(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_AllocationOrRetentionPriority, AllocationOrRetentionPriority_sequence); return offset; } static const value_string ranap_Alt_RAB_Parameter_MaxBitrateType_vals[] = { { 0, "unspecified" }, { 1, "value-range" }, { 2, "discrete-values" }, { 0, NULL } }; static int dissect_ranap_Alt_RAB_Parameter_MaxBitrateType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 3, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_MaxBitrate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 16000000U, NULL, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_MaxBitrateList_sequence_of[1] = { { &hf_ranap_Alt_RAB_Parameter_MaxBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_MaxBitrate }, }; static int dissect_ranap_Alt_RAB_Parameter_MaxBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_MaxBitrateList, Alt_RAB_Parameter_MaxBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_MaxBitrates_sequence_of[1] = { { &hf_ranap_Alt_RAB_Parameter_MaxBitrates_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Alt_RAB_Parameter_MaxBitrateList }, }; static int dissect_ranap_Alt_RAB_Parameter_MaxBitrates(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_MaxBitrates, Alt_RAB_Parameter_MaxBitrates_sequence_of, 1, maxNrOfAltValues, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_MaxBitrateInf_sequence[] = { { &hf_ranap_altMaxBitrateType, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Alt_RAB_Parameter_MaxBitrateType }, { &hf_ranap_altMaxBitrates, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Alt_RAB_Parameter_MaxBitrates }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Alt_RAB_Parameter_MaxBitrateInf(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_MaxBitrateInf, Alt_RAB_Parameter_MaxBitrateInf_sequence); return offset; } static const value_string ranap_Alt_RAB_Parameter_GuaranteedBitrateType_vals[] = { { 0, "unspecified" }, { 1, "value-range" }, { 2, "discrete-values" }, { 0, NULL } }; static int dissect_ranap_Alt_RAB_Parameter_GuaranteedBitrateType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 3, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_GuaranteedBitrate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 16000000U, NULL, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_GuaranteedBitrateList_sequence_of[1] = { { &hf_ranap_Alt_RAB_Parameter_GuaranteedBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_GuaranteedBitrate }, }; static int dissect_ranap_Alt_RAB_Parameter_GuaranteedBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_GuaranteedBitrateList, Alt_RAB_Parameter_GuaranteedBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_GuaranteedBitrates_sequence_of[1] = { { &hf_ranap_Alt_RAB_Parameter_GuaranteedBitrates_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Alt_RAB_Parameter_GuaranteedBitrateList }, }; static int dissect_ranap_Alt_RAB_Parameter_GuaranteedBitrates(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_GuaranteedBitrates, Alt_RAB_Parameter_GuaranteedBitrates_sequence_of, 1, maxNrOfAltValues, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_GuaranteedBitrateInf_sequence[] = { { &hf_ranap_altGuaranteedBitrateType, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Alt_RAB_Parameter_GuaranteedBitrateType }, { &hf_ranap_altGuaranteedBitrates, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Alt_RAB_Parameter_GuaranteedBitrates }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Alt_RAB_Parameter_GuaranteedBitrateInf(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_GuaranteedBitrateInf, Alt_RAB_Parameter_GuaranteedBitrateInf_sequence); return offset; } static const per_sequence_t Alt_RAB_Parameters_sequence[] = { { &hf_ranap_altMaxBitrateInf, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Alt_RAB_Parameter_MaxBitrateInf }, { &hf_ranap_altGuaranteedBitRateInf, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Alt_RAB_Parameter_GuaranteedBitrateInf }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Alt_RAB_Parameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameters, Alt_RAB_Parameters_sequence); return offset; } static int dissect_ranap_ExtendedGuaranteedBitrate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 16000001U, 256000000U, NULL, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_ExtendedGuaranteedBitrateList_sequence_of[1] = { { &hf_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ExtendedGuaranteedBitrate }, }; static int dissect_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateList, Alt_RAB_Parameter_ExtendedGuaranteedBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_ExtendedGuaranteedBitrates_sequence_of[1] = { { &hf_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrates_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateList }, }; static int dissect_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrates(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrates, Alt_RAB_Parameter_ExtendedGuaranteedBitrates_sequence_of, 1, maxNrOfAltValues, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf_sequence[] = { { &hf_ranap_altExtendedGuaranteedBitrateType, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Alt_RAB_Parameter_GuaranteedBitrateType }, { &hf_ranap_altExtendedGuaranteedBitrates, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrates }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf, Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf_sequence); return offset; } static int dissect_ranap_SupportedBitrate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 1000000000U, NULL, TRUE); return offset; } static const per_sequence_t SupportedRAB_ParameterBitrateList_sequence_of[1] = { { &hf_ranap_SupportedRAB_ParameterBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_SupportedBitrate }, }; static int dissect_ranap_SupportedRAB_ParameterBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_SupportedRAB_ParameterBitrateList, SupportedRAB_ParameterBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_SupportedGuaranteedBitrates_sequence_of[1] = { { &hf_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrates_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_SupportedRAB_ParameterBitrateList }, }; static int dissect_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrates(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrates, Alt_RAB_Parameter_SupportedGuaranteedBitrates_sequence_of, 1, maxNrOfAltValues, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_SupportedGuaranteedBitrateInf_sequence[] = { { &hf_ranap_altSupportedGuaranteedBitrateType, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Alt_RAB_Parameter_GuaranteedBitrateType }, { &hf_ranap_altSupportedGuaranteedBitrates, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrates }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf, Alt_RAB_Parameter_SupportedGuaranteedBitrateInf_sequence); return offset; } static int dissect_ranap_ExtendedMaxBitrate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 16000001U, 256000000U, NULL, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_ExtendedMaxBitrateList_sequence_of[1] = { { &hf_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ExtendedMaxBitrate }, }; static int dissect_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateList, Alt_RAB_Parameter_ExtendedMaxBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_ExtendedMaxBitrates_sequence_of[1] = { { &hf_ranap_Alt_RAB_Parameter_ExtendedMaxBitrates_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateList }, }; static int dissect_ranap_Alt_RAB_Parameter_ExtendedMaxBitrates(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_ExtendedMaxBitrates, Alt_RAB_Parameter_ExtendedMaxBitrates_sequence_of, 1, maxNrOfAltValues, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_ExtendedMaxBitrateInf_sequence[] = { { &hf_ranap_altExtendedMaxBitrateType, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Alt_RAB_Parameter_MaxBitrateType }, { &hf_ranap_altExtendedMaxBitrates, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Alt_RAB_Parameter_ExtendedMaxBitrates }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateInf(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateInf, Alt_RAB_Parameter_ExtendedMaxBitrateInf_sequence); return offset; } static const per_sequence_t Alt_RAB_Parameter_SupportedMaxBitrates_sequence_of[1] = { { &hf_ranap_Alt_RAB_Parameter_SupportedMaxBitrates_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_SupportedRAB_ParameterBitrateList }, }; static int dissect_ranap_Alt_RAB_Parameter_SupportedMaxBitrates(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_SupportedMaxBitrates, Alt_RAB_Parameter_SupportedMaxBitrates_sequence_of, 1, maxNrOfAltValues, FALSE); return offset; } static const per_sequence_t Alt_RAB_Parameter_SupportedMaxBitrateInf_sequence[] = { { &hf_ranap_altSupportedMaxBitrateType, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Alt_RAB_Parameter_MaxBitrateType }, { &hf_ranap_altSupportedMaxBitrates, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Alt_RAB_Parameter_SupportedMaxBitrates }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Alt_RAB_Parameter_SupportedMaxBitrateInf(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Alt_RAB_Parameter_SupportedMaxBitrateInf, Alt_RAB_Parameter_SupportedMaxBitrateInf_sequence); return offset; } static const value_string ranap_AlternativeRABConfigurationRequest_vals[] = { { 0, "alternative-RAB-configuration-Requested" }, { 0, NULL } }; static int dissect_ranap_AlternativeRABConfigurationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_APN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 255, FALSE, NULL); return offset; } static int dissect_ranap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 279 "../../asn1/ranap/ranap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 3, FALSE, &parameter_tvb); if (!parameter_tvb) return offset; dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, tree, 0, FALSE); return offset; } static int dissect_ranap_LAC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 2, 2, FALSE, NULL); return offset; } static int dissect_ranap_SAC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 2, 2, FALSE, NULL); return offset; } static const per_sequence_t SAI_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_lAC , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_LAC }, { &hf_ranap_sAC , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_SAC }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SAI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SAI, SAI_sequence); return offset; } static const value_string ranap_T_latitudeSign_vals[] = { { 0, "north" }, { 1, "south" }, { 0, NULL } }; static int dissect_ranap_T_latitudeSign(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static int dissect_ranap_INTEGER_0_8388607(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 8388607U, NULL, FALSE); return offset; } static int dissect_ranap_INTEGER_M8388608_8388607(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, -8388608, 8388607U, NULL, FALSE); return offset; } static const per_sequence_t GeographicalCoordinates_sequence[] = { { &hf_ranap_latitudeSign , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_T_latitudeSign }, { &hf_ranap_latitude , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_8388607 }, { &hf_ranap_longitude , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_M8388608_8388607 }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GeographicalCoordinates(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GeographicalCoordinates, GeographicalCoordinates_sequence); return offset; } static const per_sequence_t GA_Point_sequence[] = { { &hf_ranap_geographicalCoordinates, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GeographicalCoordinates }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GA_Point(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GA_Point, GA_Point_sequence); return offset; } static int dissect_ranap_INTEGER_0_127(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 127U, NULL, FALSE); return offset; } static const per_sequence_t GA_PointWithUnCertainty_sequence[] = { { &hf_ranap_geographicalCoordinates, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_GeographicalCoordinates }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { &hf_ranap_uncertaintyCode, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_127 }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GA_PointWithUnCertainty(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GA_PointWithUnCertainty, GA_PointWithUnCertainty_sequence); return offset; } static const per_sequence_t GA_Polygon_item_sequence[] = { { &hf_ranap_geographicalCoordinates, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GeographicalCoordinates }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GA_Polygon_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GA_Polygon_item, GA_Polygon_item_sequence); return offset; } static const per_sequence_t GA_Polygon_sequence_of[1] = { { &hf_ranap_GA_Polygon_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_GA_Polygon_item }, }; static int dissect_ranap_GA_Polygon(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_GA_Polygon, GA_Polygon_sequence_of, 1, maxNrOfPoints, FALSE); return offset; } static int dissect_ranap_INTEGER_0_179(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 179U, NULL, FALSE); return offset; } static const per_sequence_t GA_UncertaintyEllipse_sequence[] = { { &hf_ranap_uncertaintySemi_major, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_127 }, { &hf_ranap_uncertaintySemi_minor, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_127 }, { &hf_ranap_orientationOfMajorAxis, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_179 }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GA_UncertaintyEllipse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GA_UncertaintyEllipse, GA_UncertaintyEllipse_sequence); return offset; } static const per_sequence_t GA_PointWithUnCertaintyEllipse_sequence[] = { { &hf_ranap_geographicalCoordinates, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GeographicalCoordinates }, { &hf_ranap_uncertaintyEllipse, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GA_UncertaintyEllipse }, { &hf_ranap_confidence , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_127 }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GA_PointWithUnCertaintyEllipse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GA_PointWithUnCertaintyEllipse, GA_PointWithUnCertaintyEllipse_sequence); return offset; } static const value_string ranap_T_directionOfAltitude_vals[] = { { 0, "height" }, { 1, "depth" }, { 0, NULL } }; static int dissect_ranap_T_directionOfAltitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static int dissect_ranap_INTEGER_0_32767(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 32767U, NULL, FALSE); return offset; } static const per_sequence_t GA_AltitudeAndDirection_sequence[] = { { &hf_ranap_directionOfAltitude, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_T_directionOfAltitude }, { &hf_ranap_altitude , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_32767 }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GA_AltitudeAndDirection(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GA_AltitudeAndDirection, GA_AltitudeAndDirection_sequence); return offset; } static const per_sequence_t GA_PointWithAltitude_sequence[] = { { &hf_ranap_geographicalCoordinates, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GeographicalCoordinates }, { &hf_ranap_altitudeAndDirection, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GA_AltitudeAndDirection }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GA_PointWithAltitude(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GA_PointWithAltitude, GA_PointWithAltitude_sequence); return offset; } static const per_sequence_t GA_PointWithAltitudeAndUncertaintyEllipsoid_sequence[] = { { &hf_ranap_geographicalCoordinates, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GeographicalCoordinates }, { &hf_ranap_altitudeAndDirection, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GA_AltitudeAndDirection }, { &hf_ranap_uncertaintyEllipse, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GA_UncertaintyEllipse }, { &hf_ranap_uncertaintyAltitude, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_127 }, { &hf_ranap_confidence , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_127 }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GA_PointWithAltitudeAndUncertaintyEllipsoid(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GA_PointWithAltitudeAndUncertaintyEllipsoid, GA_PointWithAltitudeAndUncertaintyEllipsoid_sequence); return offset; } static const per_sequence_t GA_EllipsoidArc_sequence[] = { { &hf_ranap_geographicalCoordinates, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GeographicalCoordinates }, { &hf_ranap_innerRadius , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_65535 }, { &hf_ranap_uncertaintyRadius, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_127 }, { &hf_ranap_offsetAngle , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_179 }, { &hf_ranap_includedAngle , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_179 }, { &hf_ranap_confidence , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_127 }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GA_EllipsoidArc(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GA_EllipsoidArc, GA_EllipsoidArc_sequence); return offset; } static const value_string ranap_GeographicalArea_vals[] = { { 0, "point" }, { 1, "pointWithUnCertainty" }, { 2, "polygon" }, { 3, "pointWithUncertaintyEllipse" }, { 4, "pointWithAltitude" }, { 5, "pointWithAltitudeAndUncertaintyEllipsoid" }, { 6, "ellipsoidArc" }, { 0, NULL } }; static const per_choice_t GeographicalArea_choice[] = { { 0, &hf_ranap_point , ASN1_EXTENSION_ROOT , dissect_ranap_GA_Point }, { 1, &hf_ranap_pointWithUnCertainty, ASN1_EXTENSION_ROOT , dissect_ranap_GA_PointWithUnCertainty }, { 2, &hf_ranap_polygon , ASN1_EXTENSION_ROOT , dissect_ranap_GA_Polygon }, { 3, &hf_ranap_pointWithUncertaintyEllipse, ASN1_NOT_EXTENSION_ROOT, dissect_ranap_GA_PointWithUnCertaintyEllipse }, { 4, &hf_ranap_pointWithAltitude, ASN1_NOT_EXTENSION_ROOT, dissect_ranap_GA_PointWithAltitude }, { 5, &hf_ranap_pointWithAltitudeAndUncertaintyEllipsoid, ASN1_NOT_EXTENSION_ROOT, dissect_ranap_GA_PointWithAltitudeAndUncertaintyEllipsoid }, { 6, &hf_ranap_ellipsoidArc , ASN1_NOT_EXTENSION_ROOT, dissect_ranap_GA_EllipsoidArc }, { 0, NULL, 0, NULL } }; static int dissect_ranap_GeographicalArea(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_GeographicalArea, GeographicalArea_choice, NULL); return offset; } static const value_string ranap_AreaIdentity_vals[] = { { 0, "sAI" }, { 1, "geographicalArea" }, { 0, NULL } }; static const per_choice_t AreaIdentity_choice[] = { { 0, &hf_ranap_sAI , ASN1_EXTENSION_ROOT , dissect_ranap_SAI }, { 1, &hf_ranap_geographicalArea, ASN1_EXTENSION_ROOT , dissect_ranap_GeographicalArea }, { 0, NULL, 0, NULL } }; static int dissect_ranap_AreaIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_AreaIdentity, AreaIdentity_choice, NULL); return offset; } static const per_sequence_t Ass_RAB_Parameter_MaxBitrateList_sequence_of[1] = { { &hf_ranap_Ass_RAB_Parameter_MaxBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_MaxBitrate }, }; static int dissect_ranap_Ass_RAB_Parameter_MaxBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Ass_RAB_Parameter_MaxBitrateList, Ass_RAB_Parameter_MaxBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Ass_RAB_Parameter_GuaranteedBitrateList_sequence_of[1] = { { &hf_ranap_Ass_RAB_Parameter_GuaranteedBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_GuaranteedBitrate }, }; static int dissect_ranap_Ass_RAB_Parameter_GuaranteedBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Ass_RAB_Parameter_GuaranteedBitrateList, Ass_RAB_Parameter_GuaranteedBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Ass_RAB_Parameters_sequence[] = { { &hf_ranap_assMaxBitrateInf, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Ass_RAB_Parameter_MaxBitrateList }, { &hf_ranap_assGuaranteedBitRateInf, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Ass_RAB_Parameter_GuaranteedBitrateList }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Ass_RAB_Parameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Ass_RAB_Parameters, Ass_RAB_Parameters_sequence); return offset; } static const per_sequence_t Ass_RAB_Parameter_ExtendedGuaranteedBitrateList_sequence_of[1] = { { &hf_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ExtendedGuaranteedBitrate }, }; static int dissect_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList, Ass_RAB_Parameter_ExtendedGuaranteedBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Ass_RAB_Parameter_ExtendedMaxBitrateList_sequence_of[1] = { { &hf_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ExtendedMaxBitrate }, }; static int dissect_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList, Ass_RAB_Parameter_ExtendedMaxBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static int dissect_ranap_SNAC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, NULL, FALSE); return offset; } static const per_sequence_t AuthorisedSNAs_sequence_of[1] = { { &hf_ranap_AuthorisedSNAs_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_SNAC }, }; static int dissect_ranap_AuthorisedSNAs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_AuthorisedSNAs, AuthorisedSNAs_sequence_of, 1, maxNrOfSNAs, FALSE); return offset; } static const per_sequence_t AuthorisedPLMNs_item_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_authorisedSNAsList, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_AuthorisedSNAs }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_AuthorisedPLMNs_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_AuthorisedPLMNs_item, AuthorisedPLMNs_item_sequence); return offset; } static const per_sequence_t AuthorisedPLMNs_sequence_of[1] = { { &hf_ranap_AuthorisedPLMNs_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_AuthorisedPLMNs_item }, }; static int dissect_ranap_AuthorisedPLMNs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_AuthorisedPLMNs, AuthorisedPLMNs_sequence_of, 1, maxNrOfPLMNsSN, FALSE); return offset; } static int dissect_ranap_BindingID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 4, 4, FALSE, NULL); return offset; } static int dissect_ranap_BIT_STRING_SIZE_1(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 1, 1, FALSE, NULL, NULL); return offset; } static int dissect_ranap_BIT_STRING_SIZE_56(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 56, 56, FALSE, NULL, NULL); return offset; } static const per_sequence_t BroadcastAssistanceDataDecipheringKeys_sequence[] = { { &hf_ranap_cipheringKeyFlag, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_BIT_STRING_SIZE_1 }, { &hf_ranap_currentDecipheringKey, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_BIT_STRING_SIZE_56 }, { &hf_ranap_nextDecipheringKey, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_BIT_STRING_SIZE_56 }, { NULL, 0, 0, NULL } }; static int dissect_ranap_BroadcastAssistanceDataDecipheringKeys(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_BroadcastAssistanceDataDecipheringKeys, BroadcastAssistanceDataDecipheringKeys_sequence); return offset; } static const value_string ranap_CauseRadioNetwork_vals[] = { { 1, "rab-pre-empted" }, { 2, "trelocoverall-expiry" }, { 3, "trelocprep-expiry" }, { 4, "treloccomplete-expiry" }, { 5, "tqueing-expiry" }, { 6, "relocation-triggered" }, { 7, "trellocalloc-expiry" }, { 8, "unable-to-establish-during-relocation" }, { 9, "unknown-target-rnc" }, { 10, "relocation-cancelled" }, { 11, "successful-relocation" }, { 12, "requested-ciphering-and-or-integrity-protection-algorithms-not-supported" }, { 13, "conflict-with-already-existing-integrity-protection-and-or-ciphering-information" }, { 14, "failure-in-the-radio-interface-procedure" }, { 15, "release-due-to-utran-generated-reason" }, { 16, "user-inactivity" }, { 17, "time-critical-relocation" }, { 18, "requested-traffic-class-not-available" }, { 19, "invalid-rab-parameters-value" }, { 20, "requested-maximum-bit-rate-not-available" }, { 21, "requested-guaranteed-bit-rate-not-available" }, { 22, "requested-transfer-delay-not-achievable" }, { 23, "invalid-rab-parameters-combination" }, { 24, "condition-violation-for-sdu-parameters" }, { 25, "condition-violation-for-traffic-handling-priority" }, { 26, "condition-violation-for-guaranteed-bit-rate" }, { 27, "user-plane-versions-not-supported" }, { 28, "iu-up-failure" }, { 29, "relocation-failure-in-target-CN-RNC-or-target-system" }, { 30, "invalid-RAB-ID" }, { 31, "no-remaining-rab" }, { 32, "interaction-with-other-procedure" }, { 33, "requested-maximum-bit-rate-for-dl-not-available" }, { 34, "requested-maximum-bit-rate-for-ul-not-available" }, { 35, "requested-guaranteed-bit-rate-for-dl-not-available" }, { 36, "requested-guaranteed-bit-rate-for-ul-not-available" }, { 37, "repeated-integrity-checking-failure" }, { 38, "requested-request-type-not-supported" }, { 39, "request-superseded" }, { 40, "release-due-to-UE-generated-signalling-connection-release" }, { 41, "resource-optimisation-relocation" }, { 42, "requested-information-not-available" }, { 43, "relocation-desirable-for-radio-reasons" }, { 44, "relocation-not-supported-in-target-RNC-or-target-system" }, { 45, "directed-retry" }, { 46, "radio-connection-with-UE-Lost" }, { 47, "rNC-unable-to-establish-all-RFCs" }, { 48, "deciphering-keys-not-available" }, { 49, "dedicated-assistance-data-not-available" }, { 50, "relocation-target-not-allowed" }, { 51, "location-reporting-congestion" }, { 52, "reduce-load-in-serving-cell" }, { 53, "no-radio-resources-available-in-target-cell" }, { 54, "gERAN-Iumode-failure" }, { 55, "access-restricted-due-to-shared-networks" }, { 56, "incoming-relocation-not-supported-due-to-PUESBINE-feature" }, { 57, "traffic-load-in-the-target-cell-higher-than-in-the-source-cell" }, { 58, "mBMS-no-multicast-service-for-this-UE" }, { 59, "mBMS-unknown-UE-ID" }, { 60, "successful-MBMS-session-start-no-data-bearer-necessary" }, { 61, "mBMS-superseded-due-to-NNSF" }, { 62, "mBMS-UE-linking-already-done" }, { 63, "mBMS-UE-de-linking-failure-no-existing-UE-linking" }, { 64, "tMGI-unknown" }, { 0, NULL } }; static value_string_ext ranap_CauseRadioNetwork_vals_ext = VALUE_STRING_EXT_INIT(ranap_CauseRadioNetwork_vals); static int dissect_ranap_CauseRadioNetwork(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 64U, NULL, FALSE); return offset; } static const value_string ranap_CauseTransmissionNetwork_vals[] = { { 65, "signalling-transport-resource-failure" }, { 66, "iu-transport-connection-failed-to-establish" }, { 0, NULL } }; static int dissect_ranap_CauseTransmissionNetwork(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 65U, 80U, NULL, FALSE); return offset; } static const value_string ranap_CauseNAS_vals[] = { { 81, "user-restriction-start-indication" }, { 82, "user-restriction-end-indication" }, { 83, "normal-release" }, { 84, "csg-subscription-expiry" }, { 0, NULL } }; static int dissect_ranap_CauseNAS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 81U, 96U, NULL, FALSE); return offset; } static const value_string ranap_CauseProtocol_vals[] = { { 97, "transfer-syntax-error" }, { 98, "semantic-error" }, { 99, "message-not-compatible-with-receiver-state" }, { 100, "abstract-syntax-error-reject" }, { 101, "abstract-syntax-error-ignore-and-notify" }, { 102, "abstract-syntax-error-falsely-constructed-message" }, { 0, NULL } }; static int dissect_ranap_CauseProtocol(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 97U, 112U, NULL, FALSE); return offset; } static const value_string ranap_CauseMisc_vals[] = { { 113, "om-intervention" }, { 114, "no-resource-available" }, { 115, "unspecified-failure" }, { 116, "network-optimisation" }, { 0, NULL } }; static int dissect_ranap_CauseMisc(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 113U, 128U, NULL, FALSE); return offset; } static int dissect_ranap_CauseNon_Standard(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 129U, 256U, NULL, FALSE); return offset; } static const value_string ranap_CauseRadioNetworkExtension_vals[] = { { 257, "iP-multicast-address-and-APN-not-valid" }, { 258, "mBMS-de-registration-rejected-due-to-implicit-registration" }, { 259, "mBMS-request-superseded" }, { 260, "mBMS-de-registration-during-session-not-allowed" }, { 261, "mBMS-no-data-bearer-necessary" }, { 262, "periodicLocationInformationNotAvailable" }, { 263, "gTP-Resources-Unavailable" }, { 264, "tMGI-inUse-overlapping-MBMS-service-area" }, { 265, "mBMS-no-cell-in-MBMS-service-area" }, { 266, "no-Iu-CS-UP-relocation" }, { 267, "successful-MBMS-Session-Start-IP-Multicast-Bearer-established" }, { 268, "cS-fallback-triggered" }, { 269, "invalid-CSG-Id" }, { 0, NULL } }; static int dissect_ranap_CauseRadioNetworkExtension(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 257U, 512U, NULL, FALSE); return offset; } static const value_string ranap_Cause_vals[] = { { 0, "radioNetwork" }, { 1, "transmissionNetwork" }, { 2, "nAS" }, { 3, "protocol" }, { 4, "misc" }, { 5, "non-Standard" }, { 6, "radioNetworkExtension" }, { 0, NULL } }; static const per_choice_t Cause_choice[] = { { 0, &hf_ranap_radioNetwork , ASN1_EXTENSION_ROOT , dissect_ranap_CauseRadioNetwork }, { 1, &hf_ranap_transmissionNetwork, ASN1_EXTENSION_ROOT , dissect_ranap_CauseTransmissionNetwork }, { 2, &hf_ranap_nAS , ASN1_EXTENSION_ROOT , dissect_ranap_CauseNAS }, { 3, &hf_ranap_protocol , ASN1_EXTENSION_ROOT , dissect_ranap_CauseProtocol }, { 4, &hf_ranap_misc , ASN1_EXTENSION_ROOT , dissect_ranap_CauseMisc }, { 5, &hf_ranap_non_Standard , ASN1_EXTENSION_ROOT , dissect_ranap_CauseNon_Standard }, { 6, &hf_ranap_radioNetworkExtension, ASN1_NOT_EXTENSION_ROOT, dissect_ranap_CauseRadioNetworkExtension }, { 0, NULL, 0, NULL } }; static int dissect_ranap_Cause(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_Cause, Cause_choice, NULL); return offset; } static const value_string ranap_Cell_Access_Mode_vals[] = { { 0, "hybrid" }, { 0, NULL } }; static int dissect_ranap_Cell_Access_Mode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_Cell_Id(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 268435455U, NULL, FALSE); return offset; } static const per_sequence_t CellIdList_sequence_of[1] = { { &hf_ranap_CellIdList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Cell_Id }, }; static int dissect_ranap_CellIdList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_CellIdList, CellIdList_sequence_of, 1, maxNrOfCellIds, FALSE); return offset; } static const per_sequence_t CellBased_sequence[] = { { &hf_ranap_cellIdList , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_CellIdList }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_CellBased(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_CellBased, CellBased_sequence); return offset; } static int dissect_ranap_Cell_Capacity_Class_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 100U, NULL, TRUE); return offset; } static int dissect_ranap_LoadValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 100U, NULL, FALSE); return offset; } static int dissect_ranap_RTLoadValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 100U, NULL, FALSE); return offset; } static int dissect_ranap_NRTLoadInformationValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 3U, NULL, FALSE); return offset; } static const per_sequence_t CellLoadInformation_sequence[] = { { &hf_ranap_cell_Capacity_Class_Value, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Cell_Capacity_Class_Value }, { &hf_ranap_loadValue , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_LoadValue }, { &hf_ranap_rTLoadValue , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RTLoadValue }, { &hf_ranap_nRTLoadInformationValue, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_NRTLoadInformationValue }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_CellLoadInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_CellLoadInformation, CellLoadInformation_sequence); return offset; } static int dissect_ranap_TargetCellId(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 268435455U, NULL, FALSE); return offset; } static const per_sequence_t SourceUTRANCellID_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_uTRANcellID , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_TargetCellId }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SourceUTRANCellID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SourceUTRANCellID, SourceUTRANCellID_sequence); return offset; } static int dissect_ranap_CI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 2, 2, FALSE, NULL); return offset; } static const per_sequence_t CGI_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_lAC , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_LAC }, { &hf_ranap_cI , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_CI }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_CGI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_CGI, CGI_sequence); return offset; } static const value_string ranap_SourceCellID_vals[] = { { 0, "sourceUTRANCellID" }, { 1, "sourceGERANCellID" }, { 0, NULL } }; static const per_choice_t SourceCellID_choice[] = { { 0, &hf_ranap_sourceUTRANCellID, ASN1_EXTENSION_ROOT , dissect_ranap_SourceUTRANCellID }, { 1, &hf_ranap_sourceGERANCellID, ASN1_EXTENSION_ROOT , dissect_ranap_CGI }, { 0, NULL, 0, NULL } }; static int dissect_ranap_SourceCellID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_SourceCellID, SourceCellID_choice, NULL); return offset; } static const per_sequence_t CellLoadInformationGroup_sequence[] = { { &hf_ranap_sourceCellID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_SourceCellID }, { &hf_ranap_uplinkCellLoadInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_CellLoadInformation }, { &hf_ranap_downlinkCellLoadInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_CellLoadInformation }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_CellLoadInformationGroup(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_CellLoadInformationGroup, CellLoadInformationGroup_sequence); return offset; } static const value_string ranap_ClientType_vals[] = { { 0, "emergency-Services" }, { 1, "value-Added-Services" }, { 2, "pLMN-Operator-Services" }, { 3, "lawful-Intercept-Services" }, { 4, "pLMN-Operator-Broadcast-Services" }, { 5, "pLMN-Operator-O-et-M" }, { 6, "pLMN-Operator-Anonymous-Statistics" }, { 7, "pLMN-Operator-Target-MS-Service-Support" }, { 0, NULL } }; static int dissect_ranap_ClientType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 8, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_RepetitionNumber0(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, NULL, FALSE); return offset; } static const per_sequence_t CriticalityDiagnostics_IE_List_item_sequence[] = { { &hf_ranap_iECriticality , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Criticality }, { &hf_ranap_iE_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_ID }, { &hf_ranap_repetitionNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RepetitionNumber0 }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_CriticalityDiagnostics_IE_List_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_CriticalityDiagnostics_IE_List_item, CriticalityDiagnostics_IE_List_item_sequence); return offset; } static const per_sequence_t CriticalityDiagnostics_IE_List_sequence_of[1] = { { &hf_ranap_CriticalityDiagnostics_IE_List_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_CriticalityDiagnostics_IE_List_item }, }; static int dissect_ranap_CriticalityDiagnostics_IE_List(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_CriticalityDiagnostics_IE_List, CriticalityDiagnostics_IE_List_sequence_of, 1, maxNrOfErrors, FALSE); return offset; } static const per_sequence_t CriticalityDiagnostics_sequence[] = { { &hf_ranap_procedureCode , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProcedureCode }, { &hf_ranap_triggeringMessage, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TriggeringMessage }, { &hf_ranap_procedureCriticality, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Criticality }, { &hf_ranap_iEsCriticalityDiagnostics, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_CriticalityDiagnostics_IE_List }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_CriticalityDiagnostics(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_CriticalityDiagnostics, CriticalityDiagnostics_sequence); return offset; } static int dissect_ranap_RepetitionNumber1(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 256U, NULL, FALSE); return offset; } static const per_sequence_t MessageStructure_item_sequence[] = { { &hf_ranap_iE_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_ID }, { &hf_ranap_item_repetitionNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RepetitionNumber1 }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MessageStructure_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MessageStructure_item, MessageStructure_item_sequence); return offset; } static const per_sequence_t MessageStructure_sequence_of[1] = { { &hf_ranap_MessageStructure_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_MessageStructure_item }, }; static int dissect_ranap_MessageStructure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_MessageStructure, MessageStructure_sequence_of, 1, maxNrOfLevels, FALSE); return offset; } static const value_string ranap_EncryptionAlgorithm_vals[] = { { 0, "no-encryption" }, { 1, "standard-UMTS-encryption-algorith-UEA1" }, { 2, "standard-UMTS-encryption-algorithm-UEA2" }, { 0, NULL } }; static int dissect_ranap_EncryptionAlgorithm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 15U, NULL, FALSE); return offset; } static int dissect_ranap_ChosenEncryptionAlgorithm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_EncryptionAlgorithm(tvb, offset, actx, tree, hf_index); return offset; } static const value_string ranap_IntegrityProtectionAlgorithm_vals[] = { { 0, "standard-UMTS-integrity-algorithm-UIA1" }, { 1, "standard-UMTS-integrity-algorithm-UIA2" }, { 15, "no-value" }, { 0, NULL } }; static int dissect_ranap_IntegrityProtectionAlgorithm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 15U, NULL, FALSE); return offset; } static int dissect_ranap_ChosenIntegrityProtectionAlgorithm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_IntegrityProtectionAlgorithm(tvb, offset, actx, tree, hf_index); return offset; } static int dissect_ranap_ClassmarkInformation2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static int dissect_ranap_ClassmarkInformation3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static const value_string ranap_CN_DomainIndicator_vals[] = { { 0, "cs-domain" }, { 1, "ps-domain" }, { 0, NULL } }; static int dissect_ranap_CN_DomainIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static int dissect_ranap_CN_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 4095U, NULL, FALSE); return offset; } static int dissect_ranap_Correlation_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 4, 4, FALSE, NULL); return offset; } static const value_string ranap_CSFB_Information_vals[] = { { 0, "csfb" }, { 1, "csfb-high-priority" }, { 0, NULL } }; static int dissect_ranap_CSFB_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_CSG_Id(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 27, 27, FALSE, NULL, NULL); return offset; } static const per_sequence_t CSG_Id_List_sequence_of[1] = { { &hf_ranap_CSG_Id_List_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_CSG_Id }, }; static int dissect_ranap_CSG_Id_List(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_CSG_Id_List, CSG_Id_List_sequence_of, 1, maxNrOfCSGs, FALSE); return offset; } static const value_string ranap_CSG_Membership_Status_vals[] = { { 0, "member" }, { 1, "non-member" }, { 0, NULL } }; static int dissect_ranap_CSG_Membership_Status(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_DataPDUType_vals[] = { { 0, "pDUtype0" }, { 1, "pDUtype1" }, { 0, NULL } }; static int dissect_ranap_DataPDUType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_DataVolumeReference(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, NULL, FALSE); return offset; } static const value_string ranap_DataVolumeReportingIndication_vals[] = { { 0, "do-report" }, { 1, "do-not-report" }, { 0, NULL } }; static int dissect_ranap_DataVolumeReportingIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static int dissect_ranap_DCH_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, NULL, FALSE); return offset; } static const value_string ranap_DeliveryOfErroneousSDU_vals[] = { { 0, "yes" }, { 1, "no" }, { 2, "no-error-detection-consideration" }, { 0, NULL } }; static int dissect_ranap_DeliveryOfErroneousSDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 3, NULL, FALSE, 0, NULL); return offset; } static const value_string ranap_DeliveryOrder_vals[] = { { 0, "delivery-order-requested" }, { 1, "delivery-order-not-requested" }, { 0, NULL } }; static int dissect_ranap_DeliveryOrder(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static int dissect_ranap_RAC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 1, FALSE, NULL); return offset; } static const per_sequence_t NewRAListofIdleModeUEs_sequence_of[1] = { { &hf_ranap_NewRAListofIdleModeUEs_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RAC }, }; static int dissect_ranap_NewRAListofIdleModeUEs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_NewRAListofIdleModeUEs, NewRAListofIdleModeUEs_sequence_of, 1, maxMBMSRA, FALSE); return offset; } static const per_sequence_t RAListwithNoIdleModeUEsAnyMore_sequence_of[1] = { { &hf_ranap_RAListwithNoIdleModeUEsAnyMore_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RAC }, }; static int dissect_ranap_RAListwithNoIdleModeUEsAnyMore(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RAListwithNoIdleModeUEsAnyMore, RAListwithNoIdleModeUEsAnyMore_sequence_of, 1, maxMBMSRA, FALSE); return offset; } static const per_sequence_t DeltaRAListofIdleModeUEs_sequence[] = { { &hf_ranap_newRAListofIdleModeUEs, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_NewRAListofIdleModeUEs }, { &hf_ranap_rAListwithNoIdleModeUEsAnyMore, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_RAListwithNoIdleModeUEsAnyMore }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_DeltaRAListofIdleModeUEs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_DeltaRAListofIdleModeUEs, DeltaRAListofIdleModeUEs_sequence); return offset; } static int dissect_ranap_DL_GTP_PDU_SequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, NULL, FALSE); return offset; } static int dissect_ranap_DL_N_PDU_SequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, NULL, FALSE); return offset; } static int dissect_ranap_D_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 1048575U, NULL, FALSE); return offset; } static int dissect_ranap_DRX_CycleLengthCoefficient(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 6U, 9U, NULL, FALSE); return offset; } static int dissect_ranap_DSCH_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, NULL, FALSE); return offset; } static int dissect_ranap_E_DCH_MAC_d_Flow_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, maxNrOfEDCHMACdFlows_1, NULL, FALSE); return offset; } static int dissect_ranap_BIT_STRING_SIZE_20(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 20, 20, FALSE, NULL, NULL); return offset; } static int dissect_ranap_BIT_STRING_SIZE_28(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 28, 28, FALSE, NULL, NULL); return offset; } static const value_string ranap_ENB_ID_vals[] = { { 0, "macroENB-ID" }, { 1, "homeENB-ID" }, { 0, NULL } }; static const per_choice_t ENB_ID_choice[] = { { 0, &hf_ranap_macroENB_ID , ASN1_EXTENSION_ROOT , dissect_ranap_BIT_STRING_SIZE_20 }, { 1, &hf_ranap_homeENB_ID , ASN1_EXTENSION_ROOT , dissect_ranap_BIT_STRING_SIZE_28 }, { 0, NULL, 0, NULL } }; static int dissect_ranap_ENB_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_ENB_ID, ENB_ID_choice, NULL); return offset; } static const per_sequence_t PermittedEncryptionAlgorithms_sequence_of[1] = { { &hf_ranap_PermittedEncryptionAlgorithms_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_EncryptionAlgorithm }, }; static int dissect_ranap_PermittedEncryptionAlgorithms(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_PermittedEncryptionAlgorithms, PermittedEncryptionAlgorithms_sequence_of, 1, 16, FALSE); return offset; } static int dissect_ranap_EncryptionKey(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 128, 128, FALSE, NULL, NULL); return offset; } static const per_sequence_t EncryptionInformation_sequence[] = { { &hf_ranap_permittedAlgorithms, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PermittedEncryptionAlgorithms }, { &hf_ranap_key , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_EncryptionKey }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; int dissect_ranap_EncryptionInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_EncryptionInformation, EncryptionInformation_sequence); return offset; } static const value_string ranap_End_Of_CSFB_vals[] = { { 0, "end-of-CSFB" }, { 0, NULL } }; static int dissect_ranap_End_Of_CSFB(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_IMEI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 8, 8, FALSE, NULL); return offset; } static const per_sequence_t IMEIList_sequence_of[1] = { { &hf_ranap_IMEIList_item , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_IMEI }, }; static int dissect_ranap_IMEIList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_IMEIList, IMEIList_sequence_of, 1, maxNrOfUEsToBeTraced, FALSE); return offset; } static int dissect_ranap_IMEISV(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 8, 8, FALSE, NULL); return offset; } static const per_sequence_t IMEISVList_sequence_of[1] = { { &hf_ranap_IMEISVList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_IMEISV }, }; static int dissect_ranap_IMEISVList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_IMEISVList, IMEISVList_sequence_of, 1, maxNrOfUEsToBeTraced, FALSE); return offset; } static int dissect_ranap_BIT_STRING_SIZE_7(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 7, 7, FALSE, NULL, NULL); return offset; } static const per_sequence_t IMEIGroup_sequence[] = { { &hf_ranap_iMEI , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_IMEI }, { &hf_ranap_iMEIMask , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_BIT_STRING_SIZE_7 }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_IMEIGroup(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_IMEIGroup, IMEIGroup_sequence); return offset; } static const per_sequence_t IMEISVGroup_sequence[] = { { &hf_ranap_iMEISV , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_IMEISV }, { &hf_ranap_iMEISVMask , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_BIT_STRING_SIZE_7 }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_IMEISVGroup(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_IMEISVGroup, IMEISVGroup_sequence); return offset; } static const value_string ranap_EquipmentsToBeTraced_vals[] = { { 0, "iMEIlist" }, { 1, "iMEISVlist" }, { 2, "iMEIgroup" }, { 3, "iMEISVgroup" }, { 0, NULL } }; static const per_choice_t EquipmentsToBeTraced_choice[] = { { 0, &hf_ranap_iMEIlist , ASN1_EXTENSION_ROOT , dissect_ranap_IMEIList }, { 1, &hf_ranap_iMEISVlist , ASN1_EXTENSION_ROOT , dissect_ranap_IMEISVList }, { 2, &hf_ranap_iMEIgroup , ASN1_EXTENSION_ROOT , dissect_ranap_IMEIGroup }, { 3, &hf_ranap_iMEISVgroup , ASN1_EXTENSION_ROOT , dissect_ranap_IMEISVGroup }, { 0, NULL, 0, NULL } }; static int dissect_ranap_EquipmentsToBeTraced(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_EquipmentsToBeTraced, EquipmentsToBeTraced_choice, NULL); return offset; } static const value_string ranap_E_UTRAN_Service_Handover_vals[] = { { 0, "handover-to-E-UTRAN-shall-not-be-performed" }, { 0, NULL } }; static int dissect_ranap_E_UTRAN_Service_Handover(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_Event_vals[] = { { 0, "stop-change-of-service-area" }, { 1, "direct" }, { 2, "change-of-servicearea" }, { 3, "stop-direct" }, { 4, "periodic" }, { 5, "stop-periodic" }, { 0, NULL } }; static int dissect_ranap_Event(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 3, NULL, TRUE, 3, NULL); return offset; } static const value_string ranap_MeasurementQuantity_vals[] = { { 0, "cpichEcNo" }, { 1, "cpichRSCP" }, { 2, "pathloss" }, { 0, NULL } }; static int dissect_ranap_MeasurementQuantity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 3, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_INTEGER_M120_165(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, -120, 165U, NULL, FALSE); return offset; } static const per_sequence_t Event1F_Parameters_sequence[] = { { &hf_ranap_measurementQuantity, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_MeasurementQuantity }, { &hf_ranap_threshold , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_M120_165 }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Event1F_Parameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Event1F_Parameters, Event1F_Parameters_sequence); return offset; } static int dissect_ranap_INTEGER_M120_M25(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, -120, -25, NULL, FALSE); return offset; } static const per_sequence_t Event1I_Parameters_sequence[] = { { &hf_ranap_threshold_01 , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_M120_M25 }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Event1I_Parameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Event1I_Parameters, Event1I_Parameters_sequence); return offset; } static int dissect_ranap_ExtendedRNC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 4096U, 65535U, NULL, FALSE); return offset; } static int dissect_ranap_FrameSequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 15U, NULL, FALSE); return offset; } static const value_string ranap_FrequenceLayerConvergenceFlag_vals[] = { { 0, "no-FLC-flag" }, { 0, NULL } }; static int dissect_ranap_FrequenceLayerConvergenceFlag(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_GANSS_PositioningMethodAndUsage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 1, FALSE, NULL); return offset; } static const per_sequence_t GANSS_PositioningDataSet_sequence_of[1] = { { &hf_ranap_GANSS_PositioningDataSet_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_GANSS_PositioningMethodAndUsage }, }; static int dissect_ranap_GANSS_PositioningDataSet(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_GANSS_PositioningDataSet, GANSS_PositioningDataSet_sequence_of, 1, maxGANSSSet, FALSE); return offset; } static int dissect_ranap_GERAN_BSC_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static const per_sequence_t LAI_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_lAC , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_LAC }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LAI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LAI, LAI_sequence); return offset; } static const per_sequence_t GERAN_Cell_ID_sequence[] = { { &hf_ranap_lAI , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_LAI }, { &hf_ranap_rAC , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RAC }, { &hf_ranap_cI , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_CI }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GERAN_Cell_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GERAN_Cell_ID, GERAN_Cell_ID_sequence); return offset; } static int dissect_ranap_GERAN_Classmark(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static const per_sequence_t GlobalCN_ID_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_cN_ID , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_CN_ID }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GlobalCN_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GlobalCN_ID, GlobalCN_ID_sequence); return offset; } static int dissect_ranap_RNC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 4095U, NULL, FALSE); return offset; } static const per_sequence_t GlobalRNC_ID_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_rNC_ID , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RNC_ID }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GlobalRNC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GlobalRNC_ID, GlobalRNC_ID_sequence); return offset; } static int dissect_ranap_GTP_TEI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 330 "../../asn1/ranap/ranap.cnf" tvbuff_t *parameter_tvb=NULL; int saved_hf; saved_hf = hf_index; hf_index = -1; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 4, 4, FALSE, &parameter_tvb); if (!parameter_tvb) return offset; proto_tree_add_item(tree, saved_hf, parameter_tvb, 0, 4, ENC_BIG_ENDIAN); return offset; } static const value_string ranap_HigherBitratesThan16MbpsFlag_vals[] = { { 0, "allowed" }, { 1, "not-allowed" }, { 0, NULL } }; static int dissect_ranap_HigherBitratesThan16MbpsFlag(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_HS_DSCH_MAC_d_Flow_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, maxNrOfHSDSCHMACdFlows_1, NULL, FALSE); return offset; } static int dissect_ranap_MeasurementsToActivate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 8, 8, FALSE, NULL, NULL); return offset; } static const value_string ranap_ReportInterval_vals[] = { { 0, "ms250" }, { 1, "ms500" }, { 2, "ms1000" }, { 3, "ms2000" }, { 4, "ms3000" }, { 5, "ms4000" }, { 6, "ms6000" }, { 7, "ms12000" }, { 8, "ms16000" }, { 9, "ms20000" }, { 10, "ms24000" }, { 11, "ms32000" }, { 12, "ms64000" }, { 0, NULL } }; static int dissect_ranap_ReportInterval(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 13, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_ReportAmount_vals[] = { { 0, "n1" }, { 1, "n2" }, { 2, "n4" }, { 3, "n8" }, { 4, "n16" }, { 5, "n32" }, { 6, "n64" }, { 7, "infinity" }, { 0, NULL } }; static int dissect_ranap_ReportAmount(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 8, NULL, TRUE, 0, NULL); return offset; } static const per_sequence_t MDT_Report_Parameters_sequence[] = { { &hf_ranap_reportInterval, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ReportInterval }, { &hf_ranap_reportAmount , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ReportAmount }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MDT_Report_Parameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MDT_Report_Parameters, MDT_Report_Parameters_sequence); return offset; } static const value_string ranap_M1Report_vals[] = { { 0, "periodic" }, { 1, "event1F" }, { 0, NULL } }; static const per_choice_t M1Report_choice[] = { { 0, &hf_ranap_periodic , ASN1_EXTENSION_ROOT , dissect_ranap_MDT_Report_Parameters }, { 1, &hf_ranap_event1F , ASN1_EXTENSION_ROOT , dissect_ranap_Event1F_Parameters }, { 0, NULL, 0, NULL } }; static int dissect_ranap_M1Report(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_M1Report, M1Report_choice, NULL); return offset; } static const value_string ranap_M2Report_vals[] = { { 0, "periodic" }, { 1, "event1I" }, { 0, NULL } }; static const per_choice_t M2Report_choice[] = { { 0, &hf_ranap_periodic , ASN1_EXTENSION_ROOT , dissect_ranap_MDT_Report_Parameters }, { 1, &hf_ranap_event1I , ASN1_EXTENSION_ROOT , dissect_ranap_Event1I_Parameters }, { 0, NULL, 0, NULL } }; static int dissect_ranap_M2Report(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_M2Report, M2Report_choice, NULL); return offset; } static const per_sequence_t ImmediateMDT_sequence[] = { { &hf_ranap_measurementsToActivate, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_MeasurementsToActivate }, { &hf_ranap_m1report , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_M1Report }, { &hf_ranap_m2report , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_M2Report }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ImmediateMDT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ImmediateMDT, ImmediateMDT_sequence); return offset; } static int dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 189 "../../asn1/ranap/ranap.cnf" tvbuff_t* imsi_tvb; const char *digit_str; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 8, FALSE, &imsi_tvb); if(!imsi_tvb) return offset; if ( actx->pinfo->sccp_info && actx->pinfo->sccp_info->data.co.assoc && ! actx->pinfo->sccp_info->data.co.assoc->calling_party ) { guint len = tvb_length(imsi_tvb); guint8* bytes = (guint8 *)tvb_memdup(wmem_packet_scope(),imsi_tvb,0,len); actx->pinfo->sccp_info->data.co.assoc->calling_party = wmem_strdup_printf(wmem_file_scope(), "IMSI: %s", bytes_to_ep_str(bytes, len) ); } digit_str = unpack_digits(imsi_tvb, 0); proto_tree_add_string(tree, hf_ranap_imsi_digits, imsi_tvb, 0, -1, digit_str); return offset; } static const value_string ranap_IncludeVelocity_vals[] = { { 0, "requested" }, { 0, NULL } }; static int dissect_ranap_IncludeVelocity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, FALSE, 0, NULL); return offset; } static int dissect_ranap_InformationExchangeID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 1048575U, NULL, FALSE); return offset; } static const value_string ranap_InformationExchangeType_vals[] = { { 0, "transfer" }, { 1, "request" }, { 0, NULL } }; static int dissect_ranap_InformationExchangeType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_OCTET_STRING_SIZE_3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 3, FALSE, NULL); return offset; } static const per_sequence_t TMGI_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_serviceID , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_OCTET_STRING_SIZE_3 }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TMGI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TMGI, TMGI_sequence); return offset; } static int dissect_ranap_IPMulticastAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 4, 16, FALSE, NULL); return offset; } static const per_sequence_t MBMSIPMulticastAddressandAPNlist_sequence[] = { { &hf_ranap_tMGI , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TMGI }, { &hf_ranap_iPMulticastAddress, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_IPMulticastAddress }, { &hf_ranap_aPN , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_APN }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSIPMulticastAddressandAPNlist(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSIPMulticastAddressandAPNlist, MBMSIPMulticastAddressandAPNlist_sequence); return offset; } static const per_sequence_t RequestedMBMSIPMulticastAddressandAPNRequest_sequence_of[1] = { { &hf_ranap_RequestedMBMSIPMulticastAddressandAPNRequest_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_MBMSIPMulticastAddressandAPNlist }, }; static int dissect_ranap_RequestedMBMSIPMulticastAddressandAPNRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RequestedMBMSIPMulticastAddressandAPNRequest, RequestedMBMSIPMulticastAddressandAPNRequest_sequence_of, 1, maxnoofMulticastServicesPerRNC, FALSE); return offset; } static const per_sequence_t RequestedMulticastServiceList_sequence_of[1] = { { &hf_ranap_RequestedMulticastServiceList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_TMGI }, }; static int dissect_ranap_RequestedMulticastServiceList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RequestedMulticastServiceList, RequestedMulticastServiceList_sequence_of, 1, maxnoofMulticastServicesPerUE, FALSE); return offset; } static const value_string ranap_InformationRequested_vals[] = { { 0, "requestedMBMSIPMulticastAddressandAPNRequest" }, { 1, "requestedMulticastServiceList" }, { 0, NULL } }; static const per_choice_t InformationRequested_choice[] = { { 0, &hf_ranap_requestedMBMSIPMulticastAddressandAPNRequest, ASN1_EXTENSION_ROOT , dissect_ranap_RequestedMBMSIPMulticastAddressandAPNRequest }, { 1, &hf_ranap_requestedMulticastServiceList, ASN1_EXTENSION_ROOT , dissect_ranap_RequestedMulticastServiceList }, { 0, NULL, 0, NULL } }; static int dissect_ranap_InformationRequested(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_InformationRequested, InformationRequested_choice, NULL); return offset; } static const per_sequence_t MBMSIPMulticastAddressandAPNRequest_sequence_of[1] = { { &hf_ranap_MBMSIPMulticastAddressandAPNRequest_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_TMGI }, }; static int dissect_ranap_MBMSIPMulticastAddressandAPNRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSIPMulticastAddressandAPNRequest, MBMSIPMulticastAddressandAPNRequest_sequence_of, 1, maxnoofMulticastServicesPerRNC, FALSE); return offset; } static const value_string ranap_PermanentNAS_UE_ID_vals[] = { { 0, "iMSI" }, { 0, NULL } }; static const per_choice_t PermanentNAS_UE_ID_choice[] = { { 0, &hf_ranap_iMSI , ASN1_EXTENSION_ROOT , dissect_ranap_IMSI }, { 0, NULL, 0, NULL } }; static int dissect_ranap_PermanentNAS_UE_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_PermanentNAS_UE_ID, PermanentNAS_UE_ID_choice, NULL); return offset; } static const value_string ranap_InformationRequestType_vals[] = { { 0, "mBMSIPMulticastAddressandAPNRequest" }, { 1, "permanentNAS-UE-ID" }, { 0, NULL } }; static const per_choice_t InformationRequestType_choice[] = { { 0, &hf_ranap_mBMSIPMulticastAddressandAPNRequest, ASN1_EXTENSION_ROOT , dissect_ranap_MBMSIPMulticastAddressandAPNRequest }, { 1, &hf_ranap_permanentNAS_UE_ID, ASN1_EXTENSION_ROOT , dissect_ranap_PermanentNAS_UE_ID }, { 0, NULL, 0, NULL } }; static int dissect_ranap_InformationRequestType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_InformationRequestType, InformationRequestType_choice, NULL); return offset; } static int dissect_ranap_InformationTransferID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 1048575U, NULL, FALSE); return offset; } static int dissect_ranap_TraceReference(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 2, 3, FALSE, NULL); return offset; } static const value_string ranap_T_traceActivationIndicator_vals[] = { { 0, "activated" }, { 1, "deactivated" }, { 0, NULL } }; static int dissect_ranap_T_traceActivationIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static const per_sequence_t RNCTraceInformation_sequence[] = { { &hf_ranap_traceReference, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_TraceReference }, { &hf_ranap_traceActivationIndicator, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_T_traceActivationIndicator }, { &hf_ranap_equipmentsToBeTraced, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_EquipmentsToBeTraced }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RNCTraceInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RNCTraceInformation, RNCTraceInformation_sequence); return offset; } static const value_string ranap_InformationTransferType_vals[] = { { 0, "rNCTraceInformation" }, { 0, NULL } }; static const per_choice_t InformationTransferType_choice[] = { { 0, &hf_ranap_rNCTraceInformation, ASN1_EXTENSION_ROOT , dissect_ranap_RNCTraceInformation }, { 0, NULL, 0, NULL } }; static int dissect_ranap_InformationTransferType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_InformationTransferType, InformationTransferType_choice, NULL); return offset; } static const per_sequence_t PermittedIntegrityProtectionAlgorithms_sequence_of[1] = { { &hf_ranap_PermittedIntegrityProtectionAlgorithms_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_IntegrityProtectionAlgorithm }, }; static int dissect_ranap_PermittedIntegrityProtectionAlgorithms(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_PermittedIntegrityProtectionAlgorithms, PermittedIntegrityProtectionAlgorithms_sequence_of, 1, 16, FALSE); return offset; } static int dissect_ranap_IntegrityProtectionKey(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 128, 128, FALSE, NULL, NULL); return offset; } static const per_sequence_t IntegrityProtectionInformation_sequence[] = { { &hf_ranap_permittedAlgorithms_01, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PermittedIntegrityProtectionAlgorithms }, { &hf_ranap_key_01 , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_IntegrityProtectionKey }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; int dissect_ranap_IntegrityProtectionInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_IntegrityProtectionInformation, IntegrityProtectionInformation_sequence); return offset; } static int dissect_ranap_RIMInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static const per_sequence_t TargetRNC_ID_sequence[] = { { &hf_ranap_lAI , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_LAI }, { &hf_ranap_rAC , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_RAC }, { &hf_ranap_rNC_ID , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RNC_ID }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; int dissect_ranap_TargetRNC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TargetRNC_ID, TargetRNC_ID_sequence); return offset; } static int dissect_ranap_TAC(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 2, 2, FALSE, NULL); return offset; } static const per_sequence_t TAI_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_tAC , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_TAC }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TAI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TAI, TAI_sequence); return offset; } static const per_sequence_t TargetENB_ID_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_eNB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ENB_ID }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { &hf_ranap_selectedTAI , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TAI }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TargetENB_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TargetENB_ID, TargetENB_ID_sequence); return offset; } static const value_string ranap_RIMRoutingAddress_vals[] = { { 0, "targetRNC-ID" }, { 1, "gERAN-Cell-ID" }, { 2, "targeteNB-ID" }, { 0, NULL } }; static const per_choice_t RIMRoutingAddress_choice[] = { { 0, &hf_ranap_targetRNC_ID , ASN1_EXTENSION_ROOT , dissect_ranap_TargetRNC_ID }, { 1, &hf_ranap_gERAN_Cell_ID , ASN1_EXTENSION_ROOT , dissect_ranap_GERAN_Cell_ID }, { 2, &hf_ranap_targeteNB_ID , ASN1_NOT_EXTENSION_ROOT, dissect_ranap_TargetENB_ID }, { 0, NULL, 0, NULL } }; static int dissect_ranap_RIMRoutingAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_RIMRoutingAddress, RIMRoutingAddress_choice, NULL); return offset; } static const per_sequence_t RIM_Transfer_sequence[] = { { &hf_ranap_rIMInformation, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RIMInformation }, { &hf_ranap_rIMRoutingAddress, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_RIMRoutingAddress }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RIM_Transfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RIM_Transfer, RIM_Transfer_sequence); return offset; } static const value_string ranap_InterSystemInformationTransferType_vals[] = { { 0, "rIM-Transfer" }, { 0, NULL } }; static const per_choice_t InterSystemInformationTransferType_choice[] = { { 0, &hf_ranap_rIM_Transfer , ASN1_EXTENSION_ROOT , dissect_ranap_RIM_Transfer }, { 0, NULL, 0, NULL } }; static int dissect_ranap_InterSystemInformationTransferType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_InterSystemInformationTransferType, InterSystemInformationTransferType_choice, NULL); return offset; } static const per_sequence_t InterSystemInformation_TransparentContainer_sequence[] = { { &hf_ranap_downlinkCellLoadInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_CellLoadInformation }, { &hf_ranap_uplinkCellLoadInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_CellLoadInformation }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_InterSystemInformation_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_InterSystemInformation_TransparentContainer, InterSystemInformation_TransparentContainer_sequence); return offset; } static int dissect_ranap_IuSignallingConnectionIdentifier(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 24, 24, FALSE, NULL, NULL); return offset; } static const value_string ranap_IuTransportAssociation_vals[] = { { 0, "gTP-TEI" }, { 1, "bindingID" }, { 0, NULL } }; static const per_choice_t IuTransportAssociation_choice[] = { { 0, &hf_ranap_gTP_TEI , ASN1_EXTENSION_ROOT , dissect_ranap_GTP_TEI }, { 1, &hf_ranap_bindingID , ASN1_EXTENSION_ROOT , dissect_ranap_BindingID }, { 0, NULL, 0, NULL } }; static int dissect_ranap_IuTransportAssociation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_IuTransportAssociation, IuTransportAssociation_choice, NULL); return offset; } static const value_string ranap_KeyStatus_vals[] = { { 0, "old" }, { 1, "new" }, { 0, NULL } }; static int dissect_ranap_KeyStatus(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const per_sequence_t ListOF_SNAs_sequence_of[1] = { { &hf_ranap_ListOF_SNAs_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_SNAC }, }; static int dissect_ranap_ListOF_SNAs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_ListOF_SNAs, ListOF_SNAs_sequence_of, 1, maxNrOfSNAs, FALSE); return offset; } static const per_sequence_t LA_LIST_item_sequence[] = { { &hf_ranap_lAC , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_LAC }, { &hf_ranap_listOF_SNAs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ListOF_SNAs }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LA_LIST_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LA_LIST_item, LA_LIST_item_sequence); return offset; } static const per_sequence_t LA_LIST_sequence_of[1] = { { &hf_ranap_LA_LIST_item , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_LA_LIST_item }, }; static int dissect_ranap_LA_LIST(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_LA_LIST, LA_LIST_sequence_of, 1, maxNrOfLAs, FALSE); return offset; } static const per_sequence_t LastKnownServiceArea_sequence[] = { { &hf_ranap_sAI , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_SAI }, { &hf_ranap_ageOfSAI , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_32767 }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LastKnownServiceArea(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LastKnownServiceArea, LastKnownServiceArea_sequence); return offset; } static const value_string ranap_T_interface_vals[] = { { 0, "iu-cs" }, { 1, "iu-ps" }, { 2, "iur" }, { 3, "iub" }, { 4, "uu" }, { 0, NULL } }; static int dissect_ranap_T_interface(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 5, NULL, TRUE, 0, NULL); return offset; } static const per_sequence_t InterfacesToTraceItem_sequence[] = { { &hf_ranap_interface , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_T_interface }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_InterfacesToTraceItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_InterfacesToTraceItem, InterfacesToTraceItem_sequence); return offset; } static const per_sequence_t ListOfInterfacesToTrace_sequence_of[1] = { { &hf_ranap_ListOfInterfacesToTrace_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_InterfacesToTraceItem }, }; static int dissect_ranap_ListOfInterfacesToTrace(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_ListOfInterfacesToTrace, ListOfInterfacesToTrace_sequence_of, 1, maxNrOfInterfaces, FALSE); return offset; } static const value_string ranap_RequestedLocationRelatedDataType_vals[] = { { 0, "decipheringKeysUEBasedOTDOA" }, { 1, "decipheringKeysAssistedGPS" }, { 2, "dedicatedAssistanceDataUEBasedOTDOA" }, { 3, "dedicatedAssistanceDataAssistedGPS" }, { 4, "decipheringKeysAssistedGANSS" }, { 5, "dedicatedAssistanceDataAssistedGANSS" }, { 6, "decipheringKeysAssistedGPSandGANSS" }, { 7, "dedicatedAssistanceDataAssistedGPSandGANSS" }, { 0, NULL } }; static int dissect_ranap_RequestedLocationRelatedDataType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 4, NULL, TRUE, 4, NULL); return offset; } static int dissect_ranap_RequestedGPSAssistanceData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 38, FALSE, NULL); return offset; } static const per_sequence_t LocationRelatedDataRequestType_sequence[] = { { &hf_ranap_requestedLocationRelatedDataType, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RequestedLocationRelatedDataType }, { &hf_ranap_requestedGPSAssistanceData, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RequestedGPSAssistanceData }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LocationRelatedDataRequestType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LocationRelatedDataRequestType, LocationRelatedDataRequestType_sequence); return offset; } static const value_string ranap_LocationRelatedDataRequestTypeSpecificToGERANIuMode_vals[] = { { 0, "decipheringKeysEOTD" }, { 1, "dedicatedMobileAssistedEOTDAssistanceData" }, { 2, "dedicatedMobileBasedEOTDAssistanceData" }, { 0, NULL } }; static int dissect_ranap_LocationRelatedDataRequestTypeSpecificToGERANIuMode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 3, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_ReportChangeOfSAI_vals[] = { { 0, "requested" }, { 0, NULL } }; static int dissect_ranap_ReportChangeOfSAI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_PeriodicReportingIndicator_vals[] = { { 0, "periodicSAI" }, { 1, "periodicGeo" }, { 0, NULL } }; static int dissect_ranap_PeriodicReportingIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_DirectReportingIndicator_vals[] = { { 0, "directSAI" }, { 1, "directGeo" }, { 0, NULL } }; static int dissect_ranap_DirectReportingIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_VerticalAccuracyCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 127U, NULL, FALSE); return offset; } static const value_string ranap_PositioningPriority_vals[] = { { 0, "high-Priority" }, { 1, "normal-Priority" }, { 0, NULL } }; static int dissect_ranap_PositioningPriority(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_ResponseTime_vals[] = { { 0, "lowdelay" }, { 1, "delaytolerant" }, { 0, NULL } }; static int dissect_ranap_ResponseTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_INTEGER_1_8639999_(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 8639999U, NULL, TRUE); return offset; } static const per_sequence_t PeriodicLocationInfo_sequence[] = { { &hf_ranap_reportingAmount, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_1_8639999_ }, { &hf_ranap_reportingInterval, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_1_8639999_ }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_PeriodicLocationInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_PeriodicLocationInfo, PeriodicLocationInfo_sequence); return offset; } static const per_sequence_t LocationReportingTransferInformation_sequence[] = { { &hf_ranap_reportChangeOfSAI, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ReportChangeOfSAI }, { &hf_ranap_periodicReportingIndicator, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_PeriodicReportingIndicator }, { &hf_ranap_directReportingIndicator, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DirectReportingIndicator }, { &hf_ranap_verticalAccuracyCode, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_VerticalAccuracyCode }, { &hf_ranap_positioningPriorityChangeSAI, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_PositioningPriority }, { &hf_ranap_positioningPriorityDirect, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_PositioningPriority }, { &hf_ranap_clientTypePeriodic, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ClientType }, { &hf_ranap_clientTypeDirect, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ClientType }, { &hf_ranap_responseTime , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ResponseTime }, { &hf_ranap_includeVelocity, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_IncludeVelocity }, { &hf_ranap_periodicLocationInfo, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_PeriodicLocationInfo }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LocationReportingTransferInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LocationReportingTransferInformation, LocationReportingTransferInformation_sequence); return offset; } static int dissect_ranap_L3_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 267 "../../asn1/ranap/ranap.cnf" tvbuff_t *l3_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, &l3_info_tvb); if (l3_info_tvb) dissector_try_uint(nas_pdu_dissector_table, 0x1, l3_info_tvb, actx->pinfo, proto_tree_get_root(tree)); return offset; } static const value_string ranap_Management_Based_MDT_Allowed_vals[] = { { 0, "allowed" }, { 0, NULL } }; static int dissect_ranap_Management_Based_MDT_Allowed(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_MaxSDU_Size(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 32768U, NULL, FALSE); return offset; } static int dissect_ranap_MBMS_PTP_RAB_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 8, 8, FALSE, NULL, NULL); return offset; } static const value_string ranap_MBMSBearerServiceType_vals[] = { { 0, "multicast" }, { 1, "broadcast" }, { 0, NULL } }; static int dissect_ranap_MBMSBearerServiceType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_MBMSCNDe_Registration_vals[] = { { 0, "normalsessionstop" }, { 1, "deregister" }, { 0, NULL } }; static int dissect_ranap_MBMSCNDe_Registration(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_MBMSCountingInformation_vals[] = { { 0, "counting" }, { 1, "notcounting" }, { 0, NULL } }; static int dissect_ranap_MBMSCountingInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_MBMSHCIndicator_vals[] = { { 0, "uncompressed-header" }, { 1, "compressed-header" }, { 0, NULL } }; static int dissect_ranap_MBMSHCIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_MBMSLinkingInformation_vals[] = { { 0, "uE-has-joined-multicast-services" }, { 0, NULL } }; static int dissect_ranap_MBMSLinkingInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_MBMSRegistrationRequestType_vals[] = { { 0, "register" }, { 1, "deregister" }, { 0, NULL } }; static int dissect_ranap_MBMSRegistrationRequestType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_MBMSServiceArea(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static int dissect_ranap_MBMSSessionDuration(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 3, FALSE, NULL); return offset; } static int dissect_ranap_MBMSSessionIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 1, FALSE, NULL); return offset; } static int dissect_ranap_MBMSSessionRepetitionNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 1, FALSE, NULL); return offset; } static const value_string ranap_MDT_Activation_vals[] = { { 0, "immediateMDTonly" }, { 1, "loggedMDTonly" }, { 2, "immediateMDTandTrace" }, { 0, NULL } }; static int dissect_ranap_MDT_Activation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 3, NULL, TRUE, 0, NULL); return offset; } static const per_sequence_t LAI_List_sequence_of[1] = { { &hf_ranap_LAI_List_item , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_LAI }, }; static int dissect_ranap_LAI_List(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_LAI_List, LAI_List_sequence_of, 1, maxNrOfLAIs, FALSE); return offset; } static const per_sequence_t LABased_sequence[] = { { &hf_ranap_laiList , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_LAI_List }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LABased(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LABased, LABased_sequence); return offset; } static const per_sequence_t RAI_sequence[] = { { &hf_ranap_lAI , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_LAI }, { &hf_ranap_rAC , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAC }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAI, RAI_sequence); return offset; } static const per_sequence_t RAI_List_sequence_of[1] = { { &hf_ranap_RAI_List_item , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RAI }, }; static int dissect_ranap_RAI_List(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RAI_List, RAI_List_sequence_of, 1, maxNrOfRAIs, FALSE); return offset; } static const per_sequence_t RABased_sequence[] = { { &hf_ranap_raiList , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAI_List }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RABased(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RABased, RABased_sequence); return offset; } static int dissect_ranap_NULL(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_null(tvb, offset, actx, tree, hf_index); return offset; } static const value_string ranap_MDTAreaScope_vals[] = { { 0, "cellbased" }, { 1, "labased" }, { 2, "rabased" }, { 3, "plmn-area-based" }, { 0, NULL } }; static const per_choice_t MDTAreaScope_choice[] = { { 0, &hf_ranap_cellbased , ASN1_EXTENSION_ROOT , dissect_ranap_CellBased }, { 1, &hf_ranap_labased , ASN1_EXTENSION_ROOT , dissect_ranap_LABased }, { 2, &hf_ranap_rabased , ASN1_EXTENSION_ROOT , dissect_ranap_RABased }, { 3, &hf_ranap_plmn_area_based, ASN1_EXTENSION_ROOT , dissect_ranap_NULL }, { 0, NULL, 0, NULL } }; static int dissect_ranap_MDTAreaScope(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_MDTAreaScope, MDTAreaScope_choice, NULL); return offset; } static const value_string ranap_LoggingInterval_vals[] = { { 0, "s1d28" }, { 1, "s2d56" }, { 2, "s5d12" }, { 3, "s10d24" }, { 4, "s20d48" }, { 5, "s30d72" }, { 6, "s40d96" }, { 7, "s61d44" }, { 0, NULL } }; static int dissect_ranap_LoggingInterval(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 8, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_LoggingDuration_vals[] = { { 0, "min10" }, { 1, "min20" }, { 2, "min40" }, { 3, "min60" }, { 4, "min90" }, { 5, "min120" }, { 0, NULL } }; static int dissect_ranap_LoggingDuration(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 6, NULL, TRUE, 0, NULL); return offset; } static const per_sequence_t LoggedMDT_sequence[] = { { &hf_ranap_loggingInterval, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_LoggingInterval }, { &hf_ranap_loggingDuration, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_LoggingDuration }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LoggedMDT(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LoggedMDT, LoggedMDT_sequence); return offset; } static const value_string ranap_MDTMode_vals[] = { { 0, "immediateMDT" }, { 1, "loggedMDT" }, { 0, NULL } }; static const per_choice_t MDTMode_choice[] = { { 0, &hf_ranap_immediateMDT , ASN1_EXTENSION_ROOT , dissect_ranap_ImmediateMDT }, { 1, &hf_ranap_loggedMDT , ASN1_EXTENSION_ROOT , dissect_ranap_LoggedMDT }, { 0, NULL, 0, NULL } }; static int dissect_ranap_MDTMode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_MDTMode, MDTMode_choice, NULL); return offset; } static const per_sequence_t MDT_Configuration_sequence[] = { { &hf_ranap_mdtActivation , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_MDT_Activation }, { &hf_ranap_mdtAreaScope , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_MDTAreaScope }, { &hf_ranap_mdtMode , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_MDTMode }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MDT_Configuration(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MDT_Configuration, MDT_Configuration_sequence); return offset; } static int dissect_ranap_MSISDN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 9, FALSE, NULL); return offset; } static int dissect_ranap_NAS_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 212 "../../asn1/ranap/ranap.cnf" tvbuff_t *nas_pdu_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, &nas_pdu_tvb); if (nas_pdu_tvb) dissector_try_uint(nas_pdu_dissector_table, 0x1, nas_pdu_tvb, actx->pinfo, proto_tree_get_root(tree)); return offset; } static int dissect_ranap_NAS_SequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 2, 2, FALSE, NULL, NULL); return offset; } static int dissect_ranap_NAS_SynchronisationIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 4, 4, FALSE, NULL, NULL); return offset; } static int dissect_ranap_NewBSS_To_OldBSS_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 259 "../../asn1/ranap/ranap.cnf" tvbuff_t *bss_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, &bss_info_tvb); if (bss_info_tvb) bssmap_new_bss_to_old_bss_info(bss_info_tvb, tree, actx->pinfo); return offset; } static const value_string ranap_NonSearchingIndication_vals[] = { { 0, "non-searching" }, { 1, "searching" }, { 0, NULL } }; static int dissect_ranap_NonSearchingIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static int dissect_ranap_NumberOfIuInstances(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 2U, NULL, FALSE); return offset; } static int dissect_ranap_NumberOfSteps(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 16U, NULL, FALSE); return offset; } static int dissect_ranap_Offload_RAB_Parameters_APN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 255, FALSE, NULL); return offset; } static int dissect_ranap_Offload_RAB_Parameters_ChargingCharacteristics(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 2, 2, FALSE, NULL); return offset; } static const per_sequence_t Offload_RAB_Parameters_sequence[] = { { &hf_ranap_accessPointName, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Offload_RAB_Parameters_APN }, { &hf_ranap_chargingCharacteristics, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Offload_RAB_Parameters_ChargingCharacteristics }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Offload_RAB_Parameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Offload_RAB_Parameters, Offload_RAB_Parameters_sequence); return offset; } static int dissect_ranap_OldBSS_ToNewBSS_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 251 "../../asn1/ranap/ranap.cnf" tvbuff_t *bss_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, &bss_info_tvb); if (bss_info_tvb) bssmap_old_bss_to_new_bss_info(bss_info_tvb, tree, actx->pinfo); return offset; } static int dissect_ranap_OMC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 22, FALSE, NULL); return offset; } static const value_string ranap_PagingAreaID_vals[] = { { 0, "lAI" }, { 1, "rAI" }, { 0, NULL } }; static const per_choice_t PagingAreaID_choice[] = { { 0, &hf_ranap_lAI , ASN1_EXTENSION_ROOT , dissect_ranap_LAI }, { 1, &hf_ranap_rAI , ASN1_EXTENSION_ROOT , dissect_ranap_RAI }, { 0, NULL, 0, NULL } }; static int dissect_ranap_PagingAreaID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_PagingAreaID, PagingAreaID_choice, NULL); return offset; } static const value_string ranap_PagingCause_vals[] = { { 0, "terminating-conversational-call" }, { 1, "terminating-streaming-call" }, { 2, "terminating-interactive-call" }, { 3, "terminating-background-call" }, { 4, "terminating-low-priority-signalling" }, { 5, "terminating-high-priority-signalling" }, { 0, NULL } }; static int dissect_ranap_PagingCause(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 5, NULL, TRUE, 1, NULL); return offset; } static const value_string ranap_PDP_Type_vals[] = { { 0, "empty" }, { 1, "ppp" }, { 2, "osp-ihoss" }, { 3, "ipv4" }, { 4, "ipv6" }, { 0, NULL } }; static int dissect_ranap_PDP_Type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 5, NULL, TRUE, 0, NULL); return offset; } static const per_sequence_t PDP_TypeInformation_sequence_of[1] = { { &hf_ranap_PDP_TypeInformation_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PDP_Type }, }; static int dissect_ranap_PDP_TypeInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_PDP_TypeInformation, PDP_TypeInformation_sequence_of, 1, maxNrOfPDPDirections, FALSE); return offset; } static const value_string ranap_PDP_Type_extension_vals[] = { { 0, "ipv4-and-ipv6" }, { 0, NULL } }; static int dissect_ranap_PDP_Type_extension(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static const per_sequence_t PDP_TypeInformation_extension_sequence_of[1] = { { &hf_ranap_PDP_TypeInformation_extension_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PDP_Type_extension }, }; static int dissect_ranap_PDP_TypeInformation_extension(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_PDP_TypeInformation_extension, PDP_TypeInformation_extension_sequence_of, 1, maxNrOfPDPDirections, FALSE); return offset; } static int dissect_ranap_PDUType14FrameSequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 3U, NULL, FALSE); return offset; } static const per_sequence_t PLMNs_in_shared_network_item_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_lA_LIST , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_LA_LIST }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_PLMNs_in_shared_network_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_PLMNs_in_shared_network_item, PLMNs_in_shared_network_item_sequence); return offset; } static const per_sequence_t PLMNs_in_shared_network_sequence_of[1] = { { &hf_ranap_PLMNs_in_shared_network_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNs_in_shared_network_item }, }; static int dissect_ranap_PLMNs_in_shared_network(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_PLMNs_in_shared_network, PLMNs_in_shared_network_sequence_of, 1, maxNrOfPLMNsSN, FALSE); return offset; } static int dissect_ranap_PositioningDataDiscriminator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 4, 4, FALSE, NULL, NULL); return offset; } static int dissect_ranap_PositioningMethodAndUsage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 1, FALSE, NULL); return offset; } static const per_sequence_t PositioningDataSet_sequence_of[1] = { { &hf_ranap_PositioningDataSet_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PositioningMethodAndUsage }, }; static int dissect_ranap_PositioningDataSet(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_PositioningDataSet, PositioningDataSet_sequence_of, 1, maxSet, FALSE); return offset; } static const per_sequence_t PositionData_sequence[] = { { &hf_ranap_positioningDataDiscriminator, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_PositioningDataDiscriminator }, { &hf_ranap_positioningDataSet, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_PositioningDataSet }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_PositionData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_PositionData, PositionData_sequence); return offset; } static int dissect_ranap_PositionDataSpecificToGERANIuMode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static int dissect_ranap_Priority_Class_Indicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 8, 8, FALSE, NULL, NULL); return offset; } static const per_sequence_t Shared_Network_Information_sequence[] = { { &hf_ranap_pLMNs_in_shared_network, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNs_in_shared_network }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Shared_Network_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Shared_Network_Information, Shared_Network_Information_sequence); return offset; } static const value_string ranap_ProvidedData_vals[] = { { 0, "shared-network-information" }, { 0, NULL } }; static const per_choice_t ProvidedData_choice[] = { { 0, &hf_ranap_shared_network_information, ASN1_EXTENSION_ROOT , dissect_ranap_Shared_Network_Information }, { 0, NULL, 0, NULL } }; static int dissect_ranap_ProvidedData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_ProvidedData, ProvidedData_choice, NULL); return offset; } static int dissect_ranap_P_TMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 4, 4, FALSE, NULL); return offset; } static const value_string ranap_RAB_AsymmetryIndicator_vals[] = { { 0, "symmetric-bidirectional" }, { 1, "asymmetric-unidirectional-downlink" }, { 2, "asymmetric-unidirectional-uplink" }, { 3, "asymmetric-bidirectional" }, { 0, NULL } }; static int dissect_ranap_RAB_AsymmetryIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 4, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_UnsuccessfullyTransmittedDataVolume(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 4294967295U, NULL, FALSE); return offset; } static const per_sequence_t RABDataVolumeReport_item_sequence[] = { { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_UnsuccessfullyTransmittedDataVolume }, { &hf_ranap_dataVolumeReference, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DataVolumeReference }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RABDataVolumeReport_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RABDataVolumeReport_item, RABDataVolumeReport_item_sequence); return offset; } static const per_sequence_t RABDataVolumeReport_sequence_of[1] = { { &hf_ranap_RABDataVolumeReport_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RABDataVolumeReport_item }, }; static int dissect_ranap_RABDataVolumeReport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RABDataVolumeReport, RABDataVolumeReport_sequence_of, 1, maxNrOfVol, FALSE); return offset; } static int dissect_ranap_RAB_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 8, 8, FALSE, NULL, NULL); return offset; } static const per_sequence_t RAB_Parameter_ExtendedGuaranteedBitrateList_sequence_of[1] = { { &hf_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ExtendedGuaranteedBitrate }, }; static int dissect_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList, RAB_Parameter_ExtendedGuaranteedBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t RAB_Parameter_ExtendedMaxBitrateList_sequence_of[1] = { { &hf_ranap_RAB_Parameter_ExtendedMaxBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ExtendedMaxBitrate }, }; static int dissect_ranap_RAB_Parameter_ExtendedMaxBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_Parameter_ExtendedMaxBitrateList, RAB_Parameter_ExtendedMaxBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t RAB_Parameter_GuaranteedBitrateList_sequence_of[1] = { { &hf_ranap_RAB_Parameter_GuaranteedBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_GuaranteedBitrate }, }; static int dissect_ranap_RAB_Parameter_GuaranteedBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_Parameter_GuaranteedBitrateList, RAB_Parameter_GuaranteedBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t RAB_Parameter_MaxBitrateList_sequence_of[1] = { { &hf_ranap_RAB_Parameter_MaxBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_MaxBitrate }, }; static int dissect_ranap_RAB_Parameter_MaxBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_Parameter_MaxBitrateList, RAB_Parameter_MaxBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const value_string ranap_TrafficClass_vals[] = { { 0, "conversational" }, { 1, "streaming" }, { 2, "interactive" }, { 3, "background" }, { 0, NULL } }; static int dissect_ranap_TrafficClass(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 4, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_INTEGER_1_9(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 9U, NULL, FALSE); return offset; } static int dissect_ranap_INTEGER_1_6(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 6U, NULL, FALSE); return offset; } static const per_sequence_t SDU_ErrorRatio_sequence[] = { { &hf_ranap_mantissa , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_1_9 }, { &hf_ranap_exponent_1_8 , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_1_6 }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SDU_ErrorRatio(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SDU_ErrorRatio, SDU_ErrorRatio_sequence); return offset; } static int dissect_ranap_INTEGER_1_8(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 8U, NULL, FALSE); return offset; } static const per_sequence_t ResidualBitErrorRatio_sequence[] = { { &hf_ranap_mantissa , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_1_9 }, { &hf_ranap_exponent , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_1_8 }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ResidualBitErrorRatio(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ResidualBitErrorRatio, ResidualBitErrorRatio_sequence); return offset; } static int dissect_ranap_SubflowSDU_Size(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 4095U, NULL, FALSE); return offset; } static int dissect_ranap_RAB_SubflowCombinationBitRate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 16000000U, NULL, FALSE); return offset; } static const per_sequence_t SDU_FormatInformationParameters_item_sequence[] = { { &hf_ranap_subflowSDU_Size, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_SubflowSDU_Size }, { &hf_ranap_rAB_SubflowCombinationBitRate, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RAB_SubflowCombinationBitRate }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SDU_FormatInformationParameters_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SDU_FormatInformationParameters_item, SDU_FormatInformationParameters_item_sequence); return offset; } static const per_sequence_t SDU_FormatInformationParameters_sequence_of[1] = { { &hf_ranap_SDU_FormatInformationParameters_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_SDU_FormatInformationParameters_item }, }; static int dissect_ranap_SDU_FormatInformationParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_SDU_FormatInformationParameters, SDU_FormatInformationParameters_sequence_of, 1, maxRAB_SubflowCombination, FALSE); return offset; } static const per_sequence_t SDU_Parameters_item_sequence[] = { { &hf_ranap_sDU_ErrorRatio, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_SDU_ErrorRatio }, { &hf_ranap_residualBitErrorRatio, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ResidualBitErrorRatio }, { &hf_ranap_deliveryOfErroneousSDU, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_DeliveryOfErroneousSDU }, { &hf_ranap_sDU_FormatInformationParameters, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_SDU_FormatInformationParameters }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SDU_Parameters_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SDU_Parameters_item, SDU_Parameters_item_sequence); return offset; } static const per_sequence_t SDU_Parameters_sequence_of[1] = { { &hf_ranap_SDU_Parameters_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_SDU_Parameters_item }, }; static int dissect_ranap_SDU_Parameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_SDU_Parameters, SDU_Parameters_sequence_of, 1, maxRAB_Subflows, FALSE); return offset; } static int dissect_ranap_TransferDelay(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, NULL, FALSE); return offset; } static const value_string ranap_TrafficHandlingPriority_vals[] = { { 0, "spare" }, { 1, "highest" }, { 14, "lowest" }, { 15, "no-priority-used" }, { 0, NULL } }; static int dissect_ranap_TrafficHandlingPriority(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 15U, NULL, FALSE); return offset; } static const value_string ranap_SourceStatisticsDescriptor_vals[] = { { 0, "speech" }, { 1, "unknown" }, { 0, NULL } }; static int dissect_ranap_SourceStatisticsDescriptor(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_RelocationRequirement_vals[] = { { 0, "lossless" }, { 1, "none" }, { 2, "realtime" }, { 0, NULL } }; static int dissect_ranap_RelocationRequirement(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 1, NULL); return offset; } static const per_sequence_t RAB_Parameters_sequence[] = { { &hf_ranap_trafficClass , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TrafficClass }, { &hf_ranap_rAB_AsymmetryIndicator, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_AsymmetryIndicator }, { &hf_ranap_maxBitrate , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_Parameter_MaxBitrateList }, { &hf_ranap_guaranteedBitRate, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RAB_Parameter_GuaranteedBitrateList }, { &hf_ranap_deliveryOrder , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_DeliveryOrder }, { &hf_ranap_maxSDU_Size , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_MaxSDU_Size }, { &hf_ranap_sDU_Parameters, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_SDU_Parameters }, { &hf_ranap_transferDelay , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TransferDelay }, { &hf_ranap_trafficHandlingPriority, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TrafficHandlingPriority }, { &hf_ranap_allocationOrRetentionPriority, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_AllocationOrRetentionPriority }, { &hf_ranap_sourceStatisticsDescriptor, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_SourceStatisticsDescriptor }, { &hf_ranap_relocationRequirement, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RelocationRequirement }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_Parameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_Parameters, RAB_Parameters_sequence); return offset; } static int dissect_ranap_UPInitialisationFrame(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static const per_sequence_t UPInformation_sequence[] = { { &hf_ranap_frameSeqNoUL , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_FrameSequenceNumber }, { &hf_ranap_frameSeqNoDL , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_FrameSequenceNumber }, { &hf_ranap_pdu14FrameSeqNoUL, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_PDUType14FrameSequenceNumber }, { &hf_ranap_pdu14FrameSeqNoDL, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_PDUType14FrameSequenceNumber }, { &hf_ranap_dataPDUType , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_DataPDUType }, { &hf_ranap_upinitialisationFrame, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_UPInitialisationFrame }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_UPInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_UPInformation, UPInformation_sequence); return offset; } static const per_sequence_t RABParametersList_item_sequence[] = { { &hf_ranap_rab_Id , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_cn_domain , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_CN_DomainIndicator }, { &hf_ranap_rabDataVolumeReport, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RABDataVolumeReport }, { &hf_ranap_upInformation , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UPInformation }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RABParametersList_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RABParametersList_item, RABParametersList_item_sequence); return offset; } static const per_sequence_t RABParametersList_sequence_of[1] = { { &hf_ranap_RABParametersList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RABParametersList_item }, }; static int dissect_ranap_RABParametersList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RABParametersList, RABParametersList_sequence_of, 1, maxNrOfRABs, FALSE); return offset; } static int dissect_ranap_USCH_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, NULL, FALSE); return offset; } static const per_sequence_t TrCH_ID_sequence[] = { { &hf_ranap_dCH_ID , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DCH_ID }, { &hf_ranap_dSCH_ID , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DSCH_ID }, { &hf_ranap_uSCH_ID , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_USCH_ID }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TrCH_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TrCH_ID, TrCH_ID_sequence); return offset; } static const per_sequence_t TrCH_ID_List_sequence_of[1] = { { &hf_ranap_TrCH_ID_List_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_TrCH_ID }, }; static int dissect_ranap_TrCH_ID_List(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_TrCH_ID_List, TrCH_ID_List_sequence_of, 1, maxRAB_Subflows, FALSE); return offset; } static const per_sequence_t RAB_TrCH_MappingItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_trCH_ID_List , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TrCH_ID_List }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_TrCH_MappingItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_TrCH_MappingItem, RAB_TrCH_MappingItem_sequence); return offset; } static const per_sequence_t RAB_TrCH_Mapping_sequence_of[1] = { { &hf_ranap_RAB_TrCH_Mapping_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_TrCH_MappingItem }, }; static int dissect_ranap_RAB_TrCH_Mapping(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_TrCH_Mapping, RAB_TrCH_Mapping_sequence_of, 1, maxNrOfRABs, FALSE); return offset; } static const per_sequence_t RAofIdleModeUEs_sequence_of[1] = { { &hf_ranap_RAofIdleModeUEs_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RAC }, }; static int dissect_ranap_RAofIdleModeUEs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_RAofIdleModeUEs, RAofIdleModeUEs_sequence_of, 1, maxMBMSRA, FALSE); return offset; } static const per_sequence_t NotEmptyRAListofIdleModeUEs_sequence[] = { { &hf_ranap_rAofIdleModeUEs, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RAofIdleModeUEs }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_NotEmptyRAListofIdleModeUEs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_NotEmptyRAListofIdleModeUEs, NotEmptyRAListofIdleModeUEs_sequence); return offset; } static const value_string ranap_T_emptyFullRAListofIdleModeUEs_vals[] = { { 0, "emptylist" }, { 1, "fulllist" }, { 0, NULL } }; static int dissect_ranap_T_emptyFullRAListofIdleModeUEs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_RAListofIdleModeUEs_vals[] = { { 0, "notEmptyRAListofIdleModeUEs" }, { 1, "emptyFullRAListofIdleModeUEs" }, { 0, NULL } }; static const per_choice_t RAListofIdleModeUEs_choice[] = { { 0, &hf_ranap_notEmptyRAListofIdleModeUEs, ASN1_EXTENSION_ROOT , dissect_ranap_NotEmptyRAListofIdleModeUEs }, { 1, &hf_ranap_emptyFullRAListofIdleModeUEs, ASN1_EXTENSION_ROOT , dissect_ranap_T_emptyFullRAListofIdleModeUEs }, { 0, NULL, 0, NULL } }; static int dissect_ranap_RAListofIdleModeUEs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_RAListofIdleModeUEs, RAListofIdleModeUEs_choice, NULL); return offset; } static const per_sequence_t LAListofIdleModeUEs_sequence_of[1] = { { &hf_ranap_LAListofIdleModeUEs_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_LAI }, }; static int dissect_ranap_LAListofIdleModeUEs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_LAListofIdleModeUEs, LAListofIdleModeUEs_sequence_of, 1, maxMBMSRA, FALSE); return offset; } static const value_string ranap_RAT_Type_vals[] = { { 0, "utran" }, { 1, "geran" }, { 0, NULL } }; static int dissect_ranap_RAT_Type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_RedirectAttemptFlag(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_null(tvb, offset, actx, tree, hf_index); return offset; } static const value_string ranap_RedirectionCompleted_vals[] = { { 0, "redirection-completed" }, { 0, NULL } }; static int dissect_ranap_RedirectionCompleted(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_RejectCauseValue_vals[] = { { 0, "pLMN-Not-Allowed" }, { 1, "location-Area-Not-Allowed" }, { 2, "roaming-Not-Allowed-In-This-Location-Area" }, { 3, "no-Suitable-Cell-In-Location-Area" }, { 4, "gPRS-Services-Not-Allowed-In-This-PLMN" }, { 5, "cS-PS-coordination-required" }, { 0, NULL } }; static int dissect_ranap_RejectCauseValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 6, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_RelocationType_vals[] = { { 0, "ue-not-involved" }, { 1, "ue-involved" }, { 0, NULL } }; static int dissect_ranap_RelocationType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static const value_string ranap_ReportArea_vals[] = { { 0, "service-area" }, { 1, "geographical-area" }, { 0, NULL } }; static int dissect_ranap_ReportArea(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_RequestedGANSSAssistanceData(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 201, FALSE, NULL); return offset; } static const per_sequence_t Requested_RAB_Parameter_MaxBitrateList_sequence_of[1] = { { &hf_ranap_Requested_RAB_Parameter_MaxBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_MaxBitrate }, }; static int dissect_ranap_Requested_RAB_Parameter_MaxBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Requested_RAB_Parameter_MaxBitrateList, Requested_RAB_Parameter_MaxBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Requested_RAB_Parameter_GuaranteedBitrateList_sequence_of[1] = { { &hf_ranap_Requested_RAB_Parameter_GuaranteedBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_GuaranteedBitrate }, }; static int dissect_ranap_Requested_RAB_Parameter_GuaranteedBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Requested_RAB_Parameter_GuaranteedBitrateList, Requested_RAB_Parameter_GuaranteedBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Requested_RAB_Parameter_Values_sequence[] = { { &hf_ranap_requestedMaxBitrates, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Requested_RAB_Parameter_MaxBitrateList }, { &hf_ranap_requestedGuaranteedBitrates, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Requested_RAB_Parameter_GuaranteedBitrateList }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Requested_RAB_Parameter_Values(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Requested_RAB_Parameter_Values, Requested_RAB_Parameter_Values_sequence); return offset; } static const per_sequence_t Requested_RAB_Parameter_ExtendedMaxBitrateList_sequence_of[1] = { { &hf_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ExtendedMaxBitrate }, }; static int dissect_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList, Requested_RAB_Parameter_ExtendedMaxBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t Requested_RAB_Parameter_ExtendedGuaranteedBitrateList_sequence_of[1] = { { &hf_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ExtendedGuaranteedBitrate }, }; static int dissect_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList, Requested_RAB_Parameter_ExtendedGuaranteedBitrateList_sequence_of, 1, maxNrOfSeparateTrafficDirections, FALSE); return offset; } static const per_sequence_t RequestType_sequence[] = { { &hf_ranap_event , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Event }, { &hf_ranap_reportArea , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ReportArea }, { &hf_ranap_accuracyCode , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_INTEGER_0_127 }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RequestType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RequestType, RequestType_sequence); return offset; } static const value_string ranap_UE_ID_vals[] = { { 0, "imsi" }, { 1, "imei" }, { 2, "imeisv" }, { 0, NULL } }; static const per_choice_t UE_ID_choice[] = { { 0, &hf_ranap_imsi , ASN1_EXTENSION_ROOT , dissect_ranap_IMSI }, { 1, &hf_ranap_imei , ASN1_EXTENSION_ROOT , dissect_ranap_IMEI }, { 2, &hf_ranap_imeisv , ASN1_NOT_EXTENSION_ROOT, dissect_ranap_IMEISV }, { 0, NULL, 0, NULL } }; static int dissect_ranap_UE_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_UE_ID, UE_ID_choice, NULL); return offset; } static int dissect_ranap_TraceRecordingSessionReference(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, NULL, FALSE); return offset; } static const value_string ranap_TraceDepth_vals[] = { { 0, "minimum" }, { 1, "medium" }, { 2, "maximum" }, { 0, NULL } }; static int dissect_ranap_TraceDepth(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 3, NULL, TRUE, 0, NULL); return offset; } static const per_sequence_t TracePropagationParameters_sequence[] = { { &hf_ranap_traceRecordingSessionReference, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TraceRecordingSessionReference }, { &hf_ranap_traceDepth , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TraceDepth }, { &hf_ranap_listOfInterfacesToTrace, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ListOfInterfacesToTrace }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TracePropagationParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TracePropagationParameters, TracePropagationParameters_sequence); return offset; } static const per_sequence_t TraceInformation_sequence[] = { { &hf_ranap_traceReference, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TraceReference }, { &hf_ranap_ue_identity , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_UE_ID }, { &hf_ranap_tracePropagationParameters, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TracePropagationParameters }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TraceInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TraceInformation, TraceInformation_sequence); return offset; } static const per_sequence_t RNSAPRelocationParameters_sequence[] = { { &hf_ranap_rabParmetersList, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RABParametersList }, { &hf_ranap_locationReporting, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_LocationReportingTransferInformation }, { &hf_ranap_traceInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TraceInformation }, { &hf_ranap_sourceSAI , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_SAI }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RNSAPRelocationParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RNSAPRelocationParameters, RNSAPRelocationParameters_sequence); return offset; } static int dissect_ranap_RRC_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 221 "../../asn1/ranap/ranap.cnf" tvbuff_t *rrc_message_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, &rrc_message_tvb); if ((rrc_message_tvb)&&(tvb_length(rrc_message_tvb)!=0)&&(glbl_dissect_container)){ switch(ProtocolIE_ID){ case id_Source_ToTarget_TransparentContainer: /* INTEGER ::= 61 */ /* 9.2.1.30a Source to Target Transparent Container * Note: In the current version of this specification, this IE may * either carry the Source RNC to Target RNC Transparent Container * or the Source eNB to Target eNB Transparent Container IE as defined in [49]... */ call_dissector(rrc_s_to_trnc_handle,rrc_message_tvb,actx->pinfo, proto_tree_get_root(tree)); break; case id_Target_ToSource_TransparentContainer: /* INTEGER ::= 63 */ /* 9.2.1.30b Target to Source Transparent Container * In the current version of this specification, this IE may * either carry the Target RNC to Source RNC Transparent Container * or the Target eNB to Source eNB Transparent Container IE as defined in [49]... */ call_dissector(rrc_t_to_srnc_handle,rrc_message_tvb,actx->pinfo, proto_tree_get_root(tree)); break; default: break; } } return offset; } static const value_string ranap_SAPI_vals[] = { { 0, "sapi-0" }, { 1, "sapi-3" }, { 0, NULL } }; static int dissect_ranap_SAPI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_SessionUpdateID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 1048575U, NULL, FALSE); return offset; } static const value_string ranap_SignallingIndication_vals[] = { { 0, "signalling" }, { 0, NULL } }; static int dissect_ranap_SignallingIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static const per_sequence_t SNA_Access_Information_sequence[] = { { &hf_ranap_authorisedPLMNs, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_AuthorisedPLMNs }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SNA_Access_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SNA_Access_Information, SNA_Access_Information_sequence); return offset; } const value_string ranap_Service_Handover_vals[] = { { 0, "handover-to-GSM-should-be-performed" }, { 1, "handover-to-GSM-should-not-be-performed" }, { 2, "handover-to-GSM-shall-not-be-performed" }, { 0, NULL } }; int dissect_ranap_Service_Handover(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 3, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_Source_ToTarget_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 356 "../../asn1/ranap/ranap.cnf" dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ); return offset; } static int dissect_ranap_SourceBSS_ToTargetBSS_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static const per_sequence_t SourceRNC_ID_sequence[] = { { &hf_ranap_pLMNidentity , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_PLMNidentity }, { &hf_ranap_rNC_ID , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_RNC_ID }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SourceRNC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SourceRNC_ID, SourceRNC_ID_sequence); return offset; } static const value_string ranap_SourceID_vals[] = { { 0, "sourceRNC-ID" }, { 1, "sAI" }, { 0, NULL } }; static const per_choice_t SourceID_choice[] = { { 0, &hf_ranap_sourceRNC_ID , ASN1_EXTENSION_ROOT , dissect_ranap_SourceRNC_ID }, { 1, &hf_ranap_sAI , ASN1_EXTENSION_ROOT , dissect_ranap_SAI }, { 0, NULL, 0, NULL } }; static int dissect_ranap_SourceID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_SourceID, SourceID_choice, NULL); return offset; } static const per_sequence_t SourceRNC_ToTargetRNC_TransparentContainer_sequence[] = { { &hf_ranap_rRC_Container , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RRC_Container }, { &hf_ranap_numberOfIuInstances, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_NumberOfIuInstances }, { &hf_ranap_relocationType, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RelocationType }, { &hf_ranap_chosenIntegrityProtectionAlgorithm, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ChosenIntegrityProtectionAlgorithm }, { &hf_ranap_integrityProtectionKey, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_IntegrityProtectionKey }, { &hf_ranap_chosenEncryptionAlgorithForSignalling, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ChosenEncryptionAlgorithm }, { &hf_ranap_cipheringKey , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_EncryptionKey }, { &hf_ranap_chosenEncryptionAlgorithForCS, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ChosenEncryptionAlgorithm }, { &hf_ranap_chosenEncryptionAlgorithForPS, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ChosenEncryptionAlgorithm }, { &hf_ranap_d_RNTI , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_D_RNTI }, { &hf_ranap_targetCellId , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TargetCellId }, { &hf_ranap_rAB_TrCH_Mapping, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RAB_TrCH_Mapping }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 342 "../../asn1/ranap/ranap.cnf" /* If SourceRNC-ToTargetRNC-TransparentContainer is called trough dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ProtocolIE_ID may be unset */ ProtocolIE_ID = id_Source_ToTarget_TransparentContainer; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SourceRNC_ToTargetRNC_TransparentContainer, SourceRNC_ToTargetRNC_TransparentContainer_sequence); return offset; } static int dissect_ranap_INTEGER_0_97(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 97U, NULL, FALSE); return offset; } static int dissect_ranap_INTEGER_0_34(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 34U, NULL, FALSE); return offset; } static int dissect_ranap_INTEGER_1_100(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 100U, NULL, FALSE); return offset; } static const value_string ranap_MeasBand_vals[] = { { 0, "v6" }, { 1, "v15" }, { 2, "v25" }, { 3, "v50" }, { 4, "v75" }, { 5, "v100" }, { 0, NULL } }; static int dissect_ranap_MeasBand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 6, NULL, FALSE, 0, NULL); return offset; } static const per_sequence_t EUTRANFrequencies_item_sequence[] = { { &hf_ranap_earfcn , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_65535 }, { &hf_ranap_measBand , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_MeasBand }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_EUTRANFrequencies_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_EUTRANFrequencies_item, EUTRANFrequencies_item_sequence); return offset; } static const per_sequence_t EUTRANFrequencies_sequence_of[1] = { { &hf_ranap_EUTRANFrequencies_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_EUTRANFrequencies_item }, }; static int dissect_ranap_EUTRANFrequencies(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_EUTRANFrequencies, EUTRANFrequencies_sequence_of, 1, maxNrOfEUTRAFreqs, FALSE); return offset; } static const per_sequence_t IRATmeasurementParameters_sequence[] = { { &hf_ranap_measurementDuration, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_1_100 }, { &hf_ranap_eUTRANFrequencies, ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_EUTRANFrequencies }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_IRATmeasurementParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_IRATmeasurementParameters, IRATmeasurementParameters_sequence); return offset; } static const per_sequence_t IRAT_Measurement_Configuration_sequence[] = { { &hf_ranap_rSRP , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_INTEGER_0_97 }, { &hf_ranap_rSRQ , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_INTEGER_0_34 }, { &hf_ranap_iRATmeasurementParameters, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_IRATmeasurementParameters }, { &hf_ranap_iE_Extensions , ASN1_NO_EXTENSIONS , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_IRAT_Measurement_Configuration(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_IRAT_Measurement_Configuration, IRAT_Measurement_Configuration_sequence); return offset; } static int dissect_ranap_SubscriberProfileIDforRFP(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 256U, NULL, FALSE); return offset; } static int dissect_ranap_SRB_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 32U, NULL, FALSE); return offset; } static const per_sequence_t SRB_TrCH_MappingItem_sequence[] = { { &hf_ranap_sRB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_SRB_ID }, { &hf_ranap_trCH_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TrCH_ID }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SRB_TrCH_MappingItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SRB_TrCH_MappingItem, SRB_TrCH_MappingItem_sequence); return offset; } static const per_sequence_t SRB_TrCH_Mapping_sequence_of[1] = { { &hf_ranap_SRB_TrCH_Mapping_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_SRB_TrCH_MappingItem }, }; static int dissect_ranap_SRB_TrCH_Mapping(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_SRB_TrCH_Mapping, SRB_TrCH_Mapping_sequence_of, 1, maxNrOfSRBs, FALSE); return offset; } static const value_string ranap_SRVCC_HO_Indication_vals[] = { { 0, "ps-and-cs" }, { 1, "cs-only" }, { 0, NULL } }; static int dissect_ranap_SRVCC_HO_Indication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_BIT_STRING_SIZE_128(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 128, 128, FALSE, NULL, NULL); return offset; } static const per_sequence_t SRVCC_Information_sequence[] = { { &hf_ranap_nonce , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_BIT_STRING_SIZE_128 }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SRVCC_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SRVCC_Information, SRVCC_Information_sequence); return offset; } static const value_string ranap_SRVCC_Operation_Possible_vals[] = { { 0, "srvcc-possible" }, { 0, NULL } }; static int dissect_ranap_SRVCC_Operation_Possible(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 1, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_Target_ToSource_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 366 "../../asn1/ranap/ranap.cnf" dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU ); return offset; } static int dissect_ranap_TargetBSS_ToSourceBSS_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static const value_string ranap_TargetID_vals[] = { { 0, "targetRNC-ID" }, { 1, "cGI" }, { 2, "targeteNB-ID" }, { 0, NULL } }; static const per_choice_t TargetID_choice[] = { { 0, &hf_ranap_targetRNC_ID , ASN1_EXTENSION_ROOT , dissect_ranap_TargetRNC_ID }, { 1, &hf_ranap_cGI , ASN1_EXTENSION_ROOT , dissect_ranap_CGI }, { 2, &hf_ranap_targeteNB_ID , ASN1_NOT_EXTENSION_ROOT, dissect_ranap_TargetENB_ID }, { 0, NULL, 0, NULL } }; static int dissect_ranap_TargetID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_TargetID, TargetID_choice, NULL); return offset; } static const per_sequence_t TargetRNC_ToSourceRNC_TransparentContainer_sequence[] = { { &hf_ranap_rRC_Container , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RRC_Container }, { &hf_ranap_d_RNTI , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_D_RNTI }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TargetRNC_ToSourceRNC_TransparentContainer, TargetRNC_ToSourceRNC_TransparentContainer_sequence); return offset; } static int dissect_ranap_TMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 4, 4, FALSE, NULL); return offset; } static const value_string ranap_TemporaryUE_ID_vals[] = { { 0, "tMSI" }, { 1, "p-TMSI" }, { 0, NULL } }; static const per_choice_t TemporaryUE_ID_choice[] = { { 0, &hf_ranap_tMSI , ASN1_EXTENSION_ROOT , dissect_ranap_TMSI }, { 1, &hf_ranap_p_TMSI , ASN1_EXTENSION_ROOT , dissect_ranap_P_TMSI }, { 0, NULL, 0, NULL } }; static int dissect_ranap_TemporaryUE_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_TemporaryUE_ID, TemporaryUE_ID_choice, NULL); return offset; } static int dissect_ranap_TimeToMBMSDataTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 1, FALSE, NULL); return offset; } static const per_sequence_t TraceRecordingSessionInformation_sequence[] = { { &hf_ranap_traceReference, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TraceReference }, { &hf_ranap_traceRecordingSessionReference, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TraceRecordingSessionReference }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TraceRecordingSessionInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TraceRecordingSessionInformation, TraceRecordingSessionInformation_sequence); return offset; } static int dissect_ranap_TraceType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 1, FALSE, NULL); return offset; } static int dissect_ranap_TransportLayerAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 302 "../../asn1/ranap/ranap.cnf" tvbuff_t *parameter_tvb=NULL; proto_item *item; proto_tree *subtree, *nsap_tree; gint tvb_len; offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 1, 160, TRUE, &parameter_tvb, NULL); if (!parameter_tvb) return offset; /* Get the length */ tvb_len = tvb_length(parameter_tvb); subtree = proto_item_add_subtree(actx->created_item, ett_ranap_TransportLayerAddress); if (tvb_len==4){ /* IPv4 */ proto_tree_add_item(subtree, hf_ranap_transportLayerAddress_ipv4, parameter_tvb, 0, tvb_len, ENC_BIG_ENDIAN); } if (tvb_len==16){ /* IPv6 */ proto_tree_add_item(subtree, hf_ranap_transportLayerAddress_ipv6, parameter_tvb, 0, tvb_len, ENC_NA); } if (tvb_len==20){ item = proto_tree_add_item(subtree, hf_ranap_transportLayerAddress_nsap, parameter_tvb, 0, tvb_len, ENC_NA); nsap_tree = proto_item_add_subtree(item, ett_ranap_TransportLayerAddress_nsap); dissect_nsap(parameter_tvb, 0, 20, nsap_tree); } return offset; } static int dissect_ranap_TriggerID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 22, FALSE, NULL); return offset; } static const value_string ranap_TypeOfError_vals[] = { { 0, "not-understood" }, { 1, "missing" }, { 0, NULL } }; static int dissect_ranap_TypeOfError(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_UE_AggregateMaximumBitRateDownlink(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 1000000000U, NULL, FALSE); return offset; } static int dissect_ranap_UE_AggregateMaximumBitRateUplink(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 1000000000U, NULL, FALSE); return offset; } static const per_sequence_t UE_AggregateMaximumBitRate_sequence[] = { { &hf_ranap_uE_AggregateMaximumBitRateDownlink, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UE_AggregateMaximumBitRateDownlink }, { &hf_ranap_uE_AggregateMaximumBitRateUplink, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UE_AggregateMaximumBitRateUplink }, { NULL, 0, 0, NULL } }; static int dissect_ranap_UE_AggregateMaximumBitRate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_UE_AggregateMaximumBitRate, UE_AggregateMaximumBitRate_sequence); return offset; } static int dissect_ranap_UE_History_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, NULL); return offset; } static int dissect_ranap_UESBI_IuA(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 1, 128, FALSE, NULL, NULL); return offset; } static int dissect_ranap_UESBI_IuB(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 1, 128, FALSE, NULL, NULL); return offset; } static const per_sequence_t UESBI_Iu_sequence[] = { { &hf_ranap_uESBI_IuA , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UESBI_IuA }, { &hf_ranap_uESBI_IuB , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UESBI_IuB }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_UESBI_Iu(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_UESBI_Iu, UESBI_Iu_sequence); return offset; } static int dissect_ranap_UL_GTP_PDU_SequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, NULL, FALSE); return offset; } static int dissect_ranap_UL_N_PDU_SequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, NULL, FALSE); return offset; } static int dissect_ranap_UP_ModeVersions(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 16, 16, FALSE, NULL, NULL); return offset; } static const value_string ranap_UserPlaneMode_vals[] = { { 0, "transparent-mode" }, { 1, "support-mode-for-predefined-SDU-sizes" }, { 0, NULL } }; static int dissect_ranap_UserPlaneMode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, TRUE, 0, NULL); return offset; } static int dissect_ranap_INTEGER_0_359(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 359U, NULL, FALSE); return offset; } static int dissect_ranap_INTEGER_0_2047(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 2047U, NULL, FALSE); return offset; } static const per_sequence_t HorizontalSpeedAndBearing_sequence[] = { { &hf_ranap_bearing , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_359 }, { &hf_ranap_horizontalSpeed, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_2047 }, { NULL, 0, 0, NULL } }; static int dissect_ranap_HorizontalSpeedAndBearing(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_HorizontalSpeedAndBearing, HorizontalSpeedAndBearing_sequence); return offset; } static const per_sequence_t HorizontalVelocity_sequence[] = { { &hf_ranap_horizontalSpeedAndBearing, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_HorizontalSpeedAndBearing }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_HorizontalVelocity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_HorizontalVelocity, HorizontalVelocity_sequence); return offset; } static int dissect_ranap_INTEGER_0_255(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, NULL, FALSE); return offset; } static const value_string ranap_VerticalSpeedDirection_vals[] = { { 0, "upward" }, { 1, "downward" }, { 0, NULL } }; static int dissect_ranap_VerticalSpeedDirection(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 2, NULL, FALSE, 0, NULL); return offset; } static const per_sequence_t VerticalVelocity_sequence[] = { { &hf_ranap_veritcalSpeed , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_255 }, { &hf_ranap_veritcalSpeedDirection, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_VerticalSpeedDirection }, { NULL, 0, 0, NULL } }; static int dissect_ranap_VerticalVelocity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_VerticalVelocity, VerticalVelocity_sequence); return offset; } static const per_sequence_t HorizontalWithVerticalVelocity_sequence[] = { { &hf_ranap_horizontalSpeedAndBearing, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_HorizontalSpeedAndBearing }, { &hf_ranap_veritcalVelocity, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_VerticalVelocity }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_HorizontalWithVerticalVelocity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_HorizontalWithVerticalVelocity, HorizontalWithVerticalVelocity_sequence); return offset; } static const per_sequence_t HorizontalVelocityWithUncertainty_sequence[] = { { &hf_ranap_horizontalSpeedAndBearing, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_HorizontalSpeedAndBearing }, { &hf_ranap_uncertaintySpeed, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_255 }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_HorizontalVelocityWithUncertainty(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_HorizontalVelocityWithUncertainty, HorizontalVelocityWithUncertainty_sequence); return offset; } static const per_sequence_t HorizontalWithVerticalVelocityAndUncertainty_sequence[] = { { &hf_ranap_horizontalSpeedAndBearing, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_HorizontalSpeedAndBearing }, { &hf_ranap_veritcalVelocity, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_VerticalVelocity }, { &hf_ranap_horizontalUncertaintySpeed, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_255 }, { &hf_ranap_verticalUncertaintySpeed, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_INTEGER_0_255 }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_HorizontalWithVerticalVelocityAndUncertainty(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_HorizontalWithVerticalVelocityAndUncertainty, HorizontalWithVerticalVelocityAndUncertainty_sequence); return offset; } static const value_string ranap_VelocityEstimate_vals[] = { { 0, "horizontalVelocity" }, { 1, "horizontalWithVerticalVelocity" }, { 2, "horizontalVelocityWithUncertainty" }, { 3, "horizontalWithVeritcalVelocityAndUncertainty" }, { 0, NULL } }; static const per_choice_t VelocityEstimate_choice[] = { { 0, &hf_ranap_horizontalVelocity, ASN1_EXTENSION_ROOT , dissect_ranap_HorizontalVelocity }, { 1, &hf_ranap_horizontalWithVerticalVelocity, ASN1_EXTENSION_ROOT , dissect_ranap_HorizontalWithVerticalVelocity }, { 2, &hf_ranap_horizontalVelocityWithUncertainty, ASN1_EXTENSION_ROOT , dissect_ranap_HorizontalVelocityWithUncertainty }, { 3, &hf_ranap_horizontalWithVeritcalVelocityAndUncertainty, ASN1_EXTENSION_ROOT , dissect_ranap_HorizontalWithVerticalVelocityAndUncertainty }, { 0, NULL, 0, NULL } }; static int dissect_ranap_VelocityEstimate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_VelocityEstimate, VelocityEstimate_choice, NULL); return offset; } static int dissect_ranap_RAB_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 142 "../../asn1/ranap/ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfRABs); offset = dissect_ranap_ProtocolIE_ContainerList(tvb, offset, actx, tree, hf_index); asn1_stack_frame_pop(actx, "ProtocolIE-ContainerList"); return offset; } static int dissect_ranap_RAB_IE_ContainerPairList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 150 "../../asn1/ranap/ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerPairList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfRABs); offset = dissect_ranap_ProtocolIE_ContainerPairList(tvb, offset, actx, tree, hf_index); asn1_stack_frame_pop(actx, "ProtocolIE-ContainerPairList"); return offset; } static int dissect_ranap_IuSigConId_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 167 "../../asn1/ranap/ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfIuSigConIds); offset = dissect_ranap_ProtocolIE_ContainerList(tvb, offset, actx, tree, hf_index); asn1_stack_frame_pop(actx, "ProtocolIE-ContainerList"); return offset; } static int dissect_ranap_DirectTransfer_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 175 "../../asn1/ranap/ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfDTs); offset = dissect_ranap_ProtocolIE_ContainerList(tvb, offset, actx, tree, hf_index); asn1_stack_frame_pop(actx, "ProtocolIE-ContainerList"); return offset; } static const per_sequence_t Iu_ReleaseCommand_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Iu_ReleaseCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Iu_ReleaseCommand, Iu_ReleaseCommand_sequence); return offset; } static const per_sequence_t Iu_ReleaseComplete_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Iu_ReleaseComplete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Iu_ReleaseComplete, Iu_ReleaseComplete_sequence); return offset; } static int dissect_ranap_RAB_DataVolumeReportList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t DataVolumeList_item_sequence[] = { { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_UnsuccessfullyTransmittedDataVolume }, { &hf_ranap_dataVolumeReference, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DataVolumeReference }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_DataVolumeList_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_DataVolumeList_item, DataVolumeList_item_sequence); return offset; } static const per_sequence_t DataVolumeList_sequence_of[1] = { { &hf_ranap_DataVolumeList_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_DataVolumeList_item }, }; static int dissect_ranap_DataVolumeList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_DataVolumeList, DataVolumeList_sequence_of, 1, maxNrOfVol, FALSE); return offset; } static const per_sequence_t RAB_DataVolumeReportItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_rab_dl_UnsuccessfullyTransmittedDataVolume, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DataVolumeList }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_DataVolumeReportItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_DataVolumeReportItem, RAB_DataVolumeReportItem_sequence); return offset; } static int dissect_ranap_RAB_ReleasedList_IuRelComp(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_ReleasedItem_IuRelComp_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_dL_GTP_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DL_GTP_PDU_SequenceNumber }, { &hf_ranap_uL_GTP_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UL_GTP_PDU_SequenceNumber }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_ReleasedItem_IuRelComp(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_ReleasedItem_IuRelComp, RAB_ReleasedItem_IuRelComp_sequence); return offset; } static const per_sequence_t RelocationRequired_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RelocationRequired(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RelocationRequired, RelocationRequired_sequence); return offset; } static const per_sequence_t RelocationCommand_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RelocationCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RelocationCommand, RelocationCommand_sequence); return offset; } static int dissect_ranap_RAB_RelocationReleaseList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_RelocationReleaseItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_RelocationReleaseItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_RelocationReleaseItem, RAB_RelocationReleaseItem_sequence); return offset; } static int dissect_ranap_RAB_DataForwardingList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_DataForwardingItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_transportLayerAddress, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TransportLayerAddress }, { &hf_ranap_iuTransportAssociation, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_IuTransportAssociation }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_DataForwardingItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_DataForwardingItem, RAB_DataForwardingItem_sequence); return offset; } static const per_sequence_t RelocationPreparationFailure_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RelocationPreparationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RelocationPreparationFailure, RelocationPreparationFailure_sequence); return offset; } static const per_sequence_t RelocationRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RelocationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RelocationRequest, RelocationRequest_sequence); return offset; } static int dissect_ranap_RAB_SetupList_RelocReq(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t UserPlaneInformation_sequence[] = { { &hf_ranap_userPlaneMode , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_UserPlaneMode }, { &hf_ranap_uP_ModeVersions, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_UP_ModeVersions }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_UserPlaneInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_UserPlaneInformation, UserPlaneInformation_sequence); return offset; } static const per_sequence_t RAB_SetupItem_RelocReq_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_nAS_SynchronisationIndicator, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_NAS_SynchronisationIndicator }, { &hf_ranap_rAB_Parameters, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_Parameters }, { &hf_ranap_dataVolumeReportingIndication, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DataVolumeReportingIndication }, { &hf_ranap_pDP_TypeInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_PDP_TypeInformation }, { &hf_ranap_userPlaneInformation, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_UserPlaneInformation }, { &hf_ranap_transportLayerAddress, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TransportLayerAddress }, { &hf_ranap_iuTransportAssociation, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_IuTransportAssociation }, { &hf_ranap_service_Handover, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Service_Handover }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_SetupItem_RelocReq(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_SetupItem_RelocReq, RAB_SetupItem_RelocReq_sequence); return offset; } static const per_sequence_t JoinedMBMSBearerService_IEs_item_sequence[] = { { &hf_ranap_tMGI , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TMGI }, { &hf_ranap_mBMS_PTP_RAB_ID, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_MBMS_PTP_RAB_ID }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_JoinedMBMSBearerService_IEs_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_JoinedMBMSBearerService_IEs_item, JoinedMBMSBearerService_IEs_item_sequence); return offset; } static const per_sequence_t JoinedMBMSBearerService_IEs_sequence_of[1] = { { &hf_ranap_JoinedMBMSBearerService_IEs_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_JoinedMBMSBearerService_IEs_item }, }; static int dissect_ranap_JoinedMBMSBearerService_IEs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_JoinedMBMSBearerService_IEs, JoinedMBMSBearerService_IEs_sequence_of, 1, maxnoofMulticastServicesPerUE, FALSE); return offset; } static const per_sequence_t CNMBMSLinkingInformation_sequence[] = { { &hf_ranap_joinedMBMSBearerService_IEs, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_JoinedMBMSBearerService_IEs }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_CNMBMSLinkingInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_CNMBMSLinkingInformation, CNMBMSLinkingInformation_sequence); return offset; } static const per_sequence_t RelocationRequestAcknowledge_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RelocationRequestAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RelocationRequestAcknowledge, RelocationRequestAcknowledge_sequence); return offset; } static int dissect_ranap_RAB_SetupList_RelocReqAck(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_SetupItem_RelocReqAck_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_transportLayerAddress, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TransportLayerAddress }, { &hf_ranap_iuTransportAssociation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_IuTransportAssociation }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_SetupItem_RelocReqAck(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_SetupItem_RelocReqAck, RAB_SetupItem_RelocReqAck_sequence); return offset; } static int dissect_ranap_RAB_FailedList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_FailedItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_cause , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Cause }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_FailedItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_FailedItem, RAB_FailedItem_sequence); return offset; } static const per_sequence_t RelocationFailure_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RelocationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RelocationFailure, RelocationFailure_sequence); return offset; } static const per_sequence_t RelocationCancel_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RelocationCancel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RelocationCancel, RelocationCancel_sequence); return offset; } static const per_sequence_t RelocationCancelAcknowledge_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RelocationCancelAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RelocationCancelAcknowledge, RelocationCancelAcknowledge_sequence); return offset; } static const per_sequence_t SRNS_ContextRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SRNS_ContextRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SRNS_ContextRequest, SRNS_ContextRequest_sequence); return offset; } static int dissect_ranap_RAB_DataForwardingList_SRNS_CtxReq(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_DataForwardingItem_SRNS_CtxReq_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_DataForwardingItem_SRNS_CtxReq(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_DataForwardingItem_SRNS_CtxReq, RAB_DataForwardingItem_SRNS_CtxReq_sequence); return offset; } static const per_sequence_t SRNS_ContextResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SRNS_ContextResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SRNS_ContextResponse, SRNS_ContextResponse_sequence); return offset; } static int dissect_ranap_RAB_ContextList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_ContextItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_dl_GTP_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DL_GTP_PDU_SequenceNumber }, { &hf_ranap_ul_GTP_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UL_GTP_PDU_SequenceNumber }, { &hf_ranap_dl_N_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DL_N_PDU_SequenceNumber }, { &hf_ranap_ul_N_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UL_N_PDU_SequenceNumber }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_ContextItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_ContextItem, RAB_ContextItem_sequence); return offset; } static int dissect_ranap_RAB_ContextFailedtoTransferList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RABs_ContextFailedtoTransferItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_cause , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Cause }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RABs_ContextFailedtoTransferItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RABs_ContextFailedtoTransferItem, RABs_ContextFailedtoTransferItem_sequence); return offset; } static const per_sequence_t SecurityModeCommand_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SecurityModeCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SecurityModeCommand, SecurityModeCommand_sequence); return offset; } static const per_sequence_t SecurityModeComplete_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SecurityModeComplete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SecurityModeComplete, SecurityModeComplete_sequence); return offset; } static const per_sequence_t SecurityModeReject_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SecurityModeReject(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SecurityModeReject, SecurityModeReject_sequence); return offset; } static const per_sequence_t DataVolumeReportRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_DataVolumeReportRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_DataVolumeReportRequest, DataVolumeReportRequest_sequence); return offset; } static int dissect_ranap_RAB_DataVolumeReportRequestList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_DataVolumeReportRequestItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_DataVolumeReportRequestItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_DataVolumeReportRequestItem, RAB_DataVolumeReportRequestItem_sequence); return offset; } static const per_sequence_t DataVolumeReport_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_DataVolumeReport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_DataVolumeReport, DataVolumeReport_sequence); return offset; } static int dissect_ranap_RAB_FailedtoReportList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RABs_failed_to_reportItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_cause , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Cause }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RABs_failed_to_reportItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RABs_failed_to_reportItem, RABs_failed_to_reportItem_sequence); return offset; } static const per_sequence_t Reset_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Reset(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Reset, Reset_sequence); return offset; } static const per_sequence_t ResetAcknowledge_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ResetAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ResetAcknowledge, ResetAcknowledge_sequence); return offset; } static const per_sequence_t ResetResource_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ResetResource(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ResetResource, ResetResource_sequence); return offset; } static int dissect_ranap_ResetResourceList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_IuSigConId_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t ResetResourceItem_sequence[] = { { &hf_ranap_iuSigConId , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_IuSignallingConnectionIdentifier }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ResetResourceItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ResetResourceItem, ResetResourceItem_sequence); return offset; } static const per_sequence_t ResetResourceAcknowledge_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ResetResourceAcknowledge(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ResetResourceAcknowledge, ResetResourceAcknowledge_sequence); return offset; } static int dissect_ranap_ResetResourceAckList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_IuSigConId_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t ResetResourceAckItem_sequence[] = { { &hf_ranap_iuSigConId , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_IuSignallingConnectionIdentifier }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ResetResourceAckItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ResetResourceAckItem, ResetResourceAckItem_sequence); return offset; } static const per_sequence_t RAB_ReleaseRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_ReleaseRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_ReleaseRequest, RAB_ReleaseRequest_sequence); return offset; } static int dissect_ranap_RAB_ReleaseList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_ReleaseItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_cause , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Cause }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_ReleaseItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_ReleaseItem, RAB_ReleaseItem_sequence); return offset; } static const per_sequence_t Iu_ReleaseRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Iu_ReleaseRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Iu_ReleaseRequest, Iu_ReleaseRequest_sequence); return offset; } static const per_sequence_t RelocationDetect_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RelocationDetect(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RelocationDetect, RelocationDetect_sequence); return offset; } static const per_sequence_t RelocationComplete_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RelocationComplete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RelocationComplete, RelocationComplete_sequence); return offset; } static const per_sequence_t EnhancedRelocationCompleteRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_EnhancedRelocationCompleteRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_EnhancedRelocationCompleteRequest, EnhancedRelocationCompleteRequest_sequence); return offset; } static int dissect_ranap_RAB_SetupList_EnhancedRelocCompleteReq(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_SetupItem_EnhancedRelocCompleteReq_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_transportLayerAddressReq1, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TransportLayerAddress }, { &hf_ranap_iuTransportAssociationReq1, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_IuTransportAssociation }, { &hf_ranap_ass_RAB_Parameters, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Ass_RAB_Parameters }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_SetupItem_EnhancedRelocCompleteReq(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_SetupItem_EnhancedRelocCompleteReq, RAB_SetupItem_EnhancedRelocCompleteReq_sequence); return offset; } static const per_sequence_t EnhancedRelocationCompleteResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_EnhancedRelocationCompleteResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_EnhancedRelocationCompleteResponse, EnhancedRelocationCompleteResponse_sequence); return offset; } static int dissect_ranap_RAB_SetupList_EnhancedRelocCompleteRes(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static int dissect_ranap_RAB_ToBeReleasedList_EnhancedRelocCompleteRes(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_SetupItem_EnhancedRelocCompleteRes_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_rAB_Parameters, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RAB_Parameters }, { &hf_ranap_userPlaneInformation, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_UserPlaneInformation }, { &hf_ranap_transportLayerAddressRes1, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TransportLayerAddress }, { &hf_ranap_iuTransportAssociationRes1, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_IuTransportAssociation }, { &hf_ranap_rab2beReleasedList, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RAB_ToBeReleasedList_EnhancedRelocCompleteRes }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_SetupItem_EnhancedRelocCompleteRes(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_SetupItem_EnhancedRelocCompleteRes, RAB_SetupItem_EnhancedRelocCompleteRes_sequence); return offset; } static const per_sequence_t RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_cause , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Cause }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes, RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_sequence); return offset; } static const per_sequence_t EnhancedRelocationCompleteFailure_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_EnhancedRelocationCompleteFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_EnhancedRelocationCompleteFailure, EnhancedRelocationCompleteFailure_sequence); return offset; } static const per_sequence_t EnhancedRelocationCompleteConfirm_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_EnhancedRelocationCompleteConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_EnhancedRelocationCompleteConfirm, EnhancedRelocationCompleteConfirm_sequence); return offset; } static const per_sequence_t Paging_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Paging(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Paging, Paging_sequence); return offset; } static const per_sequence_t CommonID_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_CommonID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_CommonID, CommonID_sequence); return offset; } static const per_sequence_t CN_InvokeTrace_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_CN_InvokeTrace(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_CN_InvokeTrace, CN_InvokeTrace_sequence); return offset; } static const per_sequence_t CN_DeactivateTrace_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_CN_DeactivateTrace(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_CN_DeactivateTrace, CN_DeactivateTrace_sequence); return offset; } static const per_sequence_t LocationReportingControl_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LocationReportingControl(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LocationReportingControl, LocationReportingControl_sequence); return offset; } static const per_sequence_t LocationReport_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LocationReport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LocationReport, LocationReport_sequence); return offset; } static const per_sequence_t InitialUE_Message_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_InitialUE_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_InitialUE_Message, InitialUE_Message_sequence); return offset; } static const per_sequence_t DirectTransfer_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_DirectTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_DirectTransfer, DirectTransfer_sequence); return offset; } static int dissect_ranap_RedirectionIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_ProtocolIE_Container(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t Overload_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Overload(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Overload, Overload_sequence); return offset; } static const per_sequence_t ErrorIndication_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ErrorIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ErrorIndication, ErrorIndication_sequence); return offset; } static const per_sequence_t SRNS_DataForwardCommand_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SRNS_DataForwardCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SRNS_DataForwardCommand, SRNS_DataForwardCommand_sequence); return offset; } static const per_sequence_t ForwardSRNS_Context_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_ForwardSRNS_Context(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_ForwardSRNS_Context, ForwardSRNS_Context_sequence); return offset; } static const per_sequence_t RAB_AssignmentRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_AssignmentRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_AssignmentRequest, RAB_AssignmentRequest_sequence); return offset; } static int dissect_ranap_RAB_SetupOrModifyList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerPairList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t TransportLayerInformation_sequence[] = { { &hf_ranap_transportLayerAddress, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TransportLayerAddress }, { &hf_ranap_iuTransportAssociation, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_IuTransportAssociation }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TransportLayerInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TransportLayerInformation, TransportLayerInformation_sequence); return offset; } static const per_sequence_t RAB_SetupOrModifyItemFirst_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_nAS_SynchronisationIndicator, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_NAS_SynchronisationIndicator }, { &hf_ranap_rAB_Parameters, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_RAB_Parameters }, { &hf_ranap_userPlaneInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UserPlaneInformation }, { &hf_ranap_transportLayerInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TransportLayerInformation }, { &hf_ranap_service_Handover, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Service_Handover }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_SetupOrModifyItemFirst(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_SetupOrModifyItemFirst, RAB_SetupOrModifyItemFirst_sequence); return offset; } static const per_sequence_t RAB_SetupOrModifyItemSecond_sequence[] = { { &hf_ranap_pDP_TypeInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_PDP_TypeInformation }, { &hf_ranap_dataVolumeReportingIndication, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DataVolumeReportingIndication }, { &hf_ranap_dl_GTP_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DL_GTP_PDU_SequenceNumber }, { &hf_ranap_ul_GTP_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UL_GTP_PDU_SequenceNumber }, { &hf_ranap_dl_N_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DL_N_PDU_SequenceNumber }, { &hf_ranap_ul_N_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UL_N_PDU_SequenceNumber }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_SetupOrModifyItemSecond(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_SetupOrModifyItemSecond, RAB_SetupOrModifyItemSecond_sequence); return offset; } static const per_sequence_t RAB_AssignmentResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_AssignmentResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_AssignmentResponse, RAB_AssignmentResponse_sequence); return offset; } static int dissect_ranap_RAB_SetupOrModifiedList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_SetupOrModifiedItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_transportLayerAddress, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TransportLayerAddress }, { &hf_ranap_iuTransportAssociation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_IuTransportAssociation }, { &hf_ranap_dl_dataVolumes, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DataVolumeList }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_SetupOrModifiedItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_SetupOrModifiedItem, RAB_SetupOrModifiedItem_sequence); return offset; } static int dissect_ranap_RAB_ReleasedList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_ReleasedItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_dl_dataVolumes, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DataVolumeList }, { &hf_ranap_dL_GTP_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DL_GTP_PDU_SequenceNumber }, { &hf_ranap_uL_GTP_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UL_GTP_PDU_SequenceNumber }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_ReleasedItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_ReleasedItem, RAB_ReleasedItem_sequence); return offset; } static int dissect_ranap_RAB_QueuedList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_QueuedItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_QueuedItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_QueuedItem, RAB_QueuedItem_sequence); return offset; } static int dissect_ranap_RAB_ReleaseFailedList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_FailedList(tvb, offset, actx, tree, hf_index); return offset; } static int dissect_ranap_GERAN_Iumode_RAB_FailedList_RABAssgntResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_cause , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Cause }, { &hf_ranap_gERAN_Classmark, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_GERAN_Classmark }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item, GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_sequence); return offset; } static const per_sequence_t PrivateMessage_sequence[] = { { &hf_ranap_privateIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_PrivateIE_Container }, { NULL, 0, 0, NULL } }; static int dissect_ranap_PrivateMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_PrivateMessage, PrivateMessage_sequence); return offset; } static const per_sequence_t RANAP_RelocationInformation_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RANAP_RelocationInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RANAP_RelocationInformation, RANAP_RelocationInformation_sequence); return offset; } static int dissect_ranap_DirectTransferInformationList_RANAP_RelocInf(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_DirectTransfer_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t DirectTransferInformationItem_RANAP_RelocInf_sequence[] = { { &hf_ranap_nAS_PDU , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_NAS_PDU }, { &hf_ranap_sAPI , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_SAPI }, { &hf_ranap_cN_DomainIndicator, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_CN_DomainIndicator }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_DirectTransferInformationItem_RANAP_RelocInf(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_DirectTransferInformationItem_RANAP_RelocInf, DirectTransferInformationItem_RANAP_RelocInf_sequence); return offset; } static int dissect_ranap_RAB_ContextList_RANAP_RelocInf(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_ContextItem_RANAP_RelocInf_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_dl_GTP_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DL_GTP_PDU_SequenceNumber }, { &hf_ranap_ul_GTP_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UL_GTP_PDU_SequenceNumber }, { &hf_ranap_dl_N_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DL_N_PDU_SequenceNumber }, { &hf_ranap_ul_N_PDU_SequenceNumber, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_UL_N_PDU_SequenceNumber }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_ContextItem_RANAP_RelocInf(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_ContextItem_RANAP_RelocInf, RAB_ContextItem_RANAP_RelocInf_sequence); return offset; } static const per_sequence_t RANAP_EnhancedRelocationInformationRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RANAP_EnhancedRelocationInformationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RANAP_EnhancedRelocationInformationRequest, RANAP_EnhancedRelocationInformationRequest_sequence); return offset; } static int dissect_ranap_RAB_SetupList_EnhRelocInfoReq(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t TNLInformationEnhRelInfoReq_sequence[] = { { &hf_ranap_transportLayerAddress, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TransportLayerAddress }, { &hf_ranap_iuTransportAssociation, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_IuTransportAssociation }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TNLInformationEnhRelInfoReq(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TNLInformationEnhRelInfoReq, TNLInformationEnhRelInfoReq_sequence); return offset; } static const per_sequence_t RAB_SetupItem_EnhRelocInfoReq_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_cN_DomainIndicator, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_CN_DomainIndicator }, { &hf_ranap_rAB_Parameters, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_Parameters }, { &hf_ranap_dataVolumeReportingIndication, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_DataVolumeReportingIndication }, { &hf_ranap_pDP_TypeInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_PDP_TypeInformation }, { &hf_ranap_userPlaneInformation, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_UserPlaneInformation }, { &hf_ranap_dataForwardingInformation, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TNLInformationEnhRelInfoReq }, { &hf_ranap_sourceSideIuULTNLInfo, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TNLInformationEnhRelInfoReq }, { &hf_ranap_service_Handover, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Service_Handover }, { &hf_ranap_alt_RAB_Parameters, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Alt_RAB_Parameters }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_SetupItem_EnhRelocInfoReq(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_SetupItem_EnhRelocInfoReq, RAB_SetupItem_EnhRelocInfoReq_sequence); return offset; } static const per_sequence_t RANAP_EnhancedRelocationInformationResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RANAP_EnhancedRelocationInformationResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RANAP_EnhancedRelocationInformationResponse, RANAP_EnhancedRelocationInformationResponse_sequence); return offset; } static int dissect_ranap_RAB_SetupList_EnhRelocInfoRes(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t TNLInformationEnhRelInfoRes_sequence[] = { { &hf_ranap_dl_forwardingTransportLayerAddress, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TransportLayerAddress }, { &hf_ranap_dl_forwardingTransportAssociation, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_IuTransportAssociation }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_TNLInformationEnhRelInfoRes(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_TNLInformationEnhRelInfoRes, TNLInformationEnhRelInfoRes_sequence); return offset; } static const per_sequence_t RAB_SetupItem_EnhRelocInfoRes_sequence[] = { { &hf_ranap_cN_DomainIndicator, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_CN_DomainIndicator }, { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_dataForwardingInformation_01, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_TNLInformationEnhRelInfoRes }, { &hf_ranap_ass_RAB_Parameters, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_Ass_RAB_Parameters }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_SetupItem_EnhRelocInfoRes(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_SetupItem_EnhRelocInfoRes, RAB_SetupItem_EnhRelocInfoRes_sequence); return offset; } static int dissect_ranap_RAB_FailedList_EnhRelocInfoRes(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_FailedItem_EnhRelocInfoRes_sequence[] = { { &hf_ranap_cN_DomainIndicator, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_CN_DomainIndicator }, { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_cause , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Cause }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_FailedItem_EnhRelocInfoRes(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_FailedItem_EnhRelocInfoRes, RAB_FailedItem_EnhRelocInfoRes_sequence); return offset; } static const per_sequence_t RAB_ModifyRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_ModifyRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_ModifyRequest, RAB_ModifyRequest_sequence); return offset; } static int dissect_ranap_RAB_ModifyList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ranap_RAB_IE_ContainerList(tvb, offset, actx, tree, hf_index); return offset; } static const per_sequence_t RAB_ModifyItem_sequence[] = { { &hf_ranap_rAB_ID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_RAB_ID }, { &hf_ranap_requested_RAB_Parameter_Values, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Requested_RAB_Parameter_Values }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_RAB_ModifyItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_RAB_ModifyItem, RAB_ModifyItem_sequence); return offset; } static const per_sequence_t LocationRelatedDataRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LocationRelatedDataRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LocationRelatedDataRequest, LocationRelatedDataRequest_sequence); return offset; } static const per_sequence_t LocationRelatedDataResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LocationRelatedDataResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LocationRelatedDataResponse, LocationRelatedDataResponse_sequence); return offset; } static const per_sequence_t LocationRelatedDataFailure_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LocationRelatedDataFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LocationRelatedDataFailure, LocationRelatedDataFailure_sequence); return offset; } static const per_sequence_t InformationTransferIndication_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_InformationTransferIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_InformationTransferIndication, InformationTransferIndication_sequence); return offset; } static const per_sequence_t InformationTransferConfirmation_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_InformationTransferConfirmation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_InformationTransferConfirmation, InformationTransferConfirmation_sequence); return offset; } static const per_sequence_t InformationTransferFailure_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_InformationTransferFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_InformationTransferFailure, InformationTransferFailure_sequence); return offset; } static const per_sequence_t UESpecificInformationIndication_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_UESpecificInformationIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_UESpecificInformationIndication, UESpecificInformationIndication_sequence); return offset; } static const per_sequence_t DirectInformationTransfer_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_DirectInformationTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_DirectInformationTransfer, DirectInformationTransfer_sequence); return offset; } static const per_sequence_t UplinkInformationExchangeRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_UplinkInformationExchangeRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_UplinkInformationExchangeRequest, UplinkInformationExchangeRequest_sequence); return offset; } static const per_sequence_t UplinkInformationExchangeResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_UplinkInformationExchangeResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_UplinkInformationExchangeResponse, UplinkInformationExchangeResponse_sequence); return offset; } static const per_sequence_t UplinkInformationExchangeFailure_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_UplinkInformationExchangeFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_UplinkInformationExchangeFailure, UplinkInformationExchangeFailure_sequence); return offset; } static const per_sequence_t MBMSSessionStart_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSSessionStart(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSSessionStart, MBMSSessionStart_sequence); return offset; } static const per_sequence_t MBMSSynchronisationInformation_sequence[] = { { &hf_ranap_mBMSHCIndicator, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_MBMSHCIndicator }, { &hf_ranap_iPMulticastAddress, ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_IPMulticastAddress }, { &hf_ranap_gTPDLTEID , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_GTP_TEI }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSSynchronisationInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSSynchronisationInformation, MBMSSynchronisationInformation_sequence); return offset; } static const per_sequence_t MBMSSessionStartResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSSessionStartResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSSessionStartResponse, MBMSSessionStartResponse_sequence); return offset; } static const per_sequence_t MBMSSessionStartFailure_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSSessionStartFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSSessionStartFailure, MBMSSessionStartFailure_sequence); return offset; } static const per_sequence_t MBMSSessionUpdate_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSSessionUpdate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSSessionUpdate, MBMSSessionUpdate_sequence); return offset; } static const per_sequence_t MBMSSessionUpdateResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSSessionUpdateResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSSessionUpdateResponse, MBMSSessionUpdateResponse_sequence); return offset; } static const per_sequence_t MBMSSessionUpdateFailure_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSSessionUpdateFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSSessionUpdateFailure, MBMSSessionUpdateFailure_sequence); return offset; } static const per_sequence_t MBMSSessionStop_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSSessionStop(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSSessionStop, MBMSSessionStop_sequence); return offset; } static const per_sequence_t MBMSSessionStopResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSSessionStopResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSSessionStopResponse, MBMSSessionStopResponse_sequence); return offset; } static const per_sequence_t MBMSUELinkingRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSUELinkingRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSUELinkingRequest, MBMSUELinkingRequest_sequence); return offset; } static const per_sequence_t LeftMBMSBearerService_IEs_item_sequence[] = { { &hf_ranap_tMGI , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TMGI }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_LeftMBMSBearerService_IEs_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_LeftMBMSBearerService_IEs_item, LeftMBMSBearerService_IEs_item_sequence); return offset; } static const per_sequence_t LeftMBMSBearerService_IEs_sequence_of[1] = { { &hf_ranap_LeftMBMSBearerService_IEs_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_LeftMBMSBearerService_IEs_item }, }; static int dissect_ranap_LeftMBMSBearerService_IEs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_LeftMBMSBearerService_IEs, LeftMBMSBearerService_IEs_sequence_of, 1, maxnoofMulticastServicesPerUE, FALSE); return offset; } static const per_sequence_t MBMSUELinkingResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSUELinkingResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSUELinkingResponse, MBMSUELinkingResponse_sequence); return offset; } static const per_sequence_t UnsuccessfulLinking_IEs_item_sequence[] = { { &hf_ranap_tMGI , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_TMGI }, { &hf_ranap_cause , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_Cause }, { &hf_ranap_iE_Extensions , ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_UnsuccessfulLinking_IEs_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_UnsuccessfulLinking_IEs_item, UnsuccessfulLinking_IEs_item_sequence); return offset; } static const per_sequence_t UnsuccessfulLinking_IEs_sequence_of[1] = { { &hf_ranap_UnsuccessfulLinking_IEs_item, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_UnsuccessfulLinking_IEs_item }, }; static int dissect_ranap_UnsuccessfulLinking_IEs(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_ranap_UnsuccessfulLinking_IEs, UnsuccessfulLinking_IEs_sequence_of, 1, maxnoofMulticastServicesPerUE, FALSE); return offset; } static const per_sequence_t MBMSRegistrationRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSRegistrationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSRegistrationRequest, MBMSRegistrationRequest_sequence); return offset; } static const per_sequence_t MBMSRegistrationResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSRegistrationResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSRegistrationResponse, MBMSRegistrationResponse_sequence); return offset; } static const per_sequence_t MBMSRegistrationFailure_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSRegistrationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSRegistrationFailure, MBMSRegistrationFailure_sequence); return offset; } static const per_sequence_t MBMSCNDe_RegistrationRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSCNDe_RegistrationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSCNDe_RegistrationRequest, MBMSCNDe_RegistrationRequest_sequence); return offset; } static const per_sequence_t MBMSCNDe_RegistrationResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSCNDe_RegistrationResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSCNDe_RegistrationResponse, MBMSCNDe_RegistrationResponse_sequence); return offset; } static const per_sequence_t MBMSRABEstablishmentIndication_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSRABEstablishmentIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSRABEstablishmentIndication, MBMSRABEstablishmentIndication_sequence); return offset; } static const per_sequence_t MBMSRABReleaseRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSRABReleaseRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSRABReleaseRequest, MBMSRABReleaseRequest_sequence); return offset; } static const per_sequence_t MBMSRABRelease_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSRABRelease(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSRABRelease, MBMSRABRelease_sequence); return offset; } static const per_sequence_t MBMSRABReleaseFailure_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_MBMSRABReleaseFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_MBMSRABReleaseFailure, MBMSRABReleaseFailure_sequence); return offset; } static const per_sequence_t SRVCC_CSKeysRequest_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SRVCC_CSKeysRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SRVCC_CSKeysRequest, SRVCC_CSKeysRequest_sequence); return offset; } static const per_sequence_t SRVCC_CSKeysResponse_sequence[] = { { &hf_ranap_protocolIEs , ASN1_EXTENSION_ROOT , ASN1_NOT_OPTIONAL, dissect_ranap_ProtocolIE_Container }, { &hf_ranap_protocolExtensions, ASN1_EXTENSION_ROOT , ASN1_OPTIONAL , dissect_ranap_ProtocolExtensionContainer }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SRVCC_CSKeysResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SRVCC_CSKeysResponse, SRVCC_CSKeysResponse_sequence); return offset; } static int dissect_ranap_InitiatingMessage_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_InitiatingMessageValue); return offset; } static const per_sequence_t InitiatingMessage_sequence[] = { { &hf_ranap_procedureCode , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProcedureCode }, { &hf_ranap_criticality , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Criticality }, { &hf_ranap_initiatingMessagevalue, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_InitiatingMessage_value }, { NULL, 0, 0, NULL } }; static int dissect_ranap_InitiatingMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_InitiatingMessage, InitiatingMessage_sequence); return offset; } static int dissect_ranap_SuccessfulOutcome_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_SuccessfulOutcomeValue); return offset; } static const per_sequence_t SuccessfulOutcome_sequence[] = { { &hf_ranap_procedureCode , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProcedureCode }, { &hf_ranap_criticality , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Criticality }, { &hf_ranap_successfulOutcome_value, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_SuccessfulOutcome_value }, { NULL, 0, 0, NULL } }; static int dissect_ranap_SuccessfulOutcome(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_SuccessfulOutcome, SuccessfulOutcome_sequence); return offset; } static int dissect_ranap_UnsuccessfulOutcome_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_UnsuccessfulOutcomeValue); return offset; } static const per_sequence_t UnsuccessfulOutcome_sequence[] = { { &hf_ranap_procedureCode , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProcedureCode }, { &hf_ranap_criticality , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Criticality }, { &hf_ranap_unsuccessfulOutcome_value, ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_UnsuccessfulOutcome_value }, { NULL, 0, 0, NULL } }; static int dissect_ranap_UnsuccessfulOutcome(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_UnsuccessfulOutcome, UnsuccessfulOutcome_sequence); return offset; } static int dissect_ranap_T_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_OutcomeValue); return offset; } static const per_sequence_t Outcome_sequence[] = { { &hf_ranap_procedureCode , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_ProcedureCode }, { &hf_ranap_criticality , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_Criticality }, { &hf_ranap_value , ASN1_NO_EXTENSIONS , ASN1_NOT_OPTIONAL, dissect_ranap_T_value }, { NULL, 0, 0, NULL } }; static int dissect_ranap_Outcome(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_ranap_Outcome, Outcome_sequence); return offset; } static const value_string ranap_RANAP_PDU_vals[] = { { 0, "initiatingMessage" }, { 1, "successfulOutcome" }, { 2, "unsuccessfulOutcome" }, { 3, "outcome" }, { 0, NULL } }; static const per_choice_t RANAP_PDU_choice[] = { { 0, &hf_ranap_initiatingMessage, ASN1_EXTENSION_ROOT , dissect_ranap_InitiatingMessage }, { 1, &hf_ranap_successfulOutcome, ASN1_EXTENSION_ROOT , dissect_ranap_SuccessfulOutcome }, { 2, &hf_ranap_unsuccessfulOutcome, ASN1_EXTENSION_ROOT , dissect_ranap_UnsuccessfulOutcome }, { 3, &hf_ranap_outcome , ASN1_EXTENSION_ROOT , dissect_ranap_Outcome }, { 0, NULL, 0, NULL } }; static int dissect_ranap_RANAP_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_ranap_RANAP_PDU, RANAP_PDU_choice, NULL); return offset; } /*--- PDUs ---*/ static int dissect_AccuracyFulfilmentIndicator_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_AccuracyFulfilmentIndicator(tvb, offset, &asn1_ctx, tree, hf_ranap_AccuracyFulfilmentIndicator_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Alt_RAB_Parameters_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Alt_RAB_Parameters(tvb, offset, &asn1_ctx, tree, hf_ranap_Alt_RAB_Parameters_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf(tvb, offset, &asn1_ctx, tree, hf_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf(tvb, offset, &asn1_ctx, tree, hf_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Alt_RAB_Parameter_ExtendedMaxBitrateInf_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateInf(tvb, offset, &asn1_ctx, tree, hf_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateInf_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Alt_RAB_Parameter_SupportedMaxBitrateInf_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Alt_RAB_Parameter_SupportedMaxBitrateInf(tvb, offset, &asn1_ctx, tree, hf_ranap_Alt_RAB_Parameter_SupportedMaxBitrateInf_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_AlternativeRABConfigurationRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_AlternativeRABConfigurationRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_AlternativeRABConfigurationRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_APN_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_APN(tvb, offset, &asn1_ctx, tree, hf_ranap_APN_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_AreaIdentity_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_AreaIdentity(tvb, offset, &asn1_ctx, tree, hf_ranap_AreaIdentity_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Ass_RAB_Parameters_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Ass_RAB_Parameters(tvb, offset, &asn1_ctx, tree, hf_ranap_Ass_RAB_Parameters_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList(tvb, offset, &asn1_ctx, tree, hf_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Ass_RAB_Parameter_ExtendedMaxBitrateList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList(tvb, offset, &asn1_ctx, tree, hf_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_BroadcastAssistanceDataDecipheringKeys_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_BroadcastAssistanceDataDecipheringKeys(tvb, offset, &asn1_ctx, tree, hf_ranap_BroadcastAssistanceDataDecipheringKeys_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Cause_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Cause(tvb, offset, &asn1_ctx, tree, hf_ranap_Cause_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Cell_Access_Mode_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Cell_Access_Mode(tvb, offset, &asn1_ctx, tree, hf_ranap_Cell_Access_Mode_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CellLoadInformationGroup_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CellLoadInformationGroup(tvb, offset, &asn1_ctx, tree, hf_ranap_CellLoadInformationGroup_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ClientType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ClientType(tvb, offset, &asn1_ctx, tree, hf_ranap_ClientType_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CriticalityDiagnostics_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CriticalityDiagnostics(tvb, offset, &asn1_ctx, tree, hf_ranap_CriticalityDiagnostics_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MessageStructure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MessageStructure(tvb, offset, &asn1_ctx, tree, hf_ranap_MessageStructure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ChosenEncryptionAlgorithm_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ChosenEncryptionAlgorithm(tvb, offset, &asn1_ctx, tree, hf_ranap_ChosenEncryptionAlgorithm_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ChosenIntegrityProtectionAlgorithm_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ChosenIntegrityProtectionAlgorithm(tvb, offset, &asn1_ctx, tree, hf_ranap_ChosenIntegrityProtectionAlgorithm_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ClassmarkInformation2_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ClassmarkInformation2(tvb, offset, &asn1_ctx, tree, hf_ranap_ClassmarkInformation2_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ClassmarkInformation3_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ClassmarkInformation3(tvb, offset, &asn1_ctx, tree, hf_ranap_ClassmarkInformation3_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CN_DomainIndicator_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CN_DomainIndicator(tvb, offset, &asn1_ctx, tree, hf_ranap_CN_DomainIndicator_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Correlation_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Correlation_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_Correlation_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CSFB_Information_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CSFB_Information(tvb, offset, &asn1_ctx, tree, hf_ranap_CSFB_Information_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CSG_Id_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CSG_Id(tvb, offset, &asn1_ctx, tree, hf_ranap_CSG_Id_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CSG_Id_List_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CSG_Id_List(tvb, offset, &asn1_ctx, tree, hf_ranap_CSG_Id_List_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CSG_Membership_Status_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CSG_Membership_Status(tvb, offset, &asn1_ctx, tree, hf_ranap_CSG_Membership_Status_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_DeltaRAListofIdleModeUEs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_DeltaRAListofIdleModeUEs(tvb, offset, &asn1_ctx, tree, hf_ranap_DeltaRAListofIdleModeUEs_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_DRX_CycleLengthCoefficient_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_DRX_CycleLengthCoefficient(tvb, offset, &asn1_ctx, tree, hf_ranap_DRX_CycleLengthCoefficient_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_E_DCH_MAC_d_Flow_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_E_DCH_MAC_d_Flow_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_E_DCH_MAC_d_Flow_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_EncryptionInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_EncryptionInformation(tvb, offset, &asn1_ctx, tree, hf_ranap_EncryptionInformation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_EncryptionKey_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_EncryptionKey(tvb, offset, &asn1_ctx, tree, hf_ranap_EncryptionKey_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_End_Of_CSFB_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_End_Of_CSFB(tvb, offset, &asn1_ctx, tree, hf_ranap_End_Of_CSFB_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_E_UTRAN_Service_Handover_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_E_UTRAN_Service_Handover(tvb, offset, &asn1_ctx, tree, hf_ranap_E_UTRAN_Service_Handover_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ExtendedRNC_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ExtendedRNC_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_ExtendedRNC_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_FrequenceLayerConvergenceFlag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_FrequenceLayerConvergenceFlag(tvb, offset, &asn1_ctx, tree, hf_ranap_FrequenceLayerConvergenceFlag_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_GANSS_PositioningDataSet_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_GANSS_PositioningDataSet(tvb, offset, &asn1_ctx, tree, hf_ranap_GANSS_PositioningDataSet_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_GERAN_BSC_Container_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_GERAN_BSC_Container(tvb, offset, &asn1_ctx, tree, hf_ranap_GERAN_BSC_Container_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_GERAN_Classmark_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_GERAN_Classmark(tvb, offset, &asn1_ctx, tree, hf_ranap_GERAN_Classmark_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_GlobalCN_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_GlobalCN_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_GlobalCN_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_GlobalRNC_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_GlobalRNC_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_GlobalRNC_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_HigherBitratesThan16MbpsFlag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_HigherBitratesThan16MbpsFlag(tvb, offset, &asn1_ctx, tree, hf_ranap_HigherBitratesThan16MbpsFlag_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_HS_DSCH_MAC_d_Flow_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_HS_DSCH_MAC_d_Flow_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_HS_DSCH_MAC_d_Flow_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_IncludeVelocity_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_IncludeVelocity(tvb, offset, &asn1_ctx, tree, hf_ranap_IncludeVelocity_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InformationExchangeID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InformationExchangeID(tvb, offset, &asn1_ctx, tree, hf_ranap_InformationExchangeID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InformationExchangeType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InformationExchangeType(tvb, offset, &asn1_ctx, tree, hf_ranap_InformationExchangeType_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InformationRequested_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InformationRequested(tvb, offset, &asn1_ctx, tree, hf_ranap_InformationRequested_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InformationRequestType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InformationRequestType(tvb, offset, &asn1_ctx, tree, hf_ranap_InformationRequestType_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InformationTransferID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InformationTransferID(tvb, offset, &asn1_ctx, tree, hf_ranap_InformationTransferID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InformationTransferType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InformationTransferType(tvb, offset, &asn1_ctx, tree, hf_ranap_InformationTransferType_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_IntegrityProtectionInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_IntegrityProtectionInformation(tvb, offset, &asn1_ctx, tree, hf_ranap_IntegrityProtectionInformation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_IntegrityProtectionKey_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_IntegrityProtectionKey(tvb, offset, &asn1_ctx, tree, hf_ranap_IntegrityProtectionKey_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InterSystemInformationTransferType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InterSystemInformationTransferType(tvb, offset, &asn1_ctx, tree, hf_ranap_InterSystemInformationTransferType_PDU); offset += 7; offset >>= 3; return offset; } int dissect_ranap_InterSystemInformation_TransparentContainer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InterSystemInformation_TransparentContainer(tvb, offset, &asn1_ctx, tree, hf_ranap_ranap_InterSystemInformation_TransparentContainer_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_IPMulticastAddress_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_IPMulticastAddress(tvb, offset, &asn1_ctx, tree, hf_ranap_IPMulticastAddress_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_IuSignallingConnectionIdentifier_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_IuSignallingConnectionIdentifier(tvb, offset, &asn1_ctx, tree, hf_ranap_IuSignallingConnectionIdentifier_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_IuTransportAssociation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_IuTransportAssociation(tvb, offset, &asn1_ctx, tree, hf_ranap_IuTransportAssociation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_KeyStatus_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_KeyStatus(tvb, offset, &asn1_ctx, tree, hf_ranap_KeyStatus_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LAI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LAI(tvb, offset, &asn1_ctx, tree, hf_ranap_LAI_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LastKnownServiceArea_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LastKnownServiceArea(tvb, offset, &asn1_ctx, tree, hf_ranap_LastKnownServiceArea_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LocationRelatedDataRequestType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LocationRelatedDataRequestType(tvb, offset, &asn1_ctx, tree, hf_ranap_LocationRelatedDataRequestType_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LocationRelatedDataRequestTypeSpecificToGERANIuMode_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LocationRelatedDataRequestTypeSpecificToGERANIuMode(tvb, offset, &asn1_ctx, tree, hf_ranap_LocationRelatedDataRequestTypeSpecificToGERANIuMode_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_L3_Information_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_L3_Information(tvb, offset, &asn1_ctx, tree, hf_ranap_L3_Information_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Management_Based_MDT_Allowed_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Management_Based_MDT_Allowed(tvb, offset, &asn1_ctx, tree, hf_ranap_Management_Based_MDT_Allowed_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSBearerServiceType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSBearerServiceType(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSBearerServiceType_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSCNDe_Registration_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSCNDe_Registration(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSCNDe_Registration_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSCountingInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSCountingInformation(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSCountingInformation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSLinkingInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSLinkingInformation(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSLinkingInformation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSRegistrationRequestType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSRegistrationRequestType(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSRegistrationRequestType_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSServiceArea_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSServiceArea(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSServiceArea_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionDuration_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionDuration(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionDuration_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionIdentity_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionIdentity(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionIdentity_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionRepetitionNumber_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionRepetitionNumber(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionRepetitionNumber_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MDT_Configuration_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MDT_Configuration(tvb, offset, &asn1_ctx, tree, hf_ranap_MDT_Configuration_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MSISDN_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MSISDN(tvb, offset, &asn1_ctx, tree, hf_ranap_MSISDN_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_NAS_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_NAS_PDU(tvb, offset, &asn1_ctx, tree, hf_ranap_NAS_PDU_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_NAS_SequenceNumber_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_NAS_SequenceNumber(tvb, offset, &asn1_ctx, tree, hf_ranap_NAS_SequenceNumber_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_NewBSS_To_OldBSS_Information_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_NewBSS_To_OldBSS_Information(tvb, offset, &asn1_ctx, tree, hf_ranap_NewBSS_To_OldBSS_Information_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_NonSearchingIndication_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_NonSearchingIndication(tvb, offset, &asn1_ctx, tree, hf_ranap_NonSearchingIndication_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_NumberOfSteps_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_NumberOfSteps(tvb, offset, &asn1_ctx, tree, hf_ranap_NumberOfSteps_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Offload_RAB_Parameters_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Offload_RAB_Parameters(tvb, offset, &asn1_ctx, tree, hf_ranap_Offload_RAB_Parameters_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_OldBSS_ToNewBSS_Information_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_OldBSS_ToNewBSS_Information(tvb, offset, &asn1_ctx, tree, hf_ranap_OldBSS_ToNewBSS_Information_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_OMC_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_OMC_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_OMC_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PagingAreaID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PagingAreaID(tvb, offset, &asn1_ctx, tree, hf_ranap_PagingAreaID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PagingCause_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PagingCause(tvb, offset, &asn1_ctx, tree, hf_ranap_PagingCause_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PDP_TypeInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PDP_TypeInformation(tvb, offset, &asn1_ctx, tree, hf_ranap_PDP_TypeInformation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PDP_TypeInformation_extension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PDP_TypeInformation_extension(tvb, offset, &asn1_ctx, tree, hf_ranap_PDP_TypeInformation_extension_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PeriodicLocationInfo_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PeriodicLocationInfo(tvb, offset, &asn1_ctx, tree, hf_ranap_PeriodicLocationInfo_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PermanentNAS_UE_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PermanentNAS_UE_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_PermanentNAS_UE_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PLMNidentity_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PLMNidentity(tvb, offset, &asn1_ctx, tree, hf_ranap_PLMNidentity_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PositioningPriority_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PositioningPriority(tvb, offset, &asn1_ctx, tree, hf_ranap_PositioningPriority_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PositionData_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PositionData(tvb, offset, &asn1_ctx, tree, hf_ranap_PositionData_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PositionDataSpecificToGERANIuMode_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PositionDataSpecificToGERANIuMode(tvb, offset, &asn1_ctx, tree, hf_ranap_PositionDataSpecificToGERANIuMode_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Priority_Class_Indicator_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Priority_Class_Indicator(tvb, offset, &asn1_ctx, tree, hf_ranap_Priority_Class_Indicator_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ProvidedData_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ProvidedData(tvb, offset, &asn1_ctx, tree, hf_ranap_ProvidedData_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_Parameter_ExtendedMaxBitrateList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_Parameter_ExtendedMaxBitrateList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_Parameter_ExtendedMaxBitrateList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_Parameters_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_Parameters(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_Parameters_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RABParametersList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RABParametersList(tvb, offset, &asn1_ctx, tree, hf_ranap_RABParametersList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAC_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAC(tvb, offset, &asn1_ctx, tree, hf_ranap_RAC_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAListofIdleModeUEs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAListofIdleModeUEs(tvb, offset, &asn1_ctx, tree, hf_ranap_RAListofIdleModeUEs_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LAListofIdleModeUEs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LAListofIdleModeUEs(tvb, offset, &asn1_ctx, tree, hf_ranap_LAListofIdleModeUEs_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAT_Type_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAT_Type(tvb, offset, &asn1_ctx, tree, hf_ranap_RAT_Type_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RedirectAttemptFlag_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RedirectAttemptFlag(tvb, offset, &asn1_ctx, tree, hf_ranap_RedirectAttemptFlag_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RedirectionCompleted_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RedirectionCompleted(tvb, offset, &asn1_ctx, tree, hf_ranap_RedirectionCompleted_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RejectCauseValue_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RejectCauseValue(tvb, offset, &asn1_ctx, tree, hf_ranap_RejectCauseValue_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationType(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationType_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RequestedGANSSAssistanceData_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RequestedGANSSAssistanceData(tvb, offset, &asn1_ctx, tree, hf_ranap_RequestedGANSSAssistanceData_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Requested_RAB_Parameter_ExtendedMaxBitrateList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList(tvb, offset, &asn1_ctx, tree, hf_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList(tvb, offset, &asn1_ctx, tree, hf_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RequestType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RequestType(tvb, offset, &asn1_ctx, tree, hf_ranap_RequestType_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ResponseTime_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ResponseTime(tvb, offset, &asn1_ctx, tree, hf_ranap_ResponseTime_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RNSAPRelocationParameters_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RNSAPRelocationParameters(tvb, offset, &asn1_ctx, tree, hf_ranap_RNSAPRelocationParameters_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RRC_Container_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RRC_Container(tvb, offset, &asn1_ctx, tree, hf_ranap_RRC_Container_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SAI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SAI(tvb, offset, &asn1_ctx, tree, hf_ranap_SAI_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SAPI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SAPI(tvb, offset, &asn1_ctx, tree, hf_ranap_SAPI_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SessionUpdateID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SessionUpdateID(tvb, offset, &asn1_ctx, tree, hf_ranap_SessionUpdateID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SignallingIndication_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SignallingIndication(tvb, offset, &asn1_ctx, tree, hf_ranap_SignallingIndication_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SNA_Access_Information_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SNA_Access_Information(tvb, offset, &asn1_ctx, tree, hf_ranap_SNA_Access_Information_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Source_ToTarget_TransparentContainer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Source_ToTarget_TransparentContainer(tvb, offset, &asn1_ctx, tree, hf_ranap_Source_ToTarget_TransparentContainer_PDU); offset += 7; offset >>= 3; return offset; } int dissect_ranap_SourceCellID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SourceCellID(tvb, offset, &asn1_ctx, tree, hf_ranap_ranap_SourceCellID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SourceBSS_ToTargetBSS_TransparentContainer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SourceBSS_ToTargetBSS_TransparentContainer(tvb, offset, &asn1_ctx, tree, hf_ranap_SourceBSS_ToTargetBSS_TransparentContainer_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SourceID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SourceID(tvb, offset, &asn1_ctx, tree, hf_ranap_SourceID_PDU); offset += 7; offset >>= 3; return offset; } int dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvb, offset, &asn1_ctx, tree, hf_ranap_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_IRAT_Measurement_Configuration_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_IRAT_Measurement_Configuration(tvb, offset, &asn1_ctx, tree, hf_ranap_IRAT_Measurement_Configuration_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SubscriberProfileIDforRFP_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SubscriberProfileIDforRFP(tvb, offset, &asn1_ctx, tree, hf_ranap_SubscriberProfileIDforRFP_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SupportedRAB_ParameterBitrateList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SupportedRAB_ParameterBitrateList(tvb, offset, &asn1_ctx, tree, hf_ranap_SupportedRAB_ParameterBitrateList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SRB_TrCH_Mapping_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SRB_TrCH_Mapping(tvb, offset, &asn1_ctx, tree, hf_ranap_SRB_TrCH_Mapping_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SRVCC_HO_Indication_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SRVCC_HO_Indication(tvb, offset, &asn1_ctx, tree, hf_ranap_SRVCC_HO_Indication_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SRVCC_Information_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SRVCC_Information(tvb, offset, &asn1_ctx, tree, hf_ranap_SRVCC_Information_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SRVCC_Operation_Possible_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SRVCC_Operation_Possible(tvb, offset, &asn1_ctx, tree, hf_ranap_SRVCC_Operation_Possible_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Target_ToSource_TransparentContainer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Target_ToSource_TransparentContainer(tvb, offset, &asn1_ctx, tree, hf_ranap_Target_ToSource_TransparentContainer_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TargetBSS_ToSourceBSS_TransparentContainer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TargetBSS_ToSourceBSS_TransparentContainer(tvb, offset, &asn1_ctx, tree, hf_ranap_TargetBSS_ToSourceBSS_TransparentContainer_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TargetID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TargetID(tvb, offset, &asn1_ctx, tree, hf_ranap_TargetID_PDU); offset += 7; offset >>= 3; return offset; } int dissect_ranap_TargetRNC_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TargetRNC_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_ranap_TargetRNC_ID_PDU); offset += 7; offset >>= 3; return offset; } int dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvb, offset, &asn1_ctx, tree, hf_ranap_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TemporaryUE_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TemporaryUE_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_TemporaryUE_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TimeToMBMSDataTransfer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TimeToMBMSDataTransfer(tvb, offset, &asn1_ctx, tree, hf_ranap_TimeToMBMSDataTransfer_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TMGI_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TMGI(tvb, offset, &asn1_ctx, tree, hf_ranap_TMGI_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TracePropagationParameters_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TracePropagationParameters(tvb, offset, &asn1_ctx, tree, hf_ranap_TracePropagationParameters_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TraceRecordingSessionInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TraceRecordingSessionInformation(tvb, offset, &asn1_ctx, tree, hf_ranap_TraceRecordingSessionInformation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TraceReference_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TraceReference(tvb, offset, &asn1_ctx, tree, hf_ranap_TraceReference_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TraceType_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TraceType(tvb, offset, &asn1_ctx, tree, hf_ranap_TraceType_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TransportLayerAddress_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TransportLayerAddress(tvb, offset, &asn1_ctx, tree, hf_ranap_TransportLayerAddress_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TriggerID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TriggerID(tvb, offset, &asn1_ctx, tree, hf_ranap_TriggerID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TypeOfError_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TypeOfError(tvb, offset, &asn1_ctx, tree, hf_ranap_TypeOfError_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_UE_AggregateMaximumBitRate_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_UE_AggregateMaximumBitRate(tvb, offset, &asn1_ctx, tree, hf_ranap_UE_AggregateMaximumBitRate_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_UE_History_Information_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_UE_History_Information(tvb, offset, &asn1_ctx, tree, hf_ranap_UE_History_Information_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_UE_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_UE_ID(tvb, offset, &asn1_ctx, tree, hf_ranap_UE_ID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_UESBI_Iu_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_UESBI_Iu(tvb, offset, &asn1_ctx, tree, hf_ranap_UESBI_Iu_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_VelocityEstimate_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_VelocityEstimate(tvb, offset, &asn1_ctx, tree, hf_ranap_VelocityEstimate_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_VerticalAccuracyCode_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_VerticalAccuracyCode(tvb, offset, &asn1_ctx, tree, hf_ranap_VerticalAccuracyCode_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Iu_ReleaseCommand_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Iu_ReleaseCommand(tvb, offset, &asn1_ctx, tree, hf_ranap_Iu_ReleaseCommand_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Iu_ReleaseComplete_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Iu_ReleaseComplete(tvb, offset, &asn1_ctx, tree, hf_ranap_Iu_ReleaseComplete_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_DataVolumeReportList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_DataVolumeReportList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_DataVolumeReportList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_DataVolumeReportItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_DataVolumeReportItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_DataVolumeReportItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ReleasedList_IuRelComp_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ReleasedList_IuRelComp(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ReleasedList_IuRelComp_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ReleasedItem_IuRelComp_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ReleasedItem_IuRelComp(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ReleasedItem_IuRelComp_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationRequired_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationRequired(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationRequired_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationCommand_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationCommand(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationCommand_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_RelocationReleaseList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_RelocationReleaseList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_RelocationReleaseList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_RelocationReleaseItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_RelocationReleaseItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_RelocationReleaseItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_DataForwardingList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_DataForwardingList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_DataForwardingList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_DataForwardingItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_DataForwardingItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_DataForwardingItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationPreparationFailure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationPreparationFailure(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationPreparationFailure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupList_RelocReq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupList_RelocReq(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupList_RelocReq_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupItem_RelocReq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupItem_RelocReq(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupItem_RelocReq_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CNMBMSLinkingInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CNMBMSLinkingInformation(tvb, offset, &asn1_ctx, tree, hf_ranap_CNMBMSLinkingInformation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_JoinedMBMSBearerService_IEs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_JoinedMBMSBearerService_IEs(tvb, offset, &asn1_ctx, tree, hf_ranap_JoinedMBMSBearerService_IEs_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationRequestAcknowledge_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationRequestAcknowledge(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationRequestAcknowledge_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupList_RelocReqAck_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupList_RelocReqAck(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupList_RelocReqAck_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupItem_RelocReqAck_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupItem_RelocReqAck(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupItem_RelocReqAck_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_FailedList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_FailedList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_FailedList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_FailedItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_FailedItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_FailedItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationFailure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationFailure(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationFailure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationCancel_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationCancel(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationCancel_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationCancelAcknowledge_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationCancelAcknowledge(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationCancelAcknowledge_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SRNS_ContextRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SRNS_ContextRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_SRNS_ContextRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_DataForwardingList_SRNS_CtxReq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_DataForwardingList_SRNS_CtxReq(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_DataForwardingList_SRNS_CtxReq_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_DataForwardingItem_SRNS_CtxReq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_DataForwardingItem_SRNS_CtxReq(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_DataForwardingItem_SRNS_CtxReq_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SRNS_ContextResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SRNS_ContextResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_SRNS_ContextResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ContextList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ContextList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ContextList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ContextItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ContextItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ContextItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ContextFailedtoTransferList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ContextFailedtoTransferList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ContextFailedtoTransferList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RABs_ContextFailedtoTransferItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RABs_ContextFailedtoTransferItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RABs_ContextFailedtoTransferItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SecurityModeCommand_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SecurityModeCommand(tvb, offset, &asn1_ctx, tree, hf_ranap_SecurityModeCommand_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SecurityModeComplete_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SecurityModeComplete(tvb, offset, &asn1_ctx, tree, hf_ranap_SecurityModeComplete_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SecurityModeReject_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SecurityModeReject(tvb, offset, &asn1_ctx, tree, hf_ranap_SecurityModeReject_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_DataVolumeReportRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_DataVolumeReportRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_DataVolumeReportRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_DataVolumeReportRequestList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_DataVolumeReportRequestList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_DataVolumeReportRequestList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_DataVolumeReportRequestItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_DataVolumeReportRequestItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_DataVolumeReportRequestItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_DataVolumeReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_DataVolumeReport(tvb, offset, &asn1_ctx, tree, hf_ranap_DataVolumeReport_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_FailedtoReportList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_FailedtoReportList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_FailedtoReportList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RABs_failed_to_reportItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RABs_failed_to_reportItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RABs_failed_to_reportItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Reset_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Reset(tvb, offset, &asn1_ctx, tree, hf_ranap_Reset_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ResetAcknowledge_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ResetAcknowledge(tvb, offset, &asn1_ctx, tree, hf_ranap_ResetAcknowledge_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ResetResource_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ResetResource(tvb, offset, &asn1_ctx, tree, hf_ranap_ResetResource_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ResetResourceList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ResetResourceList(tvb, offset, &asn1_ctx, tree, hf_ranap_ResetResourceList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ResetResourceItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ResetResourceItem(tvb, offset, &asn1_ctx, tree, hf_ranap_ResetResourceItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ResetResourceAcknowledge_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ResetResourceAcknowledge(tvb, offset, &asn1_ctx, tree, hf_ranap_ResetResourceAcknowledge_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ResetResourceAckList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ResetResourceAckList(tvb, offset, &asn1_ctx, tree, hf_ranap_ResetResourceAckList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ResetResourceAckItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ResetResourceAckItem(tvb, offset, &asn1_ctx, tree, hf_ranap_ResetResourceAckItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ReleaseRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ReleaseRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ReleaseRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ReleaseList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ReleaseList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ReleaseList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ReleaseItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ReleaseItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ReleaseItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Iu_ReleaseRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Iu_ReleaseRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_Iu_ReleaseRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationDetect_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationDetect(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationDetect_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RelocationComplete_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RelocationComplete(tvb, offset, &asn1_ctx, tree, hf_ranap_RelocationComplete_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_EnhancedRelocationCompleteRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_EnhancedRelocationCompleteRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_EnhancedRelocationCompleteRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupList_EnhancedRelocCompleteReq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupList_EnhancedRelocCompleteReq(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupList_EnhancedRelocCompleteReq_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupItem_EnhancedRelocCompleteReq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupItem_EnhancedRelocCompleteReq(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupItem_EnhancedRelocCompleteReq_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_EnhancedRelocationCompleteResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_EnhancedRelocationCompleteResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_EnhancedRelocationCompleteResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupList_EnhancedRelocCompleteRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupList_EnhancedRelocCompleteRes(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupList_EnhancedRelocCompleteRes_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupItem_EnhancedRelocCompleteRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupItem_EnhancedRelocCompleteRes(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupItem_EnhancedRelocCompleteRes_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ToBeReleasedList_EnhancedRelocCompleteRes(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_EnhancedRelocationCompleteFailure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_EnhancedRelocationCompleteFailure(tvb, offset, &asn1_ctx, tree, hf_ranap_EnhancedRelocationCompleteFailure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_EnhancedRelocationCompleteConfirm_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_EnhancedRelocationCompleteConfirm(tvb, offset, &asn1_ctx, tree, hf_ranap_EnhancedRelocationCompleteConfirm_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Paging_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Paging(tvb, offset, &asn1_ctx, tree, hf_ranap_Paging_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CommonID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CommonID(tvb, offset, &asn1_ctx, tree, hf_ranap_CommonID_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CN_InvokeTrace_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CN_InvokeTrace(tvb, offset, &asn1_ctx, tree, hf_ranap_CN_InvokeTrace_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_CN_DeactivateTrace_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_CN_DeactivateTrace(tvb, offset, &asn1_ctx, tree, hf_ranap_CN_DeactivateTrace_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LocationReportingControl_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LocationReportingControl(tvb, offset, &asn1_ctx, tree, hf_ranap_LocationReportingControl_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LocationReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LocationReport(tvb, offset, &asn1_ctx, tree, hf_ranap_LocationReport_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InitialUE_Message_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InitialUE_Message(tvb, offset, &asn1_ctx, tree, hf_ranap_InitialUE_Message_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_DirectTransfer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_DirectTransfer(tvb, offset, &asn1_ctx, tree, hf_ranap_DirectTransfer_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RedirectionIndication_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RedirectionIndication(tvb, offset, &asn1_ctx, tree, hf_ranap_RedirectionIndication_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_Overload_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_Overload(tvb, offset, &asn1_ctx, tree, hf_ranap_Overload_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ErrorIndication_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ErrorIndication(tvb, offset, &asn1_ctx, tree, hf_ranap_ErrorIndication_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SRNS_DataForwardCommand_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SRNS_DataForwardCommand(tvb, offset, &asn1_ctx, tree, hf_ranap_SRNS_DataForwardCommand_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_ForwardSRNS_Context_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_ForwardSRNS_Context(tvb, offset, &asn1_ctx, tree, hf_ranap_ForwardSRNS_Context_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_AssignmentRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_AssignmentRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_AssignmentRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupOrModifyList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupOrModifyList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupOrModifyList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupOrModifyItemFirst_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupOrModifyItemFirst(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupOrModifyItemFirst_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_TransportLayerInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_TransportLayerInformation(tvb, offset, &asn1_ctx, tree, hf_ranap_TransportLayerInformation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupOrModifyItemSecond_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupOrModifyItemSecond(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupOrModifyItemSecond_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_AssignmentResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_AssignmentResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_AssignmentResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupOrModifiedList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupOrModifiedList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupOrModifiedList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupOrModifiedItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupOrModifiedItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupOrModifiedItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ReleasedList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ReleasedList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ReleasedList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ReleasedItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ReleasedItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ReleasedItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_QueuedList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_QueuedList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_QueuedList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_QueuedItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_QueuedItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_QueuedItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ReleaseFailedList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ReleaseFailedList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ReleaseFailedList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_GERAN_Iumode_RAB_FailedList_RABAssgntResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_GERAN_Iumode_RAB_FailedList_RABAssgntResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_GERAN_Iumode_RAB_FailedList_RABAssgntResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item(tvb, offset, &asn1_ctx, tree, hf_ranap_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_PrivateMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_PrivateMessage(tvb, offset, &asn1_ctx, tree, hf_ranap_PrivateMessage_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RANAP_RelocationInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RANAP_RelocationInformation(tvb, offset, &asn1_ctx, tree, hf_ranap_RANAP_RelocationInformation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_DirectTransferInformationList_RANAP_RelocInf_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_DirectTransferInformationList_RANAP_RelocInf(tvb, offset, &asn1_ctx, tree, hf_ranap_DirectTransferInformationList_RANAP_RelocInf_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_DirectTransferInformationItem_RANAP_RelocInf_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_DirectTransferInformationItem_RANAP_RelocInf(tvb, offset, &asn1_ctx, tree, hf_ranap_DirectTransferInformationItem_RANAP_RelocInf_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ContextList_RANAP_RelocInf_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ContextList_RANAP_RelocInf(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ContextList_RANAP_RelocInf_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ContextItem_RANAP_RelocInf_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ContextItem_RANAP_RelocInf(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ContextItem_RANAP_RelocInf_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RANAP_EnhancedRelocationInformationRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RANAP_EnhancedRelocationInformationRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_RANAP_EnhancedRelocationInformationRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupList_EnhRelocInfoReq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupList_EnhRelocInfoReq(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupList_EnhRelocInfoReq_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupItem_EnhRelocInfoReq_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupItem_EnhRelocInfoReq(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupItem_EnhRelocInfoReq_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RANAP_EnhancedRelocationInformationResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RANAP_EnhancedRelocationInformationResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_RANAP_EnhancedRelocationInformationResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupList_EnhRelocInfoRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupList_EnhRelocInfoRes(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupList_EnhRelocInfoRes_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_SetupItem_EnhRelocInfoRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_SetupItem_EnhRelocInfoRes(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_SetupItem_EnhRelocInfoRes_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_FailedList_EnhRelocInfoRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_FailedList_EnhRelocInfoRes(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_FailedList_EnhRelocInfoRes_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_FailedItem_EnhRelocInfoRes_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_FailedItem_EnhRelocInfoRes(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_FailedItem_EnhRelocInfoRes_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ModifyRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ModifyRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ModifyRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ModifyList_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ModifyList(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ModifyList_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RAB_ModifyItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RAB_ModifyItem(tvb, offset, &asn1_ctx, tree, hf_ranap_RAB_ModifyItem_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LocationRelatedDataRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LocationRelatedDataRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_LocationRelatedDataRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LocationRelatedDataResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LocationRelatedDataResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_LocationRelatedDataResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LocationRelatedDataFailure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LocationRelatedDataFailure(tvb, offset, &asn1_ctx, tree, hf_ranap_LocationRelatedDataFailure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InformationTransferIndication_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InformationTransferIndication(tvb, offset, &asn1_ctx, tree, hf_ranap_InformationTransferIndication_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InformationTransferConfirmation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InformationTransferConfirmation(tvb, offset, &asn1_ctx, tree, hf_ranap_InformationTransferConfirmation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_InformationTransferFailure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_InformationTransferFailure(tvb, offset, &asn1_ctx, tree, hf_ranap_InformationTransferFailure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_UESpecificInformationIndication_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_UESpecificInformationIndication(tvb, offset, &asn1_ctx, tree, hf_ranap_UESpecificInformationIndication_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_DirectInformationTransfer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_DirectInformationTransfer(tvb, offset, &asn1_ctx, tree, hf_ranap_DirectInformationTransfer_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_UplinkInformationExchangeRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_UplinkInformationExchangeRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_UplinkInformationExchangeRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_UplinkInformationExchangeResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_UplinkInformationExchangeResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_UplinkInformationExchangeResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_UplinkInformationExchangeFailure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_UplinkInformationExchangeFailure(tvb, offset, &asn1_ctx, tree, hf_ranap_UplinkInformationExchangeFailure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionStart_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionStart(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionStart_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSynchronisationInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSynchronisationInformation(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSynchronisationInformation_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionStartResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionStartResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionStartResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionStartFailure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionStartFailure(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionStartFailure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionUpdate_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionUpdate(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionUpdate_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionUpdateResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionUpdateResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionUpdateResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionUpdateFailure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionUpdateFailure(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionUpdateFailure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionStop_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionStop(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionStop_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSSessionStopResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSSessionStopResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSSessionStopResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSUELinkingRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSUELinkingRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSUELinkingRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_LeftMBMSBearerService_IEs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_LeftMBMSBearerService_IEs(tvb, offset, &asn1_ctx, tree, hf_ranap_LeftMBMSBearerService_IEs_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSUELinkingResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSUELinkingResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSUELinkingResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_UnsuccessfulLinking_IEs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_UnsuccessfulLinking_IEs(tvb, offset, &asn1_ctx, tree, hf_ranap_UnsuccessfulLinking_IEs_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSRegistrationRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSRegistrationRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSRegistrationRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSRegistrationResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSRegistrationResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSRegistrationResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSRegistrationFailure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSRegistrationFailure(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSRegistrationFailure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSCNDe_RegistrationRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSCNDe_RegistrationRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSCNDe_RegistrationRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSCNDe_RegistrationResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSCNDe_RegistrationResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSCNDe_RegistrationResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSRABEstablishmentIndication_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSRABEstablishmentIndication(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSRABEstablishmentIndication_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSRABReleaseRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSRABReleaseRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSRABReleaseRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSRABRelease_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSRABRelease(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSRABRelease_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_MBMSRABReleaseFailure_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_MBMSRABReleaseFailure(tvb, offset, &asn1_ctx, tree, hf_ranap_MBMSRABReleaseFailure_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SRVCC_CSKeysRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SRVCC_CSKeysRequest(tvb, offset, &asn1_ctx, tree, hf_ranap_SRVCC_CSKeysRequest_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_SRVCC_CSKeysResponse_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_SRVCC_CSKeysResponse(tvb, offset, &asn1_ctx, tree, hf_ranap_SRVCC_CSKeysResponse_PDU); offset += 7; offset >>= 3; return offset; } static int dissect_RANAP_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); offset = dissect_ranap_RANAP_PDU(tvb, offset, &asn1_ctx, tree, hf_ranap_RANAP_PDU_PDU); offset += 7; offset >>= 3; return offset; } /*--- End of included file: packet-ranap-fn.c ---*/ #line 144 "../../asn1/ranap/packet-ranap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { int ret = 0; int key; /* Special handling, same ID used for different IE's depending on signal */ switch(ProcedureCode){ case id_RelocationPreparation: if((ProtocolIE_ID == id_Source_ToTarget_TransparentContainer)||(ProtocolIE_ID == id_Target_ToSource_TransparentContainer)){ key = SPECIAL | ProtocolIE_ID; ret = (dissector_try_uint_new(ranap_ies_dissector_table, key, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; break; } /* Fall trough */ default: /* no special handling */ ret = (dissector_try_uint_new(ranap_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; if (ret == 0) { key = pdu_type | ProtocolIE_ID; ret = (dissector_try_uint_new(ranap_ies_dissector_table, key, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } break; } return ret; } static int dissect_ProtocolIEFieldPairFirstValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { return (dissector_try_uint_new(ranap_ies_p1_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } static int dissect_ProtocolIEFieldPairSecondValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { return (dissector_try_uint_new(ranap_ies_p2_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { return (dissector_try_uint_new(ranap_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { gboolean ret; pdu_type = IMSG; ret = dissector_try_uint_new(ranap_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL); pdu_type = 0; return ret ? tvb_length(tvb) : 0; } static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { gboolean ret; pdu_type = SOUT; ret = dissector_try_uint_new(ranap_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL); pdu_type = 0; return ret ? tvb_length(tvb) : 0; } static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { return (dissector_try_uint_new(ranap_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } static int dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { return (dissector_try_uint_new(ranap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_length(tvb) : 0; } static void dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_item *ranap_item = NULL; proto_tree *ranap_tree = NULL; pdu_type = 0; ProtocolIE_ID = 0; /* make entry in the Protocol column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "RANAP"); /* create the ranap protocol tree */ ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, -1, ENC_NA); ranap_tree = proto_item_add_subtree(ranap_item, ett_ranap); dissect_RANAP_PDU_PDU(tvb, pinfo, ranap_tree, NULL); if (pinfo->sccp_info) { sccp_msg_info_t* sccp_msg_lcl = pinfo->sccp_info; if (sccp_msg_lcl->data.co.assoc) sccp_msg_lcl->data.co.assoc->payload = SCCP_PLOAD_RANAP; if (! sccp_msg_lcl->data.co.label && ProcedureCode != 0xFFFFFFFF) { const gchar* str = val_to_str(ProcedureCode, ranap_ProcedureCode_vals,"Unknown RANAP"); sccp_msg_lcl->data.co.label = wmem_strdup(wmem_file_scope(), str); } } } static gboolean dissect_sccp_ranap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { guint8 temp; asn1_ctx_t asn1_ctx; guint length; int offset; asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); /* Is it a ranap packet? * * 4th octet should be the length of the rest of the message. * 2nd octet is the message-type e Z[0, 28] * (obviously there must be at least four octets) * * If both hold true we'll assume its RANAP */ #define LENGTH_OFFSET 3 #define MSG_TYPE_OFFSET 1 if (tvb_length(tvb) < 4) { return FALSE; } /*if (tvb_get_guint8(tvb, LENGTH_OFFSET) != (tvb_length(tvb) - 4)) { return FALSE; }*/ /* Read the length NOTE offset in bits */ offset = dissect_per_length_determinant(tvb, LENGTH_OFFSET<<3, &asn1_ctx, tree, -1, &length); offset = offset>>3; if (length!= (tvb_length(tvb) - offset)){ return FALSE; } temp = tvb_get_guint8(tvb, MSG_TYPE_OFFSET); if (temp > RANAP_MAX_PC) { return FALSE; } dissect_ranap(tvb, pinfo, tree); return TRUE; } /*--- proto_register_ranap -------------------------------------------*/ void proto_register_ranap(void) { module_t *ranap_module; /* List of fields */ static hf_register_info hf[] = { { &hf_ranap_imsi_digits, { "IMSI digits", "ranap.imsi_digits", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_transportLayerAddress_ipv4, { "transportLayerAddress IPv4", "ranap.transportLayerAddress_ipv4", FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_transportLayerAddress_ipv6, { "transportLayerAddress IPv6", "ranap.transportLayerAddress_ipv6", FT_IPv6, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_transportLayerAddress_nsap, { "transportLayerAddress NSAP", "ranap.transportLayerAddress_NSAP", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, /*--- Included file: packet-ranap-hfarr.c ---*/ #line 1 "../../asn1/ranap/packet-ranap-hfarr.c" { &hf_ranap_AccuracyFulfilmentIndicator_PDU, { "AccuracyFulfilmentIndicator", "ranap.AccuracyFulfilmentIndicator", FT_UINT32, BASE_DEC, VALS(ranap_AccuracyFulfilmentIndicator_vals), 0, NULL, HFILL }}, { &hf_ranap_Alt_RAB_Parameters_PDU, { "Alt-RAB-Parameters", "ranap.Alt_RAB_Parameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf_PDU, { "Alt-RAB-Parameter-ExtendedGuaranteedBitrateInf", "ranap.Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf_PDU, { "Alt-RAB-Parameter-SupportedGuaranteedBitrateInf", "ranap.Alt_RAB_Parameter_SupportedGuaranteedBitrateInf_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateInf_PDU, { "Alt-RAB-Parameter-ExtendedMaxBitrateInf", "ranap.Alt_RAB_Parameter_ExtendedMaxBitrateInf_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Alt_RAB_Parameter_SupportedMaxBitrateInf_PDU, { "Alt-RAB-Parameter-SupportedMaxBitrateInf", "ranap.Alt_RAB_Parameter_SupportedMaxBitrateInf_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_AlternativeRABConfigurationRequest_PDU, { "AlternativeRABConfigurationRequest", "ranap.AlternativeRABConfigurationRequest", FT_UINT32, BASE_DEC, VALS(ranap_AlternativeRABConfigurationRequest_vals), 0, NULL, HFILL }}, { &hf_ranap_APN_PDU, { "APN", "ranap.APN", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_AreaIdentity_PDU, { "AreaIdentity", "ranap.AreaIdentity", FT_UINT32, BASE_DEC, VALS(ranap_AreaIdentity_vals), 0, NULL, HFILL }}, { &hf_ranap_Ass_RAB_Parameters_PDU, { "Ass-RAB-Parameters", "ranap.Ass_RAB_Parameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU, { "Ass-RAB-Parameter-ExtendedGuaranteedBitrateList", "ranap.Ass_RAB_Parameter_ExtendedGuaranteedBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList_PDU, { "Ass-RAB-Parameter-ExtendedMaxBitrateList", "ranap.Ass_RAB_Parameter_ExtendedMaxBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_BroadcastAssistanceDataDecipheringKeys_PDU, { "BroadcastAssistanceDataDecipheringKeys", "ranap.BroadcastAssistanceDataDecipheringKeys_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Cause_PDU, { "Cause", "ranap.Cause", FT_UINT32, BASE_DEC, VALS(ranap_Cause_vals), 0, NULL, HFILL }}, { &hf_ranap_Cell_Access_Mode_PDU, { "Cell-Access-Mode", "ranap.Cell_Access_Mode", FT_UINT32, BASE_DEC, VALS(ranap_Cell_Access_Mode_vals), 0, NULL, HFILL }}, { &hf_ranap_CellLoadInformationGroup_PDU, { "CellLoadInformationGroup", "ranap.CellLoadInformationGroup_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ClientType_PDU, { "ClientType", "ranap.ClientType", FT_UINT32, BASE_DEC, VALS(ranap_ClientType_vals), 0, NULL, HFILL }}, { &hf_ranap_CriticalityDiagnostics_PDU, { "CriticalityDiagnostics", "ranap.CriticalityDiagnostics_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MessageStructure_PDU, { "MessageStructure", "ranap.MessageStructure", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_ChosenEncryptionAlgorithm_PDU, { "ChosenEncryptionAlgorithm", "ranap.ChosenEncryptionAlgorithm", FT_UINT32, BASE_DEC, VALS(ranap_EncryptionAlgorithm_vals), 0, NULL, HFILL }}, { &hf_ranap_ChosenIntegrityProtectionAlgorithm_PDU, { "ChosenIntegrityProtectionAlgorithm", "ranap.ChosenIntegrityProtectionAlgorithm", FT_UINT32, BASE_DEC, VALS(ranap_IntegrityProtectionAlgorithm_vals), 0, NULL, HFILL }}, { &hf_ranap_ClassmarkInformation2_PDU, { "ClassmarkInformation2", "ranap.ClassmarkInformation2", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ClassmarkInformation3_PDU, { "ClassmarkInformation3", "ranap.ClassmarkInformation3", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_CN_DomainIndicator_PDU, { "CN-DomainIndicator", "ranap.CN_DomainIndicator", FT_UINT32, BASE_DEC, VALS(ranap_CN_DomainIndicator_vals), 0, NULL, HFILL }}, { &hf_ranap_Correlation_ID_PDU, { "Correlation-ID", "ranap.Correlation_ID", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_CSFB_Information_PDU, { "CSFB-Information", "ranap.CSFB_Information", FT_UINT32, BASE_DEC, VALS(ranap_CSFB_Information_vals), 0, NULL, HFILL }}, { &hf_ranap_CSG_Id_PDU, { "CSG-Id", "ranap.CSG_Id", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_CSG_Id_List_PDU, { "CSG-Id-List", "ranap.CSG_Id_List", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_CSG_Membership_Status_PDU, { "CSG-Membership-Status", "ranap.CSG_Membership_Status", FT_UINT32, BASE_DEC, VALS(ranap_CSG_Membership_Status_vals), 0, NULL, HFILL }}, { &hf_ranap_DeltaRAListofIdleModeUEs_PDU, { "DeltaRAListofIdleModeUEs", "ranap.DeltaRAListofIdleModeUEs_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_DRX_CycleLengthCoefficient_PDU, { "DRX-CycleLengthCoefficient", "ranap.DRX_CycleLengthCoefficient", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_E_DCH_MAC_d_Flow_ID_PDU, { "E-DCH-MAC-d-Flow-ID", "ranap.E_DCH_MAC_d_Flow_ID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_EncryptionInformation_PDU, { "EncryptionInformation", "ranap.EncryptionInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_EncryptionKey_PDU, { "EncryptionKey", "ranap.EncryptionKey", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_End_Of_CSFB_PDU, { "End-Of-CSFB", "ranap.End_Of_CSFB", FT_UINT32, BASE_DEC, VALS(ranap_End_Of_CSFB_vals), 0, NULL, HFILL }}, { &hf_ranap_E_UTRAN_Service_Handover_PDU, { "E-UTRAN-Service-Handover", "ranap.E_UTRAN_Service_Handover", FT_UINT32, BASE_DEC, VALS(ranap_E_UTRAN_Service_Handover_vals), 0, NULL, HFILL }}, { &hf_ranap_ExtendedRNC_ID_PDU, { "ExtendedRNC-ID", "ranap.ExtendedRNC_ID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_FrequenceLayerConvergenceFlag_PDU, { "FrequenceLayerConvergenceFlag", "ranap.FrequenceLayerConvergenceFlag", FT_UINT32, BASE_DEC, VALS(ranap_FrequenceLayerConvergenceFlag_vals), 0, NULL, HFILL }}, { &hf_ranap_GANSS_PositioningDataSet_PDU, { "GANSS-PositioningDataSet", "ranap.GANSS_PositioningDataSet", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_GERAN_BSC_Container_PDU, { "GERAN-BSC-Container", "ranap.GERAN_BSC_Container", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_GERAN_Classmark_PDU, { "GERAN-Classmark", "ranap.GERAN_Classmark", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_GlobalCN_ID_PDU, { "GlobalCN-ID", "ranap.GlobalCN_ID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_GlobalRNC_ID_PDU, { "GlobalRNC-ID", "ranap.GlobalRNC_ID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_HigherBitratesThan16MbpsFlag_PDU, { "HigherBitratesThan16MbpsFlag", "ranap.HigherBitratesThan16MbpsFlag", FT_UINT32, BASE_DEC, VALS(ranap_HigherBitratesThan16MbpsFlag_vals), 0, NULL, HFILL }}, { &hf_ranap_HS_DSCH_MAC_d_Flow_ID_PDU, { "HS-DSCH-MAC-d-Flow-ID", "ranap.HS_DSCH_MAC_d_Flow_ID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_IncludeVelocity_PDU, { "IncludeVelocity", "ranap.IncludeVelocity", FT_UINT32, BASE_DEC, VALS(ranap_IncludeVelocity_vals), 0, NULL, HFILL }}, { &hf_ranap_InformationExchangeID_PDU, { "InformationExchangeID", "ranap.InformationExchangeID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_InformationExchangeType_PDU, { "InformationExchangeType", "ranap.InformationExchangeType", FT_UINT32, BASE_DEC, VALS(ranap_InformationExchangeType_vals), 0, NULL, HFILL }}, { &hf_ranap_InformationRequested_PDU, { "InformationRequested", "ranap.InformationRequested", FT_UINT32, BASE_DEC, VALS(ranap_InformationRequested_vals), 0, NULL, HFILL }}, { &hf_ranap_InformationRequestType_PDU, { "InformationRequestType", "ranap.InformationRequestType", FT_UINT32, BASE_DEC, VALS(ranap_InformationRequestType_vals), 0, NULL, HFILL }}, { &hf_ranap_InformationTransferID_PDU, { "InformationTransferID", "ranap.InformationTransferID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_InformationTransferType_PDU, { "InformationTransferType", "ranap.InformationTransferType", FT_UINT32, BASE_DEC, VALS(ranap_InformationTransferType_vals), 0, NULL, HFILL }}, { &hf_ranap_IntegrityProtectionInformation_PDU, { "IntegrityProtectionInformation", "ranap.IntegrityProtectionInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_IntegrityProtectionKey_PDU, { "IntegrityProtectionKey", "ranap.IntegrityProtectionKey", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_InterSystemInformationTransferType_PDU, { "InterSystemInformationTransferType", "ranap.InterSystemInformationTransferType", FT_UINT32, BASE_DEC, VALS(ranap_InterSystemInformationTransferType_vals), 0, NULL, HFILL }}, { &hf_ranap_ranap_InterSystemInformation_TransparentContainer_PDU, { "InterSystemInformation-TransparentContainer", "ranap.InterSystemInformation_TransparentContainer_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_IPMulticastAddress_PDU, { "IPMulticastAddress", "ranap.IPMulticastAddress", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_IuSignallingConnectionIdentifier_PDU, { "IuSignallingConnectionIdentifier", "ranap.IuSignallingConnectionIdentifier", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_IuTransportAssociation_PDU, { "IuTransportAssociation", "ranap.IuTransportAssociation", FT_UINT32, BASE_DEC, VALS(ranap_IuTransportAssociation_vals), 0, NULL, HFILL }}, { &hf_ranap_KeyStatus_PDU, { "KeyStatus", "ranap.KeyStatus", FT_UINT32, BASE_DEC, VALS(ranap_KeyStatus_vals), 0, NULL, HFILL }}, { &hf_ranap_LAI_PDU, { "LAI", "ranap.LAI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LastKnownServiceArea_PDU, { "LastKnownServiceArea", "ranap.LastKnownServiceArea_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LocationRelatedDataRequestType_PDU, { "LocationRelatedDataRequestType", "ranap.LocationRelatedDataRequestType_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LocationRelatedDataRequestTypeSpecificToGERANIuMode_PDU, { "LocationRelatedDataRequestTypeSpecificToGERANIuMode", "ranap.LocationRelatedDataRequestTypeSpecificToGERANIuMode", FT_UINT32, BASE_DEC, VALS(ranap_LocationRelatedDataRequestTypeSpecificToGERANIuMode_vals), 0, NULL, HFILL }}, { &hf_ranap_L3_Information_PDU, { "L3-Information", "ranap.L3_Information", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Management_Based_MDT_Allowed_PDU, { "Management-Based-MDT-Allowed", "ranap.Management_Based_MDT_Allowed", FT_UINT32, BASE_DEC, VALS(ranap_Management_Based_MDT_Allowed_vals), 0, NULL, HFILL }}, { &hf_ranap_MBMSBearerServiceType_PDU, { "MBMSBearerServiceType", "ranap.MBMSBearerServiceType", FT_UINT32, BASE_DEC, VALS(ranap_MBMSBearerServiceType_vals), 0, NULL, HFILL }}, { &hf_ranap_MBMSCNDe_Registration_PDU, { "MBMSCNDe-Registration", "ranap.MBMSCNDe_Registration", FT_UINT32, BASE_DEC, VALS(ranap_MBMSCNDe_Registration_vals), 0, NULL, HFILL }}, { &hf_ranap_MBMSCountingInformation_PDU, { "MBMSCountingInformation", "ranap.MBMSCountingInformation", FT_UINT32, BASE_DEC, VALS(ranap_MBMSCountingInformation_vals), 0, NULL, HFILL }}, { &hf_ranap_MBMSLinkingInformation_PDU, { "MBMSLinkingInformation", "ranap.MBMSLinkingInformation", FT_UINT32, BASE_DEC, VALS(ranap_MBMSLinkingInformation_vals), 0, NULL, HFILL }}, { &hf_ranap_MBMSRegistrationRequestType_PDU, { "MBMSRegistrationRequestType", "ranap.MBMSRegistrationRequestType", FT_UINT32, BASE_DEC, VALS(ranap_MBMSRegistrationRequestType_vals), 0, NULL, HFILL }}, { &hf_ranap_MBMSServiceArea_PDU, { "MBMSServiceArea", "ranap.MBMSServiceArea", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionDuration_PDU, { "MBMSSessionDuration", "ranap.MBMSSessionDuration", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionIdentity_PDU, { "MBMSSessionIdentity", "ranap.MBMSSessionIdentity", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionRepetitionNumber_PDU, { "MBMSSessionRepetitionNumber", "ranap.MBMSSessionRepetitionNumber", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MDT_Configuration_PDU, { "MDT-Configuration", "ranap.MDT_Configuration_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MSISDN_PDU, { "MSISDN", "ranap.MSISDN", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_NAS_PDU_PDU, { "NAS-PDU", "ranap.NAS_PDU", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_NAS_SequenceNumber_PDU, { "NAS-SequenceNumber", "ranap.NAS_SequenceNumber", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_NewBSS_To_OldBSS_Information_PDU, { "NewBSS-To-OldBSS-Information", "ranap.NewBSS_To_OldBSS_Information", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_NonSearchingIndication_PDU, { "NonSearchingIndication", "ranap.NonSearchingIndication", FT_UINT32, BASE_DEC, VALS(ranap_NonSearchingIndication_vals), 0, NULL, HFILL }}, { &hf_ranap_NumberOfSteps_PDU, { "NumberOfSteps", "ranap.NumberOfSteps", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Offload_RAB_Parameters_PDU, { "Offload-RAB-Parameters", "ranap.Offload_RAB_Parameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_OldBSS_ToNewBSS_Information_PDU, { "OldBSS-ToNewBSS-Information", "ranap.OldBSS_ToNewBSS_Information", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_OMC_ID_PDU, { "OMC-ID", "ranap.OMC_ID", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_PagingAreaID_PDU, { "PagingAreaID", "ranap.PagingAreaID", FT_UINT32, BASE_DEC, VALS(ranap_PagingAreaID_vals), 0, NULL, HFILL }}, { &hf_ranap_PagingCause_PDU, { "PagingCause", "ranap.PagingCause", FT_UINT32, BASE_DEC, VALS(ranap_PagingCause_vals), 0, NULL, HFILL }}, { &hf_ranap_PDP_TypeInformation_PDU, { "PDP-TypeInformation", "ranap.PDP_TypeInformation", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_PDP_TypeInformation_extension_PDU, { "PDP-TypeInformation-extension", "ranap.PDP_TypeInformation_extension", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_PeriodicLocationInfo_PDU, { "PeriodicLocationInfo", "ranap.PeriodicLocationInfo_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_PermanentNAS_UE_ID_PDU, { "PermanentNAS-UE-ID", "ranap.PermanentNAS_UE_ID", FT_UINT32, BASE_DEC, VALS(ranap_PermanentNAS_UE_ID_vals), 0, NULL, HFILL }}, { &hf_ranap_PLMNidentity_PDU, { "PLMNidentity", "ranap.PLMNidentity", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_PositioningPriority_PDU, { "PositioningPriority", "ranap.PositioningPriority", FT_UINT32, BASE_DEC, VALS(ranap_PositioningPriority_vals), 0, NULL, HFILL }}, { &hf_ranap_PositionData_PDU, { "PositionData", "ranap.PositionData_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_PositionDataSpecificToGERANIuMode_PDU, { "PositionDataSpecificToGERANIuMode", "ranap.PositionDataSpecificToGERANIuMode", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Priority_Class_Indicator_PDU, { "Priority-Class-Indicator", "ranap.Priority_Class_Indicator", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ProvidedData_PDU, { "ProvidedData", "ranap.ProvidedData", FT_UINT32, BASE_DEC, VALS(ranap_ProvidedData_vals), 0, NULL, HFILL }}, { &hf_ranap_RAB_ID_PDU, { "RAB-ID", "ranap.RAB_ID", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU, { "RAB-Parameter-ExtendedGuaranteedBitrateList", "ranap.RAB_Parameter_ExtendedGuaranteedBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_Parameter_ExtendedMaxBitrateList_PDU, { "RAB-Parameter-ExtendedMaxBitrateList", "ranap.RAB_Parameter_ExtendedMaxBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_Parameters_PDU, { "RAB-Parameters", "ranap.RAB_Parameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RABParametersList_PDU, { "RABParametersList", "ranap.RABParametersList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAC_PDU, { "RAC", "ranap.RAC", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAListofIdleModeUEs_PDU, { "RAListofIdleModeUEs", "ranap.RAListofIdleModeUEs", FT_UINT32, BASE_DEC, VALS(ranap_RAListofIdleModeUEs_vals), 0, NULL, HFILL }}, { &hf_ranap_LAListofIdleModeUEs_PDU, { "LAListofIdleModeUEs", "ranap.LAListofIdleModeUEs", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAT_Type_PDU, { "RAT-Type", "ranap.RAT_Type", FT_UINT32, BASE_DEC, VALS(ranap_RAT_Type_vals), 0, NULL, HFILL }}, { &hf_ranap_RedirectAttemptFlag_PDU, { "RedirectAttemptFlag", "ranap.RedirectAttemptFlag_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RedirectionCompleted_PDU, { "RedirectionCompleted", "ranap.RedirectionCompleted", FT_UINT32, BASE_DEC, VALS(ranap_RedirectionCompleted_vals), 0, NULL, HFILL }}, { &hf_ranap_RejectCauseValue_PDU, { "RejectCauseValue", "ranap.RejectCauseValue", FT_UINT32, BASE_DEC, VALS(ranap_RejectCauseValue_vals), 0, NULL, HFILL }}, { &hf_ranap_RelocationType_PDU, { "RelocationType", "ranap.RelocationType", FT_UINT32, BASE_DEC, VALS(ranap_RelocationType_vals), 0, NULL, HFILL }}, { &hf_ranap_RequestedGANSSAssistanceData_PDU, { "RequestedGANSSAssistanceData", "ranap.RequestedGANSSAssistanceData", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList_PDU, { "Requested-RAB-Parameter-ExtendedMaxBitrateList", "ranap.Requested_RAB_Parameter_ExtendedMaxBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU, { "Requested-RAB-Parameter-ExtendedGuaranteedBitrateList", "ranap.Requested_RAB_Parameter_ExtendedGuaranteedBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RequestType_PDU, { "RequestType", "ranap.RequestType_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ResponseTime_PDU, { "ResponseTime", "ranap.ResponseTime", FT_UINT32, BASE_DEC, VALS(ranap_ResponseTime_vals), 0, NULL, HFILL }}, { &hf_ranap_RNSAPRelocationParameters_PDU, { "RNSAPRelocationParameters", "ranap.RNSAPRelocationParameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RRC_Container_PDU, { "RRC-Container", "ranap.RRC_Container", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SAI_PDU, { "SAI", "ranap.SAI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SAPI_PDU, { "SAPI", "ranap.SAPI", FT_UINT32, BASE_DEC, VALS(ranap_SAPI_vals), 0, NULL, HFILL }}, { &hf_ranap_SessionUpdateID_PDU, { "SessionUpdateID", "ranap.SessionUpdateID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_SignallingIndication_PDU, { "SignallingIndication", "ranap.SignallingIndication", FT_UINT32, BASE_DEC, VALS(ranap_SignallingIndication_vals), 0, NULL, HFILL }}, { &hf_ranap_SNA_Access_Information_PDU, { "SNA-Access-Information", "ranap.SNA_Access_Information_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Source_ToTarget_TransparentContainer_PDU, { "Source-ToTarget-TransparentContainer", "ranap.Source_ToTarget_TransparentContainer", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ranap_SourceCellID_PDU, { "SourceCellID", "ranap.SourceCellID", FT_UINT32, BASE_DEC, VALS(ranap_SourceCellID_vals), 0, NULL, HFILL }}, { &hf_ranap_SourceBSS_ToTargetBSS_TransparentContainer_PDU, { "SourceBSS-ToTargetBSS-TransparentContainer", "ranap.SourceBSS_ToTargetBSS_TransparentContainer", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SourceID_PDU, { "SourceID", "ranap.SourceID", FT_UINT32, BASE_DEC, VALS(ranap_SourceID_vals), 0, NULL, HFILL }}, { &hf_ranap_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU, { "SourceRNC-ToTargetRNC-TransparentContainer", "ranap.SourceRNC_ToTargetRNC_TransparentContainer_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_IRAT_Measurement_Configuration_PDU, { "IRAT-Measurement-Configuration", "ranap.IRAT_Measurement_Configuration_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SubscriberProfileIDforRFP_PDU, { "SubscriberProfileIDforRFP", "ranap.SubscriberProfileIDforRFP", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_SupportedRAB_ParameterBitrateList_PDU, { "SupportedRAB-ParameterBitrateList", "ranap.SupportedRAB_ParameterBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_SRB_TrCH_Mapping_PDU, { "SRB-TrCH-Mapping", "ranap.SRB_TrCH_Mapping", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_SRVCC_HO_Indication_PDU, { "SRVCC-HO-Indication", "ranap.SRVCC_HO_Indication", FT_UINT32, BASE_DEC, VALS(ranap_SRVCC_HO_Indication_vals), 0, NULL, HFILL }}, { &hf_ranap_SRVCC_Information_PDU, { "SRVCC-Information", "ranap.SRVCC_Information_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SRVCC_Operation_Possible_PDU, { "SRVCC-Operation-Possible", "ranap.SRVCC_Operation_Possible", FT_UINT32, BASE_DEC, VALS(ranap_SRVCC_Operation_Possible_vals), 0, NULL, HFILL }}, { &hf_ranap_Target_ToSource_TransparentContainer_PDU, { "Target-ToSource-TransparentContainer", "ranap.Target_ToSource_TransparentContainer", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TargetBSS_ToSourceBSS_TransparentContainer_PDU, { "TargetBSS-ToSourceBSS-TransparentContainer", "ranap.TargetBSS_ToSourceBSS_TransparentContainer", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TargetID_PDU, { "TargetID", "ranap.TargetID", FT_UINT32, BASE_DEC, VALS(ranap_TargetID_vals), 0, NULL, HFILL }}, { &hf_ranap_ranap_TargetRNC_ID_PDU, { "TargetRNC-ID", "ranap.TargetRNC_ID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU, { "TargetRNC-ToSourceRNC-TransparentContainer", "ranap.TargetRNC_ToSourceRNC_TransparentContainer_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TemporaryUE_ID_PDU, { "TemporaryUE-ID", "ranap.TemporaryUE_ID", FT_UINT32, BASE_DEC, VALS(ranap_TemporaryUE_ID_vals), 0, NULL, HFILL }}, { &hf_ranap_TimeToMBMSDataTransfer_PDU, { "TimeToMBMSDataTransfer", "ranap.TimeToMBMSDataTransfer", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TMGI_PDU, { "TMGI", "ranap.TMGI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TracePropagationParameters_PDU, { "TracePropagationParameters", "ranap.TracePropagationParameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TraceRecordingSessionInformation_PDU, { "TraceRecordingSessionInformation", "ranap.TraceRecordingSessionInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TraceReference_PDU, { "TraceReference", "ranap.TraceReference", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TraceType_PDU, { "TraceType", "ranap.TraceType", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TransportLayerAddress_PDU, { "TransportLayerAddress", "ranap.TransportLayerAddress", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TriggerID_PDU, { "TriggerID", "ranap.TriggerID", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TypeOfError_PDU, { "TypeOfError", "ranap.TypeOfError", FT_UINT32, BASE_DEC, VALS(ranap_TypeOfError_vals), 0, NULL, HFILL }}, { &hf_ranap_UE_AggregateMaximumBitRate_PDU, { "UE-AggregateMaximumBitRate", "ranap.UE_AggregateMaximumBitRate_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_UE_History_Information_PDU, { "UE-History-Information", "ranap.UE_History_Information", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_UE_ID_PDU, { "UE-ID", "ranap.UE_ID", FT_UINT32, BASE_DEC, VALS(ranap_UE_ID_vals), 0, NULL, HFILL }}, { &hf_ranap_UESBI_Iu_PDU, { "UESBI-Iu", "ranap.UESBI_Iu_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_VelocityEstimate_PDU, { "VelocityEstimate", "ranap.VelocityEstimate", FT_UINT32, BASE_DEC, VALS(ranap_VelocityEstimate_vals), 0, NULL, HFILL }}, { &hf_ranap_VerticalAccuracyCode_PDU, { "VerticalAccuracyCode", "ranap.VerticalAccuracyCode", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Iu_ReleaseCommand_PDU, { "Iu-ReleaseCommand", "ranap.Iu_ReleaseCommand_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Iu_ReleaseComplete_PDU, { "Iu-ReleaseComplete", "ranap.Iu_ReleaseComplete_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_DataVolumeReportList_PDU, { "RAB-DataVolumeReportList", "ranap.RAB_DataVolumeReportList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_DataVolumeReportItem_PDU, { "RAB-DataVolumeReportItem", "ranap.RAB_DataVolumeReportItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ReleasedList_IuRelComp_PDU, { "RAB-ReleasedList-IuRelComp", "ranap.RAB_ReleasedList_IuRelComp", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ReleasedItem_IuRelComp_PDU, { "RAB-ReleasedItem-IuRelComp", "ranap.RAB_ReleasedItem_IuRelComp_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RelocationRequired_PDU, { "RelocationRequired", "ranap.RelocationRequired_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RelocationCommand_PDU, { "RelocationCommand", "ranap.RelocationCommand_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_RelocationReleaseList_PDU, { "RAB-RelocationReleaseList", "ranap.RAB_RelocationReleaseList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_RelocationReleaseItem_PDU, { "RAB-RelocationReleaseItem", "ranap.RAB_RelocationReleaseItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_DataForwardingList_PDU, { "RAB-DataForwardingList", "ranap.RAB_DataForwardingList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_DataForwardingItem_PDU, { "RAB-DataForwardingItem", "ranap.RAB_DataForwardingItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RelocationPreparationFailure_PDU, { "RelocationPreparationFailure", "ranap.RelocationPreparationFailure_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RelocationRequest_PDU, { "RelocationRequest", "ranap.RelocationRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupList_RelocReq_PDU, { "RAB-SetupList-RelocReq", "ranap.RAB_SetupList_RelocReq", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupItem_RelocReq_PDU, { "RAB-SetupItem-RelocReq", "ranap.RAB_SetupItem_RelocReq_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_CNMBMSLinkingInformation_PDU, { "CNMBMSLinkingInformation", "ranap.CNMBMSLinkingInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_JoinedMBMSBearerService_IEs_PDU, { "JoinedMBMSBearerService-IEs", "ranap.JoinedMBMSBearerService_IEs", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RelocationRequestAcknowledge_PDU, { "RelocationRequestAcknowledge", "ranap.RelocationRequestAcknowledge_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupList_RelocReqAck_PDU, { "RAB-SetupList-RelocReqAck", "ranap.RAB_SetupList_RelocReqAck", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupItem_RelocReqAck_PDU, { "RAB-SetupItem-RelocReqAck", "ranap.RAB_SetupItem_RelocReqAck_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_FailedList_PDU, { "RAB-FailedList", "ranap.RAB_FailedList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_FailedItem_PDU, { "RAB-FailedItem", "ranap.RAB_FailedItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RelocationFailure_PDU, { "RelocationFailure", "ranap.RelocationFailure_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RelocationCancel_PDU, { "RelocationCancel", "ranap.RelocationCancel_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RelocationCancelAcknowledge_PDU, { "RelocationCancelAcknowledge", "ranap.RelocationCancelAcknowledge_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SRNS_ContextRequest_PDU, { "SRNS-ContextRequest", "ranap.SRNS_ContextRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_DataForwardingList_SRNS_CtxReq_PDU, { "RAB-DataForwardingList-SRNS-CtxReq", "ranap.RAB_DataForwardingList_SRNS_CtxReq", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_DataForwardingItem_SRNS_CtxReq_PDU, { "RAB-DataForwardingItem-SRNS-CtxReq", "ranap.RAB_DataForwardingItem_SRNS_CtxReq_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SRNS_ContextResponse_PDU, { "SRNS-ContextResponse", "ranap.SRNS_ContextResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ContextList_PDU, { "RAB-ContextList", "ranap.RAB_ContextList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ContextItem_PDU, { "RAB-ContextItem", "ranap.RAB_ContextItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ContextFailedtoTransferList_PDU, { "RAB-ContextFailedtoTransferList", "ranap.RAB_ContextFailedtoTransferList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RABs_ContextFailedtoTransferItem_PDU, { "RABs-ContextFailedtoTransferItem", "ranap.RABs_ContextFailedtoTransferItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SecurityModeCommand_PDU, { "SecurityModeCommand", "ranap.SecurityModeCommand_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SecurityModeComplete_PDU, { "SecurityModeComplete", "ranap.SecurityModeComplete_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SecurityModeReject_PDU, { "SecurityModeReject", "ranap.SecurityModeReject_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_DataVolumeReportRequest_PDU, { "DataVolumeReportRequest", "ranap.DataVolumeReportRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_DataVolumeReportRequestList_PDU, { "RAB-DataVolumeReportRequestList", "ranap.RAB_DataVolumeReportRequestList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_DataVolumeReportRequestItem_PDU, { "RAB-DataVolumeReportRequestItem", "ranap.RAB_DataVolumeReportRequestItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_DataVolumeReport_PDU, { "DataVolumeReport", "ranap.DataVolumeReport_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_FailedtoReportList_PDU, { "RAB-FailedtoReportList", "ranap.RAB_FailedtoReportList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RABs_failed_to_reportItem_PDU, { "RABs-failed-to-reportItem", "ranap.RABs_failed_to_reportItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Reset_PDU, { "Reset", "ranap.Reset_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ResetAcknowledge_PDU, { "ResetAcknowledge", "ranap.ResetAcknowledge_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ResetResource_PDU, { "ResetResource", "ranap.ResetResource_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ResetResourceList_PDU, { "ResetResourceList", "ranap.ResetResourceList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_ResetResourceItem_PDU, { "ResetResourceItem", "ranap.ResetResourceItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ResetResourceAcknowledge_PDU, { "ResetResourceAcknowledge", "ranap.ResetResourceAcknowledge_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ResetResourceAckList_PDU, { "ResetResourceAckList", "ranap.ResetResourceAckList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_ResetResourceAckItem_PDU, { "ResetResourceAckItem", "ranap.ResetResourceAckItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ReleaseRequest_PDU, { "RAB-ReleaseRequest", "ranap.RAB_ReleaseRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ReleaseList_PDU, { "RAB-ReleaseList", "ranap.RAB_ReleaseList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ReleaseItem_PDU, { "RAB-ReleaseItem", "ranap.RAB_ReleaseItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Iu_ReleaseRequest_PDU, { "Iu-ReleaseRequest", "ranap.Iu_ReleaseRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RelocationDetect_PDU, { "RelocationDetect", "ranap.RelocationDetect_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RelocationComplete_PDU, { "RelocationComplete", "ranap.RelocationComplete_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_EnhancedRelocationCompleteRequest_PDU, { "EnhancedRelocationCompleteRequest", "ranap.EnhancedRelocationCompleteRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupList_EnhancedRelocCompleteReq_PDU, { "RAB-SetupList-EnhancedRelocCompleteReq", "ranap.RAB_SetupList_EnhancedRelocCompleteReq", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupItem_EnhancedRelocCompleteReq_PDU, { "RAB-SetupItem-EnhancedRelocCompleteReq", "ranap.RAB_SetupItem_EnhancedRelocCompleteReq_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_EnhancedRelocationCompleteResponse_PDU, { "EnhancedRelocationCompleteResponse", "ranap.EnhancedRelocationCompleteResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupList_EnhancedRelocCompleteRes_PDU, { "RAB-SetupList-EnhancedRelocCompleteRes", "ranap.RAB_SetupList_EnhancedRelocCompleteRes", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupItem_EnhancedRelocCompleteRes_PDU, { "RAB-SetupItem-EnhancedRelocCompleteRes", "ranap.RAB_SetupItem_EnhancedRelocCompleteRes_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_PDU, { "RAB-ToBeReleasedList-EnhancedRelocCompleteRes", "ranap.RAB_ToBeReleasedList_EnhancedRelocCompleteRes", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_PDU, { "RAB-ToBeReleasedItem-EnhancedRelocCompleteRes", "ranap.RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_EnhancedRelocationCompleteFailure_PDU, { "EnhancedRelocationCompleteFailure", "ranap.EnhancedRelocationCompleteFailure_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_EnhancedRelocationCompleteConfirm_PDU, { "EnhancedRelocationCompleteConfirm", "ranap.EnhancedRelocationCompleteConfirm_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_Paging_PDU, { "Paging", "ranap.Paging_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_CommonID_PDU, { "CommonID", "ranap.CommonID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_CN_InvokeTrace_PDU, { "CN-InvokeTrace", "ranap.CN_InvokeTrace_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_CN_DeactivateTrace_PDU, { "CN-DeactivateTrace", "ranap.CN_DeactivateTrace_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LocationReportingControl_PDU, { "LocationReportingControl", "ranap.LocationReportingControl_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LocationReport_PDU, { "LocationReport", "ranap.LocationReport_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_InitialUE_Message_PDU, { "InitialUE-Message", "ranap.InitialUE_Message_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_DirectTransfer_PDU, { "DirectTransfer", "ranap.DirectTransfer_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RedirectionIndication_PDU, { "RedirectionIndication", "ranap.RedirectionIndication", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Overload_PDU, { "Overload", "ranap.Overload_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ErrorIndication_PDU, { "ErrorIndication", "ranap.ErrorIndication_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SRNS_DataForwardCommand_PDU, { "SRNS-DataForwardCommand", "ranap.SRNS_DataForwardCommand_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ForwardSRNS_Context_PDU, { "ForwardSRNS-Context", "ranap.ForwardSRNS_Context_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_AssignmentRequest_PDU, { "RAB-AssignmentRequest", "ranap.RAB_AssignmentRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupOrModifyList_PDU, { "RAB-SetupOrModifyList", "ranap.RAB_SetupOrModifyList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupOrModifyItemFirst_PDU, { "RAB-SetupOrModifyItemFirst", "ranap.RAB_SetupOrModifyItemFirst_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_TransportLayerInformation_PDU, { "TransportLayerInformation", "ranap.TransportLayerInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupOrModifyItemSecond_PDU, { "RAB-SetupOrModifyItemSecond", "ranap.RAB_SetupOrModifyItemSecond_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_AssignmentResponse_PDU, { "RAB-AssignmentResponse", "ranap.RAB_AssignmentResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupOrModifiedList_PDU, { "RAB-SetupOrModifiedList", "ranap.RAB_SetupOrModifiedList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupOrModifiedItem_PDU, { "RAB-SetupOrModifiedItem", "ranap.RAB_SetupOrModifiedItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ReleasedList_PDU, { "RAB-ReleasedList", "ranap.RAB_ReleasedList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ReleasedItem_PDU, { "RAB-ReleasedItem", "ranap.RAB_ReleasedItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_QueuedList_PDU, { "RAB-QueuedList", "ranap.RAB_QueuedList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_QueuedItem_PDU, { "RAB-QueuedItem", "ranap.RAB_QueuedItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ReleaseFailedList_PDU, { "RAB-ReleaseFailedList", "ranap.RAB_ReleaseFailedList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_GERAN_Iumode_RAB_FailedList_RABAssgntResponse_PDU, { "GERAN-Iumode-RAB-FailedList-RABAssgntResponse", "ranap.GERAN_Iumode_RAB_FailedList_RABAssgntResponse", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_PDU, { "GERAN-Iumode-RAB-Failed-RABAssgntResponse-Item", "ranap.GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_PrivateMessage_PDU, { "PrivateMessage", "ranap.PrivateMessage_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RANAP_RelocationInformation_PDU, { "RANAP-RelocationInformation", "ranap.RANAP_RelocationInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_DirectTransferInformationList_RANAP_RelocInf_PDU, { "DirectTransferInformationList-RANAP-RelocInf", "ranap.DirectTransferInformationList_RANAP_RelocInf", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_DirectTransferInformationItem_RANAP_RelocInf_PDU, { "DirectTransferInformationItem-RANAP-RelocInf", "ranap.DirectTransferInformationItem_RANAP_RelocInf_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ContextList_RANAP_RelocInf_PDU, { "RAB-ContextList-RANAP-RelocInf", "ranap.RAB_ContextList_RANAP_RelocInf", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ContextItem_RANAP_RelocInf_PDU, { "RAB-ContextItem-RANAP-RelocInf", "ranap.RAB_ContextItem_RANAP_RelocInf_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RANAP_EnhancedRelocationInformationRequest_PDU, { "RANAP-EnhancedRelocationInformationRequest", "ranap.RANAP_EnhancedRelocationInformationRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupList_EnhRelocInfoReq_PDU, { "RAB-SetupList-EnhRelocInfoReq", "ranap.RAB_SetupList_EnhRelocInfoReq", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupItem_EnhRelocInfoReq_PDU, { "RAB-SetupItem-EnhRelocInfoReq", "ranap.RAB_SetupItem_EnhRelocInfoReq_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RANAP_EnhancedRelocationInformationResponse_PDU, { "RANAP-EnhancedRelocationInformationResponse", "ranap.RANAP_EnhancedRelocationInformationResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupList_EnhRelocInfoRes_PDU, { "RAB-SetupList-EnhRelocInfoRes", "ranap.RAB_SetupList_EnhRelocInfoRes", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_SetupItem_EnhRelocInfoRes_PDU, { "RAB-SetupItem-EnhRelocInfoRes", "ranap.RAB_SetupItem_EnhRelocInfoRes_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_FailedList_EnhRelocInfoRes_PDU, { "RAB-FailedList-EnhRelocInfoRes", "ranap.RAB_FailedList_EnhRelocInfoRes", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_FailedItem_EnhRelocInfoRes_PDU, { "RAB-FailedItem-EnhRelocInfoRes", "ranap.RAB_FailedItem_EnhRelocInfoRes_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ModifyRequest_PDU, { "RAB-ModifyRequest", "ranap.RAB_ModifyRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ModifyList_PDU, { "RAB-ModifyList", "ranap.RAB_ModifyList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_ModifyItem_PDU, { "RAB-ModifyItem", "ranap.RAB_ModifyItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LocationRelatedDataRequest_PDU, { "LocationRelatedDataRequest", "ranap.LocationRelatedDataRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LocationRelatedDataResponse_PDU, { "LocationRelatedDataResponse", "ranap.LocationRelatedDataResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LocationRelatedDataFailure_PDU, { "LocationRelatedDataFailure", "ranap.LocationRelatedDataFailure_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_InformationTransferIndication_PDU, { "InformationTransferIndication", "ranap.InformationTransferIndication_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_InformationTransferConfirmation_PDU, { "InformationTransferConfirmation", "ranap.InformationTransferConfirmation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_InformationTransferFailure_PDU, { "InformationTransferFailure", "ranap.InformationTransferFailure_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_UESpecificInformationIndication_PDU, { "UESpecificInformationIndication", "ranap.UESpecificInformationIndication_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_DirectInformationTransfer_PDU, { "DirectInformationTransfer", "ranap.DirectInformationTransfer_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_UplinkInformationExchangeRequest_PDU, { "UplinkInformationExchangeRequest", "ranap.UplinkInformationExchangeRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_UplinkInformationExchangeResponse_PDU, { "UplinkInformationExchangeResponse", "ranap.UplinkInformationExchangeResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_UplinkInformationExchangeFailure_PDU, { "UplinkInformationExchangeFailure", "ranap.UplinkInformationExchangeFailure_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionStart_PDU, { "MBMSSessionStart", "ranap.MBMSSessionStart_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSynchronisationInformation_PDU, { "MBMSSynchronisationInformation", "ranap.MBMSSynchronisationInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionStartResponse_PDU, { "MBMSSessionStartResponse", "ranap.MBMSSessionStartResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionStartFailure_PDU, { "MBMSSessionStartFailure", "ranap.MBMSSessionStartFailure_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionUpdate_PDU, { "MBMSSessionUpdate", "ranap.MBMSSessionUpdate_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionUpdateResponse_PDU, { "MBMSSessionUpdateResponse", "ranap.MBMSSessionUpdateResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionUpdateFailure_PDU, { "MBMSSessionUpdateFailure", "ranap.MBMSSessionUpdateFailure_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionStop_PDU, { "MBMSSessionStop", "ranap.MBMSSessionStop_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSSessionStopResponse_PDU, { "MBMSSessionStopResponse", "ranap.MBMSSessionStopResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSUELinkingRequest_PDU, { "MBMSUELinkingRequest", "ranap.MBMSUELinkingRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LeftMBMSBearerService_IEs_PDU, { "LeftMBMSBearerService-IEs", "ranap.LeftMBMSBearerService_IEs", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSUELinkingResponse_PDU, { "MBMSUELinkingResponse", "ranap.MBMSUELinkingResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_UnsuccessfulLinking_IEs_PDU, { "UnsuccessfulLinking-IEs", "ranap.UnsuccessfulLinking_IEs", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSRegistrationRequest_PDU, { "MBMSRegistrationRequest", "ranap.MBMSRegistrationRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSRegistrationResponse_PDU, { "MBMSRegistrationResponse", "ranap.MBMSRegistrationResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSRegistrationFailure_PDU, { "MBMSRegistrationFailure", "ranap.MBMSRegistrationFailure_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSCNDe_RegistrationRequest_PDU, { "MBMSCNDe-RegistrationRequest", "ranap.MBMSCNDe_RegistrationRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSCNDe_RegistrationResponse_PDU, { "MBMSCNDe-RegistrationResponse", "ranap.MBMSCNDe_RegistrationResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSRABEstablishmentIndication_PDU, { "MBMSRABEstablishmentIndication", "ranap.MBMSRABEstablishmentIndication_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSRABReleaseRequest_PDU, { "MBMSRABReleaseRequest", "ranap.MBMSRABReleaseRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSRABRelease_PDU, { "MBMSRABRelease", "ranap.MBMSRABRelease_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_MBMSRABReleaseFailure_PDU, { "MBMSRABReleaseFailure", "ranap.MBMSRABReleaseFailure_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SRVCC_CSKeysRequest_PDU, { "SRVCC-CSKeysRequest", "ranap.SRVCC_CSKeysRequest_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_SRVCC_CSKeysResponse_PDU, { "SRVCC-CSKeysResponse", "ranap.SRVCC_CSKeysResponse_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RANAP_PDU_PDU, { "RANAP-PDU", "ranap.RANAP_PDU", FT_UINT32, BASE_DEC, VALS(ranap_RANAP_PDU_vals), 0, NULL, HFILL }}, { &hf_ranap_local, { "local", "ranap.local", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_65535", HFILL }}, { &hf_ranap_global, { "global", "ranap.global", FT_OID, BASE_NONE, NULL, 0, "OBJECT_IDENTIFIER", HFILL }}, { &hf_ranap_ProtocolIE_Container_item, { "ProtocolIE-Field", "ranap.ProtocolIE_Field_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_id, { "id", "ranap.id", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &ranap_ProtocolIE_ID_vals_ext, 0, "ProtocolIE_ID", HFILL }}, { &hf_ranap_criticality, { "criticality", "ranap.criticality", FT_UINT32, BASE_DEC, VALS(ranap_Criticality_vals), 0, NULL, HFILL }}, { &hf_ranap_ie_field_value, { "value", "ranap.value_element", FT_NONE, BASE_NONE, NULL, 0, "T_ie_field_value", HFILL }}, { &hf_ranap_ProtocolIE_ContainerPair_item, { "ProtocolIE-FieldPair", "ranap.ProtocolIE_FieldPair_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_firstCriticality, { "firstCriticality", "ranap.firstCriticality", FT_UINT32, BASE_DEC, VALS(ranap_Criticality_vals), 0, "Criticality", HFILL }}, { &hf_ranap_firstValue, { "firstValue", "ranap.firstValue_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_secondCriticality, { "secondCriticality", "ranap.secondCriticality", FT_UINT32, BASE_DEC, VALS(ranap_Criticality_vals), 0, "Criticality", HFILL }}, { &hf_ranap_secondValue, { "secondValue", "ranap.secondValue_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ProtocolIE_ContainerList_item, { "ProtocolIE-Container", "ranap.ProtocolIE_Container", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_ProtocolIE_ContainerPairList_item, { "ProtocolIE-ContainerPair", "ranap.ProtocolIE_ContainerPair", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_ProtocolExtensionContainer_item, { "ProtocolExtensionField", "ranap.ProtocolExtensionField_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_ext_id, { "id", "ranap.id", FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ranap_ProtocolIE_ID_vals_ext, 0, "ProtocolExtensionID", HFILL }}, { &hf_ranap_extensionValue, { "extensionValue", "ranap.extensionValue_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_PrivateIE_Container_item, { "PrivateIE-Field", "ranap.PrivateIE_Field_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_private_id, { "id", "ranap.id", FT_UINT32, BASE_DEC, VALS(ranap_PrivateIE_ID_vals), 0, "PrivateIE_ID", HFILL }}, { &hf_ranap_private_value, { "value", "ranap.value_element", FT_NONE, BASE_NONE, NULL, 0, "T_private_value", HFILL }}, { &hf_ranap_priorityLevel, { "priorityLevel", "ranap.priorityLevel", FT_UINT32, BASE_DEC, VALS(ranap_PriorityLevel_vals), 0, NULL, HFILL }}, { &hf_ranap_pre_emptionCapability, { "pre-emptionCapability", "ranap.pre_emptionCapability", FT_UINT32, BASE_DEC, VALS(ranap_Pre_emptionCapability_vals), 0, NULL, HFILL }}, { &hf_ranap_pre_emptionVulnerability, { "pre-emptionVulnerability", "ranap.pre_emptionVulnerability", FT_UINT32, BASE_DEC, VALS(ranap_Pre_emptionVulnerability_vals), 0, NULL, HFILL }}, { &hf_ranap_queuingAllowed, { "queuingAllowed", "ranap.queuingAllowed", FT_UINT32, BASE_DEC, VALS(ranap_QueuingAllowed_vals), 0, NULL, HFILL }}, { &hf_ranap_iE_Extensions, { "iE-Extensions", "ranap.iE_Extensions", FT_UINT32, BASE_DEC, NULL, 0, "ProtocolExtensionContainer", HFILL }}, { &hf_ranap_altMaxBitrateInf, { "altMaxBitrateInf", "ranap.altMaxBitrateInf_element", FT_NONE, BASE_NONE, NULL, 0, "Alt_RAB_Parameter_MaxBitrateInf", HFILL }}, { &hf_ranap_altGuaranteedBitRateInf, { "altGuaranteedBitRateInf", "ranap.altGuaranteedBitRateInf_element", FT_NONE, BASE_NONE, NULL, 0, "Alt_RAB_Parameter_GuaranteedBitrateInf", HFILL }}, { &hf_ranap_altExtendedGuaranteedBitrateType, { "altExtendedGuaranteedBitrateType", "ranap.altExtendedGuaranteedBitrateType", FT_UINT32, BASE_DEC, VALS(ranap_Alt_RAB_Parameter_GuaranteedBitrateType_vals), 0, "Alt_RAB_Parameter_GuaranteedBitrateType", HFILL }}, { &hf_ranap_altExtendedGuaranteedBitrates, { "altExtendedGuaranteedBitrates", "ranap.altExtendedGuaranteedBitrates", FT_UINT32, BASE_DEC, NULL, 0, "Alt_RAB_Parameter_ExtendedGuaranteedBitrates", HFILL }}, { &hf_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrates_item, { "Alt-RAB-Parameter-ExtendedGuaranteedBitrateList", "ranap.Alt_RAB_Parameter_ExtendedGuaranteedBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateList_item, { "ExtendedGuaranteedBitrate", "ranap.ExtendedGuaranteedBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_altGuaranteedBitrateType, { "altGuaranteedBitrateType", "ranap.altGuaranteedBitrateType", FT_UINT32, BASE_DEC, VALS(ranap_Alt_RAB_Parameter_GuaranteedBitrateType_vals), 0, "Alt_RAB_Parameter_GuaranteedBitrateType", HFILL }}, { &hf_ranap_altGuaranteedBitrates, { "altGuaranteedBitrates", "ranap.altGuaranteedBitrates", FT_UINT32, BASE_DEC, NULL, 0, "Alt_RAB_Parameter_GuaranteedBitrates", HFILL }}, { &hf_ranap_Alt_RAB_Parameter_GuaranteedBitrates_item, { "Alt-RAB-Parameter-GuaranteedBitrateList", "ranap.Alt_RAB_Parameter_GuaranteedBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Alt_RAB_Parameter_GuaranteedBitrateList_item, { "GuaranteedBitrate", "ranap.GuaranteedBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_altSupportedGuaranteedBitrateType, { "altSupportedGuaranteedBitrateType", "ranap.altSupportedGuaranteedBitrateType", FT_UINT32, BASE_DEC, VALS(ranap_Alt_RAB_Parameter_GuaranteedBitrateType_vals), 0, "Alt_RAB_Parameter_GuaranteedBitrateType", HFILL }}, { &hf_ranap_altSupportedGuaranteedBitrates, { "altSupportedGuaranteedBitrates", "ranap.altSupportedGuaranteedBitrates", FT_UINT32, BASE_DEC, NULL, 0, "Alt_RAB_Parameter_SupportedGuaranteedBitrates", HFILL }}, { &hf_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrates_item, { "SupportedRAB-ParameterBitrateList", "ranap.SupportedRAB_ParameterBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_altExtendedMaxBitrateType, { "altExtendedMaxBitrateType", "ranap.altExtendedMaxBitrateType", FT_UINT32, BASE_DEC, VALS(ranap_Alt_RAB_Parameter_MaxBitrateType_vals), 0, "Alt_RAB_Parameter_MaxBitrateType", HFILL }}, { &hf_ranap_altExtendedMaxBitrates, { "altExtendedMaxBitrates", "ranap.altExtendedMaxBitrates", FT_UINT32, BASE_DEC, NULL, 0, "Alt_RAB_Parameter_ExtendedMaxBitrates", HFILL }}, { &hf_ranap_Alt_RAB_Parameter_ExtendedMaxBitrates_item, { "Alt-RAB-Parameter-ExtendedMaxBitrateList", "ranap.Alt_RAB_Parameter_ExtendedMaxBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateList_item, { "ExtendedMaxBitrate", "ranap.ExtendedMaxBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_altMaxBitrateType, { "altMaxBitrateType", "ranap.altMaxBitrateType", FT_UINT32, BASE_DEC, VALS(ranap_Alt_RAB_Parameter_MaxBitrateType_vals), 0, "Alt_RAB_Parameter_MaxBitrateType", HFILL }}, { &hf_ranap_altMaxBitrates, { "altMaxBitrates", "ranap.altMaxBitrates", FT_UINT32, BASE_DEC, NULL, 0, "Alt_RAB_Parameter_MaxBitrates", HFILL }}, { &hf_ranap_Alt_RAB_Parameter_MaxBitrates_item, { "Alt-RAB-Parameter-MaxBitrateList", "ranap.Alt_RAB_Parameter_MaxBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Alt_RAB_Parameter_MaxBitrateList_item, { "MaxBitrate", "ranap.MaxBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_altSupportedMaxBitrateType, { "altSupportedMaxBitrateType", "ranap.altSupportedMaxBitrateType", FT_UINT32, BASE_DEC, VALS(ranap_Alt_RAB_Parameter_MaxBitrateType_vals), 0, "Alt_RAB_Parameter_MaxBitrateType", HFILL }}, { &hf_ranap_altSupportedMaxBitrates, { "altSupportedMaxBitrates", "ranap.altSupportedMaxBitrates", FT_UINT32, BASE_DEC, NULL, 0, "Alt_RAB_Parameter_SupportedMaxBitrates", HFILL }}, { &hf_ranap_Alt_RAB_Parameter_SupportedMaxBitrates_item, { "SupportedRAB-ParameterBitrateList", "ranap.SupportedRAB_ParameterBitrateList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_sAI, { "sAI", "ranap.sAI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_geographicalArea, { "geographicalArea", "ranap.geographicalArea", FT_UINT32, BASE_DEC, VALS(ranap_GeographicalArea_vals), 0, NULL, HFILL }}, { &hf_ranap_assMaxBitrateInf, { "assMaxBitrateInf", "ranap.assMaxBitrateInf", FT_UINT32, BASE_DEC, NULL, 0, "Ass_RAB_Parameter_MaxBitrateList", HFILL }}, { &hf_ranap_assGuaranteedBitRateInf, { "assGuaranteedBitRateInf", "ranap.assGuaranteedBitRateInf", FT_UINT32, BASE_DEC, NULL, 0, "Ass_RAB_Parameter_GuaranteedBitrateList", HFILL }}, { &hf_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList_item, { "ExtendedGuaranteedBitrate", "ranap.ExtendedGuaranteedBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList_item, { "ExtendedMaxBitrate", "ranap.ExtendedMaxBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Ass_RAB_Parameter_GuaranteedBitrateList_item, { "GuaranteedBitrate", "ranap.GuaranteedBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Ass_RAB_Parameter_MaxBitrateList_item, { "MaxBitrate", "ranap.MaxBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_AuthorisedPLMNs_item, { "AuthorisedPLMNs item", "ranap.AuthorisedPLMNs_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_pLMNidentity, { "pLMNidentity", "ranap.pLMNidentity", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_authorisedSNAsList, { "authorisedSNAsList", "ranap.authorisedSNAsList", FT_UINT32, BASE_DEC, NULL, 0, "AuthorisedSNAs", HFILL }}, { &hf_ranap_AuthorisedSNAs_item, { "SNAC", "ranap.SNAC", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_cipheringKeyFlag, { "cipheringKeyFlag", "ranap.cipheringKeyFlag", FT_BYTES, BASE_NONE, NULL, 0, "BIT_STRING_SIZE_1", HFILL }}, { &hf_ranap_currentDecipheringKey, { "currentDecipheringKey", "ranap.currentDecipheringKey", FT_BYTES, BASE_NONE, NULL, 0, "BIT_STRING_SIZE_56", HFILL }}, { &hf_ranap_nextDecipheringKey, { "nextDecipheringKey", "ranap.nextDecipheringKey", FT_BYTES, BASE_NONE, NULL, 0, "BIT_STRING_SIZE_56", HFILL }}, { &hf_ranap_radioNetwork, { "radioNetwork", "ranap.radioNetwork", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &ranap_CauseRadioNetwork_vals_ext, 0, "CauseRadioNetwork", HFILL }}, { &hf_ranap_transmissionNetwork, { "transmissionNetwork", "ranap.transmissionNetwork", FT_UINT32, BASE_DEC, VALS(ranap_CauseTransmissionNetwork_vals), 0, "CauseTransmissionNetwork", HFILL }}, { &hf_ranap_nAS, { "nAS", "ranap.nAS", FT_UINT32, BASE_DEC, VALS(ranap_CauseNAS_vals), 0, "CauseNAS", HFILL }}, { &hf_ranap_protocol, { "protocol", "ranap.protocol", FT_UINT32, BASE_DEC, VALS(ranap_CauseProtocol_vals), 0, "CauseProtocol", HFILL }}, { &hf_ranap_misc, { "misc", "ranap.misc", FT_UINT32, BASE_DEC, VALS(ranap_CauseMisc_vals), 0, "CauseMisc", HFILL }}, { &hf_ranap_non_Standard, { "non-Standard", "ranap.non_Standard", FT_UINT32, BASE_DEC, NULL, 0, "CauseNon_Standard", HFILL }}, { &hf_ranap_radioNetworkExtension, { "radioNetworkExtension", "ranap.radioNetworkExtension", FT_UINT32, BASE_DEC, VALS(ranap_CauseRadioNetworkExtension_vals), 0, "CauseRadioNetworkExtension", HFILL }}, { &hf_ranap_cellIdList, { "cellIdList", "ranap.cellIdList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_CellIdList_item, { "Cell-Id", "ranap.Cell_Id", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_cell_Capacity_Class_Value, { "cell-Capacity-Class-Value", "ranap.cell_Capacity_Class_Value", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_loadValue, { "loadValue", "ranap.loadValue", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_rTLoadValue, { "rTLoadValue", "ranap.rTLoadValue", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_nRTLoadInformationValue, { "nRTLoadInformationValue", "ranap.nRTLoadInformationValue", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_sourceCellID, { "sourceCellID", "ranap.sourceCellID", FT_UINT32, BASE_DEC, VALS(ranap_SourceCellID_vals), 0, NULL, HFILL }}, { &hf_ranap_uplinkCellLoadInformation, { "uplinkCellLoadInformation", "ranap.uplinkCellLoadInformation_element", FT_NONE, BASE_NONE, NULL, 0, "CellLoadInformation", HFILL }}, { &hf_ranap_downlinkCellLoadInformation, { "downlinkCellLoadInformation", "ranap.downlinkCellLoadInformation_element", FT_NONE, BASE_NONE, NULL, 0, "CellLoadInformation", HFILL }}, { &hf_ranap_procedureCode, { "procedureCode", "ranap.procedureCode", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &ranap_ProcedureCode_vals_ext, 0, NULL, HFILL }}, { &hf_ranap_triggeringMessage, { "triggeringMessage", "ranap.triggeringMessage", FT_UINT32, BASE_DEC, VALS(ranap_TriggeringMessage_vals), 0, NULL, HFILL }}, { &hf_ranap_procedureCriticality, { "procedureCriticality", "ranap.procedureCriticality", FT_UINT32, BASE_DEC, VALS(ranap_Criticality_vals), 0, "Criticality", HFILL }}, { &hf_ranap_iEsCriticalityDiagnostics, { "iEsCriticalityDiagnostics", "ranap.iEsCriticalityDiagnostics", FT_UINT32, BASE_DEC, NULL, 0, "CriticalityDiagnostics_IE_List", HFILL }}, { &hf_ranap_CriticalityDiagnostics_IE_List_item, { "CriticalityDiagnostics-IE-List item", "ranap.CriticalityDiagnostics_IE_List_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_iECriticality, { "iECriticality", "ranap.iECriticality", FT_UINT32, BASE_DEC, VALS(ranap_Criticality_vals), 0, "Criticality", HFILL }}, { &hf_ranap_iE_ID, { "iE-ID", "ranap.iE_ID", FT_UINT32, BASE_DEC|BASE_EXT_STRING, &ranap_ProtocolIE_ID_vals_ext, 0, "ProtocolIE_ID", HFILL }}, { &hf_ranap_repetitionNumber, { "repetitionNumber", "ranap.repetitionNumber", FT_UINT32, BASE_DEC, NULL, 0, "RepetitionNumber0", HFILL }}, { &hf_ranap_MessageStructure_item, { "MessageStructure item", "ranap.MessageStructure_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_item_repetitionNumber, { "repetitionNumber", "ranap.repetitionNumber", FT_UINT32, BASE_DEC, NULL, 0, "RepetitionNumber1", HFILL }}, { &hf_ranap_lAC, { "lAC", "ranap.lAC", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_cI, { "cI", "ranap.cI", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_CSG_Id_List_item, { "CSG-Id", "ranap.CSG_Id", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_newRAListofIdleModeUEs, { "newRAListofIdleModeUEs", "ranap.newRAListofIdleModeUEs", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_rAListwithNoIdleModeUEsAnyMore, { "rAListwithNoIdleModeUEsAnyMore", "ranap.rAListwithNoIdleModeUEsAnyMore", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_NewRAListofIdleModeUEs_item, { "RAC", "ranap.RAC", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAListwithNoIdleModeUEsAnyMore_item, { "RAC", "ranap.RAC", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_macroENB_ID, { "macroENB-ID", "ranap.macroENB_ID", FT_BYTES, BASE_NONE, NULL, 0, "BIT_STRING_SIZE_20", HFILL }}, { &hf_ranap_homeENB_ID, { "homeENB-ID", "ranap.homeENB_ID", FT_BYTES, BASE_NONE, NULL, 0, "BIT_STRING_SIZE_28", HFILL }}, { &hf_ranap_permittedAlgorithms, { "permittedAlgorithms", "ranap.permittedAlgorithms", FT_UINT32, BASE_DEC, NULL, 0, "PermittedEncryptionAlgorithms", HFILL }}, { &hf_ranap_key, { "key", "ranap.key", FT_BYTES, BASE_NONE, NULL, 0, "EncryptionKey", HFILL }}, { &hf_ranap_iMEIlist, { "iMEIlist", "ranap.iMEIlist", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_iMEISVlist, { "iMEISVlist", "ranap.iMEISVlist", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_iMEIgroup, { "iMEIgroup", "ranap.iMEIgroup_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_iMEISVgroup, { "iMEISVgroup", "ranap.iMEISVgroup_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_measurementQuantity, { "measurementQuantity", "ranap.measurementQuantity", FT_UINT32, BASE_DEC, VALS(ranap_MeasurementQuantity_vals), 0, NULL, HFILL }}, { &hf_ranap_threshold, { "threshold", "ranap.threshold", FT_INT32, BASE_DEC, NULL, 0, "INTEGER_M120_165", HFILL }}, { &hf_ranap_threshold_01, { "threshold", "ranap.threshold", FT_INT32, BASE_DEC, NULL, 0, "INTEGER_M120_M25", HFILL }}, { &hf_ranap_GANSS_PositioningDataSet_item, { "GANSS-PositioningMethodAndUsage", "ranap.GANSS_PositioningMethodAndUsage", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_point, { "point", "ranap.point_element", FT_NONE, BASE_NONE, NULL, 0, "GA_Point", HFILL }}, { &hf_ranap_pointWithUnCertainty, { "pointWithUnCertainty", "ranap.pointWithUnCertainty_element", FT_NONE, BASE_NONE, NULL, 0, "GA_PointWithUnCertainty", HFILL }}, { &hf_ranap_polygon, { "polygon", "ranap.polygon", FT_UINT32, BASE_DEC, NULL, 0, "GA_Polygon", HFILL }}, { &hf_ranap_pointWithUncertaintyEllipse, { "pointWithUncertaintyEllipse", "ranap.pointWithUncertaintyEllipse_element", FT_NONE, BASE_NONE, NULL, 0, "GA_PointWithUnCertaintyEllipse", HFILL }}, { &hf_ranap_pointWithAltitude, { "pointWithAltitude", "ranap.pointWithAltitude_element", FT_NONE, BASE_NONE, NULL, 0, "GA_PointWithAltitude", HFILL }}, { &hf_ranap_pointWithAltitudeAndUncertaintyEllipsoid, { "pointWithAltitudeAndUncertaintyEllipsoid", "ranap.pointWithAltitudeAndUncertaintyEllipsoid_element", FT_NONE, BASE_NONE, NULL, 0, "GA_PointWithAltitudeAndUncertaintyEllipsoid", HFILL }}, { &hf_ranap_ellipsoidArc, { "ellipsoidArc", "ranap.ellipsoidArc_element", FT_NONE, BASE_NONE, NULL, 0, "GA_EllipsoidArc", HFILL }}, { &hf_ranap_latitudeSign, { "latitudeSign", "ranap.latitudeSign", FT_UINT32, BASE_DEC, VALS(ranap_T_latitudeSign_vals), 0, NULL, HFILL }}, { &hf_ranap_latitude, { "latitude", "ranap.latitude", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_8388607", HFILL }}, { &hf_ranap_longitude, { "longitude", "ranap.longitude", FT_INT32, BASE_DEC, NULL, 0, "INTEGER_M8388608_8388607", HFILL }}, { &hf_ranap_directionOfAltitude, { "directionOfAltitude", "ranap.directionOfAltitude", FT_UINT32, BASE_DEC, VALS(ranap_T_directionOfAltitude_vals), 0, NULL, HFILL }}, { &hf_ranap_altitude, { "altitude", "ranap.altitude", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_32767", HFILL }}, { &hf_ranap_geographicalCoordinates, { "geographicalCoordinates", "ranap.geographicalCoordinates_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_innerRadius, { "innerRadius", "ranap.innerRadius", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_65535", HFILL }}, { &hf_ranap_uncertaintyRadius, { "uncertaintyRadius", "ranap.uncertaintyRadius", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_127", HFILL }}, { &hf_ranap_offsetAngle, { "offsetAngle", "ranap.offsetAngle", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_179", HFILL }}, { &hf_ranap_includedAngle, { "includedAngle", "ranap.includedAngle", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_179", HFILL }}, { &hf_ranap_confidence, { "confidence", "ranap.confidence", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_127", HFILL }}, { &hf_ranap_altitudeAndDirection, { "altitudeAndDirection", "ranap.altitudeAndDirection_element", FT_NONE, BASE_NONE, NULL, 0, "GA_AltitudeAndDirection", HFILL }}, { &hf_ranap_uncertaintyEllipse, { "uncertaintyEllipse", "ranap.uncertaintyEllipse_element", FT_NONE, BASE_NONE, NULL, 0, "GA_UncertaintyEllipse", HFILL }}, { &hf_ranap_uncertaintyAltitude, { "uncertaintyAltitude", "ranap.uncertaintyAltitude", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_127", HFILL }}, { &hf_ranap_uncertaintyCode, { "uncertaintyCode", "ranap.uncertaintyCode", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_127", HFILL }}, { &hf_ranap_GA_Polygon_item, { "GA-Polygon item", "ranap.GA_Polygon_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_uncertaintySemi_major, { "uncertaintySemi-major", "ranap.uncertaintySemi_major", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_127", HFILL }}, { &hf_ranap_uncertaintySemi_minor, { "uncertaintySemi-minor", "ranap.uncertaintySemi_minor", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_127", HFILL }}, { &hf_ranap_orientationOfMajorAxis, { "orientationOfMajorAxis", "ranap.orientationOfMajorAxis", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_179", HFILL }}, { &hf_ranap_lAI, { "lAI", "ranap.lAI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_rAC, { "rAC", "ranap.rAC", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_cN_ID, { "cN-ID", "ranap.cN_ID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_rNC_ID, { "rNC-ID", "ranap.rNC_ID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_iMEI, { "iMEI", "ranap.iMEI", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_iMEIMask, { "iMEIMask", "ranap.iMEIMask", FT_BYTES, BASE_NONE, NULL, 0, "BIT_STRING_SIZE_7", HFILL }}, { &hf_ranap_IMEIList_item, { "IMEI", "ranap.IMEI", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_iMEISV, { "iMEISV", "ranap.iMEISV", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_iMEISVMask, { "iMEISVMask", "ranap.iMEISVMask", FT_BYTES, BASE_NONE, NULL, 0, "BIT_STRING_SIZE_7", HFILL }}, { &hf_ranap_IMEISVList_item, { "IMEISV", "ranap.IMEISV", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_measurementsToActivate, { "measurementsToActivate", "ranap.measurementsToActivate", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_m1report, { "m1report", "ranap.m1report", FT_UINT32, BASE_DEC, VALS(ranap_M1Report_vals), 0, NULL, HFILL }}, { &hf_ranap_m2report, { "m2report", "ranap.m2report", FT_UINT32, BASE_DEC, VALS(ranap_M2Report_vals), 0, NULL, HFILL }}, { &hf_ranap_requestedMBMSIPMulticastAddressandAPNRequest, { "requestedMBMSIPMulticastAddressandAPNRequest", "ranap.requestedMBMSIPMulticastAddressandAPNRequest", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_requestedMulticastServiceList, { "requestedMulticastServiceList", "ranap.requestedMulticastServiceList", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_mBMSIPMulticastAddressandAPNRequest, { "mBMSIPMulticastAddressandAPNRequest", "ranap.mBMSIPMulticastAddressandAPNRequest", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_permanentNAS_UE_ID, { "permanentNAS-UE-ID", "ranap.permanentNAS_UE_ID", FT_UINT32, BASE_DEC, VALS(ranap_PermanentNAS_UE_ID_vals), 0, NULL, HFILL }}, { &hf_ranap_rNCTraceInformation, { "rNCTraceInformation", "ranap.rNCTraceInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_permittedAlgorithms_01, { "permittedAlgorithms", "ranap.permittedAlgorithms", FT_UINT32, BASE_DEC, NULL, 0, "PermittedIntegrityProtectionAlgorithms", HFILL }}, { &hf_ranap_key_01, { "key", "ranap.key", FT_BYTES, BASE_NONE, NULL, 0, "IntegrityProtectionKey", HFILL }}, { &hf_ranap_rIM_Transfer, { "rIM-Transfer", "ranap.rIM_Transfer_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_gTP_TEI, { "gTP-TEI", "ranap.gTP_TEI", FT_UINT32, BASE_HEX_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_bindingID, { "bindingID", "ranap.bindingID", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LA_LIST_item, { "LA-LIST item", "ranap.LA_LIST_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_listOF_SNAs, { "listOF-SNAs", "ranap.listOF_SNAs", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_ageOfSAI, { "ageOfSAI", "ranap.ageOfSAI", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_32767", HFILL }}, { &hf_ranap_ListOF_SNAs_item, { "SNAC", "ranap.SNAC", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_ListOfInterfacesToTrace_item, { "InterfacesToTraceItem", "ranap.InterfacesToTraceItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_interface, { "interface", "ranap.interface", FT_UINT32, BASE_DEC, VALS(ranap_T_interface_vals), 0, NULL, HFILL }}, { &hf_ranap_requestedLocationRelatedDataType, { "requestedLocationRelatedDataType", "ranap.requestedLocationRelatedDataType", FT_UINT32, BASE_DEC, VALS(ranap_RequestedLocationRelatedDataType_vals), 0, NULL, HFILL }}, { &hf_ranap_requestedGPSAssistanceData, { "requestedGPSAssistanceData", "ranap.requestedGPSAssistanceData", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_reportChangeOfSAI, { "reportChangeOfSAI", "ranap.reportChangeOfSAI", FT_UINT32, BASE_DEC, VALS(ranap_ReportChangeOfSAI_vals), 0, NULL, HFILL }}, { &hf_ranap_periodicReportingIndicator, { "periodicReportingIndicator", "ranap.periodicReportingIndicator", FT_UINT32, BASE_DEC, VALS(ranap_PeriodicReportingIndicator_vals), 0, NULL, HFILL }}, { &hf_ranap_directReportingIndicator, { "directReportingIndicator", "ranap.directReportingIndicator", FT_UINT32, BASE_DEC, VALS(ranap_DirectReportingIndicator_vals), 0, NULL, HFILL }}, { &hf_ranap_verticalAccuracyCode, { "verticalAccuracyCode", "ranap.verticalAccuracyCode", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_positioningPriorityChangeSAI, { "positioningPriorityChangeSAI", "ranap.positioningPriorityChangeSAI", FT_UINT32, BASE_DEC, VALS(ranap_PositioningPriority_vals), 0, "PositioningPriority", HFILL }}, { &hf_ranap_positioningPriorityDirect, { "positioningPriorityDirect", "ranap.positioningPriorityDirect", FT_UINT32, BASE_DEC, VALS(ranap_PositioningPriority_vals), 0, "PositioningPriority", HFILL }}, { &hf_ranap_clientTypePeriodic, { "clientTypePeriodic", "ranap.clientTypePeriodic", FT_UINT32, BASE_DEC, VALS(ranap_ClientType_vals), 0, "ClientType", HFILL }}, { &hf_ranap_clientTypeDirect, { "clientTypeDirect", "ranap.clientTypeDirect", FT_UINT32, BASE_DEC, VALS(ranap_ClientType_vals), 0, "ClientType", HFILL }}, { &hf_ranap_responseTime, { "responseTime", "ranap.responseTime", FT_UINT32, BASE_DEC, VALS(ranap_ResponseTime_vals), 0, NULL, HFILL }}, { &hf_ranap_includeVelocity, { "includeVelocity", "ranap.includeVelocity", FT_UINT32, BASE_DEC, VALS(ranap_IncludeVelocity_vals), 0, NULL, HFILL }}, { &hf_ranap_periodicLocationInfo, { "periodicLocationInfo", "ranap.periodicLocationInfo_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_periodic, { "periodic", "ranap.periodic_element", FT_NONE, BASE_NONE, NULL, 0, "MDT_Report_Parameters", HFILL }}, { &hf_ranap_event1F, { "event1F", "ranap.event1F_element", FT_NONE, BASE_NONE, NULL, 0, "Event1F_Parameters", HFILL }}, { &hf_ranap_event1I, { "event1I", "ranap.event1I_element", FT_NONE, BASE_NONE, NULL, 0, "Event1I_Parameters", HFILL }}, { &hf_ranap_MBMSIPMulticastAddressandAPNRequest_item, { "TMGI", "ranap.TMGI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_cellbased, { "cellbased", "ranap.cellbased_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_labased, { "labased", "ranap.labased_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_rabased, { "rabased", "ranap.rabased_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_plmn_area_based, { "plmn-area-based", "ranap.plmn_area_based_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_mdtActivation, { "mdtActivation", "ranap.mdtActivation", FT_UINT32, BASE_DEC, VALS(ranap_MDT_Activation_vals), 0, "MDT_Activation", HFILL }}, { &hf_ranap_mdtAreaScope, { "mdtAreaScope", "ranap.mdtAreaScope", FT_UINT32, BASE_DEC, VALS(ranap_MDTAreaScope_vals), 0, NULL, HFILL }}, { &hf_ranap_mdtMode, { "mdtMode", "ranap.mdtMode", FT_UINT32, BASE_DEC, VALS(ranap_MDTMode_vals), 0, NULL, HFILL }}, { &hf_ranap_immediateMDT, { "immediateMDT", "ranap.immediateMDT_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_loggedMDT, { "loggedMDT", "ranap.loggedMDT_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_reportInterval, { "reportInterval", "ranap.reportInterval", FT_UINT32, BASE_DEC, VALS(ranap_ReportInterval_vals), 0, NULL, HFILL }}, { &hf_ranap_reportAmount, { "reportAmount", "ranap.reportAmount", FT_UINT32, BASE_DEC, VALS(ranap_ReportAmount_vals), 0, NULL, HFILL }}, { &hf_ranap_accessPointName, { "accessPointName", "ranap.accessPointName", FT_BYTES, BASE_NONE, NULL, 0, "Offload_RAB_Parameters_APN", HFILL }}, { &hf_ranap_chargingCharacteristics, { "chargingCharacteristics", "ranap.chargingCharacteristics", FT_BYTES, BASE_NONE, NULL, 0, "Offload_RAB_Parameters_ChargingCharacteristics", HFILL }}, { &hf_ranap_rAI, { "rAI", "ranap.rAI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_PDP_TypeInformation_item, { "PDP-Type", "ranap.PDP_Type", FT_UINT32, BASE_DEC, VALS(ranap_PDP_Type_vals), 0, NULL, HFILL }}, { &hf_ranap_PDP_TypeInformation_extension_item, { "PDP-Type-extension", "ranap.PDP_Type_extension", FT_UINT32, BASE_DEC, VALS(ranap_PDP_Type_extension_vals), 0, NULL, HFILL }}, { &hf_ranap_reportingAmount, { "reportingAmount", "ranap.reportingAmount", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_1_8639999_", HFILL }}, { &hf_ranap_reportingInterval, { "reportingInterval", "ranap.reportingInterval", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_1_8639999_", HFILL }}, { &hf_ranap_iMSI, { "iMSI", "ranap.iMSI", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_PermittedEncryptionAlgorithms_item, { "EncryptionAlgorithm", "ranap.EncryptionAlgorithm", FT_UINT32, BASE_DEC, VALS(ranap_EncryptionAlgorithm_vals), 0, NULL, HFILL }}, { &hf_ranap_PermittedIntegrityProtectionAlgorithms_item, { "IntegrityProtectionAlgorithm", "ranap.IntegrityProtectionAlgorithm", FT_UINT32, BASE_DEC, VALS(ranap_IntegrityProtectionAlgorithm_vals), 0, NULL, HFILL }}, { &hf_ranap_laiList, { "laiList", "ranap.laiList", FT_UINT32, BASE_DEC, NULL, 0, "LAI_List", HFILL }}, { &hf_ranap_LAI_List_item, { "LAI", "ranap.LAI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_loggingInterval, { "loggingInterval", "ranap.loggingInterval", FT_UINT32, BASE_DEC, VALS(ranap_LoggingInterval_vals), 0, NULL, HFILL }}, { &hf_ranap_loggingDuration, { "loggingDuration", "ranap.loggingDuration", FT_UINT32, BASE_DEC, VALS(ranap_LoggingDuration_vals), 0, NULL, HFILL }}, { &hf_ranap_PLMNs_in_shared_network_item, { "PLMNs-in-shared-network item", "ranap.PLMNs_in_shared_network_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_lA_LIST, { "lA-LIST", "ranap.lA_LIST", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_PositioningDataSet_item, { "PositioningMethodAndUsage", "ranap.PositioningMethodAndUsage", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_positioningDataDiscriminator, { "positioningDataDiscriminator", "ranap.positioningDataDiscriminator", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_positioningDataSet, { "positioningDataSet", "ranap.positioningDataSet", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_shared_network_information, { "shared-network-information", "ranap.shared_network_information_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_raiList, { "raiList", "ranap.raiList", FT_UINT32, BASE_DEC, NULL, 0, "RAI_List", HFILL }}, { &hf_ranap_RAI_List_item, { "RAI", "ranap.RAI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RABDataVolumeReport_item, { "RABDataVolumeReport item", "ranap.RABDataVolumeReport_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume, { "dl-UnsuccessfullyTransmittedDataVolume", "ranap.dl_UnsuccessfullyTransmittedDataVolume", FT_UINT32, BASE_DEC, NULL, 0, "UnsuccessfullyTransmittedDataVolume", HFILL }}, { &hf_ranap_dataVolumeReference, { "dataVolumeReference", "ranap.dataVolumeReference", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList_item, { "ExtendedGuaranteedBitrate", "ranap.ExtendedGuaranteedBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_Parameter_ExtendedMaxBitrateList_item, { "ExtendedMaxBitrate", "ranap.ExtendedMaxBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_Parameter_GuaranteedBitrateList_item, { "GuaranteedBitrate", "ranap.GuaranteedBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_Parameter_MaxBitrateList_item, { "MaxBitrate", "ranap.MaxBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_trafficClass, { "trafficClass", "ranap.trafficClass", FT_UINT32, BASE_DEC, VALS(ranap_TrafficClass_vals), 0, NULL, HFILL }}, { &hf_ranap_rAB_AsymmetryIndicator, { "rAB-AsymmetryIndicator", "ranap.rAB_AsymmetryIndicator", FT_UINT32, BASE_DEC, VALS(ranap_RAB_AsymmetryIndicator_vals), 0, NULL, HFILL }}, { &hf_ranap_maxBitrate, { "maxBitrate", "ranap.maxBitrate", FT_UINT32, BASE_DEC, NULL, 0, "RAB_Parameter_MaxBitrateList", HFILL }}, { &hf_ranap_guaranteedBitRate, { "guaranteedBitRate", "ranap.guaranteedBitRate", FT_UINT32, BASE_DEC, NULL, 0, "RAB_Parameter_GuaranteedBitrateList", HFILL }}, { &hf_ranap_deliveryOrder, { "deliveryOrder", "ranap.deliveryOrder", FT_UINT32, BASE_DEC, VALS(ranap_DeliveryOrder_vals), 0, NULL, HFILL }}, { &hf_ranap_maxSDU_Size, { "maxSDU-Size", "ranap.maxSDU_Size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_sDU_Parameters, { "sDU-Parameters", "ranap.sDU_Parameters", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_transferDelay, { "transferDelay", "ranap.transferDelay", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_trafficHandlingPriority, { "trafficHandlingPriority", "ranap.trafficHandlingPriority", FT_UINT32, BASE_DEC, VALS(ranap_TrafficHandlingPriority_vals), 0, NULL, HFILL }}, { &hf_ranap_allocationOrRetentionPriority, { "allocationOrRetentionPriority", "ranap.allocationOrRetentionPriority_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_sourceStatisticsDescriptor, { "sourceStatisticsDescriptor", "ranap.sourceStatisticsDescriptor", FT_UINT32, BASE_DEC, VALS(ranap_SourceStatisticsDescriptor_vals), 0, NULL, HFILL }}, { &hf_ranap_relocationRequirement, { "relocationRequirement", "ranap.relocationRequirement", FT_UINT32, BASE_DEC, VALS(ranap_RelocationRequirement_vals), 0, NULL, HFILL }}, { &hf_ranap_RABParametersList_item, { "RABParametersList item", "ranap.RABParametersList_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_rab_Id, { "rab-Id", "ranap.rab_Id", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_cn_domain, { "cn-domain", "ranap.cn_domain", FT_UINT32, BASE_DEC, VALS(ranap_CN_DomainIndicator_vals), 0, "CN_DomainIndicator", HFILL }}, { &hf_ranap_rabDataVolumeReport, { "rabDataVolumeReport", "ranap.rabDataVolumeReport", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_upInformation, { "upInformation", "ranap.upInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAB_TrCH_Mapping_item, { "RAB-TrCH-MappingItem", "ranap.RAB_TrCH_MappingItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_rAB_ID, { "rAB-ID", "ranap.rAB_ID", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_trCH_ID_List, { "trCH-ID-List", "ranap.trCH_ID_List", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_notEmptyRAListofIdleModeUEs, { "notEmptyRAListofIdleModeUEs", "ranap.notEmptyRAListofIdleModeUEs_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_emptyFullRAListofIdleModeUEs, { "emptyFullRAListofIdleModeUEs", "ranap.emptyFullRAListofIdleModeUEs", FT_UINT32, BASE_DEC, VALS(ranap_T_emptyFullRAListofIdleModeUEs_vals), 0, NULL, HFILL }}, { &hf_ranap_rAofIdleModeUEs, { "rAofIdleModeUEs", "ranap.rAofIdleModeUEs", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_RAofIdleModeUEs_item, { "RAC", "ranap.RAC", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_LAListofIdleModeUEs_item, { "LAI", "ranap.LAI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RequestedMBMSIPMulticastAddressandAPNRequest_item, { "MBMSIPMulticastAddressandAPNlist", "ranap.MBMSIPMulticastAddressandAPNlist_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_tMGI, { "tMGI", "ranap.tMGI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_iPMulticastAddress, { "iPMulticastAddress", "ranap.iPMulticastAddress", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_aPN, { "aPN", "ranap.aPN", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_RequestedMulticastServiceList_item, { "TMGI", "ranap.TMGI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_requestedMaxBitrates, { "requestedMaxBitrates", "ranap.requestedMaxBitrates", FT_UINT32, BASE_DEC, NULL, 0, "Requested_RAB_Parameter_MaxBitrateList", HFILL }}, { &hf_ranap_requestedGuaranteedBitrates, { "requestedGuaranteedBitrates", "ranap.requestedGuaranteedBitrates", FT_UINT32, BASE_DEC, NULL, 0, "Requested_RAB_Parameter_GuaranteedBitrateList", HFILL }}, { &hf_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList_item, { "ExtendedMaxBitrate", "ranap.ExtendedMaxBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList_item, { "ExtendedGuaranteedBitrate", "ranap.ExtendedGuaranteedBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Requested_RAB_Parameter_MaxBitrateList_item, { "MaxBitrate", "ranap.MaxBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_Requested_RAB_Parameter_GuaranteedBitrateList_item, { "GuaranteedBitrate", "ranap.GuaranteedBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_event, { "event", "ranap.event", FT_UINT32, BASE_DEC, VALS(ranap_Event_vals), 0, NULL, HFILL }}, { &hf_ranap_reportArea, { "reportArea", "ranap.reportArea", FT_UINT32, BASE_DEC, VALS(ranap_ReportArea_vals), 0, NULL, HFILL }}, { &hf_ranap_accuracyCode, { "accuracyCode", "ranap.accuracyCode", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_127", HFILL }}, { &hf_ranap_mantissa, { "mantissa", "ranap.mantissa", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_1_9", HFILL }}, { &hf_ranap_exponent, { "exponent", "ranap.exponent", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_1_8", HFILL }}, { &hf_ranap_rIMInformation, { "rIMInformation", "ranap.rIMInformation", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_rIMRoutingAddress, { "rIMRoutingAddress", "ranap.rIMRoutingAddress", FT_UINT32, BASE_DEC, VALS(ranap_RIMRoutingAddress_vals), 0, NULL, HFILL }}, { &hf_ranap_targetRNC_ID, { "targetRNC-ID", "ranap.targetRNC_ID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_gERAN_Cell_ID, { "gERAN-Cell-ID", "ranap.gERAN_Cell_ID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_targeteNB_ID, { "targeteNB-ID", "ranap.targeteNB_ID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_traceReference, { "traceReference", "ranap.traceReference", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_traceActivationIndicator, { "traceActivationIndicator", "ranap.traceActivationIndicator", FT_UINT32, BASE_DEC, VALS(ranap_T_traceActivationIndicator_vals), 0, NULL, HFILL }}, { &hf_ranap_equipmentsToBeTraced, { "equipmentsToBeTraced", "ranap.equipmentsToBeTraced", FT_UINT32, BASE_DEC, VALS(ranap_EquipmentsToBeTraced_vals), 0, NULL, HFILL }}, { &hf_ranap_rabParmetersList, { "rabParmetersList", "ranap.rabParmetersList", FT_UINT32, BASE_DEC, NULL, 0, "RABParametersList", HFILL }}, { &hf_ranap_locationReporting, { "locationReporting", "ranap.locationReporting_element", FT_NONE, BASE_NONE, NULL, 0, "LocationReportingTransferInformation", HFILL }}, { &hf_ranap_traceInformation, { "traceInformation", "ranap.traceInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_sourceSAI, { "sourceSAI", "ranap.sourceSAI_element", FT_NONE, BASE_NONE, NULL, 0, "SAI", HFILL }}, { &hf_ranap_sAC, { "sAC", "ranap.sAC", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_pLMNs_in_shared_network, { "pLMNs-in-shared-network", "ranap.pLMNs_in_shared_network", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_exponent_1_8, { "exponent", "ranap.exponent", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_1_6", HFILL }}, { &hf_ranap_SDU_FormatInformationParameters_item, { "SDU-FormatInformationParameters item", "ranap.SDU_FormatInformationParameters_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_subflowSDU_Size, { "subflowSDU-Size", "ranap.subflowSDU_Size", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_rAB_SubflowCombinationBitRate, { "rAB-SubflowCombinationBitRate", "ranap.rAB_SubflowCombinationBitRate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_SDU_Parameters_item, { "SDU-Parameters item", "ranap.SDU_Parameters_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_sDU_ErrorRatio, { "sDU-ErrorRatio", "ranap.sDU_ErrorRatio_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_residualBitErrorRatio, { "residualBitErrorRatio", "ranap.residualBitErrorRatio_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_deliveryOfErroneousSDU, { "deliveryOfErroneousSDU", "ranap.deliveryOfErroneousSDU", FT_UINT32, BASE_DEC, VALS(ranap_DeliveryOfErroneousSDU_vals), 0, NULL, HFILL }}, { &hf_ranap_sDU_FormatInformationParameters, { "sDU-FormatInformationParameters", "ranap.sDU_FormatInformationParameters", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_authorisedPLMNs, { "authorisedPLMNs", "ranap.authorisedPLMNs", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_sourceUTRANCellID, { "sourceUTRANCellID", "ranap.sourceUTRANCellID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_sourceGERANCellID, { "sourceGERANCellID", "ranap.sourceGERANCellID_element", FT_NONE, BASE_NONE, NULL, 0, "CGI", HFILL }}, { &hf_ranap_sourceRNC_ID, { "sourceRNC-ID", "ranap.sourceRNC_ID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_rRC_Container, { "rRC-Container", "ranap.rRC_Container", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_numberOfIuInstances, { "numberOfIuInstances", "ranap.numberOfIuInstances", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_relocationType, { "relocationType", "ranap.relocationType", FT_UINT32, BASE_DEC, VALS(ranap_RelocationType_vals), 0, NULL, HFILL }}, { &hf_ranap_chosenIntegrityProtectionAlgorithm, { "chosenIntegrityProtectionAlgorithm", "ranap.chosenIntegrityProtectionAlgorithm", FT_UINT32, BASE_DEC, VALS(ranap_IntegrityProtectionAlgorithm_vals), 0, NULL, HFILL }}, { &hf_ranap_integrityProtectionKey, { "integrityProtectionKey", "ranap.integrityProtectionKey", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_chosenEncryptionAlgorithForSignalling, { "chosenEncryptionAlgorithForSignalling", "ranap.chosenEncryptionAlgorithForSignalling", FT_UINT32, BASE_DEC, VALS(ranap_EncryptionAlgorithm_vals), 0, "ChosenEncryptionAlgorithm", HFILL }}, { &hf_ranap_cipheringKey, { "cipheringKey", "ranap.cipheringKey", FT_BYTES, BASE_NONE, NULL, 0, "EncryptionKey", HFILL }}, { &hf_ranap_chosenEncryptionAlgorithForCS, { "chosenEncryptionAlgorithForCS", "ranap.chosenEncryptionAlgorithForCS", FT_UINT32, BASE_DEC, VALS(ranap_EncryptionAlgorithm_vals), 0, "ChosenEncryptionAlgorithm", HFILL }}, { &hf_ranap_chosenEncryptionAlgorithForPS, { "chosenEncryptionAlgorithForPS", "ranap.chosenEncryptionAlgorithForPS", FT_UINT32, BASE_DEC, VALS(ranap_EncryptionAlgorithm_vals), 0, "ChosenEncryptionAlgorithm", HFILL }}, { &hf_ranap_d_RNTI, { "d-RNTI", "ranap.d_RNTI", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_targetCellId, { "targetCellId", "ranap.targetCellId", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_rAB_TrCH_Mapping, { "rAB-TrCH-Mapping", "ranap.rAB_TrCH_Mapping", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_rSRP, { "rSRP", "ranap.rSRP", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_97", HFILL }}, { &hf_ranap_rSRQ, { "rSRQ", "ranap.rSRQ", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_34", HFILL }}, { &hf_ranap_iRATmeasurementParameters, { "iRATmeasurementParameters", "ranap.iRATmeasurementParameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_measurementDuration, { "measurementDuration", "ranap.measurementDuration", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_1_100", HFILL }}, { &hf_ranap_eUTRANFrequencies, { "eUTRANFrequencies", "ranap.eUTRANFrequencies", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_EUTRANFrequencies_item, { "EUTRANFrequencies item", "ranap.EUTRANFrequencies_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_earfcn, { "earfcn", "ranap.earfcn", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_65535", HFILL }}, { &hf_ranap_measBand, { "measBand", "ranap.measBand", FT_UINT32, BASE_DEC, VALS(ranap_MeasBand_vals), 0, NULL, HFILL }}, { &hf_ranap_SupportedRAB_ParameterBitrateList_item, { "SupportedBitrate", "ranap.SupportedBitrate", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_uTRANcellID, { "uTRANcellID", "ranap.uTRANcellID", FT_UINT32, BASE_DEC, NULL, 0, "TargetCellId", HFILL }}, { &hf_ranap_SRB_TrCH_Mapping_item, { "SRB-TrCH-MappingItem", "ranap.SRB_TrCH_MappingItem_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_sRB_ID, { "sRB-ID", "ranap.sRB_ID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_trCH_ID, { "trCH-ID", "ranap.trCH_ID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_nonce, { "nonce", "ranap.nonce", FT_BYTES, BASE_NONE, NULL, 0, "BIT_STRING_SIZE_128", HFILL }}, { &hf_ranap_tAC, { "tAC", "ranap.tAC", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_cGI, { "cGI", "ranap.cGI_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_eNB_ID, { "eNB-ID", "ranap.eNB_ID", FT_UINT32, BASE_DEC, VALS(ranap_ENB_ID_vals), 0, NULL, HFILL }}, { &hf_ranap_selectedTAI, { "selectedTAI", "ranap.selectedTAI_element", FT_NONE, BASE_NONE, NULL, 0, "TAI", HFILL }}, { &hf_ranap_tMSI, { "tMSI", "ranap.tMSI", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_p_TMSI, { "p-TMSI", "ranap.p_TMSI", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_serviceID, { "serviceID", "ranap.serviceID", FT_BYTES, BASE_NONE, NULL, 0, "OCTET_STRING_SIZE_3", HFILL }}, { &hf_ranap_ue_identity, { "ue-identity", "ranap.ue_identity", FT_UINT32, BASE_DEC, VALS(ranap_UE_ID_vals), 0, "UE_ID", HFILL }}, { &hf_ranap_tracePropagationParameters, { "tracePropagationParameters", "ranap.tracePropagationParameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_traceRecordingSessionReference, { "traceRecordingSessionReference", "ranap.traceRecordingSessionReference", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_traceDepth, { "traceDepth", "ranap.traceDepth", FT_UINT32, BASE_DEC, VALS(ranap_TraceDepth_vals), 0, NULL, HFILL }}, { &hf_ranap_listOfInterfacesToTrace, { "listOfInterfacesToTrace", "ranap.listOfInterfacesToTrace", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_dCH_ID, { "dCH-ID", "ranap.dCH_ID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_dSCH_ID, { "dSCH-ID", "ranap.dSCH_ID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_uSCH_ID, { "uSCH-ID", "ranap.uSCH_ID", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_TrCH_ID_List_item, { "TrCH-ID", "ranap.TrCH_ID_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_uE_AggregateMaximumBitRateDownlink, { "uE-AggregateMaximumBitRateDownlink", "ranap.uE_AggregateMaximumBitRateDownlink", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_uE_AggregateMaximumBitRateUplink, { "uE-AggregateMaximumBitRateUplink", "ranap.uE_AggregateMaximumBitRateUplink", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_imsi, { "imsi", "ranap.imsi", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_imei, { "imei", "ranap.imei", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_imeisv, { "imeisv", "ranap.imeisv", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_uESBI_IuA, { "uESBI-IuA", "ranap.uESBI_IuA", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_uESBI_IuB, { "uESBI-IuB", "ranap.uESBI_IuB", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_frameSeqNoUL, { "frameSeqNoUL", "ranap.frameSeqNoUL", FT_UINT32, BASE_DEC, NULL, 0, "FrameSequenceNumber", HFILL }}, { &hf_ranap_frameSeqNoDL, { "frameSeqNoDL", "ranap.frameSeqNoDL", FT_UINT32, BASE_DEC, NULL, 0, "FrameSequenceNumber", HFILL }}, { &hf_ranap_pdu14FrameSeqNoUL, { "pdu14FrameSeqNoUL", "ranap.pdu14FrameSeqNoUL", FT_UINT32, BASE_DEC, NULL, 0, "PDUType14FrameSequenceNumber", HFILL }}, { &hf_ranap_pdu14FrameSeqNoDL, { "pdu14FrameSeqNoDL", "ranap.pdu14FrameSeqNoDL", FT_UINT32, BASE_DEC, NULL, 0, "PDUType14FrameSequenceNumber", HFILL }}, { &hf_ranap_dataPDUType, { "dataPDUType", "ranap.dataPDUType", FT_UINT32, BASE_DEC, VALS(ranap_DataPDUType_vals), 0, NULL, HFILL }}, { &hf_ranap_upinitialisationFrame, { "upinitialisationFrame", "ranap.upinitialisationFrame", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_horizontalVelocity, { "horizontalVelocity", "ranap.horizontalVelocity_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_horizontalWithVerticalVelocity, { "horizontalWithVerticalVelocity", "ranap.horizontalWithVerticalVelocity_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_horizontalVelocityWithUncertainty, { "horizontalVelocityWithUncertainty", "ranap.horizontalVelocityWithUncertainty_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_horizontalWithVeritcalVelocityAndUncertainty, { "horizontalWithVeritcalVelocityAndUncertainty", "ranap.horizontalWithVeritcalVelocityAndUncertainty_element", FT_NONE, BASE_NONE, NULL, 0, "HorizontalWithVerticalVelocityAndUncertainty", HFILL }}, { &hf_ranap_horizontalSpeedAndBearing, { "horizontalSpeedAndBearing", "ranap.horizontalSpeedAndBearing_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_veritcalVelocity, { "veritcalVelocity", "ranap.veritcalVelocity_element", FT_NONE, BASE_NONE, NULL, 0, "VerticalVelocity", HFILL }}, { &hf_ranap_uncertaintySpeed, { "uncertaintySpeed", "ranap.uncertaintySpeed", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_255", HFILL }}, { &hf_ranap_horizontalUncertaintySpeed, { "horizontalUncertaintySpeed", "ranap.horizontalUncertaintySpeed", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_255", HFILL }}, { &hf_ranap_verticalUncertaintySpeed, { "verticalUncertaintySpeed", "ranap.verticalUncertaintySpeed", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_255", HFILL }}, { &hf_ranap_bearing, { "bearing", "ranap.bearing", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_359", HFILL }}, { &hf_ranap_horizontalSpeed, { "horizontalSpeed", "ranap.horizontalSpeed", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_2047", HFILL }}, { &hf_ranap_veritcalSpeed, { "veritcalSpeed", "ranap.veritcalSpeed", FT_UINT32, BASE_DEC, NULL, 0, "INTEGER_0_255", HFILL }}, { &hf_ranap_veritcalSpeedDirection, { "veritcalSpeedDirection", "ranap.veritcalSpeedDirection", FT_UINT32, BASE_DEC, VALS(ranap_VerticalSpeedDirection_vals), 0, "VerticalSpeedDirection", HFILL }}, { &hf_ranap_protocolIEs, { "protocolIEs", "ranap.protocolIEs", FT_UINT32, BASE_DEC, NULL, 0, "ProtocolIE_Container", HFILL }}, { &hf_ranap_protocolExtensions, { "protocolExtensions", "ranap.protocolExtensions", FT_UINT32, BASE_DEC, NULL, 0, "ProtocolExtensionContainer", HFILL }}, { &hf_ranap_rab_dl_UnsuccessfullyTransmittedDataVolume, { "dl-UnsuccessfullyTransmittedDataVolume", "ranap.dl_UnsuccessfullyTransmittedDataVolume", FT_UINT32, BASE_DEC, NULL, 0, "DataVolumeList", HFILL }}, { &hf_ranap_dL_GTP_PDU_SequenceNumber, { "dL-GTP-PDU-SequenceNumber", "ranap.dL_GTP_PDU_SequenceNumber", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_uL_GTP_PDU_SequenceNumber, { "uL-GTP-PDU-SequenceNumber", "ranap.uL_GTP_PDU_SequenceNumber", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_transportLayerAddress, { "transportLayerAddress", "ranap.transportLayerAddress", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_iuTransportAssociation, { "iuTransportAssociation", "ranap.iuTransportAssociation", FT_UINT32, BASE_DEC, VALS(ranap_IuTransportAssociation_vals), 0, NULL, HFILL }}, { &hf_ranap_nAS_SynchronisationIndicator, { "nAS-SynchronisationIndicator", "ranap.nAS_SynchronisationIndicator", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_rAB_Parameters, { "rAB-Parameters", "ranap.rAB_Parameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_dataVolumeReportingIndication, { "dataVolumeReportingIndication", "ranap.dataVolumeReportingIndication", FT_UINT32, BASE_DEC, VALS(ranap_DataVolumeReportingIndication_vals), 0, NULL, HFILL }}, { &hf_ranap_pDP_TypeInformation, { "pDP-TypeInformation", "ranap.pDP_TypeInformation", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_userPlaneInformation, { "userPlaneInformation", "ranap.userPlaneInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_service_Handover, { "service-Handover", "ranap.service_Handover", FT_UINT32, BASE_DEC, VALS(ranap_Service_Handover_vals), 0, NULL, HFILL }}, { &hf_ranap_userPlaneMode, { "userPlaneMode", "ranap.userPlaneMode", FT_UINT32, BASE_DEC, VALS(ranap_UserPlaneMode_vals), 0, NULL, HFILL }}, { &hf_ranap_uP_ModeVersions, { "uP-ModeVersions", "ranap.uP_ModeVersions", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_joinedMBMSBearerService_IEs, { "joinedMBMSBearerService-IEs", "ranap.joinedMBMSBearerService_IEs", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_JoinedMBMSBearerService_IEs_item, { "JoinedMBMSBearerService-IEs item", "ranap.JoinedMBMSBearerService_IEs_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_mBMS_PTP_RAB_ID, { "mBMS-PTP-RAB-ID", "ranap.mBMS_PTP_RAB_ID", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_cause, { "cause", "ranap.cause", FT_UINT32, BASE_DEC, VALS(ranap_Cause_vals), 0, NULL, HFILL }}, { &hf_ranap_dl_GTP_PDU_SequenceNumber, { "dl-GTP-PDU-SequenceNumber", "ranap.dl_GTP_PDU_SequenceNumber", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_ul_GTP_PDU_SequenceNumber, { "ul-GTP-PDU-SequenceNumber", "ranap.ul_GTP_PDU_SequenceNumber", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_dl_N_PDU_SequenceNumber, { "dl-N-PDU-SequenceNumber", "ranap.dl_N_PDU_SequenceNumber", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_ul_N_PDU_SequenceNumber, { "ul-N-PDU-SequenceNumber", "ranap.ul_N_PDU_SequenceNumber", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }}, { &hf_ranap_iuSigConId, { "iuSigConId", "ranap.iuSigConId", FT_BYTES, BASE_NONE, NULL, 0, "IuSignallingConnectionIdentifier", HFILL }}, { &hf_ranap_transportLayerAddressReq1, { "transportLayerAddressReq1", "ranap.transportLayerAddressReq1", FT_BYTES, BASE_NONE, NULL, 0, "TransportLayerAddress", HFILL }}, { &hf_ranap_iuTransportAssociationReq1, { "iuTransportAssociationReq1", "ranap.iuTransportAssociationReq1", FT_UINT32, BASE_DEC, VALS(ranap_IuTransportAssociation_vals), 0, "IuTransportAssociation", HFILL }}, { &hf_ranap_ass_RAB_Parameters, { "ass-RAB-Parameters", "ranap.ass_RAB_Parameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_transportLayerAddressRes1, { "transportLayerAddressRes1", "ranap.transportLayerAddressRes1", FT_BYTES, BASE_NONE, NULL, 0, "TransportLayerAddress", HFILL }}, { &hf_ranap_iuTransportAssociationRes1, { "iuTransportAssociationRes1", "ranap.iuTransportAssociationRes1", FT_UINT32, BASE_DEC, VALS(ranap_IuTransportAssociation_vals), 0, "IuTransportAssociation", HFILL }}, { &hf_ranap_rab2beReleasedList, { "rab2beReleasedList", "ranap.rab2beReleasedList", FT_UINT32, BASE_DEC, NULL, 0, "RAB_ToBeReleasedList_EnhancedRelocCompleteRes", HFILL }}, { &hf_ranap_transportLayerInformation, { "transportLayerInformation", "ranap.transportLayerInformation_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_dl_dataVolumes, { "dl-dataVolumes", "ranap.dl_dataVolumes", FT_UINT32, BASE_DEC, NULL, 0, "DataVolumeList", HFILL }}, { &hf_ranap_DataVolumeList_item, { "DataVolumeList item", "ranap.DataVolumeList_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_gERAN_Classmark, { "gERAN-Classmark", "ranap.gERAN_Classmark", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_privateIEs, { "privateIEs", "ranap.privateIEs", FT_UINT32, BASE_DEC, NULL, 0, "PrivateIE_Container", HFILL }}, { &hf_ranap_nAS_PDU, { "nAS-PDU", "ranap.nAS_PDU", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_sAPI, { "sAPI", "ranap.sAPI", FT_UINT32, BASE_DEC, VALS(ranap_SAPI_vals), 0, NULL, HFILL }}, { &hf_ranap_cN_DomainIndicator, { "cN-DomainIndicator", "ranap.cN_DomainIndicator", FT_UINT32, BASE_DEC, VALS(ranap_CN_DomainIndicator_vals), 0, NULL, HFILL }}, { &hf_ranap_dataForwardingInformation, { "dataForwardingInformation", "ranap.dataForwardingInformation_element", FT_NONE, BASE_NONE, NULL, 0, "TNLInformationEnhRelInfoReq", HFILL }}, { &hf_ranap_sourceSideIuULTNLInfo, { "sourceSideIuULTNLInfo", "ranap.sourceSideIuULTNLInfo_element", FT_NONE, BASE_NONE, NULL, 0, "TNLInformationEnhRelInfoReq", HFILL }}, { &hf_ranap_alt_RAB_Parameters, { "alt-RAB-Parameters", "ranap.alt_RAB_Parameters_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_dataForwardingInformation_01, { "dataForwardingInformation", "ranap.dataForwardingInformation_element", FT_NONE, BASE_NONE, NULL, 0, "TNLInformationEnhRelInfoRes", HFILL }}, { &hf_ranap_dl_forwardingTransportLayerAddress, { "dl-forwardingTransportLayerAddress", "ranap.dl_forwardingTransportLayerAddress", FT_BYTES, BASE_NONE, NULL, 0, "TransportLayerAddress", HFILL }}, { &hf_ranap_dl_forwardingTransportAssociation, { "dl-forwardingTransportAssociation", "ranap.dl_forwardingTransportAssociation", FT_UINT32, BASE_DEC, VALS(ranap_IuTransportAssociation_vals), 0, "IuTransportAssociation", HFILL }}, { &hf_ranap_requested_RAB_Parameter_Values, { "requested-RAB-Parameter-Values", "ranap.requested_RAB_Parameter_Values_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_mBMSHCIndicator, { "mBMSHCIndicator", "ranap.mBMSHCIndicator", FT_UINT32, BASE_DEC, VALS(ranap_MBMSHCIndicator_vals), 0, NULL, HFILL }}, { &hf_ranap_gTPDLTEID, { "gTPDLTEID", "ranap.gTPDLTEID", FT_UINT32, BASE_HEX_DEC, NULL, 0, "GTP_TEI", HFILL }}, { &hf_ranap_LeftMBMSBearerService_IEs_item, { "LeftMBMSBearerService-IEs item", "ranap.LeftMBMSBearerService_IEs_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_UnsuccessfulLinking_IEs_item, { "UnsuccessfulLinking-IEs item", "ranap.UnsuccessfulLinking_IEs_item_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_initiatingMessage, { "initiatingMessage", "ranap.initiatingMessage_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_successfulOutcome, { "successfulOutcome", "ranap.successfulOutcome_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_unsuccessfulOutcome, { "unsuccessfulOutcome", "ranap.unsuccessfulOutcome_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_outcome, { "outcome", "ranap.outcome_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, { &hf_ranap_initiatingMessagevalue, { "value", "ranap.value_element", FT_NONE, BASE_NONE, NULL, 0, "InitiatingMessage_value", HFILL }}, { &hf_ranap_successfulOutcome_value, { "value", "ranap.value_element", FT_NONE, BASE_NONE, NULL, 0, "SuccessfulOutcome_value", HFILL }}, { &hf_ranap_unsuccessfulOutcome_value, { "value", "ranap.value_element", FT_NONE, BASE_NONE, NULL, 0, "UnsuccessfulOutcome_value", HFILL }}, { &hf_ranap_value, { "value", "ranap.value_element", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }}, /*--- End of included file: packet-ranap-hfarr.c ---*/ #line 319 "../../asn1/ranap/packet-ranap-template.c" }; /* List of subtrees */ static gint *ett[] = { &ett_ranap, &ett_ranap_TransportLayerAddress, &ett_ranap_TransportLayerAddress_nsap, /*--- Included file: packet-ranap-ettarr.c ---*/ #line 1 "../../asn1/ranap/packet-ranap-ettarr.c" &ett_ranap_PrivateIE_ID, &ett_ranap_ProtocolIE_Container, &ett_ranap_ProtocolIE_Field, &ett_ranap_ProtocolIE_ContainerPair, &ett_ranap_ProtocolIE_FieldPair, &ett_ranap_ProtocolIE_ContainerList, &ett_ranap_ProtocolIE_ContainerPairList, &ett_ranap_ProtocolExtensionContainer, &ett_ranap_ProtocolExtensionField, &ett_ranap_PrivateIE_Container, &ett_ranap_PrivateIE_Field, &ett_ranap_AllocationOrRetentionPriority, &ett_ranap_Alt_RAB_Parameters, &ett_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf, &ett_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrates, &ett_ranap_Alt_RAB_Parameter_ExtendedGuaranteedBitrateList, &ett_ranap_Alt_RAB_Parameter_GuaranteedBitrateInf, &ett_ranap_Alt_RAB_Parameter_GuaranteedBitrates, &ett_ranap_Alt_RAB_Parameter_GuaranteedBitrateList, &ett_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf, &ett_ranap_Alt_RAB_Parameter_SupportedGuaranteedBitrates, &ett_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateInf, &ett_ranap_Alt_RAB_Parameter_ExtendedMaxBitrates, &ett_ranap_Alt_RAB_Parameter_ExtendedMaxBitrateList, &ett_ranap_Alt_RAB_Parameter_MaxBitrateInf, &ett_ranap_Alt_RAB_Parameter_MaxBitrates, &ett_ranap_Alt_RAB_Parameter_MaxBitrateList, &ett_ranap_Alt_RAB_Parameter_SupportedMaxBitrateInf, &ett_ranap_Alt_RAB_Parameter_SupportedMaxBitrates, &ett_ranap_AreaIdentity, &ett_ranap_Ass_RAB_Parameters, &ett_ranap_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList, &ett_ranap_Ass_RAB_Parameter_ExtendedMaxBitrateList, &ett_ranap_Ass_RAB_Parameter_GuaranteedBitrateList, &ett_ranap_Ass_RAB_Parameter_MaxBitrateList, &ett_ranap_AuthorisedPLMNs, &ett_ranap_AuthorisedPLMNs_item, &ett_ranap_AuthorisedSNAs, &ett_ranap_BroadcastAssistanceDataDecipheringKeys, &ett_ranap_Cause, &ett_ranap_CellBased, &ett_ranap_CellIdList, &ett_ranap_CellLoadInformation, &ett_ranap_CellLoadInformationGroup, &ett_ranap_CriticalityDiagnostics, &ett_ranap_CriticalityDiagnostics_IE_List, &ett_ranap_CriticalityDiagnostics_IE_List_item, &ett_ranap_MessageStructure, &ett_ranap_MessageStructure_item, &ett_ranap_CGI, &ett_ranap_CSG_Id_List, &ett_ranap_DeltaRAListofIdleModeUEs, &ett_ranap_NewRAListofIdleModeUEs, &ett_ranap_RAListwithNoIdleModeUEsAnyMore, &ett_ranap_ENB_ID, &ett_ranap_EncryptionInformation, &ett_ranap_EquipmentsToBeTraced, &ett_ranap_Event1F_Parameters, &ett_ranap_Event1I_Parameters, &ett_ranap_GANSS_PositioningDataSet, &ett_ranap_GeographicalArea, &ett_ranap_GeographicalCoordinates, &ett_ranap_GA_AltitudeAndDirection, &ett_ranap_GA_EllipsoidArc, &ett_ranap_GA_Point, &ett_ranap_GA_PointWithAltitude, &ett_ranap_GA_PointWithAltitudeAndUncertaintyEllipsoid, &ett_ranap_GA_PointWithUnCertainty, &ett_ranap_GA_PointWithUnCertaintyEllipse, &ett_ranap_GA_Polygon, &ett_ranap_GA_Polygon_item, &ett_ranap_GA_UncertaintyEllipse, &ett_ranap_GERAN_Cell_ID, &ett_ranap_GlobalCN_ID, &ett_ranap_GlobalRNC_ID, &ett_ranap_IMEIGroup, &ett_ranap_IMEIList, &ett_ranap_IMEISVGroup, &ett_ranap_IMEISVList, &ett_ranap_ImmediateMDT, &ett_ranap_InformationRequested, &ett_ranap_InformationRequestType, &ett_ranap_InformationTransferType, &ett_ranap_IntegrityProtectionInformation, &ett_ranap_InterSystemInformationTransferType, &ett_ranap_InterSystemInformation_TransparentContainer, &ett_ranap_IuTransportAssociation, &ett_ranap_LA_LIST, &ett_ranap_LA_LIST_item, &ett_ranap_LAI, &ett_ranap_LastKnownServiceArea, &ett_ranap_ListOF_SNAs, &ett_ranap_ListOfInterfacesToTrace, &ett_ranap_InterfacesToTraceItem, &ett_ranap_LocationRelatedDataRequestType, &ett_ranap_LocationReportingTransferInformation, &ett_ranap_M1Report, &ett_ranap_M2Report, &ett_ranap_MBMSIPMulticastAddressandAPNRequest, &ett_ranap_MDTAreaScope, &ett_ranap_MDT_Configuration, &ett_ranap_MDTMode, &ett_ranap_MDT_Report_Parameters, &ett_ranap_Offload_RAB_Parameters, &ett_ranap_PagingAreaID, &ett_ranap_PDP_TypeInformation, &ett_ranap_PDP_TypeInformation_extension, &ett_ranap_PeriodicLocationInfo, &ett_ranap_PermanentNAS_UE_ID, &ett_ranap_PermittedEncryptionAlgorithms, &ett_ranap_PermittedIntegrityProtectionAlgorithms, &ett_ranap_LABased, &ett_ranap_LAI_List, &ett_ranap_LoggedMDT, &ett_ranap_PLMNs_in_shared_network, &ett_ranap_PLMNs_in_shared_network_item, &ett_ranap_PositioningDataSet, &ett_ranap_PositionData, &ett_ranap_ProvidedData, &ett_ranap_RABased, &ett_ranap_RAI_List, &ett_ranap_RABDataVolumeReport, &ett_ranap_RABDataVolumeReport_item, &ett_ranap_RAB_Parameter_ExtendedGuaranteedBitrateList, &ett_ranap_RAB_Parameter_ExtendedMaxBitrateList, &ett_ranap_RAB_Parameter_GuaranteedBitrateList, &ett_ranap_RAB_Parameter_MaxBitrateList, &ett_ranap_RAB_Parameters, &ett_ranap_RABParametersList, &ett_ranap_RABParametersList_item, &ett_ranap_RAB_TrCH_Mapping, &ett_ranap_RAB_TrCH_MappingItem, &ett_ranap_RAI, &ett_ranap_RAListofIdleModeUEs, &ett_ranap_NotEmptyRAListofIdleModeUEs, &ett_ranap_RAofIdleModeUEs, &ett_ranap_LAListofIdleModeUEs, &ett_ranap_RequestedMBMSIPMulticastAddressandAPNRequest, &ett_ranap_MBMSIPMulticastAddressandAPNlist, &ett_ranap_RequestedMulticastServiceList, &ett_ranap_Requested_RAB_Parameter_Values, &ett_ranap_Requested_RAB_Parameter_ExtendedMaxBitrateList, &ett_ranap_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList, &ett_ranap_Requested_RAB_Parameter_MaxBitrateList, &ett_ranap_Requested_RAB_Parameter_GuaranteedBitrateList, &ett_ranap_RequestType, &ett_ranap_ResidualBitErrorRatio, &ett_ranap_RIM_Transfer, &ett_ranap_RIMRoutingAddress, &ett_ranap_RNCTraceInformation, &ett_ranap_RNSAPRelocationParameters, &ett_ranap_SAI, &ett_ranap_Shared_Network_Information, &ett_ranap_SDU_ErrorRatio, &ett_ranap_SDU_FormatInformationParameters, &ett_ranap_SDU_FormatInformationParameters_item, &ett_ranap_SDU_Parameters, &ett_ranap_SDU_Parameters_item, &ett_ranap_SNA_Access_Information, &ett_ranap_SourceCellID, &ett_ranap_SourceID, &ett_ranap_SourceRNC_ID, &ett_ranap_SourceRNC_ToTargetRNC_TransparentContainer, &ett_ranap_IRAT_Measurement_Configuration, &ett_ranap_IRATmeasurementParameters, &ett_ranap_EUTRANFrequencies, &ett_ranap_EUTRANFrequencies_item, &ett_ranap_SupportedRAB_ParameterBitrateList, &ett_ranap_SourceUTRANCellID, &ett_ranap_SRB_TrCH_Mapping, &ett_ranap_SRB_TrCH_MappingItem, &ett_ranap_SRVCC_Information, &ett_ranap_TAI, &ett_ranap_TargetID, &ett_ranap_TargetENB_ID, &ett_ranap_TargetRNC_ID, &ett_ranap_TargetRNC_ToSourceRNC_TransparentContainer, &ett_ranap_TemporaryUE_ID, &ett_ranap_TMGI, &ett_ranap_TraceInformation, &ett_ranap_TracePropagationParameters, &ett_ranap_TraceRecordingSessionInformation, &ett_ranap_TrCH_ID, &ett_ranap_TrCH_ID_List, &ett_ranap_UE_AggregateMaximumBitRate, &ett_ranap_UE_ID, &ett_ranap_UESBI_Iu, &ett_ranap_UPInformation, &ett_ranap_VelocityEstimate, &ett_ranap_HorizontalVelocity, &ett_ranap_HorizontalWithVerticalVelocity, &ett_ranap_HorizontalVelocityWithUncertainty, &ett_ranap_HorizontalWithVerticalVelocityAndUncertainty, &ett_ranap_HorizontalSpeedAndBearing, &ett_ranap_VerticalVelocity, &ett_ranap_Iu_ReleaseCommand, &ett_ranap_Iu_ReleaseComplete, &ett_ranap_RAB_DataVolumeReportItem, &ett_ranap_RAB_ReleasedItem_IuRelComp, &ett_ranap_RelocationRequired, &ett_ranap_RelocationCommand, &ett_ranap_RAB_RelocationReleaseItem, &ett_ranap_RAB_DataForwardingItem, &ett_ranap_RelocationPreparationFailure, &ett_ranap_RelocationRequest, &ett_ranap_RAB_SetupItem_RelocReq, &ett_ranap_UserPlaneInformation, &ett_ranap_CNMBMSLinkingInformation, &ett_ranap_JoinedMBMSBearerService_IEs, &ett_ranap_JoinedMBMSBearerService_IEs_item, &ett_ranap_RelocationRequestAcknowledge, &ett_ranap_RAB_SetupItem_RelocReqAck, &ett_ranap_RAB_FailedItem, &ett_ranap_RelocationFailure, &ett_ranap_RelocationCancel, &ett_ranap_RelocationCancelAcknowledge, &ett_ranap_SRNS_ContextRequest, &ett_ranap_RAB_DataForwardingItem_SRNS_CtxReq, &ett_ranap_SRNS_ContextResponse, &ett_ranap_RAB_ContextItem, &ett_ranap_RABs_ContextFailedtoTransferItem, &ett_ranap_SecurityModeCommand, &ett_ranap_SecurityModeComplete, &ett_ranap_SecurityModeReject, &ett_ranap_DataVolumeReportRequest, &ett_ranap_RAB_DataVolumeReportRequestItem, &ett_ranap_DataVolumeReport, &ett_ranap_RABs_failed_to_reportItem, &ett_ranap_Reset, &ett_ranap_ResetAcknowledge, &ett_ranap_ResetResource, &ett_ranap_ResetResourceItem, &ett_ranap_ResetResourceAcknowledge, &ett_ranap_ResetResourceAckItem, &ett_ranap_RAB_ReleaseRequest, &ett_ranap_RAB_ReleaseItem, &ett_ranap_Iu_ReleaseRequest, &ett_ranap_RelocationDetect, &ett_ranap_RelocationComplete, &ett_ranap_EnhancedRelocationCompleteRequest, &ett_ranap_RAB_SetupItem_EnhancedRelocCompleteReq, &ett_ranap_EnhancedRelocationCompleteResponse, &ett_ranap_RAB_SetupItem_EnhancedRelocCompleteRes, &ett_ranap_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes, &ett_ranap_EnhancedRelocationCompleteFailure, &ett_ranap_EnhancedRelocationCompleteConfirm, &ett_ranap_Paging, &ett_ranap_CommonID, &ett_ranap_CN_InvokeTrace, &ett_ranap_CN_DeactivateTrace, &ett_ranap_LocationReportingControl, &ett_ranap_LocationReport, &ett_ranap_InitialUE_Message, &ett_ranap_DirectTransfer, &ett_ranap_Overload, &ett_ranap_ErrorIndication, &ett_ranap_SRNS_DataForwardCommand, &ett_ranap_ForwardSRNS_Context, &ett_ranap_RAB_AssignmentRequest, &ett_ranap_RAB_SetupOrModifyItemFirst, &ett_ranap_TransportLayerInformation, &ett_ranap_RAB_SetupOrModifyItemSecond, &ett_ranap_RAB_AssignmentResponse, &ett_ranap_RAB_SetupOrModifiedItem, &ett_ranap_RAB_ReleasedItem, &ett_ranap_DataVolumeList, &ett_ranap_DataVolumeList_item, &ett_ranap_RAB_QueuedItem, &ett_ranap_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item, &ett_ranap_PrivateMessage, &ett_ranap_RANAP_RelocationInformation, &ett_ranap_DirectTransferInformationItem_RANAP_RelocInf, &ett_ranap_RAB_ContextItem_RANAP_RelocInf, &ett_ranap_RANAP_EnhancedRelocationInformationRequest, &ett_ranap_RAB_SetupItem_EnhRelocInfoReq, &ett_ranap_TNLInformationEnhRelInfoReq, &ett_ranap_RANAP_EnhancedRelocationInformationResponse, &ett_ranap_RAB_SetupItem_EnhRelocInfoRes, &ett_ranap_RAB_FailedItem_EnhRelocInfoRes, &ett_ranap_TNLInformationEnhRelInfoRes, &ett_ranap_RAB_ModifyRequest, &ett_ranap_RAB_ModifyItem, &ett_ranap_LocationRelatedDataRequest, &ett_ranap_LocationRelatedDataResponse, &ett_ranap_LocationRelatedDataFailure, &ett_ranap_InformationTransferIndication, &ett_ranap_InformationTransferConfirmation, &ett_ranap_InformationTransferFailure, &ett_ranap_UESpecificInformationIndication, &ett_ranap_DirectInformationTransfer, &ett_ranap_UplinkInformationExchangeRequest, &ett_ranap_UplinkInformationExchangeResponse, &ett_ranap_UplinkInformationExchangeFailure, &ett_ranap_MBMSSessionStart, &ett_ranap_MBMSSynchronisationInformation, &ett_ranap_MBMSSessionStartResponse, &ett_ranap_MBMSSessionStartFailure, &ett_ranap_MBMSSessionUpdate, &ett_ranap_MBMSSessionUpdateResponse, &ett_ranap_MBMSSessionUpdateFailure, &ett_ranap_MBMSSessionStop, &ett_ranap_MBMSSessionStopResponse, &ett_ranap_MBMSUELinkingRequest, &ett_ranap_LeftMBMSBearerService_IEs, &ett_ranap_LeftMBMSBearerService_IEs_item, &ett_ranap_MBMSUELinkingResponse, &ett_ranap_UnsuccessfulLinking_IEs, &ett_ranap_UnsuccessfulLinking_IEs_item, &ett_ranap_MBMSRegistrationRequest, &ett_ranap_MBMSRegistrationResponse, &ett_ranap_MBMSRegistrationFailure, &ett_ranap_MBMSCNDe_RegistrationRequest, &ett_ranap_MBMSCNDe_RegistrationResponse, &ett_ranap_MBMSRABEstablishmentIndication, &ett_ranap_MBMSRABReleaseRequest, &ett_ranap_MBMSRABRelease, &ett_ranap_MBMSRABReleaseFailure, &ett_ranap_SRVCC_CSKeysRequest, &ett_ranap_SRVCC_CSKeysResponse, &ett_ranap_RANAP_PDU, &ett_ranap_InitiatingMessage, &ett_ranap_SuccessfulOutcome, &ett_ranap_UnsuccessfulOutcome, &ett_ranap_Outcome, /*--- End of included file: packet-ranap-ettarr.c ---*/ #line 327 "../../asn1/ranap/packet-ranap-template.c" }; /* Register protocol */ proto_ranap = proto_register_protocol(PNAME, PSNAME, PFNAME); /* Register fields and subtrees */ proto_register_field_array(proto_ranap, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); /* Register dissector */ register_dissector("ranap", dissect_ranap, proto_ranap); /* Register dissector tables */ ranap_ies_dissector_table = register_dissector_table("ranap.ies", "RANAP-PROTOCOL-IES", FT_UINT32, BASE_DEC); ranap_ies_p1_dissector_table = register_dissector_table("ranap.ies.pair.first", "RANAP-PROTOCOL-IES-PAIR FirstValue", FT_UINT32, BASE_DEC); ranap_ies_p2_dissector_table = register_dissector_table("ranap.ies.pair.second", "RANAP-PROTOCOL-IES-PAIR SecondValue", FT_UINT32, BASE_DEC); ranap_extension_dissector_table = register_dissector_table("ranap.extension", "RANAP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC); ranap_proc_imsg_dissector_table = register_dissector_table("ranap.proc.imsg", "RANAP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC); ranap_proc_sout_dissector_table = register_dissector_table("ranap.proc.sout", "RANAP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC); ranap_proc_uout_dissector_table = register_dissector_table("ranap.proc.uout", "RANAP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC); ranap_proc_out_dissector_table = register_dissector_table("ranap.proc.out", "RANAP-ELEMENTARY-PROCEDURE Outcome", FT_UINT32, BASE_DEC); nas_pdu_dissector_table = register_dissector_table("ranap.nas_pdu", "RANAP NAS PDU", FT_UINT8, BASE_DEC); ranap_module = prefs_register_protocol(proto_ranap, proto_reg_handoff_ranap); prefs_register_uint_preference(ranap_module, "sccp_ssn", "SCCP SSN for RANAP", "The SCCP SubSystem Number for RANAP (default 142)", 10, &global_ranap_sccp_ssn); prefs_register_bool_preference(ranap_module, "dissect_rrc_container", "Attempt to dissect RRC-Container", "Attempt to dissect RRC message embedded in RRC-Container IE", &glbl_dissect_container); } /*--- proto_reg_handoff_ranap ---------------------------------------*/ void proto_reg_handoff_ranap(void) { static gboolean initialized = FALSE; static dissector_handle_t ranap_handle; static gint local_ranap_sccp_ssn; if (!initialized) { ranap_handle = find_dissector("ranap"); rrc_s_to_trnc_handle = find_dissector("rrc.s_to_trnc_cont"); rrc_t_to_srnc_handle = find_dissector("rrc.t_to_srnc_cont"); rrc_ho_to_utran_cmd = find_dissector("rrc.irat.ho_to_utran_cmd"); initialized = TRUE; /*--- Included file: packet-ranap-dis-tab.c ---*/ #line 1 "../../asn1/ranap/packet-ranap-dis-tab.c" dissector_add_uint("ranap.ies", id_Cause, new_create_dissector_handle(dissect_Cause_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_DataVolumeReportList, new_create_dissector_handle(dissect_RAB_DataVolumeReportList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ReleasedList_IuRelComp, new_create_dissector_handle(dissect_RAB_ReleasedList_IuRelComp_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_CriticalityDiagnostics, new_create_dissector_handle(dissect_CriticalityDiagnostics_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_DataVolumeReportItem, new_create_dissector_handle(dissect_RAB_DataVolumeReportItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ReleasedItem_IuRelComp, new_create_dissector_handle(dissect_RAB_ReleasedItem_IuRelComp_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RelocationType, new_create_dissector_handle(dissect_RelocationType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_SourceID, new_create_dissector_handle(dissect_SourceID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_Source_ToTarget_TransparentContainer, new_create_dissector_handle(dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU, proto_ranap)); dissector_add_uint("ranap.ies", SPECIAL|id_Source_ToTarget_TransparentContainer, new_create_dissector_handle(dissect_Source_ToTarget_TransparentContainer_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_TargetID, new_create_dissector_handle(dissect_TargetID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_Target_ToSource_TransparentContainer, new_create_dissector_handle(dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU, proto_ranap)); dissector_add_uint("ranap.ies", SPECIAL|id_Target_ToSource_TransparentContainer, new_create_dissector_handle(dissect_Target_ToSource_TransparentContainer_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_ClassmarkInformation2, new_create_dissector_handle(dissect_ClassmarkInformation2_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_ClassmarkInformation3, new_create_dissector_handle(dissect_ClassmarkInformation3_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_OldBSS_ToNewBSS_Information, new_create_dissector_handle(dissect_OldBSS_ToNewBSS_Information_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_L3_Information, new_create_dissector_handle(dissect_L3_Information_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_RelocationReleaseList, new_create_dissector_handle(dissect_RAB_RelocationReleaseList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_DataForwardingList, new_create_dissector_handle(dissect_RAB_DataForwardingList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_RelocationReleaseItem, new_create_dissector_handle(dissect_RAB_RelocationReleaseItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_DataForwardingItem, new_create_dissector_handle(dissect_RAB_DataForwardingItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_PermanentNAS_UE_ID, new_create_dissector_handle(dissect_PermanentNAS_UE_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_CN_DomainIndicator, new_create_dissector_handle(dissect_CN_DomainIndicator_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupList_RelocReq, new_create_dissector_handle(dissect_RAB_SetupList_RelocReq_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_IntegrityProtectionInformation, new_create_dissector_handle(dissect_IntegrityProtectionInformation_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_EncryptionInformation, new_create_dissector_handle(dissect_EncryptionInformation_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_IuSigConId, new_create_dissector_handle(dissect_IuSignallingConnectionIdentifier_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_DirectTransferInformationList_RANAP_RelocInf, new_create_dissector_handle(dissect_DirectTransferInformationList_RANAP_RelocInf_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_DirectTransferInformationItem_RANAP_RelocInf, new_create_dissector_handle(dissect_DirectTransferInformationItem_RANAP_RelocInf_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupItem_RelocReq, new_create_dissector_handle(dissect_RAB_SetupItem_RelocReq_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupList_RelocReqAck, new_create_dissector_handle(dissect_RAB_SetupList_RelocReqAck_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_FailedList, new_create_dissector_handle(dissect_RAB_FailedList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_ChosenIntegrityProtectionAlgorithm, new_create_dissector_handle(dissect_ChosenIntegrityProtectionAlgorithm_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_ChosenEncryptionAlgorithm, new_create_dissector_handle(dissect_ChosenEncryptionAlgorithm_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupItem_RelocReqAck, new_create_dissector_handle(dissect_RAB_SetupItem_RelocReqAck_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_FailedItem, new_create_dissector_handle(dissect_RAB_FailedItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_DataForwardingList_SRNS_CtxReq, new_create_dissector_handle(dissect_RAB_DataForwardingList_SRNS_CtxReq_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_DataForwardingItem_SRNS_CtxReq, new_create_dissector_handle(dissect_RAB_DataForwardingItem_SRNS_CtxReq_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ContextList, new_create_dissector_handle(dissect_RAB_ContextList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ContextFailedtoTransferList, new_create_dissector_handle(dissect_RAB_ContextFailedtoTransferList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ContextItem, new_create_dissector_handle(dissect_RAB_ContextItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ContextFailedtoTransferItem, new_create_dissector_handle(dissect_RABs_ContextFailedtoTransferItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_KeyStatus, new_create_dissector_handle(dissect_KeyStatus_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_DataVolumeReportRequestList, new_create_dissector_handle(dissect_RAB_DataVolumeReportRequestList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_DataVolumeReportRequestItem, new_create_dissector_handle(dissect_RAB_DataVolumeReportRequestItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_FailedtoReportList, new_create_dissector_handle(dissect_RAB_FailedtoReportList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_FailedtoReportItem, new_create_dissector_handle(dissect_RABs_failed_to_reportItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_GlobalRNC_ID, new_create_dissector_handle(dissect_GlobalRNC_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", IMSG|id_IuSigConIdList, new_create_dissector_handle(dissect_ResetResourceList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", IMSG|id_IuSigConIdItem, new_create_dissector_handle(dissect_ResetResourceItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", SOUT|id_IuSigConIdList, new_create_dissector_handle(dissect_ResetResourceAckList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", SOUT|id_IuSigConIdItem, new_create_dissector_handle(dissect_ResetResourceAckItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ReleaseList, new_create_dissector_handle(dissect_RAB_ReleaseList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ReleaseItem, new_create_dissector_handle(dissect_RAB_ReleaseItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_TemporaryUE_ID, new_create_dissector_handle(dissect_TemporaryUE_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_PagingAreaID, new_create_dissector_handle(dissect_PagingAreaID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_PagingCause, new_create_dissector_handle(dissect_PagingCause_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_NonSearchingIndication, new_create_dissector_handle(dissect_NonSearchingIndication_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_DRX_CycleLengthCoefficient, new_create_dissector_handle(dissect_DRX_CycleLengthCoefficient_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_TraceType, new_create_dissector_handle(dissect_TraceType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_TraceReference, new_create_dissector_handle(dissect_TraceReference_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_TriggerID, new_create_dissector_handle(dissect_TriggerID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_UE_ID, new_create_dissector_handle(dissect_UE_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_OMC_ID, new_create_dissector_handle(dissect_OMC_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RequestType, new_create_dissector_handle(dissect_RequestType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_AreaIdentity, new_create_dissector_handle(dissect_AreaIdentity_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_LAI, new_create_dissector_handle(dissect_LAI_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAC, new_create_dissector_handle(dissect_RAC_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_SAI, new_create_dissector_handle(dissect_SAI_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_NAS_PDU, new_create_dissector_handle(dissect_NAS_PDU_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_SAPI, new_create_dissector_handle(dissect_SAPI_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RejectCauseValue, new_create_dissector_handle(dissect_RejectCauseValue_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_NAS_SequenceNumber, new_create_dissector_handle(dissect_NAS_SequenceNumber_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_NumberOfSteps, new_create_dissector_handle(dissect_NumberOfSteps_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupOrModifyList, new_create_dissector_handle(dissect_RAB_SetupOrModifyList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupOrModifiedList, new_create_dissector_handle(dissect_RAB_SetupOrModifiedList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ReleasedList, new_create_dissector_handle(dissect_RAB_ReleasedList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_QueuedList, new_create_dissector_handle(dissect_RAB_QueuedList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ReleaseFailedList, new_create_dissector_handle(dissect_RAB_ReleaseFailedList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupOrModifiedItem, new_create_dissector_handle(dissect_RAB_SetupOrModifiedItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ReleasedItem, new_create_dissector_handle(dissect_RAB_ReleasedItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_QueuedItem, new_create_dissector_handle(dissect_RAB_QueuedItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item, new_create_dissector_handle(dissect_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ContextList_RANAP_RelocInf, new_create_dissector_handle(dissect_RAB_ContextList_RANAP_RelocInf_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ContextItem_RANAP_RelocInf, new_create_dissector_handle(dissect_RAB_ContextItem_RANAP_RelocInf_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ModifyList, new_create_dissector_handle(dissect_RAB_ModifyList_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ModifyItem, new_create_dissector_handle(dissect_RAB_ModifyItem_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_LocationRelatedDataRequestType, new_create_dissector_handle(dissect_LocationRelatedDataRequestType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_BroadcastAssistanceDataDecipheringKeys, new_create_dissector_handle(dissect_BroadcastAssistanceDataDecipheringKeys_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_InformationTransferID, new_create_dissector_handle(dissect_InformationTransferID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_ProvidedData, new_create_dissector_handle(dissect_ProvidedData_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_GlobalCN_ID, new_create_dissector_handle(dissect_GlobalCN_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_UESBI_Iu, new_create_dissector_handle(dissect_UESBI_Iu_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_InterSystemInformationTransferType, new_create_dissector_handle(dissect_InterSystemInformationTransferType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_InformationExchangeID, new_create_dissector_handle(dissect_InformationExchangeID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_InformationExchangeType, new_create_dissector_handle(dissect_InformationExchangeType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_InformationTransferType, new_create_dissector_handle(dissect_InformationTransferType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_InformationRequestType, new_create_dissector_handle(dissect_InformationRequestType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_InformationRequested, new_create_dissector_handle(dissect_InformationRequested_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_TMGI, new_create_dissector_handle(dissect_TMGI_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_MBMSSessionIdentity, new_create_dissector_handle(dissect_MBMSSessionIdentity_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_MBMSBearerServiceType, new_create_dissector_handle(dissect_MBMSBearerServiceType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_Parameters, new_create_dissector_handle(dissect_RAB_Parameters_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_PDP_TypeInformation, new_create_dissector_handle(dissect_PDP_TypeInformation_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_MBMSSessionDuration, new_create_dissector_handle(dissect_MBMSSessionDuration_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_MBMSServiceArea, new_create_dissector_handle(dissect_MBMSServiceArea_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_FrequenceLayerConvergenceFlag, new_create_dissector_handle(dissect_FrequenceLayerConvergenceFlag_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAListofIdleModeUEs, new_create_dissector_handle(dissect_RAListofIdleModeUEs_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_MBMSSessionRepetitionNumber, new_create_dissector_handle(dissect_MBMSSessionRepetitionNumber_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_TimeToMBMSDataTransfer, new_create_dissector_handle(dissect_TimeToMBMSDataTransfer_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_TransportLayerInformation, new_create_dissector_handle(dissect_TransportLayerInformation_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_SessionUpdateID, new_create_dissector_handle(dissect_SessionUpdateID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_DeltaRAListofIdleModeUEs, new_create_dissector_handle(dissect_DeltaRAListofIdleModeUEs_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_MBMSCNDe_Registration, new_create_dissector_handle(dissect_MBMSCNDe_Registration_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_JoinedMBMSBearerServicesList, new_create_dissector_handle(dissect_JoinedMBMSBearerService_IEs_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_LeftMBMSBearerServicesList, new_create_dissector_handle(dissect_LeftMBMSBearerService_IEs_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_UnsuccessfulLinkingList, new_create_dissector_handle(dissect_UnsuccessfulLinking_IEs_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_MBMSRegistrationRequestType, new_create_dissector_handle(dissect_MBMSRegistrationRequestType_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_IPMulticastAddress, new_create_dissector_handle(dissect_IPMulticastAddress_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_APN, new_create_dissector_handle(dissect_APN_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupList_EnhancedRelocCompleteReq, new_create_dissector_handle(dissect_RAB_SetupList_EnhancedRelocCompleteReq_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupItem_EnhancedRelocCompleteReq, new_create_dissector_handle(dissect_RAB_SetupItem_EnhancedRelocCompleteReq_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupList_EnhancedRelocCompleteRes, new_create_dissector_handle(dissect_RAB_SetupList_EnhancedRelocCompleteRes_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupItem_EnhancedRelocCompleteRes, new_create_dissector_handle(dissect_RAB_SetupItem_EnhancedRelocCompleteRes_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupList_EnhRelocInfoReq, new_create_dissector_handle(dissect_RAB_SetupList_EnhRelocInfoReq_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupItem_EnhRelocInfoReq, new_create_dissector_handle(dissect_RAB_SetupItem_EnhRelocInfoReq_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupList_EnhRelocInfoRes, new_create_dissector_handle(dissect_RAB_SetupList_EnhRelocInfoRes_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_SetupItem_EnhRelocInfoRes, new_create_dissector_handle(dissect_RAB_SetupItem_EnhRelocInfoRes_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_OldIuSigConId, new_create_dissector_handle(dissect_IuSignallingConnectionIdentifier_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_FailedList_EnhRelocInfoRes, new_create_dissector_handle(dissect_RAB_FailedList_EnhRelocInfoRes_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_FailedItem_EnhRelocInfoRes, new_create_dissector_handle(dissect_RAB_FailedItem_EnhRelocInfoRes_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_OldIuSigConIdCS, new_create_dissector_handle(dissect_IuSignallingConnectionIdentifier_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_OldIuSigConIdPS, new_create_dissector_handle(dissect_IuSignallingConnectionIdentifier_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_GlobalCN_IDCS, new_create_dissector_handle(dissect_GlobalCN_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes, new_create_dissector_handle(dissect_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_RAB_ToBeReleasedList_EnhancedRelocCompleteRes, new_create_dissector_handle(dissect_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_Relocation_TargetRNC_ID, new_create_dissector_handle(dissect_GlobalRNC_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_Relocation_TargetExtendedRNC_ID, new_create_dissector_handle(dissect_ExtendedRNC_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf, new_create_dissector_handle(dissect_Alt_RAB_Parameter_SupportedGuaranteedBitrateInf_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_Alt_RAB_Parameter_SupportedMaxBitrateInf, new_create_dissector_handle(dissect_Alt_RAB_Parameter_SupportedMaxBitrateInf_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_Relocation_SourceRNC_ID, new_create_dissector_handle(dissect_GlobalRNC_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_Relocation_SourceExtendedRNC_ID, new_create_dissector_handle(dissect_ExtendedRNC_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_EncryptionKey, new_create_dissector_handle(dissect_EncryptionKey_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_IntegrityProtectionKey, new_create_dissector_handle(dissect_IntegrityProtectionKey_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_SRVCC_Information, new_create_dissector_handle(dissect_SRVCC_Information_PDU, proto_ranap)); dissector_add_uint("ranap.ies", id_GlobalCN_IDPS, new_create_dissector_handle(dissect_GlobalCN_ID_PDU, proto_ranap)); dissector_add_uint("ranap.ies.pair.first", id_RAB_SetupOrModifyItem, new_create_dissector_handle(dissect_RAB_SetupOrModifyItemFirst_PDU, proto_ranap)); dissector_add_uint("ranap.ies.pair.second", id_RAB_SetupOrModifyItem, new_create_dissector_handle(dissect_RAB_SetupOrModifyItemSecond_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_AlternativeRABConfiguration, new_create_dissector_handle(dissect_RAB_Parameters_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf, new_create_dissector_handle(dissect_Alt_RAB_Parameter_ExtendedGuaranteedBitrateInf_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Alt_RAB_Parameter_ExtendedMaxBitrateInf, new_create_dissector_handle(dissect_Alt_RAB_Parameter_ExtendedMaxBitrateInf_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList, new_create_dissector_handle(dissect_Ass_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Ass_RAB_Parameter_ExtendedMaxBitrateList, new_create_dissector_handle(dissect_Ass_RAB_Parameter_ExtendedMaxBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_MessageStructure, new_create_dissector_handle(dissect_MessageStructure_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_TypeOfError, new_create_dissector_handle(dissect_TypeOfError_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RAC, new_create_dissector_handle(dissect_RAC_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_newLAListofIdleModeUEs, new_create_dissector_handle(dissect_LAListofIdleModeUEs_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_LAListwithNoIdleModeUEsAnyMore, new_create_dissector_handle(dissect_LAListofIdleModeUEs_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_GANSS_PositioningDataSet, new_create_dissector_handle(dissect_GANSS_PositioningDataSet_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_SignallingIndication, new_create_dissector_handle(dissect_SignallingIndication_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RAB_Parameter_ExtendedGuaranteedBitrateList, new_create_dissector_handle(dissect_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RAB_Parameter_ExtendedMaxBitrateList, new_create_dissector_handle(dissect_RAB_Parameter_ExtendedMaxBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_CN_DomainIndicator, new_create_dissector_handle(dissect_CN_DomainIndicator_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_LAofIdleModeUEs, new_create_dissector_handle(dissect_LAListofIdleModeUEs_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_AlternativeRABConfigurationRequest, new_create_dissector_handle(dissect_AlternativeRABConfigurationRequest_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Requested_RAB_Parameter_ExtendedMaxBitrateList, new_create_dissector_handle(dissect_Requested_RAB_Parameter_ExtendedMaxBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList, new_create_dissector_handle(dissect_Requested_RAB_Parameter_ExtendedGuaranteedBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_ExtendedRNC_ID, new_create_dissector_handle(dissect_ExtendedRNC_ID_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_SRB_TrCH_Mapping, new_create_dissector_handle(dissect_SRB_TrCH_Mapping_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_CellLoadInformationGroup, new_create_dissector_handle(dissect_CellLoadInformationGroup_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_TraceRecordingSessionInformation, new_create_dissector_handle(dissect_TraceRecordingSessionInformation_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_MBMSLinkingInformation, new_create_dissector_handle(dissect_MBMSLinkingInformation_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_hS_DSCH_MAC_d_Flow_ID, new_create_dissector_handle(dissect_HS_DSCH_MAC_d_Flow_ID_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_E_DCH_MAC_d_Flow_ID, new_create_dissector_handle(dissect_E_DCH_MAC_d_Flow_ID_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_GERAN_Classmark, new_create_dissector_handle(dissect_GERAN_Classmark_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_SourceBSS_ToTargetBSS_TransparentContainer, new_create_dissector_handle(dissect_SourceBSS_ToTargetBSS_TransparentContainer_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_TransportLayerAddress, new_create_dissector_handle(dissect_TransportLayerAddress_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_IuTransportAssociation, new_create_dissector_handle(dissect_IuTransportAssociation_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_InterSystemInformation_TransparentContainer, new_create_dissector_handle(dissect_ranap_InterSystemInformation_TransparentContainer_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_TargetBSS_ToSourceBSS_TransparentContainer, new_create_dissector_handle(dissect_TargetBSS_ToSourceBSS_TransparentContainer_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Alt_RAB_Parameters, new_create_dissector_handle(dissect_Alt_RAB_Parameters_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_GERAN_BSC_Container, new_create_dissector_handle(dissect_GERAN_BSC_Container_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_GlobalCN_ID, new_create_dissector_handle(dissect_GlobalCN_ID_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_SNA_Access_Information, new_create_dissector_handle(dissect_SNA_Access_Information_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_UESBI_Iu, new_create_dissector_handle(dissect_UESBI_Iu_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_SelectedPLMN_ID, new_create_dissector_handle(dissect_PLMNidentity_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_CNMBMSLinkingInformation, new_create_dissector_handle(dissect_CNMBMSLinkingInformation_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Ass_RAB_Parameters, new_create_dissector_handle(dissect_Ass_RAB_Parameters_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_NewBSS_To_OldBSS_Information, new_create_dissector_handle(dissect_NewBSS_To_OldBSS_Information_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RAT_Type, new_create_dissector_handle(dissect_RAT_Type_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_TracePropagationParameters, new_create_dissector_handle(dissect_TracePropagationParameters_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_VerticalAccuracyCode, new_create_dissector_handle(dissect_VerticalAccuracyCode_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_ResponseTime, new_create_dissector_handle(dissect_ResponseTime_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_PositioningPriority, new_create_dissector_handle(dissect_PositioningPriority_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_ClientType, new_create_dissector_handle(dissect_ClientType_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_IncludeVelocity, new_create_dissector_handle(dissect_IncludeVelocity_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_PeriodicLocationInfo, new_create_dissector_handle(dissect_PeriodicLocationInfo_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_LastKnownServiceArea, new_create_dissector_handle(dissect_LastKnownServiceArea_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_PositionData, new_create_dissector_handle(dissect_PositionData_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_PositionDataSpecificToGERANIuMode, new_create_dissector_handle(dissect_PositionDataSpecificToGERANIuMode_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_AccuracyFulfilmentIndicator, new_create_dissector_handle(dissect_AccuracyFulfilmentIndicator_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_VelocityEstimate, new_create_dissector_handle(dissect_VelocityEstimate_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_PermanentNAS_UE_ID, new_create_dissector_handle(dissect_PermanentNAS_UE_ID_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_NAS_SequenceNumber, new_create_dissector_handle(dissect_NAS_SequenceNumber_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RedirectAttemptFlag, new_create_dissector_handle(dissect_RedirectAttemptFlag_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RedirectionIndication, new_create_dissector_handle(dissect_RedirectionIndication_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RedirectionCompleted, new_create_dissector_handle(dissect_RedirectionCompleted_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_SourceRNC_PDCP_context_info, new_create_dissector_handle(dissect_RRC_Container_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_GERAN_Iumode_RAB_FailedList_RABAssgntResponse, new_create_dissector_handle(dissect_GERAN_Iumode_RAB_FailedList_RABAssgntResponse_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_LocationRelatedDataRequestTypeSpecificToGERANIuMode, new_create_dissector_handle(dissect_LocationRelatedDataRequestTypeSpecificToGERANIuMode_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RequestedGANSSAssistanceData, new_create_dissector_handle(dissect_RequestedGANSSAssistanceData_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_CriticalityDiagnostics, new_create_dissector_handle(dissect_CriticalityDiagnostics_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_MBMSCountingInformation, new_create_dissector_handle(dissect_MBMSCountingInformation_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_UE_History_Information, new_create_dissector_handle(dissect_UE_History_Information_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_MBMSSynchronisationInformation, new_create_dissector_handle(dissect_MBMSSynchronisationInformation_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_SubscriberProfileIDforRFP, new_create_dissector_handle(dissect_SubscriberProfileIDforRFP_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_CSG_Id, new_create_dissector_handle(dissect_CSG_Id_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Ass_RAB_Parameter_SupportedGuaranteedBitrateList, new_create_dissector_handle(dissect_SupportedRAB_ParameterBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Ass_RAB_Parameter_SupportedMaxBitrateList, new_create_dissector_handle(dissect_SupportedRAB_ParameterBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RAB_Parameter_SupportedGuaranteedBitrateList, new_create_dissector_handle(dissect_SupportedRAB_ParameterBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RAB_Parameter_SupportedMaxBitrateList, new_create_dissector_handle(dissect_SupportedRAB_ParameterBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Requested_RAB_Parameter_SupportedMaxBitrateList, new_create_dissector_handle(dissect_SupportedRAB_ParameterBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Requested_RAB_Parameter_SupportedGuaranteedBitrateList, new_create_dissector_handle(dissect_SupportedRAB_ParameterBitrateList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_SRVCC_HO_Indication, new_create_dissector_handle(dissect_SRVCC_HO_Indication_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_SRVCC_Operation_Possible, new_create_dissector_handle(dissect_SRVCC_Operation_Possible_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_CSG_Id_List, new_create_dissector_handle(dissect_CSG_Id_List_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_PSRABtobeReplaced, new_create_dissector_handle(dissect_RAB_ID_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_E_UTRAN_Service_Handover, new_create_dissector_handle(dissect_E_UTRAN_Service_Handover_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_UE_AggregateMaximumBitRate, new_create_dissector_handle(dissect_UE_AggregateMaximumBitRate_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_CSG_Membership_Status, new_create_dissector_handle(dissect_CSG_Membership_Status_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Cell_Access_Mode, new_create_dissector_handle(dissect_Cell_Access_Mode_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_IP_Source_Address, new_create_dissector_handle(dissect_IPMulticastAddress_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_CSFB_Information, new_create_dissector_handle(dissect_CSFB_Information_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_PDP_TypeInformation_extension, new_create_dissector_handle(dissect_PDP_TypeInformation_extension_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_MSISDN, new_create_dissector_handle(dissect_MSISDN_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Offload_RAB_Parameters, new_create_dissector_handle(dissect_Offload_RAB_Parameters_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_LGW_TransportLayerAddress, new_create_dissector_handle(dissect_TransportLayerAddress_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Correlation_ID, new_create_dissector_handle(dissect_Correlation_ID_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_IRAT_Measurement_Configuration, new_create_dissector_handle(dissect_IRAT_Measurement_Configuration_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_MDT_Configuration, new_create_dissector_handle(dissect_MDT_Configuration_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Priority_Class_Indicator, new_create_dissector_handle(dissect_Priority_Class_Indicator_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RNSAPRelocationParameters, new_create_dissector_handle(dissect_RNSAPRelocationParameters_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_RABParametersList, new_create_dissector_handle(dissect_RABParametersList_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Management_Based_MDT_Allowed, new_create_dissector_handle(dissect_Management_Based_MDT_Allowed_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_HigherBitratesThan16MbpsFlag, new_create_dissector_handle(dissect_HigherBitratesThan16MbpsFlag_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_Trace_Collection_Entity_IP_Addess, new_create_dissector_handle(dissect_TransportLayerAddress_PDU, proto_ranap)); dissector_add_uint("ranap.extension", id_End_Of_CSFB, new_create_dissector_handle(dissect_End_Of_CSFB_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_Iu_Release, new_create_dissector_handle(dissect_Iu_ReleaseCommand_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_Iu_Release, new_create_dissector_handle(dissect_Iu_ReleaseComplete_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_RelocationPreparation, new_create_dissector_handle(dissect_RelocationRequired_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_RelocationPreparation, new_create_dissector_handle(dissect_RelocationCommand_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_RelocationPreparation, new_create_dissector_handle(dissect_RelocationPreparationFailure_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_RelocationResourceAllocation, new_create_dissector_handle(dissect_RelocationRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_RelocationResourceAllocation, new_create_dissector_handle(dissect_RelocationRequestAcknowledge_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_RelocationResourceAllocation, new_create_dissector_handle(dissect_RelocationFailure_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_RelocationCancel, new_create_dissector_handle(dissect_RelocationCancel_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_RelocationCancel, new_create_dissector_handle(dissect_RelocationCancelAcknowledge_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_SRNS_ContextTransfer, new_create_dissector_handle(dissect_SRNS_ContextRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_SRNS_ContextTransfer, new_create_dissector_handle(dissect_SRNS_ContextResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_SecurityModeControl, new_create_dissector_handle(dissect_SecurityModeCommand_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_SecurityModeControl, new_create_dissector_handle(dissect_SecurityModeComplete_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_SecurityModeControl, new_create_dissector_handle(dissect_SecurityModeReject_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_DataVolumeReport, new_create_dissector_handle(dissect_DataVolumeReportRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_DataVolumeReport, new_create_dissector_handle(dissect_DataVolumeReport_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_Reset, new_create_dissector_handle(dissect_Reset_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_Reset, new_create_dissector_handle(dissect_ResetAcknowledge_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_RAB_ReleaseRequest, new_create_dissector_handle(dissect_RAB_ReleaseRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_Iu_ReleaseRequest, new_create_dissector_handle(dissect_Iu_ReleaseRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_RelocationDetect, new_create_dissector_handle(dissect_RelocationDetect_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_RelocationComplete, new_create_dissector_handle(dissect_RelocationComplete_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_Paging, new_create_dissector_handle(dissect_Paging_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_CommonID, new_create_dissector_handle(dissect_CommonID_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_CN_InvokeTrace, new_create_dissector_handle(dissect_CN_InvokeTrace_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_CN_DeactivateTrace, new_create_dissector_handle(dissect_CN_DeactivateTrace_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_LocationReportingControl, new_create_dissector_handle(dissect_LocationReportingControl_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_LocationReport, new_create_dissector_handle(dissect_LocationReport_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_InitialUE_Message, new_create_dissector_handle(dissect_InitialUE_Message_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_DirectTransfer, new_create_dissector_handle(dissect_DirectTransfer_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_OverloadControl, new_create_dissector_handle(dissect_Overload_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_ErrorIndication, new_create_dissector_handle(dissect_ErrorIndication_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_SRNS_DataForward, new_create_dissector_handle(dissect_SRNS_DataForwardCommand_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_ForwardSRNS_Context, new_create_dissector_handle(dissect_ForwardSRNS_Context_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_RAB_Assignment, new_create_dissector_handle(dissect_RAB_AssignmentRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.out", id_RAB_Assignment, new_create_dissector_handle(dissect_RAB_AssignmentResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_privateMessage, new_create_dissector_handle(dissect_PrivateMessage_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_ResetResource, new_create_dissector_handle(dissect_ResetResource_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_ResetResource, new_create_dissector_handle(dissect_ResetResourceAcknowledge_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_RANAP_Relocation, new_create_dissector_handle(dissect_RANAP_RelocationInformation_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_RAB_ModifyRequest, new_create_dissector_handle(dissect_RAB_ModifyRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_LocationRelatedData, new_create_dissector_handle(dissect_LocationRelatedDataRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_LocationRelatedData, new_create_dissector_handle(dissect_LocationRelatedDataResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_LocationRelatedData, new_create_dissector_handle(dissect_LocationRelatedDataFailure_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_InformationTransfer, new_create_dissector_handle(dissect_InformationTransferIndication_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_InformationTransfer, new_create_dissector_handle(dissect_InformationTransferConfirmation_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_InformationTransfer, new_create_dissector_handle(dissect_InformationTransferFailure_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_UESpecificInformation, new_create_dissector_handle(dissect_UESpecificInformationIndication_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_DirectInformationTransfer, new_create_dissector_handle(dissect_DirectInformationTransfer_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_UplinkInformationExchange, new_create_dissector_handle(dissect_UplinkInformationExchangeRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_UplinkInformationExchange, new_create_dissector_handle(dissect_UplinkInformationExchangeResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_UplinkInformationExchange, new_create_dissector_handle(dissect_UplinkInformationExchangeFailure_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_MBMSSessionStart, new_create_dissector_handle(dissect_MBMSSessionStart_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_MBMSSessionStart, new_create_dissector_handle(dissect_MBMSSessionStartResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_MBMSSessionStart, new_create_dissector_handle(dissect_MBMSSessionStartFailure_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_MBMSSessionUpdate, new_create_dissector_handle(dissect_MBMSSessionUpdate_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_MBMSSessionUpdate, new_create_dissector_handle(dissect_MBMSSessionUpdateResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_MBMSSessionUpdate, new_create_dissector_handle(dissect_MBMSSessionUpdateFailure_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_MBMSSessionStop, new_create_dissector_handle(dissect_MBMSSessionStop_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_MBMSSessionStop, new_create_dissector_handle(dissect_MBMSSessionStopResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_MBMSUELinking, new_create_dissector_handle(dissect_MBMSUELinkingRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.out", id_MBMSUELinking, new_create_dissector_handle(dissect_MBMSUELinkingResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_MBMSRegistration, new_create_dissector_handle(dissect_MBMSRegistrationRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_MBMSRegistration, new_create_dissector_handle(dissect_MBMSRegistrationResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_MBMSRegistration, new_create_dissector_handle(dissect_MBMSRegistrationFailure_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_MBMSCNDe_Registration_Procedure, new_create_dissector_handle(dissect_MBMSCNDe_RegistrationRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_MBMSCNDe_Registration_Procedure, new_create_dissector_handle(dissect_MBMSCNDe_RegistrationResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_MBMSRABEstablishmentIndication, new_create_dissector_handle(dissect_MBMSRABEstablishmentIndication_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_MBMSRABRelease, new_create_dissector_handle(dissect_MBMSRABReleaseRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_MBMSRABRelease, new_create_dissector_handle(dissect_MBMSRABRelease_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_MBMSRABRelease, new_create_dissector_handle(dissect_MBMSRABReleaseFailure_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_enhancedRelocationComplete, new_create_dissector_handle(dissect_EnhancedRelocationCompleteRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_enhancedRelocationComplete, new_create_dissector_handle(dissect_EnhancedRelocationCompleteResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.uout", id_enhancedRelocationComplete, new_create_dissector_handle(dissect_EnhancedRelocationCompleteFailure_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_enhancedRelocationCompleteConfirm, new_create_dissector_handle(dissect_EnhancedRelocationCompleteConfirm_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_RANAPenhancedRelocation, new_create_dissector_handle(dissect_RANAP_EnhancedRelocationInformationRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.sout", id_RANAPenhancedRelocation, new_create_dissector_handle(dissect_RANAP_EnhancedRelocationInformationResponse_PDU, proto_ranap)); dissector_add_uint("ranap.proc.imsg", id_SRVCCPreparation, new_create_dissector_handle(dissect_SRVCC_CSKeysRequest_PDU, proto_ranap)); dissector_add_uint("ranap.proc.out", id_SRVCCPreparation, new_create_dissector_handle(dissect_SRVCC_CSKeysResponse_PDU, proto_ranap)); /*--- End of included file: packet-ranap-dis-tab.c ---*/ #line 377 "../../asn1/ranap/packet-ranap-template.c" } else { dissector_delete_uint("sccp.ssn", local_ranap_sccp_ssn, ranap_handle); } dissector_add_uint("sccp.ssn", global_ranap_sccp_ssn, ranap_handle); local_ranap_sccp_ssn = global_ranap_sccp_ssn; /* Add heuristic dissector * Perhaps we want a preference whether the heuristic dissector * is or isn't enabled */ heur_dissector_add("sccp", dissect_sccp_ranap_heur, proto_ranap); heur_dissector_add("sua", dissect_sccp_ranap_heur, proto_ranap); }
arowser/wireshark-xcoin
epan/dissectors/packet-ranap.c
C
gpl-2.0
778,112
45.176013
240
0.672953
false
/* $Id: views.css,v 1.11.2.3 2010/03/12 00:25:33 merlinofchaos Exp $ */ .asce-mod-1 { position: relative; } .views-field-image-image { float: left; } .asce-mod-1 .views-field-title { font-size: 160%; line-height: 130%; } /* From ASCE website */ .ImgCaptMain{ width: 1150; position:relative; } .ImgCaptDescBox{ position:absolute; bottom:0px; /* since it's positioned absolutely it will need a width, but not height, that would fill the entire box covering the image */ width:100%; } .ImgCaptDescBg{ background:#333333; filter:alpha(opacity=70); -moz-opacity:0.7; -khtml-opacity: 0.7; opacity: 0.9; width:100%; } .ImgCaptDesc{ padding:5px; color:#fff; font-weight:normal; font-family:Arial; font-size: 12px; text-align:left; } .ImgCaptDesc h2 { font-size:16px; font-weight:bold; padding: 0px; margin: 5px 0px; vertical-align:middle; } .ImgCaptDesc a { color:#fff; font-weight:bold; } .ImgCaptDesc a:hover { text-decoration:underline; } .program-border { padding: 1em .25em .25em .25em; margin-top: .25em; border-collapse: separate; border-spacing: .25em; border-style: solid; border-width: thin; } .views-field-title { margin-bottom: 1em; } .views-field-picture { clear: right; float: right; padding-left: 1em; } .views-field-name { clear: right; float: right; padding-left: 1em; } .views-field-field-event-author-title-value { clear: right; float: right; padding-left: 1em; margin-bottom: .25em; } .views-field-title-1 { clear: right; float: right; padding-left: 1em; margin-bottom: .25em; } .picture-box { clear: right; float: right; padding-left: 1em; margin-bottom: .25em; } .picture-box .picture { clear: right; float: right; padding-left: 1em; margin-right: 0em; }
marvoey/live-web
sites/all/themes/copriMobileGarland/asce-back.css
CSS
gpl-2.0
1,828
14.361345
75
0.654267
false
package tim.prune.threedee; import java.awt.event.InputEvent; /* * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistribution of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistribution in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of Sun Microsystems, Inc. or the names of * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * This software is provided "AS IS," without a warranty of any * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY * EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * * You acknowledge that this software is not designed, licensed or * intended for use in the design, construction, operation or * maintenance of any nuclear facility. * * Copyright (c) 2021 ActivityWorkshop simplifications and renamings, * and restriction to upright orientations. */ import java.awt.event.MouseEvent; import java.awt.AWTEvent; import javax.media.j3d.Transform3D; import javax.media.j3d.Canvas3D; import javax.vecmath.Vector3d; import javax.vecmath.Point3d; import javax.vecmath.Matrix3d; import com.sun.j3d.utils.behaviors.vp.ViewPlatformAWTBehavior; import com.sun.j3d.utils.universe.ViewingPlatform; /** * Moves the View around a point of interest when the mouse is dragged with * a mouse button pressed. Includes rotation, zoom, and translation * actions. Zooming can also be obtained by using mouse wheel. * <p> * The rotate action rotates the ViewPlatform around the point of interest * when the mouse is moved with the main mouse button pressed. The * rotation is in the direction of the mouse movement, with a default * rotation of 0.01 radians for each pixel of mouse movement. * <p> * The zoom action moves the ViewPlatform closer to or further from the * point of interest when the mouse is moved with the middle mouse button * pressed (or Alt-main mouse button on systems without a middle mouse button). * The default zoom action is to translate the ViewPlatform 0.01 units for each * pixel of mouse movement. Moving the mouse up moves the ViewPlatform closer, * moving the mouse down moves the ViewPlatform further away. * <p> * The translate action translates the ViewPlatform when the mouse is moved * with the right mouse button pressed. The translation is in the direction * of the mouse movement, with a default translation of 0.01 units for each * pixel of mouse movement. * <p> * The actions can be reversed using the <code>REVERSE_</code><i>ACTION</i> * constructor flags. The default action moves the ViewPlatform around the * objects in the scene. The <code>REVERSE_</code><i>ACTION</i> flags can * make the objects in the scene appear to be moving in the direction * of the mouse movement. */ public class UprightOrbiter extends ViewPlatformAWTBehavior { private Transform3D _longitudeTransform = new Transform3D(); private Transform3D _latitudeTransform = new Transform3D(); private Transform3D _rotateTransform = new Transform3D(); // needed for integrateTransforms but don't want to new every time private Transform3D _temp1 = new Transform3D(); private Transform3D _temp2 = new Transform3D(); private Transform3D _translation = new Transform3D(); private Vector3d _transVector = new Vector3d(); private Vector3d _distanceVector = new Vector3d(); private Vector3d _centerVector = new Vector3d(); private Vector3d _invertCenterVector = new Vector3d(); private double _deltaYaw = 0.0, _deltaPitch = 0.0; private double _startDistanceFromCenter = 20.0; private double _distanceFromCenter = 20.0; private Point3d _rotationCenter = new Point3d(); private Matrix3d _rotMatrix = new Matrix3d(); private int _mouseX = 0, _mouseY = 0; private double _xtrans = 0.0, _ytrans = 0.0, _ztrans = 0.0; private static final double MIN_RADIUS = 0.0; // the factor to be applied to wheel zooming so that it does not // look much different with mouse movement zooming. private static final float wheelZoomFactor = 50.0f; private static final double NOMINAL_ZOOM_FACTOR = .01; private static final double NOMINAL_ROT_FACTOR = .008; private static final double NOMINAL_TRANS_FACTOR = .003; private double _pitchAngle = 0.0; /** * Creates a new OrbitBehaviour * @param inCanvas The Canvas3D to add the behaviour to * @param inInitialPitch pitch angle in degrees */ public UprightOrbiter(Canvas3D inCanvas, double inInitialPitch) { super(inCanvas, MOUSE_LISTENER | MOUSE_MOTION_LISTENER | MOUSE_WHEEL_LISTENER ); _pitchAngle = Math.toRadians(inInitialPitch); } protected synchronized void processAWTEvents( final AWTEvent[] events ) { motion = false; for (AWTEvent event : events) { if (event instanceof MouseEvent) { processMouseEvent((MouseEvent) event); } } } protected void processMouseEvent( final MouseEvent evt ) { if (evt.getID() == MouseEvent.MOUSE_PRESSED) { _mouseX = evt.getX(); _mouseY = evt.getY(); motion = true; } else if (evt.getID() == MouseEvent.MOUSE_DRAGGED) { int xchange = evt.getX() - _mouseX; int ychange = evt.getY() - _mouseY; // rotate if (isRotateEvent(evt)) { _deltaYaw -= xchange * NOMINAL_ROT_FACTOR; _deltaPitch -= ychange * NOMINAL_ROT_FACTOR; } // translate else if (isTranslateEvent(evt)) { _xtrans -= xchange * NOMINAL_TRANS_FACTOR; _ytrans += ychange * NOMINAL_TRANS_FACTOR; } // zoom else if (isZoomEvent(evt)) { doZoomOperations( ychange ); } _mouseX = evt.getX(); _mouseY = evt.getY(); motion = true; } else if (evt.getID() == MouseEvent.MOUSE_WHEEL ) { if (isZoomEvent(evt)) { // if zooming is done through mouse wheel, the number of wheel increments // is multiplied by the wheelZoomFactor, to make zoom speed look natural if ( evt instanceof java.awt.event.MouseWheelEvent) { int zoom = ((int)(((java.awt.event.MouseWheelEvent)evt).getWheelRotation() * wheelZoomFactor)); doZoomOperations( zoom ); motion = true; } } } } /* * zoom but stop at MIN_RADIUS */ private void doZoomOperations( int ychange ) { if ((_distanceFromCenter - ychange * NOMINAL_ZOOM_FACTOR) > MIN_RADIUS) { _distanceFromCenter -= ychange * NOMINAL_ZOOM_FACTOR; } else { _distanceFromCenter = MIN_RADIUS; } } /** * Sets the ViewingPlatform for this behaviour. This method is * called by the ViewingPlatform. * If a sub-calls overrides this method, it must call * super.setViewingPlatform(vp). * NOTE: Applications should <i>not</i> call this method. */ @Override public void setViewingPlatform(ViewingPlatform vp) { super.setViewingPlatform( vp ); if (vp != null) { resetView(); integrateTransforms(); } } /** * Reset the orientation and distance of this behaviour to the current * values in the ViewPlatform Transform Group */ private void resetView() { Vector3d centerToView = new Vector3d(); targetTG.getTransform( targetTransform ); targetTransform.get( _rotMatrix, _transVector ); centerToView.sub( _transVector, _rotationCenter ); _distanceFromCenter = centerToView.length(); _startDistanceFromCenter = _distanceFromCenter; targetTransform.get( _rotMatrix ); _rotateTransform.set( _rotMatrix ); // compute the initial x/y/z offset _temp1.set(centerToView); _rotateTransform.invert(); _rotateTransform.mul(_temp1); _rotateTransform.get(centerToView); _xtrans = centerToView.x; _ytrans = centerToView.y; _ztrans = centerToView.z; // reset rotMatrix _rotateTransform.set( _rotMatrix ); } protected synchronized void integrateTransforms() { // Check if the transform has been changed by another behaviour Transform3D currentXfm = new Transform3D(); targetTG.getTransform(currentXfm); if (! targetTransform.equals(currentXfm)) resetView(); // Three-step rotation process, firstly undo the pitch and apply the delta yaw _latitudeTransform.rotX(_pitchAngle); _rotateTransform.mul(_rotateTransform, _latitudeTransform); _longitudeTransform.rotY( _deltaYaw ); _rotateTransform.mul(_rotateTransform, _longitudeTransform); // Now update pitch angle according to delta and apply _pitchAngle = Math.min(Math.max(0.0, _pitchAngle - _deltaPitch), Math.PI/2.0); _latitudeTransform.rotX(-_pitchAngle); _rotateTransform.mul(_rotateTransform, _latitudeTransform); _distanceVector.z = _distanceFromCenter - _startDistanceFromCenter; _temp1.set(_distanceVector); _temp1.mul(_rotateTransform, _temp1); // want to look at rotationCenter _transVector.x = _rotationCenter.x + _xtrans; _transVector.y = _rotationCenter.y + _ytrans; _transVector.z = _rotationCenter.z + _ztrans; _translation.set(_transVector); targetTransform.mul(_temp1, _translation); // handle rotationCenter _temp1.set(_centerVector); _temp1.mul(targetTransform); _invertCenterVector.x = -_centerVector.x; _invertCenterVector.y = -_centerVector.y; _invertCenterVector.z = -_centerVector.z; _temp2.set(_invertCenterVector); targetTransform.mul(_temp1, _temp2); Vector3d finalTranslation = new Vector3d(); targetTransform.get(finalTranslation); targetTG.setTransform(targetTransform); // reset yaw and pitch deltas _deltaYaw = 0.0; _deltaPitch = 0.0; } private boolean isRotateEvent(MouseEvent evt) { final boolean isRightDrag = (evt.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK) > 0; return !evt.isAltDown() && !isRightDrag; } private boolean isZoomEvent(MouseEvent evt) { if (evt instanceof java.awt.event.MouseWheelEvent) { return true; } return evt.isAltDown() && !evt.isMetaDown(); } private boolean isTranslateEvent(MouseEvent evt) { final boolean isRightDrag = (evt.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK) > 0; return !evt.isAltDown() && isRightDrag; } }
activityworkshop/GpsPrune
src/tim/prune/threedee/UprightOrbiter.java
Java
gpl-2.0
10,939
32.35061
88
0.729591
false
/* mkvtoolnix - A set of programs for manipulating Matroska files Distributed under the GPL see the file COPYING for details or visit http://www.gnu.org/copyleft/gpl.html Cross platform compatibility definitions Written by Moritz Bunkus <moritz@bunkus.org>. */ #ifndef MTX_COMMON_OS_H #define MTX_COMMON_OS_H #undef __STRICT_ANSI__ #include "config.h" // For PRId64 and PRIu64: #define __STDC_FORMAT_MACROS #if defined(HAVE_COREC_H) #include "corec.h" #if defined(TARGET_WIN) # define SYS_WINDOWS #elif defined(TARGET_OSX) # define SYS_APPLE #elif defined(TARGET_LINUX) # define SYS_UNIX # if defined(__sun) && defined(__SVR4) # define SYS_SOLARIS # else # define SYS_LINUX # endif #endif #else // HAVE_COREC_H #if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) # define SYS_WINDOWS #elif defined(__APPLE__) # define SYS_APPLE #else # define COMP_GCC # define SYS_UNIX # if defined(__bsdi__) || defined(__FreeBSD__) # define SYS_BSD # elif defined(__sun) && defined(__SUNPRO_CC) # undef COMP_GCC # define COMP_SUNPRO # define SYS_SOLARIS # elif defined(__sun) && defined(__SVR4) # define SYS_SOLARIS # else # define SYS_LINUX # endif #endif #endif // HAVE_COREC_H #if defined(SYS_WINDOWS) # if defined __MINGW32__ # define COMP_MINGW # elif defined __CYGWIN__ # define COMP_CYGWIN # else # define COMP_MSC # define NOMINMAX # endif #endif #if (defined(SYS_WINDOWS) && defined(_WIN64)) || (!defined(SYS_WINDOWS) && (defined(__x86_64__) || defined(__ppc64__))) # define ARCH_64BIT #else # define ARCH_32BIT #endif #if defined(COMP_MSC) #if !defined(HAVE_COREC_H) # define strncasecmp _strnicmp # define strcasecmp _stricmp typedef __int64 int64_t; typedef __int32 int32_t; typedef __int16 int16_t; typedef __int8 int8_t; typedef unsigned __int64 uint64_t; typedef unsigned __int32 uint32_t; typedef unsigned __int16 uint16_t; typedef unsigned __int8 uint8_t; #endif // HAVE_COREC_H # define nice(a) #include <io.h> typedef _fsize_t ssize_t; #define PACKED_STRUCTURE #else // COMP_MSC #define PACKED_STRUCTURE __attribute__((__packed__)) #endif // COMP_MSC #if defined(COMP_MINGW) || defined(COMP_MSC) # if defined(COMP_MINGW) // mingw is a special case. It does have inttypes.h declaring // PRId64 to be I64d, but it warns about "int type format, different // type argument" if %I64d is used with a int64_t. The mx* functions // convert %lld to %I64d on mingw/msvc anyway. # undef PRId64 # define PRId64 "lld" # undef PRIu64 # define PRIu64 "llu" # undef PRIx64 # define PRIx64 "llx" # else // MSVC doesn't have inttypes, nor the PRI?64 defines. # define PRId64 "I64d" # define PRIu64 "I64u" # define PRIx64 "I64x" # endif // defined(COMP_MINGW) #endif // COMP_MINGW || COMP_MSC #define LLD "%" PRId64 #define LLU "%" PRIu64 #if defined(HAVE_NO_INT64_T) typedef INT64_TYPE int64_t; #endif #if defined(HAVE_NO_UINT64_T) typedef UINT64_TYPE uint64_t; #endif #if defined(SYS_WINDOWS) # define PATHSEP '\\' #else # define PATHSEP '/' #endif #if defined(WORDS_BIGENDIAN) && (WORDS_BIGENDIAN == 1) # define ARCH_BIGENDIAN #else # define ARCH_LITTLEENDIAN #endif #endif
UbiCastTeam/mkvtoolnix-ubicast
src/common/os.h
C
gpl-2.0
3,162
20.510204
119
0.696395
false
/* * A framebuffer driver for VBE 2.0+ compliant video cards * * (c) 2007 Michal Januszewski <spock@gentoo.org> * Loosely based upon the vesafb driver. * */ #include <linux/init.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/skbuff.h> #include <linux/timer.h> #include <linux/completion.h> #include <linux/connector.h> #include <linux/random.h> #include <linux/platform_device.h> #include <linux/limits.h> #include <linux/fb.h> #include <linux/io.h> #include <linux/mutex.h> #include <linux/slab.h> #include <video/edid.h> #include <video/uvesafb.h> #ifdef CONFIG_X86 #include <video/vga.h> #include <linux/pci.h> #endif #ifdef CONFIG_MTRR #include <asm/mtrr.h> #endif #include "edid.h" static struct cb_id uvesafb_cn_id = { .idx = CN_IDX_V86D, .val = CN_VAL_V86D_UVESAFB }; static char v86d_path[PATH_MAX] = "/sbin/v86d"; static char v86d_started; /* has v86d been started by uvesafb? */ static struct fb_fix_screeninfo uvesafb_fix __devinitdata = { .id = "VESA VGA", .type = FB_TYPE_PACKED_PIXELS, .accel = FB_ACCEL_NONE, .visual = FB_VISUAL_TRUECOLOR, }; static int mtrr __devinitdata = 3; /* enable mtrr by default */ static int blank = 1; /* enable blanking by default */ static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */ static bool pmi_setpal __devinitdata = true; /* use PMI for palette changes */ static int nocrtc __devinitdata; /* ignore CRTC settings */ static int noedid __devinitdata; /* don't try DDC transfers */ static int vram_remap __devinitdata; /* set amt. of memory to be used */ static int vram_total __devinitdata; /* set total amount of memory */ static u16 maxclk __devinitdata; /* maximum pixel clock */ static u16 maxvf __devinitdata; /* maximum vertical frequency */ static u16 maxhf __devinitdata; /* maximum horizontal frequency */ static u16 vbemode __devinitdata; /* force use of a specific VBE mode */ static char *mode_option __devinitdata; static u8 dac_width = 6; static struct uvesafb_ktask *uvfb_tasks[UVESAFB_TASKS_MAX]; static DEFINE_MUTEX(uvfb_lock); /* * A handler for replies from userspace. * * Make sure each message passes consistency checks and if it does, * find the kernel part of the task struct, copy the registers and * the buffer contents and then complete the task. */ static void uvesafb_cn_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp) { struct uvesafb_task *utask; struct uvesafb_ktask *task; if (!cap_raised(current_cap(), CAP_SYS_ADMIN)) return; if (msg->seq >= UVESAFB_TASKS_MAX) return; mutex_lock(&uvfb_lock); task = uvfb_tasks[msg->seq]; if (!task || msg->ack != task->ack) { mutex_unlock(&uvfb_lock); return; } utask = (struct uvesafb_task *)msg->data; /* Sanity checks for the buffer length. */ if (task->t.buf_len < utask->buf_len || utask->buf_len > msg->len - sizeof(*utask)) { mutex_unlock(&uvfb_lock); return; } uvfb_tasks[msg->seq] = NULL; mutex_unlock(&uvfb_lock); memcpy(&task->t, utask, sizeof(*utask)); if (task->t.buf_len && task->buf) memcpy(task->buf, utask + 1, task->t.buf_len); complete(task->done); return; } static int uvesafb_helper_start(void) { char *envp[] = { "HOME=/", "PATH=/sbin:/bin", NULL, }; char *argv[] = { v86d_path, NULL, }; return call_usermodehelper(v86d_path, argv, envp, 1); } /* * Execute a uvesafb task. * * Returns 0 if the task is executed successfully. * * A message sent to the userspace consists of the uvesafb_task * struct and (optionally) a buffer. The uvesafb_task struct is * a simplified version of uvesafb_ktask (its kernel counterpart) * containing only the register values, flags and the length of * the buffer. * * Each message is assigned a sequence number (increased linearly) * and a random ack number. The sequence number is used as a key * for the uvfb_tasks array which holds pointers to uvesafb_ktask * structs for all requests. */ static int uvesafb_exec(struct uvesafb_ktask *task) { static int seq; struct cn_msg *m; int err; int len = sizeof(task->t) + task->t.buf_len; /* * Check whether the message isn't longer than the maximum * allowed by connector. */ if (sizeof(*m) + len > CONNECTOR_MAX_MSG_SIZE) { printk(KERN_WARNING "uvesafb: message too long (%d), " "can't execute task\n", (int)(sizeof(*m) + len)); return -E2BIG; } m = kzalloc(sizeof(*m) + len, GFP_KERNEL); if (!m) return -ENOMEM; init_completion(task->done); memcpy(&m->id, &uvesafb_cn_id, sizeof(m->id)); m->seq = seq; m->len = len; m->ack = random32(); /* uvesafb_task structure */ memcpy(m + 1, &task->t, sizeof(task->t)); /* Buffer */ memcpy((u8 *)(m + 1) + sizeof(task->t), task->buf, task->t.buf_len); /* * Save the message ack number so that we can find the kernel * part of this task when a reply is received from userspace. */ task->ack = m->ack; mutex_lock(&uvfb_lock); /* If all slots are taken -- bail out. */ if (uvfb_tasks[seq]) { mutex_unlock(&uvfb_lock); err = -EBUSY; goto out; } /* Save a pointer to the kernel part of the task struct. */ uvfb_tasks[seq] = task; mutex_unlock(&uvfb_lock); err = cn_netlink_send(m, 0, GFP_KERNEL); if (err == -ESRCH) { /* * Try to start the userspace helper if sending * the request failed the first time. */ err = uvesafb_helper_start(); if (err) { printk(KERN_ERR "uvesafb: failed to execute %s\n", v86d_path); printk(KERN_ERR "uvesafb: make sure that the v86d " "helper is installed and executable\n"); } else { v86d_started = 1; err = cn_netlink_send(m, 0, gfp_any()); if (err == -ENOBUFS) err = 0; } } else if (err == -ENOBUFS) err = 0; if (!err && !(task->t.flags & TF_EXIT)) err = !wait_for_completion_timeout(task->done, msecs_to_jiffies(UVESAFB_TIMEOUT)); mutex_lock(&uvfb_lock); uvfb_tasks[seq] = NULL; mutex_unlock(&uvfb_lock); seq++; if (seq >= UVESAFB_TASKS_MAX) seq = 0; out: kfree(m); return err; } /* * Free a uvesafb_ktask struct. */ static void uvesafb_free(struct uvesafb_ktask *task) { if (task) { if (task->done) kfree(task->done); kfree(task); } } /* * Prepare a uvesafb_ktask struct to be used again. */ static void uvesafb_reset(struct uvesafb_ktask *task) { struct completion *cpl = task->done; memset(task, 0, sizeof(*task)); task->done = cpl; } /* * Allocate and prepare a uvesafb_ktask struct. */ static struct uvesafb_ktask *uvesafb_prep(void) { struct uvesafb_ktask *task; task = kzalloc(sizeof(*task), GFP_KERNEL); if (task) { task->done = kzalloc(sizeof(*task->done), GFP_KERNEL); if (!task->done) { kfree(task); task = NULL; } } return task; } static void uvesafb_setup_var(struct fb_var_screeninfo *var, struct fb_info *info, struct vbe_mode_ib *mode) { struct uvesafb_par *par = info->par; var->vmode = FB_VMODE_NONINTERLACED; var->sync = FB_SYNC_VERT_HIGH_ACT; var->xres = mode->x_res; var->yres = mode->y_res; var->xres_virtual = mode->x_res; var->yres_virtual = (par->ypan) ? info->fix.smem_len / mode->bytes_per_scan_line : mode->y_res; var->xoffset = 0; var->yoffset = 0; var->bits_per_pixel = mode->bits_per_pixel; if (var->bits_per_pixel == 15) var->bits_per_pixel = 16; if (var->bits_per_pixel > 8) { var->red.offset = mode->red_off; var->red.length = mode->red_len; var->green.offset = mode->green_off; var->green.length = mode->green_len; var->blue.offset = mode->blue_off; var->blue.length = mode->blue_len; var->transp.offset = mode->rsvd_off; var->transp.length = mode->rsvd_len; } else { var->red.offset = 0; var->green.offset = 0; var->blue.offset = 0; var->transp.offset = 0; var->red.length = 8; var->green.length = 8; var->blue.length = 8; var->transp.length = 0; } } static int uvesafb_vbe_find_mode(struct uvesafb_par *par, int xres, int yres, int depth, unsigned char flags) { int i, match = -1, h = 0, d = 0x7fffffff; for (i = 0; i < par->vbe_modes_cnt; i++) { h = abs(par->vbe_modes[i].x_res - xres) + abs(par->vbe_modes[i].y_res - yres) + abs(depth - par->vbe_modes[i].depth); /* * We have an exact match in terms of resolution * and depth. */ if (h == 0) return i; if (h < d || (h == d && par->vbe_modes[i].depth > depth)) { d = h; match = i; } } i = 1; if (flags & UVESAFB_EXACT_DEPTH && par->vbe_modes[match].depth != depth) i = 0; if (flags & UVESAFB_EXACT_RES && d > 24) i = 0; if (i != 0) return match; else return -1; } static u8 *uvesafb_vbe_state_save(struct uvesafb_par *par) { struct uvesafb_ktask *task; u8 *state; int err; if (!par->vbe_state_size) return NULL; state = kmalloc(par->vbe_state_size, GFP_KERNEL); if (!state) return NULL; task = uvesafb_prep(); if (!task) { kfree(state); return NULL; } task->t.regs.eax = 0x4f04; task->t.regs.ecx = 0x000f; task->t.regs.edx = 0x0001; task->t.flags = TF_BUF_RET | TF_BUF_ESBX; task->t.buf_len = par->vbe_state_size; task->buf = state; err = uvesafb_exec(task); if (err || (task->t.regs.eax & 0xffff) != 0x004f) { printk(KERN_WARNING "uvesafb: VBE get state call " "failed (eax=0x%x, err=%d)\n", task->t.regs.eax, err); kfree(state); state = NULL; } uvesafb_free(task); return state; } static void uvesafb_vbe_state_restore(struct uvesafb_par *par, u8 *state_buf) { struct uvesafb_ktask *task; int err; if (!state_buf) return; task = uvesafb_prep(); if (!task) return; task->t.regs.eax = 0x4f04; task->t.regs.ecx = 0x000f; task->t.regs.edx = 0x0002; task->t.buf_len = par->vbe_state_size; task->t.flags = TF_BUF_ESBX; task->buf = state_buf; err = uvesafb_exec(task); if (err || (task->t.regs.eax & 0xffff) != 0x004f) printk(KERN_WARNING "uvesafb: VBE state restore call " "failed (eax=0x%x, err=%d)\n", task->t.regs.eax, err); uvesafb_free(task); } static int __devinit uvesafb_vbe_getinfo(struct uvesafb_ktask *task, struct uvesafb_par *par) { int err; task->t.regs.eax = 0x4f00; task->t.flags = TF_VBEIB; task->t.buf_len = sizeof(struct vbe_ib); task->buf = &par->vbe_ib; strncpy(par->vbe_ib.vbe_signature, "VBE2", 4); err = uvesafb_exec(task); if (err || (task->t.regs.eax & 0xffff) != 0x004f) { printk(KERN_ERR "uvesafb: Getting VBE info block failed " "(eax=0x%x, err=%d)\n", (u32)task->t.regs.eax, err); return -EINVAL; } if (par->vbe_ib.vbe_version < 0x0200) { printk(KERN_ERR "uvesafb: Sorry, pre-VBE 2.0 cards are " "not supported.\n"); return -EINVAL; } if (!par->vbe_ib.mode_list_ptr) { printk(KERN_ERR "uvesafb: Missing mode list!\n"); return -EINVAL; } printk(KERN_INFO "uvesafb: "); /* * Convert string pointers and the mode list pointer into * usable addresses. Print informational messages about the * video adapter and its vendor. */ if (par->vbe_ib.oem_vendor_name_ptr) printk("%s, ", ((char *)task->buf) + par->vbe_ib.oem_vendor_name_ptr); if (par->vbe_ib.oem_product_name_ptr) printk("%s, ", ((char *)task->buf) + par->vbe_ib.oem_product_name_ptr); if (par->vbe_ib.oem_product_rev_ptr) printk("%s, ", ((char *)task->buf) + par->vbe_ib.oem_product_rev_ptr); if (par->vbe_ib.oem_string_ptr) printk("OEM: %s, ", ((char *)task->buf) + par->vbe_ib.oem_string_ptr); printk("VBE v%d.%d\n", ((par->vbe_ib.vbe_version & 0xff00) >> 8), par->vbe_ib.vbe_version & 0xff); return 0; } static int __devinit uvesafb_vbe_getmodes(struct uvesafb_ktask *task, struct uvesafb_par *par) { int off = 0, err; u16 *mode; par->vbe_modes_cnt = 0; /* Count available modes. */ mode = (u16 *) (((u8 *)&par->vbe_ib) + par->vbe_ib.mode_list_ptr); while (*mode != 0xffff) { par->vbe_modes_cnt++; mode++; } par->vbe_modes = kzalloc(sizeof(struct vbe_mode_ib) * par->vbe_modes_cnt, GFP_KERNEL); if (!par->vbe_modes) return -ENOMEM; /* Get info about all available modes. */ mode = (u16 *) (((u8 *)&par->vbe_ib) + par->vbe_ib.mode_list_ptr); while (*mode != 0xffff) { struct vbe_mode_ib *mib; uvesafb_reset(task); task->t.regs.eax = 0x4f01; task->t.regs.ecx = (u32) *mode; task->t.flags = TF_BUF_RET | TF_BUF_ESDI; task->t.buf_len = sizeof(struct vbe_mode_ib); task->buf = par->vbe_modes + off; err = uvesafb_exec(task); if (err || (task->t.regs.eax & 0xffff) != 0x004f) { printk(KERN_WARNING "uvesafb: Getting mode info block " "for mode 0x%x failed (eax=0x%x, err=%d)\n", *mode, (u32)task->t.regs.eax, err); mode++; par->vbe_modes_cnt--; continue; } mib = task->buf; mib->mode_id = *mode; /* * We only want modes that are supported with the current * hardware configuration, color, graphics and that have * support for the LFB. */ if ((mib->mode_attr & VBE_MODE_MASK) == VBE_MODE_MASK && mib->bits_per_pixel >= 8) off++; else par->vbe_modes_cnt--; mode++; mib->depth = mib->red_len + mib->green_len + mib->blue_len; /* * Handle 8bpp modes and modes with broken color component * lengths. */ if (mib->depth == 0 || (mib->depth == 24 && mib->bits_per_pixel == 32)) mib->depth = mib->bits_per_pixel; } if (par->vbe_modes_cnt > 0) return 0; else return -EINVAL; } /* * The Protected Mode Interface is 32-bit x86 code, so we only run it on * x86 and not x86_64. */ #ifdef CONFIG_X86_32 static int __devinit uvesafb_vbe_getpmi(struct uvesafb_ktask *task, struct uvesafb_par *par) { int i, err; uvesafb_reset(task); task->t.regs.eax = 0x4f0a; task->t.regs.ebx = 0x0; err = uvesafb_exec(task); if ((task->t.regs.eax & 0xffff) != 0x4f || task->t.regs.es < 0xc000) { par->pmi_setpal = par->ypan = 0; } else { par->pmi_base = (u16 *)phys_to_virt(((u32)task->t.regs.es << 4) + task->t.regs.edi); par->pmi_start = (u8 *)par->pmi_base + par->pmi_base[1]; par->pmi_pal = (u8 *)par->pmi_base + par->pmi_base[2]; printk(KERN_INFO "uvesafb: protected mode interface info at " "%04x:%04x\n", (u16)task->t.regs.es, (u16)task->t.regs.edi); printk(KERN_INFO "uvesafb: pmi: set display start = %p, " "set palette = %p\n", par->pmi_start, par->pmi_pal); if (par->pmi_base[3]) { printk(KERN_INFO "uvesafb: pmi: ports = "); for (i = par->pmi_base[3]/2; par->pmi_base[i] != 0xffff; i++) printk("%x ", par->pmi_base[i]); printk("\n"); if (par->pmi_base[i] != 0xffff) { printk(KERN_INFO "uvesafb: can't handle memory" " requests, pmi disabled\n"); par->ypan = par->pmi_setpal = 0; } } } return 0; } #endif /* CONFIG_X86_32 */ /* * Check whether a video mode is supported by the Video BIOS and is * compatible with the monitor limits. */ static int __devinit uvesafb_is_valid_mode(struct fb_videomode *mode, struct fb_info *info) { if (info->monspecs.gtf) { fb_videomode_to_var(&info->var, mode); if (fb_validate_mode(&info->var, info)) return 0; } if (uvesafb_vbe_find_mode(info->par, mode->xres, mode->yres, 8, UVESAFB_EXACT_RES) == -1) return 0; return 1; } static int __devinit uvesafb_vbe_getedid(struct uvesafb_ktask *task, struct fb_info *info) { struct uvesafb_par *par = info->par; int err = 0; if (noedid || par->vbe_ib.vbe_version < 0x0300) return -EINVAL; task->t.regs.eax = 0x4f15; task->t.regs.ebx = 0; task->t.regs.ecx = 0; task->t.buf_len = 0; task->t.flags = 0; err = uvesafb_exec(task); if ((task->t.regs.eax & 0xffff) != 0x004f || err) return -EINVAL; if ((task->t.regs.ebx & 0x3) == 3) { printk(KERN_INFO "uvesafb: VBIOS/hardware supports both " "DDC1 and DDC2 transfers\n"); } else if ((task->t.regs.ebx & 0x3) == 2) { printk(KERN_INFO "uvesafb: VBIOS/hardware supports DDC2 " "transfers\n"); } else if ((task->t.regs.ebx & 0x3) == 1) { printk(KERN_INFO "uvesafb: VBIOS/hardware supports DDC1 " "transfers\n"); } else { printk(KERN_INFO "uvesafb: VBIOS/hardware doesn't support " "DDC transfers\n"); return -EINVAL; } task->t.regs.eax = 0x4f15; task->t.regs.ebx = 1; task->t.regs.ecx = task->t.regs.edx = 0; task->t.flags = TF_BUF_RET | TF_BUF_ESDI; task->t.buf_len = EDID_LENGTH; task->buf = kzalloc(EDID_LENGTH, GFP_KERNEL); err = uvesafb_exec(task); if ((task->t.regs.eax & 0xffff) == 0x004f && !err) { fb_edid_to_monspecs(task->buf, &info->monspecs); if (info->monspecs.vfmax && info->monspecs.hfmax) { /* * If the maximum pixel clock wasn't specified in * the EDID block, set it to 300 MHz. */ if (info->monspecs.dclkmax == 0) info->monspecs.dclkmax = 300 * 1000000; info->monspecs.gtf = 1; } } else { err = -EINVAL; } kfree(task->buf); return err; } static void __devinit uvesafb_vbe_getmonspecs(struct uvesafb_ktask *task, struct fb_info *info) { struct uvesafb_par *par = info->par; int i; memset(&info->monspecs, 0, sizeof(info->monspecs)); /* * If we don't get all necessary data from the EDID block, * mark it as incompatible with the GTF and set nocrtc so * that we always use the default BIOS refresh rate. */ if (uvesafb_vbe_getedid(task, info)) { info->monspecs.gtf = 0; par->nocrtc = 1; } /* Kernel command line overrides. */ if (maxclk) info->monspecs.dclkmax = maxclk * 1000000; if (maxvf) info->monspecs.vfmax = maxvf; if (maxhf) info->monspecs.hfmax = maxhf * 1000; /* * In case DDC transfers are not supported, the user can provide * monitor limits manually. Lower limits are set to "safe" values. */ if (info->monspecs.gtf == 0 && maxclk && maxvf && maxhf) { info->monspecs.dclkmin = 0; info->monspecs.vfmin = 60; info->monspecs.hfmin = 29000; info->monspecs.gtf = 1; par->nocrtc = 0; } if (info->monspecs.gtf) printk(KERN_INFO "uvesafb: monitor limits: vf = %d Hz, hf = %d kHz, " "clk = %d MHz\n", info->monspecs.vfmax, (int)(info->monspecs.hfmax / 1000), (int)(info->monspecs.dclkmax / 1000000)); else printk(KERN_INFO "uvesafb: no monitor limits have been set, " "default refresh rate will be used\n"); /* Add VBE modes to the modelist. */ for (i = 0; i < par->vbe_modes_cnt; i++) { struct fb_var_screeninfo var; struct vbe_mode_ib *mode; struct fb_videomode vmode; mode = &par->vbe_modes[i]; memset(&var, 0, sizeof(var)); var.xres = mode->x_res; var.yres = mode->y_res; fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, &var, info); fb_var_to_videomode(&vmode, &var); fb_add_videomode(&vmode, &info->modelist); } /* Add valid VESA modes to our modelist. */ for (i = 0; i < VESA_MODEDB_SIZE; i++) { if (uvesafb_is_valid_mode((struct fb_videomode *) &vesa_modes[i], info)) fb_add_videomode(&vesa_modes[i], &info->modelist); } for (i = 0; i < info->monspecs.modedb_len; i++) { if (uvesafb_is_valid_mode(&info->monspecs.modedb[i], info)) fb_add_videomode(&info->monspecs.modedb[i], &info->modelist); } return; } static void __devinit uvesafb_vbe_getstatesize(struct uvesafb_ktask *task, struct uvesafb_par *par) { int err; uvesafb_reset(task); /* * Get the VBE state buffer size. We want all available * hardware state data (CL = 0x0f). */ task->t.regs.eax = 0x4f04; task->t.regs.ecx = 0x000f; task->t.regs.edx = 0x0000; task->t.flags = 0; err = uvesafb_exec(task); if (err || (task->t.regs.eax & 0xffff) != 0x004f) { printk(KERN_WARNING "uvesafb: VBE state buffer size " "cannot be determined (eax=0x%x, err=%d)\n", task->t.regs.eax, err); par->vbe_state_size = 0; return; } par->vbe_state_size = 64 * (task->t.regs.ebx & 0xffff); } static int __devinit uvesafb_vbe_init(struct fb_info *info) { struct uvesafb_ktask *task = NULL; struct uvesafb_par *par = info->par; int err; task = uvesafb_prep(); if (!task) return -ENOMEM; err = uvesafb_vbe_getinfo(task, par); if (err) goto out; err = uvesafb_vbe_getmodes(task, par); if (err) goto out; par->nocrtc = nocrtc; #ifdef CONFIG_X86_32 par->pmi_setpal = pmi_setpal; par->ypan = ypan; if (par->pmi_setpal || par->ypan) { if (__supported_pte_mask & _PAGE_NX) { par->pmi_setpal = par->ypan = 0; printk(KERN_WARNING "uvesafb: NX protection is actively." "We have better not to use the PMI.\n"); } else { uvesafb_vbe_getpmi(task, par); } } #else /* The protected mode interface is not available on non-x86. */ par->pmi_setpal = par->ypan = 0; #endif INIT_LIST_HEAD(&info->modelist); uvesafb_vbe_getmonspecs(task, info); uvesafb_vbe_getstatesize(task, par); out: uvesafb_free(task); return err; } static int __devinit uvesafb_vbe_init_mode(struct fb_info *info) { struct list_head *pos; struct fb_modelist *modelist; struct fb_videomode *mode; struct uvesafb_par *par = info->par; int i, modeid; /* Has the user requested a specific VESA mode? */ if (vbemode) { for (i = 0; i < par->vbe_modes_cnt; i++) { if (par->vbe_modes[i].mode_id == vbemode) { modeid = i; uvesafb_setup_var(&info->var, info, &par->vbe_modes[modeid]); fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, &info->var, info); /* * With pixclock set to 0, the default BIOS * timings will be used in set_par(). */ info->var.pixclock = 0; goto gotmode; } } printk(KERN_INFO "uvesafb: requested VBE mode 0x%x is " "unavailable\n", vbemode); vbemode = 0; } /* Count the modes in the modelist */ i = 0; list_for_each(pos, &info->modelist) i++; /* * Convert the modelist into a modedb so that we can use it with * fb_find_mode(). */ mode = kzalloc(i * sizeof(*mode), GFP_KERNEL); if (mode) { i = 0; list_for_each(pos, &info->modelist) { modelist = list_entry(pos, struct fb_modelist, list); mode[i] = modelist->mode; i++; } if (!mode_option) mode_option = UVESAFB_DEFAULT_MODE; i = fb_find_mode(&info->var, info, mode_option, mode, i, NULL, 8); kfree(mode); } /* fb_find_mode() failed */ if (i == 0) { info->var.xres = 640; info->var.yres = 480; mode = (struct fb_videomode *) fb_find_best_mode(&info->var, &info->modelist); if (mode) { fb_videomode_to_var(&info->var, mode); } else { modeid = par->vbe_modes[0].mode_id; uvesafb_setup_var(&info->var, info, &par->vbe_modes[modeid]); fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, &info->var, info); goto gotmode; } } /* Look for a matching VBE mode. */ modeid = uvesafb_vbe_find_mode(par, info->var.xres, info->var.yres, info->var.bits_per_pixel, UVESAFB_EXACT_RES); if (modeid == -1) return -EINVAL; uvesafb_setup_var(&info->var, info, &par->vbe_modes[modeid]); gotmode: /* * If we are not VBE3.0+ compliant, we're done -- the BIOS will * ignore our timings anyway. */ if (par->vbe_ib.vbe_version < 0x0300 || par->nocrtc) fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, &info->var, info); return modeid; } static int uvesafb_setpalette(struct uvesafb_pal_entry *entries, int count, int start, struct fb_info *info) { struct uvesafb_ktask *task; #ifdef CONFIG_X86 struct uvesafb_par *par = info->par; int i = par->mode_idx; #endif int err = 0; /* * We support palette modifications for 8 bpp modes only, so * there can never be more than 256 entries. */ if (start + count > 256) return -EINVAL; #ifdef CONFIG_X86 /* Use VGA registers if mode is VGA-compatible. */ if (i >= 0 && i < par->vbe_modes_cnt && par->vbe_modes[i].mode_attr & VBE_MODE_VGACOMPAT) { for (i = 0; i < count; i++) { outb_p(start + i, dac_reg); outb_p(entries[i].red, dac_val); outb_p(entries[i].green, dac_val); outb_p(entries[i].blue, dac_val); } } #ifdef CONFIG_X86_32 else if (par->pmi_setpal) { __asm__ __volatile__( "call *(%%esi)" : /* no return value */ : "a" (0x4f09), /* EAX */ "b" (0), /* EBX */ "c" (count), /* ECX */ "d" (start), /* EDX */ "D" (entries), /* EDI */ "S" (&par->pmi_pal)); /* ESI */ } #endif /* CONFIG_X86_32 */ else #endif /* CONFIG_X86 */ { task = uvesafb_prep(); if (!task) return -ENOMEM; task->t.regs.eax = 0x4f09; task->t.regs.ebx = 0x0; task->t.regs.ecx = count; task->t.regs.edx = start; task->t.flags = TF_BUF_ESDI; task->t.buf_len = sizeof(struct uvesafb_pal_entry) * count; task->buf = entries; err = uvesafb_exec(task); if ((task->t.regs.eax & 0xffff) != 0x004f) err = 1; uvesafb_free(task); } return err; } static int uvesafb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info) { struct uvesafb_pal_entry entry; int shift = 16 - dac_width; int err = 0; if (regno >= info->cmap.len) return -EINVAL; if (info->var.bits_per_pixel == 8) { entry.red = red >> shift; entry.green = green >> shift; entry.blue = blue >> shift; entry.pad = 0; err = uvesafb_setpalette(&entry, 1, regno, info); } else if (regno < 16) { switch (info->var.bits_per_pixel) { case 16: if (info->var.red.offset == 10) { /* 1:5:5:5 */ ((u32 *) (info->pseudo_palette))[regno] = ((red & 0xf800) >> 1) | ((green & 0xf800) >> 6) | ((blue & 0xf800) >> 11); } else { /* 0:5:6:5 */ ((u32 *) (info->pseudo_palette))[regno] = ((red & 0xf800) ) | ((green & 0xfc00) >> 5) | ((blue & 0xf800) >> 11); } break; case 24: case 32: red >>= 8; green >>= 8; blue >>= 8; ((u32 *)(info->pseudo_palette))[regno] = (red << info->var.red.offset) | (green << info->var.green.offset) | (blue << info->var.blue.offset); break; } } return err; } static int uvesafb_setcmap(struct fb_cmap *cmap, struct fb_info *info) { struct uvesafb_pal_entry *entries; int shift = 16 - dac_width; int i, err = 0; if (info->var.bits_per_pixel == 8) { if (cmap->start + cmap->len > info->cmap.start + info->cmap.len || cmap->start < info->cmap.start) return -EINVAL; entries = kmalloc(sizeof(*entries) * cmap->len, GFP_KERNEL); if (!entries) return -ENOMEM; for (i = 0; i < cmap->len; i++) { entries[i].red = cmap->red[i] >> shift; entries[i].green = cmap->green[i] >> shift; entries[i].blue = cmap->blue[i] >> shift; entries[i].pad = 0; } err = uvesafb_setpalette(entries, cmap->len, cmap->start, info); kfree(entries); } else { /* * For modes with bpp > 8, we only set the pseudo palette in * the fb_info struct. We rely on uvesafb_setcolreg to do all * sanity checking. */ for (i = 0; i < cmap->len; i++) { err |= uvesafb_setcolreg(cmap->start + i, cmap->red[i], cmap->green[i], cmap->blue[i], 0, info); } } return err; } static int uvesafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) { #ifdef CONFIG_X86_32 int offset; struct uvesafb_par *par = info->par; offset = (var->yoffset * info->fix.line_length + var->xoffset) / 4; /* * It turns out it's not the best idea to do panning via vm86, * so we only allow it if we have a PMI. */ if (par->pmi_start) { __asm__ __volatile__( "call *(%%edi)" : /* no return value */ : "a" (0x4f07), /* EAX */ "b" (0), /* EBX */ "c" (offset), /* ECX */ "d" (offset >> 16), /* EDX */ "D" (&par->pmi_start)); /* EDI */ } #endif return 0; } static int uvesafb_blank(int blank, struct fb_info *info) { struct uvesafb_ktask *task; int err = 1; #ifdef CONFIG_X86 struct uvesafb_par *par = info->par; if (par->vbe_ib.capabilities & VBE_CAP_VGACOMPAT) { int loop = 10000; u8 seq = 0, crtc17 = 0; if (blank == FB_BLANK_POWERDOWN) { seq = 0x20; crtc17 = 0x00; err = 0; } else { seq = 0x00; crtc17 = 0x80; err = (blank == FB_BLANK_UNBLANK) ? 0 : -EINVAL; } vga_wseq(NULL, 0x00, 0x01); seq |= vga_rseq(NULL, 0x01) & ~0x20; vga_wseq(NULL, 0x00, seq); crtc17 |= vga_rcrt(NULL, 0x17) & ~0x80; while (loop--); vga_wcrt(NULL, 0x17, crtc17); vga_wseq(NULL, 0x00, 0x03); } else #endif /* CONFIG_X86 */ { task = uvesafb_prep(); if (!task) return -ENOMEM; task->t.regs.eax = 0x4f10; switch (blank) { case FB_BLANK_UNBLANK: task->t.regs.ebx = 0x0001; break; case FB_BLANK_NORMAL: task->t.regs.ebx = 0x0101; /* standby */ break; case FB_BLANK_POWERDOWN: task->t.regs.ebx = 0x0401; /* powerdown */ break; default: goto out; } err = uvesafb_exec(task); if (err || (task->t.regs.eax & 0xffff) != 0x004f) err = 1; out: uvesafb_free(task); } return err; } static int uvesafb_open(struct fb_info *info, int user) { struct uvesafb_par *par = info->par; int cnt = atomic_read(&par->ref_count); if (!cnt && par->vbe_state_size) par->vbe_state_orig = uvesafb_vbe_state_save(par); atomic_inc(&par->ref_count); return 0; } static int uvesafb_release(struct fb_info *info, int user) { struct uvesafb_ktask *task = NULL; struct uvesafb_par *par = info->par; int cnt = atomic_read(&par->ref_count); if (!cnt) return -EINVAL; if (cnt != 1) goto out; task = uvesafb_prep(); if (!task) goto out; /* First, try to set the standard 80x25 text mode. */ task->t.regs.eax = 0x0003; uvesafb_exec(task); /* * Now try to restore whatever hardware state we might have * saved when the fb device was first opened. */ uvesafb_vbe_state_restore(par, par->vbe_state_orig); out: atomic_dec(&par->ref_count); if (task) uvesafb_free(task); return 0; } static int uvesafb_set_par(struct fb_info *info) { struct uvesafb_par *par = info->par; struct uvesafb_ktask *task = NULL; struct vbe_crtc_ib *crtc = NULL; struct vbe_mode_ib *mode = NULL; int i, err = 0, depth = info->var.bits_per_pixel; if (depth > 8 && depth != 32) depth = info->var.red.length + info->var.green.length + info->var.blue.length; i = uvesafb_vbe_find_mode(par, info->var.xres, info->var.yres, depth, UVESAFB_EXACT_RES | UVESAFB_EXACT_DEPTH); if (i >= 0) mode = &par->vbe_modes[i]; else return -EINVAL; task = uvesafb_prep(); if (!task) return -ENOMEM; setmode: task->t.regs.eax = 0x4f02; task->t.regs.ebx = mode->mode_id | 0x4000; /* use LFB */ if (par->vbe_ib.vbe_version >= 0x0300 && !par->nocrtc && info->var.pixclock != 0) { task->t.regs.ebx |= 0x0800; /* use CRTC data */ task->t.flags = TF_BUF_ESDI; crtc = kzalloc(sizeof(struct vbe_crtc_ib), GFP_KERNEL); if (!crtc) { err = -ENOMEM; goto out; } crtc->horiz_start = info->var.xres + info->var.right_margin; crtc->horiz_end = crtc->horiz_start + info->var.hsync_len; crtc->horiz_total = crtc->horiz_end + info->var.left_margin; crtc->vert_start = info->var.yres + info->var.lower_margin; crtc->vert_end = crtc->vert_start + info->var.vsync_len; crtc->vert_total = crtc->vert_end + info->var.upper_margin; crtc->pixel_clock = PICOS2KHZ(info->var.pixclock) * 1000; crtc->refresh_rate = (u16)(100 * (crtc->pixel_clock / (crtc->vert_total * crtc->horiz_total))); if (info->var.vmode & FB_VMODE_DOUBLE) crtc->flags |= 0x1; if (info->var.vmode & FB_VMODE_INTERLACED) crtc->flags |= 0x2; if (!(info->var.sync & FB_SYNC_HOR_HIGH_ACT)) crtc->flags |= 0x4; if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT)) crtc->flags |= 0x8; memcpy(&par->crtc, crtc, sizeof(*crtc)); } else { memset(&par->crtc, 0, sizeof(*crtc)); } task->t.buf_len = sizeof(struct vbe_crtc_ib); task->buf = &par->crtc; err = uvesafb_exec(task); if (err || (task->t.regs.eax & 0xffff) != 0x004f) { /* * The mode switch might have failed because we tried to * use our own timings. Try again with the default timings. */ if (crtc != NULL) { printk(KERN_WARNING "uvesafb: mode switch failed " "(eax=0x%x, err=%d). Trying again with " "default timings.\n", task->t.regs.eax, err); uvesafb_reset(task); kfree(crtc); crtc = NULL; info->var.pixclock = 0; goto setmode; } else { printk(KERN_ERR "uvesafb: mode switch failed (eax=" "0x%x, err=%d)\n", task->t.regs.eax, err); err = -EINVAL; goto out; } } par->mode_idx = i; /* For 8bpp modes, always try to set the DAC to 8 bits. */ if (par->vbe_ib.capabilities & VBE_CAP_CAN_SWITCH_DAC && mode->bits_per_pixel <= 8) { uvesafb_reset(task); task->t.regs.eax = 0x4f08; task->t.regs.ebx = 0x0800; err = uvesafb_exec(task); if (err || (task->t.regs.eax & 0xffff) != 0x004f || ((task->t.regs.ebx & 0xff00) >> 8) != 8) { dac_width = 6; } else { dac_width = 8; } } info->fix.visual = (info->var.bits_per_pixel == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; info->fix.line_length = mode->bytes_per_scan_line; out: if (crtc != NULL) kfree(crtc); uvesafb_free(task); return err; } static void uvesafb_check_limits(struct fb_var_screeninfo *var, struct fb_info *info) { const struct fb_videomode *mode; struct uvesafb_par *par = info->par; /* * If pixclock is set to 0, then we're using default BIOS timings * and thus don't have to perform any checks here. */ if (!var->pixclock) return; if (par->vbe_ib.vbe_version < 0x0300) { fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, 60, var, info); return; } if (!fb_validate_mode(var, info)) return; mode = fb_find_best_mode(var, &info->modelist); if (mode) { if (mode->xres == var->xres && mode->yres == var->yres && !(mode->vmode & (FB_VMODE_INTERLACED | FB_VMODE_DOUBLE))) { fb_videomode_to_var(var, mode); return; } } if (info->monspecs.gtf && !fb_get_mode(FB_MAXTIMINGS, 0, var, info)) return; /* Use default refresh rate */ var->pixclock = 0; } static int uvesafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) { struct uvesafb_par *par = info->par; struct vbe_mode_ib *mode = NULL; int match = -1; int depth = var->red.length + var->green.length + var->blue.length; /* * Various apps will use bits_per_pixel to set the color depth, * which is theoretically incorrect, but which we'll try to handle * here. */ if (depth == 0 || abs(depth - var->bits_per_pixel) >= 8) depth = var->bits_per_pixel; match = uvesafb_vbe_find_mode(par, var->xres, var->yres, depth, UVESAFB_EXACT_RES); if (match == -1) return -EINVAL; mode = &par->vbe_modes[match]; uvesafb_setup_var(var, info, mode); /* * Check whether we have remapped enough memory for this mode. * We might be called at an early stage, when we haven't remapped * any memory yet, in which case we simply skip the check. */ if (var->yres * mode->bytes_per_scan_line > info->fix.smem_len && info->fix.smem_len) return -EINVAL; if ((var->vmode & FB_VMODE_DOUBLE) && !(par->vbe_modes[match].mode_attr & 0x100)) var->vmode &= ~FB_VMODE_DOUBLE; if ((var->vmode & FB_VMODE_INTERLACED) && !(par->vbe_modes[match].mode_attr & 0x200)) var->vmode &= ~FB_VMODE_INTERLACED; uvesafb_check_limits(var, info); var->xres_virtual = var->xres; var->yres_virtual = (par->ypan) ? info->fix.smem_len / mode->bytes_per_scan_line : var->yres; return 0; } static struct fb_ops uvesafb_ops = { .owner = THIS_MODULE, .fb_open = uvesafb_open, .fb_release = uvesafb_release, .fb_setcolreg = uvesafb_setcolreg, .fb_setcmap = uvesafb_setcmap, .fb_pan_display = uvesafb_pan_display, .fb_blank = uvesafb_blank, .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, .fb_check_var = uvesafb_check_var, .fb_set_par = uvesafb_set_par, }; static void __devinit uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode) { unsigned int size_vmode; unsigned int size_remap; unsigned int size_total; struct uvesafb_par *par = info->par; int i, h; info->pseudo_palette = ((u8 *)info->par + sizeof(struct uvesafb_par)); info->fix = uvesafb_fix; info->fix.ypanstep = par->ypan ? 1 : 0; info->fix.ywrapstep = (par->ypan > 1) ? 1 : 0; /* Disable blanking if the user requested so. */ if (!blank) info->fbops->fb_blank = NULL; /* * Find out how much IO memory is required for the mode with * the highest resolution. */ size_remap = 0; for (i = 0; i < par->vbe_modes_cnt; i++) { h = par->vbe_modes[i].bytes_per_scan_line * par->vbe_modes[i].y_res; if (h > size_remap) size_remap = h; } size_remap *= 2; /* * size_vmode -- that is the amount of memory needed for the * used video mode, i.e. the minimum amount of * memory we need. */ if (mode != NULL) { size_vmode = info->var.yres * mode->bytes_per_scan_line; } else { size_vmode = info->var.yres * info->var.xres * ((info->var.bits_per_pixel + 7) >> 3); } /* * size_total -- all video memory we have. Used for mtrr * entries, resource allocation and bounds * checking. */ size_total = par->vbe_ib.total_memory * 65536; if (vram_total) size_total = vram_total * 1024 * 1024; if (size_total < size_vmode) size_total = size_vmode; /* * size_remap -- the amount of video memory we are going to * use for vesafb. With modern cards it is no * option to simply use size_total as th * wastes plenty of kernel address space. */ if (vram_remap) size_remap = vram_remap * 1024 * 1024; if (size_remap < size_vmode) size_remap = size_vmode; if (size_remap > size_total) size_remap = size_total; info->fix.smem_len = size_remap; info->fix.smem_start = mode->phys_base_ptr; /* * We have to set yres_virtual here because when setup_var() was * called, smem_len wasn't defined yet. */ info->var.yres_virtual = info->fix.smem_len / mode->bytes_per_scan_line; if (par->ypan && info->var.yres_virtual > info->var.yres) { printk(KERN_INFO "uvesafb: scrolling: %s " "using protected mode interface, " "yres_virtual=%d\n", (par->ypan > 1) ? "ywrap" : "ypan", info->var.yres_virtual); } else { printk(KERN_INFO "uvesafb: scrolling: redraw\n"); info->var.yres_virtual = info->var.yres; par->ypan = 0; } info->flags = FBINFO_FLAG_DEFAULT | (par->ypan ? FBINFO_HWACCEL_YPAN : 0); if (!par->ypan) info->fbops->fb_pan_display = NULL; } static void __devinit uvesafb_init_mtrr(struct fb_info *info) { #ifdef CONFIG_MTRR if (mtrr && !(info->fix.smem_start & (PAGE_SIZE - 1))) { int temp_size = info->fix.smem_len; unsigned int type = 0; switch (mtrr) { case 1: type = MTRR_TYPE_UNCACHABLE; break; case 2: type = MTRR_TYPE_WRBACK; break; case 3: type = MTRR_TYPE_WRCOMB; break; case 4: type = MTRR_TYPE_WRTHROUGH; break; default: type = 0; break; } if (type) { int rc; /* Find the largest power-of-two */ temp_size = roundup_pow_of_two(temp_size); /* Try and find a power of two to add */ do { rc = mtrr_add(info->fix.smem_start, temp_size, type, 1); temp_size >>= 1; } while (temp_size >= PAGE_SIZE && rc == -EINVAL); } } #endif /* CONFIG_MTRR */ } static void __devinit uvesafb_ioremap(struct fb_info *info) { #ifdef CONFIG_X86 switch (mtrr) { case 1: /* uncachable */ info->screen_base = ioremap_nocache(info->fix.smem_start, info->fix.smem_len); break; case 2: /* write-back */ info->screen_base = ioremap_cache(info->fix.smem_start, info->fix.smem_len); break; case 3: /* write-combining */ info->screen_base = ioremap_wc(info->fix.smem_start, info->fix.smem_len); break; case 4: /* write-through */ default: info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); break; } #else info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len); #endif /* CONFIG_X86 */ } static ssize_t uvesafb_show_vbe_ver(struct device *dev, struct device_attribute *attr, char *buf) { struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); struct uvesafb_par *par = info->par; return snprintf(buf, PAGE_SIZE, "%.4x\n", par->vbe_ib.vbe_version); } static DEVICE_ATTR(vbe_version, S_IRUGO, uvesafb_show_vbe_ver, NULL); static ssize_t uvesafb_show_vbe_modes(struct device *dev, struct device_attribute *attr, char *buf) { struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); struct uvesafb_par *par = info->par; int ret = 0, i; for (i = 0; i < par->vbe_modes_cnt && ret < PAGE_SIZE; i++) { ret += snprintf(buf + ret, PAGE_SIZE - ret, "%dx%d-%d, 0x%.4x\n", par->vbe_modes[i].x_res, par->vbe_modes[i].y_res, par->vbe_modes[i].depth, par->vbe_modes[i].mode_id); } return ret; } static DEVICE_ATTR(vbe_modes, S_IRUGO, uvesafb_show_vbe_modes, NULL); static ssize_t uvesafb_show_vendor(struct device *dev, struct device_attribute *attr, char *buf) { struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); struct uvesafb_par *par = info->par; if (par->vbe_ib.oem_vendor_name_ptr) return snprintf(buf, PAGE_SIZE, "%s\n", (char *) (&par->vbe_ib) + par->vbe_ib.oem_vendor_name_ptr); else return 0; } static DEVICE_ATTR(oem_vendor, S_IRUGO, uvesafb_show_vendor, NULL); static ssize_t uvesafb_show_product_name(struct device *dev, struct device_attribute *attr, char *buf) { struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); struct uvesafb_par *par = info->par; if (par->vbe_ib.oem_product_name_ptr) return snprintf(buf, PAGE_SIZE, "%s\n", (char *) (&par->vbe_ib) + par->vbe_ib.oem_product_name_ptr); else return 0; } static DEVICE_ATTR(oem_product_name, S_IRUGO, uvesafb_show_product_name, NULL); static ssize_t uvesafb_show_product_rev(struct device *dev, struct device_attribute *attr, char *buf) { struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); struct uvesafb_par *par = info->par; if (par->vbe_ib.oem_product_rev_ptr) return snprintf(buf, PAGE_SIZE, "%s\n", (char *) (&par->vbe_ib) + par->vbe_ib.oem_product_rev_ptr); else return 0; } static DEVICE_ATTR(oem_product_rev, S_IRUGO, uvesafb_show_product_rev, NULL); static ssize_t uvesafb_show_oem_string(struct device *dev, struct device_attribute *attr, char *buf) { struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); struct uvesafb_par *par = info->par; if (par->vbe_ib.oem_string_ptr) return snprintf(buf, PAGE_SIZE, "%s\n", (char *)(&par->vbe_ib) + par->vbe_ib.oem_string_ptr); else return 0; } static DEVICE_ATTR(oem_string, S_IRUGO, uvesafb_show_oem_string, NULL); static ssize_t uvesafb_show_nocrtc(struct device *dev, struct device_attribute *attr, char *buf) { struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); struct uvesafb_par *par = info->par; return snprintf(buf, PAGE_SIZE, "%d\n", par->nocrtc); } static ssize_t uvesafb_store_nocrtc(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); struct uvesafb_par *par = info->par; if (count > 0) { if (buf[0] == '0') par->nocrtc = 0; else par->nocrtc = 1; } return count; } static DEVICE_ATTR(nocrtc, S_IRUGO | S_IWUSR, uvesafb_show_nocrtc, uvesafb_store_nocrtc); static struct attribute *uvesafb_dev_attrs[] = { &dev_attr_vbe_version.attr, &dev_attr_vbe_modes.attr, &dev_attr_oem_vendor.attr, &dev_attr_oem_product_name.attr, &dev_attr_oem_product_rev.attr, &dev_attr_oem_string.attr, &dev_attr_nocrtc.attr, NULL, }; static struct attribute_group uvesafb_dev_attgrp = { .name = NULL, .attrs = uvesafb_dev_attrs, }; static int __devinit uvesafb_probe(struct platform_device *dev) { struct fb_info *info; struct vbe_mode_ib *mode = NULL; struct uvesafb_par *par; int err = 0, i; info = framebuffer_alloc(sizeof(*par) + sizeof(u32) * 256, &dev->dev); if (!info) return -ENOMEM; par = info->par; err = uvesafb_vbe_init(info); if (err) { printk(KERN_ERR "uvesafb: vbe_init() failed with %d\n", err); goto out; } info->fbops = &uvesafb_ops; i = uvesafb_vbe_init_mode(info); if (i < 0) { err = -EINVAL; goto out; } else { mode = &par->vbe_modes[i]; } if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { err = -ENXIO; goto out; } uvesafb_init_info(info, mode); if (!request_region(0x3c0, 32, "uvesafb")) { printk(KERN_ERR "uvesafb: request region 0x3c0-0x3e0 failed\n"); err = -EIO; goto out_mode; } if (!request_mem_region(info->fix.smem_start, info->fix.smem_len, "uvesafb")) { printk(KERN_ERR "uvesafb: cannot reserve video memory at " "0x%lx\n", info->fix.smem_start); err = -EIO; goto out_reg; } uvesafb_init_mtrr(info); uvesafb_ioremap(info); if (!info->screen_base) { printk(KERN_ERR "uvesafb: abort, cannot ioremap 0x%x bytes of video " "memory at 0x%lx\n", info->fix.smem_len, info->fix.smem_start); err = -EIO; goto out_mem; } platform_set_drvdata(dev, info); if (register_framebuffer(info) < 0) { printk(KERN_ERR "uvesafb: failed to register framebuffer device\n"); err = -EINVAL; goto out_unmap; } printk(KERN_INFO "uvesafb: framebuffer at 0x%lx, mapped to 0x%p, " "using %dk, total %dk\n", info->fix.smem_start, info->screen_base, info->fix.smem_len/1024, par->vbe_ib.total_memory * 64); printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node, info->fix.id); err = sysfs_create_group(&dev->dev.kobj, &uvesafb_dev_attgrp); if (err != 0) printk(KERN_WARNING "fb%d: failed to register attributes\n", info->node); return 0; out_unmap: iounmap(info->screen_base); out_mem: release_mem_region(info->fix.smem_start, info->fix.smem_len); out_reg: release_region(0x3c0, 32); out_mode: if (!list_empty(&info->modelist)) fb_destroy_modelist(&info->modelist); fb_destroy_modedb(info->monspecs.modedb); fb_dealloc_cmap(&info->cmap); out: if (par->vbe_modes) kfree(par->vbe_modes); framebuffer_release(info); return err; } static int uvesafb_remove(struct platform_device *dev) { struct fb_info *info = platform_get_drvdata(dev); if (info) { struct uvesafb_par *par = info->par; sysfs_remove_group(&dev->dev.kobj, &uvesafb_dev_attgrp); unregister_framebuffer(info); release_region(0x3c0, 32); iounmap(info->screen_base); release_mem_region(info->fix.smem_start, info->fix.smem_len); fb_destroy_modedb(info->monspecs.modedb); fb_dealloc_cmap(&info->cmap); if (par) { if (par->vbe_modes) kfree(par->vbe_modes); if (par->vbe_state_orig) kfree(par->vbe_state_orig); if (par->vbe_state_saved) kfree(par->vbe_state_saved); } framebuffer_release(info); } return 0; } static struct platform_driver uvesafb_driver = { .probe = uvesafb_probe, .remove = uvesafb_remove, .driver = { .name = "uvesafb", }, }; static struct platform_device *uvesafb_device; #ifndef MODULE static int __devinit uvesafb_setup(char *options) { char *this_opt; if (!options || !*options) return 0; while ((this_opt = strsep(&options, ",")) != NULL) { if (!*this_opt) continue; if (!strcmp(this_opt, "redraw")) ypan = 0; else if (!strcmp(this_opt, "ypan")) ypan = 1; else if (!strcmp(this_opt, "ywrap")) ypan = 2; else if (!strcmp(this_opt, "vgapal")) pmi_setpal = 0; else if (!strcmp(this_opt, "pmipal")) pmi_setpal = 1; else if (!strncmp(this_opt, "mtrr:", 5)) mtrr = simple_strtoul(this_opt+5, NULL, 0); else if (!strcmp(this_opt, "nomtrr")) mtrr = 0; else if (!strcmp(this_opt, "nocrtc")) nocrtc = 1; else if (!strcmp(this_opt, "noedid")) noedid = 1; else if (!strcmp(this_opt, "noblank")) blank = 0; else if (!strncmp(this_opt, "vtotal:", 7)) vram_total = simple_strtoul(this_opt + 7, NULL, 0); else if (!strncmp(this_opt, "vremap:", 7)) vram_remap = simple_strtoul(this_opt + 7, NULL, 0); else if (!strncmp(this_opt, "maxhf:", 6)) maxhf = simple_strtoul(this_opt + 6, NULL, 0); else if (!strncmp(this_opt, "maxvf:", 6)) maxvf = simple_strtoul(this_opt + 6, NULL, 0); else if (!strncmp(this_opt, "maxclk:", 7)) maxclk = simple_strtoul(this_opt + 7, NULL, 0); else if (!strncmp(this_opt, "vbemode:", 8)) vbemode = simple_strtoul(this_opt + 8, NULL, 0); else if (this_opt[0] >= '0' && this_opt[0] <= '9') { mode_option = this_opt; } else { printk(KERN_WARNING "uvesafb: unrecognized option %s\n", this_opt); } } return 0; } #endif /* !MODULE */ static ssize_t show_v86d(struct device_driver *dev, char *buf) { return snprintf(buf, PAGE_SIZE, "%s\n", v86d_path); } static ssize_t store_v86d(struct device_driver *dev, const char *buf, size_t count) { strncpy(v86d_path, buf, PATH_MAX); return count; } static DRIVER_ATTR(v86d, S_IRUGO | S_IWUSR, show_v86d, store_v86d); static int __devinit uvesafb_init(void) { int err; #ifndef MODULE char *option = NULL; if (fb_get_options("uvesafb", &option)) return -ENODEV; uvesafb_setup(option); #endif err = cn_add_callback(&uvesafb_cn_id, "uvesafb", uvesafb_cn_callback); if (err) return err; err = platform_driver_register(&uvesafb_driver); if (!err) { uvesafb_device = platform_device_alloc("uvesafb", 0); if (uvesafb_device) err = platform_device_add(uvesafb_device); else err = -ENOMEM; if (err) { platform_device_put(uvesafb_device); platform_driver_unregister(&uvesafb_driver); cn_del_callback(&uvesafb_cn_id); return err; } err = driver_create_file(&uvesafb_driver.driver, &driver_attr_v86d); if (err) { printk(KERN_WARNING "uvesafb: failed to register " "attributes\n"); err = 0; } } return err; } module_init(uvesafb_init); static void __devexit uvesafb_exit(void) { struct uvesafb_ktask *task; if (v86d_started) { task = uvesafb_prep(); if (task) { task->t.flags = TF_EXIT; uvesafb_exec(task); uvesafb_free(task); } } cn_del_callback(&uvesafb_cn_id); driver_remove_file(&uvesafb_driver.driver, &driver_attr_v86d); platform_device_unregister(uvesafb_device); platform_driver_unregister(&uvesafb_driver); } module_exit(uvesafb_exit); static int param_set_scroll(const char *val, const struct kernel_param *kp) { ypan = 0; if (!strcmp(val, "redraw")) ypan = 0; else if (!strcmp(val, "ypan")) ypan = 1; else if (!strcmp(val, "ywrap")) ypan = 2; else return -EINVAL; return 0; } static struct kernel_param_ops param_ops_scroll = { .set = param_set_scroll, }; #define param_check_scroll(name, p) __param_check(name, p, void) module_param_named(scroll, ypan, scroll, 0); MODULE_PARM_DESC(scroll, "Scrolling mode, set to 'redraw', 'ypan', or 'ywrap'"); module_param_named(vgapal, pmi_setpal, invbool, 0); MODULE_PARM_DESC(vgapal, "Set palette using VGA registers"); module_param_named(pmipal, pmi_setpal, bool, 0); MODULE_PARM_DESC(pmipal, "Set palette using PMI calls"); module_param(mtrr, uint, 0); MODULE_PARM_DESC(mtrr, "Memory Type Range Registers setting. Use 0 to disable."); module_param(blank, bool, 0); MODULE_PARM_DESC(blank, "Enable hardware blanking"); module_param(nocrtc, bool, 0); MODULE_PARM_DESC(nocrtc, "Ignore CRTC timings when setting modes"); module_param(noedid, bool, 0); MODULE_PARM_DESC(noedid, "Ignore EDID-provided monitor limits when setting modes"); module_param(vram_remap, uint, 0); MODULE_PARM_DESC(vram_remap, "Set amount of video memory to be used [MiB]"); module_param(vram_total, uint, 0); MODULE_PARM_DESC(vram_total, "Set total amount of video memoery [MiB]"); module_param(maxclk, ushort, 0); MODULE_PARM_DESC(maxclk, "Maximum pixelclock [MHz], overrides EDID data"); module_param(maxhf, ushort, 0); MODULE_PARM_DESC(maxhf, "Maximum horizontal frequency [kHz], overrides EDID data"); module_param(maxvf, ushort, 0); MODULE_PARM_DESC(maxvf, "Maximum vertical frequency [Hz], overrides EDID data"); module_param(mode_option, charp, 0); MODULE_PARM_DESC(mode_option, "Specify initial video mode as \"<xres>x<yres>[-<bpp>][@<refresh>]\""); module_param(vbemode, ushort, 0); MODULE_PARM_DESC(vbemode, "VBE mode number to set, overrides the 'mode' option"); module_param_string(v86d, v86d_path, PATH_MAX, 0660); MODULE_PARM_DESC(v86d, "Path to the v86d userspace helper."); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Michal Januszewski <spock@gentoo.org>"); MODULE_DESCRIPTION("Framebuffer driver for VBE2.0+ compliant graphics boards");
manveru0/FeaCore_Phoenix_S3
drivers/video/uvesafb.c
C
gpl-2.0
52,031
24.135749
82
0.633718
false
/** * 对公众平台发送给公众账号的消息加解密示例代码. * * @copyright Copyright (c) 1998-2014 Tencent Inc. */ // ------------------------------------------------------------------------ package com.weixin.sdk.encrypt; import java.security.MessageDigest; import java.util.Arrays; /** * SHA1 class * * 计算公众平台的消息签名接口. */ class SHA1 { /** * 用SHA1算法生成安全签名 * @param token 票据 * @param timestamp 时间戳 * @param nonce 随机字符串 * @param encrypt 密文 * @return 安全签名 * @throws AesException */ public static String getSHA1(String token, String timestamp, String nonce, String encrypt) throws AesException { try { String[] array = new String[] { token, timestamp, nonce, encrypt }; StringBuffer sb = new StringBuffer(); // 字符串排序 Arrays.sort(array); for (int i = 0; i < 4; i++) { sb.append(array[i]); } String str = sb.toString(); // SHA1签名生成 MessageDigest md = MessageDigest.getInstance("SHA-1"); md.update(str.getBytes()); byte[] digest = md.digest(); StringBuffer hexstr = new StringBuffer(); String shaHex = ""; for (int i = 0; i < digest.length; i++) { shaHex = Integer.toHexString(digest[i] & 0xFF); if (shaHex.length() < 2) { hexstr.append(0); } hexstr.append(shaHex); } return hexstr.toString(); } catch (Exception e) { e.printStackTrace(); throw new AesException(AesException.ComputeSignatureError); } } }
teabo/wholly-framework
wholly-demo/wholly_weixin/src/main/java/com/weixin/sdk/encrypt/SHA1.java
Java
gpl-2.0
1,592
21.836066
111
0.578404
false
/* Copyright (C) 2015 Panagiotis Roubatsis 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* * Created by Panagiotis Roubatsis * * Description: A single adjacency for the adjacency list. */ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Map_Creator { class MapAdjacency { public int destIndex; public int cost; public bool invisible; public MapAdjacency(int dest, int cost, bool invisible) { this.destIndex = dest; this.cost = cost; this.invisible = invisible; } } }
proubatsis/Map-Creator
Map Creator/MapAdjacency.cs
C#
gpl-2.0
1,312
28.111111
75
0.68855
false
set term ^; CREATE OR ALTER PROCEDURE RELDRE( PDTA1 DATE , PDTA2 DATE, PCC INTEGER ) -- ATS Soluções 11/03/2009 RETURNS ( CONTA VARCHAR( 30 ) , DESC_CONTA VARCHAR( 80 ) , CREDITO DOUBLE PRECISION , TOTAL DOUBLE PRECISION , ACUMULA DOUBLE PRECISION , TOT CHAR( 1 ) ) AS DECLARE VARIABLE CODREC INTEGER; DECLARE VARIABLE CODP INTEGER; DECLARE VARIABLE CENTROPERDA INTEGER; DECLARE VARIABLE CONTAJURO VARCHAR(60); DECLARE VARIABLE CONTAPASSIVO VARCHAR(60); DECLARE VARIABLE CONTACOMISSAO integer; -- Codigo da Conta DECLARE VARIABLE CONTAIMPOSTOVENDA integer; -- Codigo da Conta DECLARE VARIABLE TOTALIZA Double precision; DECLARE VARIABLE TOTALREC Double precision = 0; DECLARE VARIABLE TOTAL Double precision = 0; DECLARE VARIABLE custoMatPrima Double precision = 0; DECLARE VARIABLE QTDE Double precision = 0; DECLARE VARIABLE produt VARCHAR(300); DECLARE VARIABLE linha VARCHAR(60); DECLARE VARIABLE jaPassou CHAR(1); DECLARE VARIABLE CONTAPAI VARCHAR(15); DECLARE VARIABLE EstoqueIni Double precision = 0; DECLARE VARIABLE EstoqueFim Double precision = 0; DECLARE VARIABLE Compras Double precision = 0; DECLARE VARIABLE Desconto Double precision = 0; BEGIN -- TOT -----> A = Negrito / Valor Null, S = Negrito com Valor, N = Normal sem valor linha = 'nada'; jaPassou = 'N'; /* Busca o CENTRO DE CUSTO usado para Lixo e Descartes */ SELECT DADOS FROM PARAMETRO WHERE PARAMETRO = 'CENTRO PERDA' INTO :CENTROPERDA; IF (CENTROPERDA IS NULL) THEN CENTROPERDA = 0; /* Busca a Conta Principal de lançamento Desp. Juros. */ CONTAJURO = '4.1.1.01'; SELECT DADOS FROM PARAMETRO WHERE PARAMETRO = 'CONTASDESPESAJUROS' INTO :CONTAJURO; /* Busca a Conta Principal de lançamento Desp. COMISSAO. */ contaComissao = null; SELECT CAST(DADOS as INTEGER) FROM PARAMETRO WHERE PARAMETRO = 'CONTACOMISSAO' INTO :CONTACOMISSAO; IF (CONTACOMISSAO IS NULL) THEN CONTACOMISSAO = 0; /* Busca a Conta PASSIVO. */ contaPassivo = null; SELECT CAST(DADOS as INTEGER) FROM PARAMETRO WHERE PARAMETRO = 'CONTASPASSIVO' INTO :CONTAPASSIVO; IF (CONTAPASSIVO IS NULL) THEN CONTAPASSIVO = 0; /* Busca a Conta Principal de lançamento Impostos Sobre Venda*/ contaImpostoVenda = null; SELECT CAST(DADOS as INTEGER) FROM PARAMETRO WHERE PARAMETRO = 'CONTAIMPOSTOVENDA' INTO :CONTAIMPOSTOVENDA; /* ########### Gerando a Receita ############*/ /* Receitas Vendas OS */ DESC_CONTA = 'Receitas operacionais'; CONTA = null; CREDITO = null; SUSPEND; TOTALIZA = 0; TOTAL = 0; select sum(md.valTotal) FROM MOVIMENTO mov inner join MOVIMENTODETALHE md on md.CODMOVIMENTO = mov.CODMOVIMENTO inner join VENDA ven on ven.CODMOVIMENTO = mov.CODMOVIMENTO inner join PRODUTOS prod on prod.CODPRODUTO = md.CODPRODUTO where (mov.codnatureza = 3) and (ven.DATAVENDA between :PDTA1 AND :PDTA2) and ((PROD.TIPO <> 'SERV') OR (PROD.TIPO IS NULL)) and ((ven.CODCCUSTO = :PCC) OR (:PCC = 0)) INTO :CREDITO; select sum(md.valTotal*((case when md.qtde_alt is null then 0 else md.qtde_alt end)/100)) FROM MOVIMENTO mov inner join MOVIMENTODETALHE md on md.CODMOVIMENTO = mov.CODMOVIMENTO inner join VENDA ven on ven.CODMOVIMENTO = mov.CODMOVIMENTO inner join PRODUTOS prod on prod.CODPRODUTO = md.CODPRODUTO where (mov.codnatureza = 3) and (ven.DATAVENDA between :PDTA1 AND :PDTA2) and ((PROD.TIPO <> 'SERV') OR (PROD.TIPO IS NULL)) and ((ven.CODCCUSTO = :PCC) OR (:PCC = 0)) INTO :desconto; if (desconto is null) then desconto = 0; IF (CREDITO IS NULL) THEN CREDITO = 0; CREDITO = CREDITO-desconto; DESC_CONTA = ' Faturamento do Mês'; TOTALIZA = TOTALIZA + CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; SUSPEND; TOTALIZA = 0; /* Receitas Servicos OS */ CONTA = null; CREDITO = null; TOTALIZA = 0; FOR select sum(md.valTotal) FROM MOVIMENTO mov inner join MOVIMENTODETALHE md on md.CODMOVIMENTO = mov.CODMOVIMENTO inner join VENDA ven on ven.CODMOVIMENTO = mov.CODMOVIMENTO inner join PRODUTOS prod on prod.CODPRODUTO = md.CODPRODUTO where (mov.codnatureza = 3) and (ven.DATAVENDA between :PDTA1 AND :PDTA2) and PROD.TIPO = 'SERV' and ((ven.CODCCUSTO = :PCC) OR (:PCC = 0)) INTO :CREDITO do begin IF (CREDITO IS NULL) THEN CREDITO = 0; DESC_CONTA = ' Receitas de Serviços '; TOTALIZA = TOTALIZA + CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; if (CREDITO > 0) THEN SUSPEND; end /* Receitas Vendas OS */ DESC_CONTA = 'Receitas não operacionais'; CONTA = null; CREDITO = null; TOT = 'A'; SUSPEND; /* Receitas JUROS e CORRECAO MONETARIA*/ CONTA = null; CREDITO = null; TOTALIZA = 0; FOR select sum(JUROS + FUNRURAL) FROM RECEBIMENTO rec where (rec.DATARECEBIMENTO between :PDTA1 AND :PDTA2) and rec.STATUS = '7-' INTO :CREDITO do begin IF (CREDITO IS NULL) THEN CREDITO = 0; DESC_CONTA = ' Receitas de Juros e Corr. Monetária '; TOTALIZA = TOTALIZA + CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; if (CREDITO > 0) THEN SUSPEND; end TOTALIZA = 0; -- Outras Receitas de Vendas (FRETE , SEGUROS, etc ) FOR select sum(v.VALOR_FRETE + v.VALOR_SEGURO + v.OUTRAS_DESP + v.VALOR_IPI) FROM VENDA v where (v.DATAVENDA between :PDTA1 AND :PDTA2) INTO :CREDITO do begin IF (CREDITO IS NULL) THEN CREDITO = 0; DESC_CONTA = ' Outros receitas (FRETE, SEGURO) '; TOTALIZA = TOTALIZA + CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; if (CREDITO > 0) THEN SUSPEND; end TOTALIZA = 0; -- Receitas Diversas FOR select sum(r.VALOR_RESTO), p.NOME FROM RECEBIMENTO r inner join plano p on p.CODIGO = r.CONTACREDITO where (r.EMISSAO between :PDTA1 AND :PDTA2) And (r.CODVENDA is null) group by p.NOME INTO :CREDITO, :DESC_CONTA do begin DESC_CONTA = ' ' || :DESC_CONTA; IF (CREDITO IS NULL) THEN CREDITO = 0; TOTALIZA = TOTALIZA + CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; if (CREDITO > 0) THEN SUSPEND; TOTALIZA = 0; end DESC_CONTA = '= Total de Receitas '; CONTA = null; CREDITO = null; --TOTAL = NULL; TOT = 'S'; SUSPEND; TOTALIZA = 0; /* Gerando Total Receita */ DESC_CONTA = '(-) Deduções das Receitas'; CONTA = null; CREDITO = null; ACUMULA = TOTAL; TOTAL = 0; TOT = 'A'; SUSPEND; /* COMISSAO DE VENDAS */ IF (CONTACOMISSAO IS NOT NULL) THEN begin For Select sum(pag.VALOR_RESTO), pl.NOME FROM PAGAMENTO pag , plano pl where (pag.EMISSAO between :PDTA1 AND :PDTA2) and pl.CODIGO = pag.CONTACREDITO and (pag.CONTACREDITO = :CONTACOMISSAO) group by pl.NOME INTO :CREDITO, :DESC_CONTA do begin desc_conta = ' ' || :DESC_CONTA; IF (CREDITO IS NULL) THEN CREDITO = 0; TOTALIZA = TOTALIZA - CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; if (CREDITO > 0) THEN SUSPEND; end end /* Deducoes das Receitas*/ CONTA = null; CREDITO = null; TOTALIZA = 0; TOTAL = ACUMULA; -- Desconto concedido na venda FOR select sum(ven.DESCONTO) FROM VENDA ven where (ven.DATAVENDA between :PDTA1 AND :PDTA2) and ((ven.CODCCUSTO = :PCC) OR (:PCC = 0)) INTO :CREDITO do begin IF (CREDITO IS NULL) THEN CREDITO = 0; TOTALIZA = TOTALIZA - CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; IF (CREDITO > 0) then SUSPEND; end /* PERDAS E DESCARTES*/ CONTA = null; CREDITO = null; TOTALIZA = 0; TOTAL = ACUMULA; FOR select sum(md.VLRESTOQUE) FROM MOVIMENTO mov inner join MOVIMENTODETALHE md on md.CODMOVIMENTO = mov.CODMOVIMENTO inner join PRODUTOS prod on prod.CODPRODUTO = md.CODPRODUTO where (mov.codnatureza = 2) and (mov.DATAMOVIMENTO between :PDTA1 AND :PDTA2) and ((mov.CODALMOXARIFADO = :CENTROPERDA)) INTO :CREDITO do begin IF (CREDITO IS NULL) THEN CREDITO = 0; DESC_CONTA = ' Perdas e Descartes'; TOTALIZA = TOTALIZA - CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; IF (CREDITO > 0) then SUSPEND; end /* Impostos sobre Venda */ IF (CONTAIMPOSTOVENDA IS NOT NULL) THEN begin For Select sum(pag.VALOR_RESTO), pl.NOME FROM PAGAMENTO pag , plano pl where (pag.EMISSAO between :PDTA1 AND :PDTA2) and pl.CODIGO = pag.CONTACREDITO and (pag.CONTACREDITO = :CONTAIMPOSTOVENDA) group by pl.NOME INTO :CREDITO, :DESC_CONTA do begin desc_conta = ' ' || :DESC_CONTA; IF (CREDITO IS NULL) THEN CREDITO = 0; TOTALIZA = TOTALIZA - CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; if (CREDITO > 0) THEN SUSPEND; end end DESC_CONTA = '= Receitas Líquidas'; CONTA = null; CREDITO = null; TOTAL = ACUMULA; --TOTAL = NULL; TOT = 'S'; SUSPEND; /* ########### FIM Receita ############*/ /* ########### Gerando a Despesas ############*/ DESC_CONTA = '(-) Custo das Vendas'; CONTA = null; CREDITO = null; TOT = 'N'; SUSPEND; TOTALIZA = 0; Select sum(VALORCUSTO*SALDOFIM) from SPESTOQUEPRODUTO((:PDTA1-30), (:PDTA1-1),0,500000, 'TODOS OS GRUPOS CADASTRADOS', 'TODOS SUBGRUPOS DO CADASTRO', 'TODAS AS MARCAS CADASTRADAS', 0) INTO :EstoqueIni; TOTALIZA = EstoqueFim; Select sum(VALORCUSTO*SALDOFIM) from SPESTOQUEPRODUTO(:PDTA1, :PDTA2,0,500000, 'TODOS OS GRUPOS CADASTRADOS', 'TODOS SUBGRUPOS DO CADASTRO', 'TODAS AS MARCAS CADASTRADAS', 0) INTO :EstoqueFim; TOTALIZA = TOTALIZA + EstoqueFim; EstoqueFim = TOTALIZA; TOTALIZA = 0; /* Valor que Entrou durante o Mês por Compras*/ For select SUM(rec.VALOR) from COMPRA rec where rec.DATACOMPRA between :PDTA1 and :PDTA2 and rec.codFORNECEDOR > 0 and ((rec.CODCCUSTO = :PCC) OR (:PCC = 0)) INTO :Compras do begin end EstoqueFim = EstoqueIni + Compras; DESC_CONTA = ' Custo dos Produtos Vendidos'; CREDITO = EstoqueIni + Compras - EstoqueFim; TOTALIZA = TOTALIZA - CREDITO; --TOTAL = TOTAL + TOTALIZA; ############# Aqui esta pegando algum valor NULL ACUMULA = TOTAL; TOT = 'N'; if (CREDITO > 0) then SUSPEND; TOTALIZA = 0; DESC_CONTA = ' Estoque Inicial'; CREDITO = estoqueIni; TOT = 'N'; --if (CREDITO > 0) then -- SUSPEND; DESC_CONTA = ' Compras'; if (compras is null) then compras = 0; CREDITO = Compras; TOTALIZA = TOTALIZA - CREDITO; TOTAL = TOTAL + TOTALIZA; TOT = 'N'; if (CREDITO > 0) then SUSPEND; compras = 0; TOTALIZA = 0; DESC_CONTA = ' Estoque Final'; CREDITO = EstoqueFim; TOT = 'N'; --if (CREDITO > 0) then -- SUSPEND; TOTALIZA = 0; CONTA = null; CREDITO = null; TOTALIZA = 0; -- Serviços FOR select sum(md.QUANTIDADE * prod.PRECOMEDIO) FROM MOVIMENTO mov inner join MOVIMENTODETALHE md on md.CODMOVIMENTO = mov.CODMOVIMENTO inner join VENDA ven on ven.CODMOVIMENTO = mov.CODMOVIMENTO inner join PRODUTOS prod on prod.CODPRODUTO = md.CODPRODUTO inner join NATUREZAOPERACAO natu on natu.CODNATUREZA = mov.CODNATUREZA where (natu.TIPOMOVIMENTO = 3) and (ven.DATAVENDA between :PDTA1 AND :PDTA2) and prod.TIPO = 'SERV' and ((ven.CODCCUSTO = :PCC) OR (:PCC = 0)) INTO :CREDITO do begin IF (CREDITO IS NULL) THEN CREDITO = 0; DESC_CONTA = ' Custo dos Serviços Vendidos'; TOTALIZA = TOTALIZA - CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; if (CREDITO > 0) then SUSPEND; end TOTALIZA = 0; -- ##################### Busca as contas que estão marcadas para reduzir da Receita FOR select distinct pl.contapai FROM PAGAMENTO pag left outer join COMPRA cp on cp.CODCOMPRA = pag.CODCOMPRA inner join plano pl on pl.CODIGO = pag.CONTACREDITO where (pl.REDUZRECEITA = 'S') and (pag.EMISSAO between :PDTA1 AND :PDTA2) and ((pag.CODALMOXARIFADO = :PCC) OR (:PCC = 0)) and (pl.CODIGO <> :CONTACOMISSAO) and (pl.CONTAPAI <> '') and (plnCtaRoot(pl.CONTAPAI) <> 2) group by pl.contapai INTO :CONTAPAI do begin TOT = 'G'; /*Para nao imprimir a linha*/ TOTAL = 0; CONTA = null; CREDITO = null; SELECT NOME FROM PLANO WHERE CONTA = :CONTAPAI INTO :DESC_CONTA; -- SUSPEND; -- Nao imprimi esse grupos , aparecem tudo em Custos de Vendas TOTAL = ACUMULA; /* A maioria das despesas nao tem produto, sao compras ligado ao plano de contas */ FOR select sum(pag.VALOR_RESTO), pl.NOME FROM PAGAMENTO pag left outer join COMPRA cp on cp.CODCOMPRA = pag.CODCOMPRA inner join plano pl on pl.CODIGO = pag.CONTACREDITO where (pl.REDUZRECEITA = 'S') and (pag.EMISSAO between :PDTA1 AND :PDTA2) and pl.contapai = :CONTAPAI and ((pag.CODALMOXARIFADO = :PCC) OR (:PCC = 0)) and (plnCtaRoot(pl.CONTAPAI) <> 2) group by pl.NOME INTO :CREDITO, :produt do begin if (credito is null) then credito = 0; DESC_CONTA = ' ' || produt; TOTALIZA = TOTALIZA - CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; SUSPEND; TOTALIZA = 0; end end -- ########################## Fim do REDUZ RECEITA DESC_CONTA = '= Resultado Bruto'; CONTA = null; CREDITO = null; TOTALIZA = 0; --TOTAL = 0; TOT = 'S'; TOTAL = ACUMULA; SUSPEND; ACUMULA = TOTAL; DESC_CONTA = '(-) Despesas Operacionais'; CONTA = null; CREDITO = null; TOT = 'N'; SUSPEND; /* PEGO A CONTA PAI PARA IMPRIMIR POR GRUPO */ FOR select distinct pl.contapai FROM PAGAMENTO pag left outer join COMPRA cp on cp.CODCOMPRA = pag.CODCOMPRA inner join plano pl on pl.CODIGO = pag.CONTACREDITO where ((REDUZRECEITA IS NULL) OR (REDUZRECEITA = 'N')) and (pag.EMISSAO between :PDTA1 AND :PDTA2) and ((pag.CODALMOXARIFADO = :PCC) OR (:PCC = 0)) and (plnCtaRoot(pl.CONTAPAI) <> 2) and (pl.CODIGO <> :CONTACOMISSAO) and (pl.CONTAPAI <> '') group by pl.contapai INTO :CONTAPAI do begin TOT = 'G'; /*Para nao imprimir a linha*/ TOTAL = 0; CONTA = null; CREDITO = null; SELECT NOME FROM PLANO WHERE CONTA = :CONTAPAI INTO :DESC_CONTA; if (plnctaRoot(:contaPai) <> contaPassivo ) then begin SUSPEND; end if (jaPassou = 'N') then begin IF (CONTAPAI = CONTAJURO) THEN begin --desc_conta = :CONTAPAI || ' - ' || :CONTAJURO; --suspend; For Select sum(pag.JUROS + pag.FUNRURAL) FROM PAGAMENTO pag where (pag.DATAPAGAMENTO between :PDTA1 AND :PDTA2) and pag.STATUS = '7-' and ((pag.CODALMOXARIFADO = :PCC) OR (:PCC = 0)) INTO :CREDITO do begin IF (CREDITO IS NULL) THEN CREDITO = 0; DESC_CONTA = ' Despesas Juros e Corr. Monetária '; TOTALIZA = TOTALIZA - CREDITO; TOTAL = ACUMULA; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; if (credito > 0) then SUSPEND; end jaPassou = 'S'; end end TOTAL = ACUMULA; ACUMULA = 0; if (plnctaRoot(:contaPai) <> contaPassivo ) then begin /* A maioria das despesas nao tem produto, sao compras ligado ao plano de contas */ FOR select sum(pag.VALOR_RESTO), pl.NOME FROM PAGAMENTO pag left outer join COMPRA cp on cp.CODCOMPRA = pag.CODCOMPRA inner join plano pl on pl.CODIGO = pag.CONTACREDITO where ((REDUZRECEITA IS NULL) OR (REDUZRECEITA = 'N')) and (pag.EMISSAO between :PDTA1 AND :PDTA2) and pl.contapai = :CONTAPAI and ((pag.CODALMOXARIFADO = :PCC) OR (:PCC = 0)) and (plnCtaRoot(pl.CONTAPAI) <> 2) group by pl.NOME INTO :CREDITO, :produt do begin if (credito is null) then credito = 0; DESC_CONTA = ' ' || produt; TOTALIZA = TOTALIZA - CREDITO; TOTAL = TOTAL + TOTALIZA; ACUMULA = TOTAL; TOT = 'N'; SUSPEND; TOTALIZA = 0; end end TOTALIZA = 0; end /* Gerando Total Receita */ DESC_CONTA = '= Resultado Liquido '; CONTA = null; CREDITO = null; --TOTAL = TOTALIZA; TOT = 'S'; SUSPEND; --TOTAL = ACUMULA + TOTALIZA; /* Resultado Geral do Período */ DESC_CONTA = ' Resultado Geral no período : '; CONTA = null; CREDITO = null; --TOTAL = TOTALREC - TOTALIZA; SUSPEND; TOTAL = null; end
ATSTI/administra
script/relDre_warong107.sql
SQL
gpl-2.0
18,336
29.505155
120
0.57548
false
package com.rockey.emonitor.jms.controller; import java.util.Enumeration; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.AbstractController; import com.rockey.emonitor.jms.component.AppList; import com.rockey.emonitor.jms.component.EmonitorContext; import com.rockey.emonitor.jms.component.FilterList; import com.rockey.emonitor.jms.model.LogMessage; import com.rockey.emonitor.jms.service.MessageService; import com.rockey.emonitor.jms.util.Base64; import com.rockey.emonitor.jms.util.Util; import com.rockey.emonitor.model.AppFilter; public class MessageController extends AbstractController{ private static final Log log = LogFactory.getLog(MessageController.class); @Autowired private MessageService messageService; @Autowired private EmonitorContext runtimeContext; @Autowired private AppList appListComponent; @Autowired private FilterList filterListComponent; private String key; public String getKey() { return key; } public void setKey(String key) { this.key = key; } @Override protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { request.setCharacterEncoding("utf-8"); log.info("requestURL =[ " + request.getRequestURI() + "?" + request.getQueryString() + " ]"); if (!runtimeContext.isReadyProcess()) { log.error("EmonitorContext not init complete ! please wait..."); return null; } try { List<String> appList = appListComponent.getAppList(); Map<String, List<AppFilter>> filterMap = filterListComponent.getFilterMap(); Map<String,String> params = new HashMap<String,String>(); // 打印参数列表 @SuppressWarnings("unchecked") Enumeration<String> names = request.getParameterNames(); if(names.hasMoreElements()) { while (names.hasMoreElements()) { String paramName = (String) names.nextElement(); String paramValue = request.getParameter(paramName); //将所有参数转为大写 params.put(paramName.toUpperCase(), paramValue); log.info("Request Parameter:" + paramName + "=" + paramValue); } } //获取消息 String message = params.get("MESSAGE"); if (message!= null && !message.isEmpty()) { message = new String(Base64.decode(message.getBytes("UTF-8")),"UTF-8"); } log.info("client IP :" + request.getRemoteAddr() + ", message = " + message); LogMessage logMessage = Util.createMessageFromXml(message); //密钥检测 String sign = Util.ComputeHash(logMessage, this.key); if (logMessage.getSign().equals(sign)) { if (!appList.isEmpty() && appList.contains(logMessage.getApplicationID())) {//应用合法检测 if (!filterMap.isEmpty() && filterMap.containsKey(logMessage.getApplicationID())) {//过滤器检测 List<AppFilter> fiterList = filterMap.get(logMessage.getApplicationID()); for (AppFilter filter : fiterList) { if (logMessage.getTitle().contains(filter.getContent())) { log.info("告警标题包含过滤信息[" + filter.getContent() + "],信息将会被过滤。"); return null; } if (logMessage.getBody().contains(filter.getContent())) { log.info("告警内容包含过滤信息[" + filter.getContent() + "],信息将会被过滤。"); return null; } } } messageService.sendAlertMessage(logMessage); } else { log.error("invalid applicationId (" + logMessage.getApplicationID() + ") ...."); } } } catch (Exception e) { log.error("MessageController err", e); } return null; } }
RockeyHoo/icheck
emonitor/src/main/java/com/rockey/emonitor/jms/controller/MessageController.java
Java
gpl-2.0
4,087
31.717949
95
0.686439
false
#!/usr/bin/perl use strict; use lib "$ENV{'LJHOME'}/cgi-bin"; use LJ; my $dbh = LJ::get_dbh("master"); my $sth; $sth = $dbh->prepare("SELECT spid FROM support WHERE timelasthelp IS NULL"); $sth->execute; while (my ($spid) = $sth->fetchrow_array) { print "Fixing $spid...\n"; my $st2 = $dbh->prepare("SELECT MAX(timelogged) FROM supportlog WHERE spid=$spid AND type='answer'"); $st2->execute; my ($max) = $st2->fetchrow_array; $max = $max + 0; # turn undef -> 0 print " time = $max\n"; $dbh->do("UPDATE support SET timelasthelp=$max WHERE spid=$spid"); }
apparentlymart/livejournal
bin/upgrading/support-upgrade.pl
Perl
gpl-2.0
589
25.772727
105
0.616299
false
//------------------------------------------------------------------------------ // <自动生成> // 此代码由工具生成。 // // 对此文件的更改可能会导致不正确的行为,并且如果 // 重新生成代码,这些更改将会丢失。 // </自动生成> //------------------------------------------------------------------------------ namespace FormsAuthWeb { public partial class MyInfo { } }
cbfjay/Aspnet.Login
FormsAuthWeb/MyInfo.aspx.designer.cs
C#
gpl-2.0
452
21.533333
81
0.286982
false
<?php if ( ! defined( 'ABSPATH' ) ) { exit; // disable direct access } if ( ! class_exists( 'Mega_Menu_Nav_Menus' ) ) : /** * Handles all admin related functionality. */ class Mega_Menu_Nav_Menus { /** * Return the default settings for each menu item * * @since 1.5 */ public static function get_menu_item_defaults() { $defaults = array( 'type' => 'flyout', 'align' => 'bottom-left', 'icon' => 'disabled', 'hide_text' => 'false', 'disable_link' => 'false', 'hide_arrow' => 'false', 'item_align' => 'left', 'panel_columns' => 6, // total number of columns displayed in the panel 'mega_menu_columns' => 1 // for sub menu items, how many columns to span in the panel ); return apply_filters( "megamenu_menu_item_defaults", $defaults ); } /** * Constructor * * @since 1.0 */ public function __construct() { add_action( 'admin_init', array( $this, 'register_nav_meta_box' ), 11 ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_menu_page_scripts' ) ); add_action( 'megamenu_save_settings', array($this, 'save') ); add_filter( 'hidden_meta_boxes', array( $this, 'show_mega_menu_metabox' ) ); } /** * By default the mega menu meta box is hidden - show it. * * @since 1.0 * @param array $hidden * @return array */ public function show_mega_menu_metabox( $hidden ) { if ( is_array( $hidden ) && count( $hidden ) > 0 ) { foreach ( $hidden as $key => $value ) { if ( $value == 'mega_menu_meta_box' ) { unset( $hidden[$key] ); } } } return $hidden; } /** * Adds the meta box container * * @since 1.0 */ public function register_nav_meta_box() { global $pagenow; if ( 'nav-menus.php' == $pagenow ) { add_meta_box( 'mega_menu_meta_box', __("Mega Menu Settings", "megamenu"), array( $this, 'metabox_contents' ), 'nav-menus', 'side', 'high' ); } } /** * Enqueue required CSS and JS for Mega Menu * * @since 1.0 */ public function enqueue_menu_page_scripts($hook) { if( 'nav-menus.php' != $hook ) return; // http://wordpress.org/plugins/image-widget/ if ( class_exists( 'Tribe_Image_Widget' ) ) { $image_widget = new Tribe_Image_Widget; $image_widget->admin_setup(); } wp_enqueue_style( 'colorbox', MEGAMENU_BASE_URL . 'js/colorbox/colorbox.css', false, MEGAMENU_VERSION ); wp_enqueue_style( 'mega-menu', MEGAMENU_BASE_URL . 'css/admin-menus.css', false, MEGAMENU_VERSION ); wp_enqueue_script( 'mega-menu', MEGAMENU_BASE_URL . 'js/admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-sortable', 'jquery-ui-accordion'), MEGAMENU_VERSION ); wp_enqueue_script( 'colorbox', MEGAMENU_BASE_URL . 'js/colorbox/jquery.colorbox-min.js', array( 'jquery' ), MEGAMENU_VERSION ); wp_localize_script( 'mega-menu', 'megamenu', array( 'debug_launched' => __("Launched for Menu ID", "megamenu"), 'launch_lightbox' => __("Mega Menu", "megamenu"), 'saving' => __("Saving", "megamenu"), 'nonce' => wp_create_nonce('megamenu_edit'), 'nonce_check_failed' => __("Oops. Something went wrong. Please reload the page.", "megamenu") ) ); do_action("megamenu_enqueue_admin_scripts"); } /** * Show the Meta Menu settings * * @since 1.0 */ public function metabox_contents() { $menu_id = $this->get_selected_menu_id(); do_action("megamenu_save_settings"); $this->print_enable_megamenu_options( $menu_id ); } /** * Save the mega menu settings (submitted from Menus Page Meta Box) * * @since 1.0 */ public function save() { if ( isset( $_POST['menu'] ) && $_POST['menu'] > 0 && is_nav_menu( $_POST['menu'] ) && isset( $_POST['megamenu_meta'] ) ) { $submitted_settings = $_POST['megamenu_meta']; if ( ! get_site_option( 'megamenu_settings' ) ) { add_site_option( 'megamenu_settings', $submitted_settings ); } else { $existing_settings = get_site_option( 'megamenu_settings' ); $new_settings = array_merge( $existing_settings, $submitted_settings ); update_site_option( 'megamenu_settings', $new_settings ); } do_action( "megamenu_after_save_settings" ); } } /** * Print the custom Meta Box settings * * @param int $menu_id * @since 1.0 */ public function print_enable_megamenu_options( $menu_id ) { $tagged_menu_locations = $this->get_tagged_theme_locations_for_menu_id( $menu_id ); $theme_locations = get_registered_nav_menus(); $saved_settings = get_site_option( 'megamenu_settings' ); if ( ! count( $theme_locations ) ) { echo "<p>" . __("This theme does not have any menu locations.", "megamenu") . "</p>"; } else if ( ! count ( $tagged_menu_locations ) ) { echo "<p>" . __("This menu is not tagged to a location. Please tag a location to enable the Mega Menu settings.", "megamenu") . "</p>"; } else { ?> <?php if ( count( $tagged_menu_locations ) == 1 ) : ?> <?php $locations = array_keys( $tagged_menu_locations ); $location = $locations[0]; if (isset( $tagged_menu_locations[ $location ] ) ) { $this->settings_table( $location, $saved_settings ); } ?> <?php else: ?> <div id='megamenu_accordion'> <?php foreach ( $theme_locations as $location => $name ) : ?> <?php if ( isset( $tagged_menu_locations[ $location ] ) ): ?> <h3 class='theme_settings'><?php echo esc_html( $name ); ?></h3> <div class='accordion_content' style='display: none;'> <?php $this->settings_table( $location, $saved_settings ); ?> </div> <?php endif; ?> <?php endforeach;?> </div> <?php endif; ?> <?php submit_button( __( 'Save' ), 'button-primary alignright'); } } /** * Print the list of Mega Menu settings * * @since 1.0 */ public function settings_table( $location, $settings ) { ?> <table> <tr> <td><?php _e("Enable", "megamenu") ?></td> <td> <input type='checkbox' name='megamenu_meta[<?php echo $location ?>][enabled]' value='1' <?php checked( isset( $settings[$location]['enabled'] ) ); ?> /> </td> </tr> <tr> <td><?php _e("Event", "megamenu") ?></td> <td> <select name='megamenu_meta[<?php echo $location ?>][event]'> <option value='hover' <?php selected( isset( $settings[$location]['event'] ) && $settings[$location]['event'] == 'hover'); ?>><?php _e("Hover", "megamenu"); ?></option> <option value='click' <?php selected( isset( $settings[$location]['event'] ) && $settings[$location]['event'] == 'click'); ?>><?php _e("Click", "megamenu"); ?></option> </select> </td> </tr> <tr> <td><?php _e("Effect", "megamenu") ?></td> <td> <select name='megamenu_meta[<?php echo $location ?>][effect]'> <?php $selected = isset( $settings[$location]['effect'] ) ? $settings[$location]['effect'] : 'disabled'; $options = apply_filters("megamenu_effects", array( "disabled" => array( 'label' => __("None", "megamenu"), 'selected' => $selected == 'disabled', ), "fade" => array( 'label' => __("Fade", "megamenu"), 'selected' => $selected == 'fade', ), "slide" => array( 'label' => __("Slide", "megamenu"), 'selected' => $selected == 'slide', ) ), $selected ); foreach ( $options as $key => $value ) { ?><option value='<?php echo $key ?>' <?php selected( $value['selected'] ); ?>><?php echo $value['label'] ?></option><?php } ?> </select> </td> </tr> <tr> <td><?php _e("Theme", "megamenu"); ?></td> <td> <select name='megamenu_meta[<?php echo $location ?>][theme]'> <?php $style_manager = new Mega_Menu_Style_Manager(); $themes = $style_manager->get_themes(); foreach ( $themes as $key => $theme ) { echo "<option value='{$key}' " . selected( $settings[$location]['theme'], $key ) . ">{$theme['title']}</option>"; } ?> </select> </td> </tr> <?php do_action('megamenu_settings_table', $location, $settings); ?> </table> <?php } /** * Return the locations that a specific menu ID has been tagged to. * * @param $menu_id int * @return array */ public function get_tagged_theme_locations_for_menu_id( $menu_id ) { $locations = array(); $nav_menu_locations = get_nav_menu_locations(); foreach ( get_registered_nav_menus() as $id => $name ) { if ( isset( $nav_menu_locations[ $id ] ) && $nav_menu_locations[$id] == $menu_id ) $locations[$id] = $name; } return $locations; } /** * Get the current menu ID. * * Most of this taken from wp-admin/nav-menus.php (no built in functions to do this) * * @since 1.0 * @return int */ public function get_selected_menu_id() { $nav_menus = wp_get_nav_menus( array('orderby' => 'name') ); $menu_count = count( $nav_menus ); $nav_menu_selected_id = isset( $_REQUEST['menu'] ) ? (int) $_REQUEST['menu'] : 0; $add_new_screen = ( isset( $_GET['menu'] ) && 0 == $_GET['menu'] ) ? true : false; // If we have one theme location, and zero menus, we take them right into editing their first menu $page_count = wp_count_posts( 'page' ); $one_theme_location_no_menus = ( 1 == count( get_registered_nav_menus() ) && ! $add_new_screen && empty( $nav_menus ) && ! empty( $page_count->publish ) ) ? true : false; // Get recently edited nav menu $recently_edited = absint( get_user_option( 'nav_menu_recently_edited' ) ); if ( empty( $recently_edited ) && is_nav_menu( $nav_menu_selected_id ) ) $recently_edited = $nav_menu_selected_id; // Use $recently_edited if none are selected if ( empty( $nav_menu_selected_id ) && ! isset( $_GET['menu'] ) && is_nav_menu( $recently_edited ) ) $nav_menu_selected_id = $recently_edited; // On deletion of menu, if another menu exists, show it if ( ! $add_new_screen && 0 < $menu_count && isset( $_GET['action'] ) && 'delete' == $_GET['action'] ) $nav_menu_selected_id = $nav_menus[0]->term_id; // Set $nav_menu_selected_id to 0 if no menus if ( $one_theme_location_no_menus ) { $nav_menu_selected_id = 0; } elseif ( empty( $nav_menu_selected_id ) && ! empty( $nav_menus ) && ! $add_new_screen ) { // if we have no selection yet, and we have menus, set to the first one in the list $nav_menu_selected_id = $nav_menus[0]->term_id; } return $nav_menu_selected_id; } } endif;
Metrashev/Obuhte
wp-content/plugins/megamenu/classes/nav-menus.class.php
PHP
gpl-2.0
12,985
31.546366
192
0.467616
false
using System; namespace Player.Model { /// <remarks> /// A button can only be rectangular, if there should be other forms, you have to use more buttons which reference each other. /// </remarks> public interface ButtonPosition { int X { get; } int Y { get; } /// <summary>The dimension in x coordinates, i.e. how many columns are allocated.</summary> int DimX { get; } /// <summary>The dimension in y coordinates, i.e. how many rows are allocated.</summary> int DimY { get; } } }
asterics/KeyboardX
Player/Model/ButtonPosition.cs
C#
gpl-2.0
579
26.85
130
0.587522
false
/* * Copyright (C) 2011-2021 Project SkyFire <https://www.projectskyfire.org/> * Copyright (C) 2008-2021 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2021 MaNGOS <https://www.getmangos.eu/> * Copyright (C) 2006-2014 ScriptDev2 <https://github.com/scriptdev2/scriptdev2/> * * 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 3 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, see <http://www.gnu.org/licenses/>. */ /* ScriptData SDName: Shattrath_City SD%Complete: 100 SDComment: Quest support: 10004, 10009, 10211. Flask vendors, Teleport to Caverns of Time SDCategory: Shattrath City EndScriptData */ /* ContentData npc_raliq_the_drunk npc_salsalabim npc_shattrathflaskvendors npc_zephyr npc_kservant npc_ishanah npc_khadgar EndContentData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" #include "ScriptedEscortAI.h" #include "Player.h" #include "WorldSession.h" /*###### ## npc_raliq_the_drunk ######*/ #define GOSSIP_RALIQ "You owe Sim'salabim money. Hand them over or die!" enum Raliq { SPELL_UPPERCUT = 10966, QUEST_CRACK_SKULLS = 10009, FACTION_HOSTILE_RD = 45 }; class npc_raliq_the_drunk : public CreatureScript { public: npc_raliq_the_drunk() : CreatureScript("npc_raliq_the_drunk") { } bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE { player->PlayerTalkClass->ClearMenus(); if (action == GOSSIP_ACTION_INFO_DEF+1) { player->CLOSE_GOSSIP_MENU(); creature->setFaction(FACTION_HOSTILE_RD); creature->AI()->AttackStart(player); } return true; } bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_RALIQ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(9440, creature->GetGUID()); return true; } CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_raliq_the_drunkAI(creature); } struct npc_raliq_the_drunkAI : public ScriptedAI { npc_raliq_the_drunkAI(Creature* creature) : ScriptedAI(creature) { m_uiNormFaction = creature->getFaction(); } uint32 m_uiNormFaction; uint32 Uppercut_Timer; void Reset() OVERRIDE { Uppercut_Timer = 5000; me->RestoreFaction(); } void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; if (Uppercut_Timer <= diff) { DoCastVictim(SPELL_UPPERCUT); Uppercut_Timer = 15000; } else Uppercut_Timer -= diff; DoMeleeAttackIfReady(); } }; }; /*###### # npc_salsalabim ######*/ enum Salsalabim { // Factions FACTION_HOSTILE_SA = 90, FACTION_FRIENDLY_SA = 35, // Quests QUEST_10004 = 10004, // Spells SPELL_MAGNETIC_PULL = 31705 }; class npc_salsalabim : public CreatureScript { public: npc_salsalabim() : CreatureScript("npc_salsalabim") { } bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (player->GetQuestStatus(QUEST_10004) == QUEST_STATUS_INCOMPLETE) { creature->setFaction(FACTION_HOSTILE_SA); creature->AI()->AttackStart(player); } else { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); } return true; } CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_salsalabimAI(creature); } struct npc_salsalabimAI : public ScriptedAI { npc_salsalabimAI(Creature* creature) : ScriptedAI(creature) { } uint32 MagneticPull_Timer; void Reset() OVERRIDE { MagneticPull_Timer = 15000; me->RestoreFaction(); } void DamageTaken(Unit* done_by, uint32 &damage) OVERRIDE { if (done_by->GetTypeId() == TypeID::TYPEID_PLAYER && me->HealthBelowPctDamaged(20, damage)) { done_by->ToPlayer()->GroupEventHappens(QUEST_10004, me); damage = 0; EnterEvadeMode(); } } void UpdateAI(uint32 diff) OVERRIDE { if (!UpdateVictim()) return; if (MagneticPull_Timer <= diff) { DoCastVictim(SPELL_MAGNETIC_PULL); MagneticPull_Timer = 15000; } else MagneticPull_Timer -= diff; DoMeleeAttackIfReady(); } }; }; /* ################################################## Shattrath City Flask Vendors provides flasks to people exalted with 3 fActions: Haldor the Compulsive Arcanist Xorith Both sell special flasks for use in Outlands 25man raids only, purchasable for one Mark of Illidari each Purchase requires exalted reputation with Scryers/Aldor, Cenarion Expedition and The Sha'tar ################################################## */ class npc_shattrathflaskvendors : public CreatureScript { public: npc_shattrathflaskvendors() : CreatureScript("npc_shattrathflaskvendors") { } bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE { player->PlayerTalkClass->ClearMenus(); if (action == GOSSIP_ACTION_TRADE) player->GetSession()->SendListInventory(creature->GetGUID()); return true; } bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->GetEntry() == 23484) { // Aldor vendor if (creature->IsVendor() && (player->GetReputationRank(932) == REP_EXALTED) && (player->GetReputationRank(935) == REP_EXALTED) && (player->GetReputationRank(942) == REP_EXALTED)) { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); player->SEND_GOSSIP_MENU(11085, creature->GetGUID()); } else { player->SEND_GOSSIP_MENU(11083, creature->GetGUID()); } } if (creature->GetEntry() == 23483) { // Scryers vendor if (creature->IsVendor() && (player->GetReputationRank(934) == REP_EXALTED) && (player->GetReputationRank(935) == REP_EXALTED) && (player->GetReputationRank(942) == REP_EXALTED)) { player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); player->SEND_GOSSIP_MENU(11085, creature->GetGUID()); } else { player->SEND_GOSSIP_MENU(11084, creature->GetGUID()); } } return true; } }; /*###### # npc_zephyr ######*/ #define GOSSIP_HZ "Take me to the Caverns of Time." class npc_zephyr : public CreatureScript { public: npc_zephyr() : CreatureScript("npc_zephyr") { } bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*sender*/, uint32 action) OVERRIDE { player->PlayerTalkClass->ClearMenus(); if (action == GOSSIP_ACTION_INFO_DEF+1) player->CastSpell(player, 37778, false); return true; } bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (player->GetReputationRank(989) >= REP_REVERED) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HZ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); return true; } }; /*###### # npc_kservant ######*/ enum KServant { SAY1 = 0, WHISP1 = 1, WHISP2 = 2, WHISP3 = 3, WHISP4 = 4, WHISP5 = 5, WHISP6 = 6, WHISP7 = 7, WHISP8 = 8, WHISP9 = 9, WHISP10 = 10, WHISP11 = 11, WHISP12 = 12, WHISP13 = 13, WHISP14 = 14, WHISP15 = 15, WHISP16 = 16, WHISP17 = 17, WHISP18 = 18, WHISP19 = 19, WHISP20 = 20, WHISP21 = 21 }; class npc_kservant : public CreatureScript { public: npc_kservant() : CreatureScript("npc_kservant") { } CreatureAI* GetAI(Creature* creature) const OVERRIDE { return new npc_kservantAI(creature); } struct npc_kservantAI : public npc_escortAI { public: npc_kservantAI(Creature* creature) : npc_escortAI(creature) { } void WaypointReached(uint32 waypointId) OVERRIDE { Player* player = GetPlayerForEscort(); if (!player) return; switch (waypointId) { case 0: Talk(SAY1, player); break; case 4: Talk(WHISP1, player); break; case 6: Talk(WHISP2, player); break; case 7: Talk(WHISP3, player); break; case 8: Talk(WHISP4, player); break; case 17: Talk(WHISP5, player); break; case 18: Talk(WHISP6, player); break; case 19: Talk(WHISP7, player); break; case 33: Talk(WHISP8, player); break; case 34: Talk(WHISP9, player); break; case 35: Talk(WHISP10, player); break; case 36: Talk(WHISP11, player); break; case 43: Talk(WHISP12, player); break; case 44: Talk(WHISP13, player); break; case 49: Talk(WHISP14, player); break; case 50: Talk(WHISP15, player); break; case 51: Talk(WHISP16, player); break; case 52: Talk(WHISP17, player); break; case 53: Talk(WHISP18, player); break; case 54: Talk(WHISP19, player); break; case 55: Talk(WHISP20, player); break; case 56: Talk(WHISP21, player); player->GroupEventHappens(10211, me); break; } } void MoveInLineOfSight(Unit* who) OVERRIDE { if (HasEscortState(STATE_ESCORT_ESCORTING)) return; Player* player = who->ToPlayer(); if (player && player->GetQuestStatus(10211) == QUEST_STATUS_INCOMPLETE) { float Radius = 10.0f; if (me->IsWithinDistInMap(who, Radius)) { Start(false, false, who->GetGUID()); } } } void Reset() OVERRIDE { } }; }; /*###### # npc_ishanah ######*/ #define ISANAH_GOSSIP_1 "Who are the Sha'tar?" #define ISANAH_GOSSIP_2 "Isn't Shattrath a draenei city? Why do you allow others here?" class npc_ishanah : public CreatureScript { public: npc_ishanah() : CreatureScript("npc_ishanah") { } bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE { player->PlayerTalkClass->ClearMenus(); if (action == GOSSIP_ACTION_INFO_DEF+1) player->SEND_GOSSIP_MENU(9458, creature->GetGUID()); else if (action == GOSSIP_ACTION_INFO_DEF+2) player->SEND_GOSSIP_MENU(9459, creature->GetGUID()); return true; } bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, ISANAH_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, ISANAH_GOSSIP_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); return true; } }; /*###### # npc_khadgar ######*/ #define KHADGAR_GOSSIP_1 "I've heard your name spoken only in whispers, mage. Who are you?" #define KHADGAR_GOSSIP_2 "Go on, please." #define KHADGAR_GOSSIP_3 "I see." //6th too this #define KHADGAR_GOSSIP_4 "What did you do then?" #define KHADGAR_GOSSIP_5 "What happened next?" #define KHADGAR_GOSSIP_7 "There was something else I wanted to ask you." class npc_khadgar : public CreatureScript { public: npc_khadgar() : CreatureScript("npc_khadgar") { } bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE { player->PlayerTalkClass->ClearMenus(); switch (action) { case GOSSIP_ACTION_INFO_DEF+1: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); player->SEND_GOSSIP_MENU(9876, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+2: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); player->SEND_GOSSIP_MENU(9877, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+3: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); player->SEND_GOSSIP_MENU(9878, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+4: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); player->SEND_GOSSIP_MENU(9879, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+5: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); player->SEND_GOSSIP_MENU(9880, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+6: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); player->SEND_GOSSIP_MENU(9881, creature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+7: player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(9243, creature->GetGUID()); break; } return true; } bool OnGossipHello(Player* player, Creature* creature) OVERRIDE { if (creature->IsQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); if (player->GetQuestStatus(10211) != QUEST_STATUS_INCOMPLETE) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); player->SEND_GOSSIP_MENU(9243, creature->GetGUID()); return true; } }; void AddSC_shattrath_city() { new npc_raliq_the_drunk(); new npc_salsalabim(); new npc_shattrathflaskvendors(); new npc_zephyr(); new npc_kservant(); new npc_ishanah(); new npc_khadgar(); }
ProjectSkyfire/SkyFire.548
src/server/scripts/Outland/zone_shattrath_city.cpp
C++
gpl-2.0
16,677
29.377049
190
0.560053
false
<?php /** * Template Name: Sidebar Left Template * * @package WordPress * @subpackage Invictus * @since Invictus 1.0 */ get_header(); ?> <div id="single-page" class="clearfix left-sidebar"> <div id="primary"> <div id="content" role="main"> <?php the_post(); ?> <?php get_template_part( 'content', 'page' ); ?> </div><!-- #content --> </div><!-- #primary --> <div id="sidebar"> <?php /* Widgetised Area */ if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar('sidebar-main') ) ?> </div> </div> <?php get_footer(); ?>
iTTemple/html
wp-content/themes/invictus_2.6.2/template-sidebar-left.php
PHP
gpl-2.0
568
17.322581
115
0.570423
false
// // CRTDispatchConnection.cpp // dyncRTConnector // // Created by hp on 12/8/15. // Copyright (c) 2015 hp. All rights reserved. // #include "CRTDispatchConnection.h" #include "CRTConnManager.h" #include "CRTConnection.h" #include "CRTConnectionTcp.h" #include "rtklog.h" void CRTDispatchConnection::DispatchMsg(const std::string& uid, pms::RelayMsg& r_msg) { //find connector CRTConnManager::ConnectionInfo* pci = CRTConnManager::Instance().findConnectionInfoById(uid); if (!pci) { LE("CRTDispatchConnection::DispatchMsg not find user:%s connection\n", uid.c_str()); LI("CRTDispatchConnection::DispatchMsg handle_cmd:%s, handle_mtype:%s, handle_data:%s\n", r_msg.handle_cmd().c_str(), r_msg.handle_mtype().c_str(), r_msg.handle_data().c_str()); // not set push in this msg if (r_msg.handle_cmd().length()==0 \ || r_msg.handle_cmd().compare("push")!=0 \ || r_msg.handle_data().length()==0 \ || r_msg.handle_data().compare("1")!=0) { LE("CRTDispatchConnection::DispatchMsg this type of message is no need to push, so return\n"); return; } LI("CRTDispatchConnection::DispatchMsg userid:%s, r_msg.cont_module:%d\n\n", uid.c_str(), r_msg.cont_module()); // user set not accept push // user set mute notification if (!CRTConnManager::Instance().CouldPush(uid, r_msg.cont_module())) { LE("CRTDispatchConnection::DispatchMsg user set do not accept push or mute notify, so return\n"); return; } // get redis setting enablepush // find pusher module and sent to pusher CRTConnManager::ModuleInfo* pmodule = CRTConnManager::Instance().findModuleInfo("", pms::ETransferModule::MPUSHER); if (pmodule && pmodule->pModule && pmodule->pModule->IsLiveSession()) { pms::TransferMsg t_msg; //r_msg.set_svr_cmds(cmd); r_msg.set_tr_module(pms::ETransferModule::MCONNECTOR); r_msg.set_connector(CRTConnManager::Instance().ConnectorId()); t_msg.set_type(pms::ETransferType::TQUEUE); t_msg.set_content(r_msg.SerializeAsString()); std::string s = t_msg.SerializeAsString(); pmodule->pModule->SendTransferData(s.c_str(), (int)s.length()); LI("CRTDispatchConnection::DispatchMsg has send push msg to pusher, module type:%d, module id:%s!!!\n\n", pmodule->othModuleType, pmodule->othModuleId.c_str()); } else { LE("CRTDispatchConnection::DispatchMsg module pusher is not liveeeeeeeeeeee!!!\n"); } return; } else { //!pci if (pci->_pConn && pci->_pConn->IsLiveSession()) { if (pci->_connType == pms::EConnType::THTTP) { CRTConnection *c = dynamic_cast<CRTConnection*>(pci->_pConn); if (c) { c->SendDispatch(uid, r_msg.content()); } } else if (pci->_connType == pms::EConnType::TTCP) { CRTConnectionTcp *ct = dynamic_cast<CRTConnectionTcp*>(pci->_pConn); if (ct) { ct->SendDispatch(uid, r_msg.content()); } } } } }
Teameeting/Teameeting-MsgServer
MsgServer/MsgServerConnector/CRTDispatchConnection.cpp
C++
gpl-2.0
3,277
41.012821
185
0.586817
false
'use strict'; /*@ngInject*/ function repoItemClassifierFilter() { return function(node) { if (node.type) { return 'uib-repository__item--movable'; } else { return 'uib-repository__group'; } }; } module.exports = repoItemClassifierFilter;
raqystyle/ui-builder
frontend/scripts/builder/modules/repository/filters/repoItemClassifier.filter.js
JavaScript
gpl-2.0
268
18.142857
45
0.641791
false
class ActorEffectActorPen < ActorEffect title 'Actor Pen' description 'Uses chosen actor as a brush tip, rendering it multiple times per frame to smoothly follow a chosen X,Y point.' hint 'This effect is primarily intended for use with the Canvas actor.' categories :canvas setting 'actor', :actor setting 'offset_x', :float, :default => 0.0..1.0 setting 'offset_y', :float, :default => 0.0..1.0 setting 'period', :float, :default => 0.01..1.0 setting 'scale', :float, :default => 1.0..2.0 setting 'alpha', :float, :default => 1.0..1.0, :range => 0.0..1.0 setting 'maximum_per_frame', :integer, :range => 1..1000, :default => 50..1000 def render return yield if scale == 0.0 actor.one { |a| parent_user_object.using { with_alpha(alpha) { prev_x = offset_x_setting.last_value prev_y = offset_y_setting.last_value delta_x = offset_x - prev_x delta_y = offset_y - prev_y prev_scale = scale_setting.last_value delta_scale = (scale - prev_scale) distance = Math.sqrt(delta_x*delta_x + delta_y*delta_y) count = ((distance / scale) / period).floor count = maximum_per_frame if count > maximum_per_frame if count < 2 with_translation(offset_x, offset_y) { with_scale(scale) { a.render! } } else step_x = delta_x / count step_y = delta_y / count step_scale = delta_scale / count beat_delta = $env[:beat_delta] for i in 1..count progress = (i.to_f / count) with_beat_shift(-beat_delta * (1.0 - progress)) { with_translation(prev_x + step_x*i, prev_y + step_y*i) { with_scale(prev_scale + step_scale*i) { a.render! } } } end end } } } yield end end
lighttroupe/luz-next
engine/plugins/actor_effects/actor-pen.luz.rb
Ruby
gpl-2.0
1,787
24.528571
125
0.594852
false
// // XRLoginView.h // XyralityTest // // Created by lava on 12/19/15. // // #import <UIKit/UIKit.h> @interface XRLoginView : UIView @property (weak, nonatomic) IBOutlet UIView *credentialsView; @property (weak, nonatomic) IBOutlet UILabel *loginLabel; @property (weak, nonatomic) IBOutlet UITextField *loginTextField; @property (weak, nonatomic) IBOutlet UILabel *passwordLabel; @property (weak, nonatomic) IBOutlet UITextField *passworldTextField; @property (weak, nonatomic) IBOutlet UIButton *showMyWorldsButton; @property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activtyIndicator; - (void)startProgressAnimation; - (void)stopProgressAnimation; @end
DrBobr/XyralityTest
XyralityTest/XyralityTest/XRLoginView.h
C
gpl-2.0
781
32.956522
84
0.668374
false
<?php // (C) Copyright Bobbing Wide 2012, 2017 /** * Determine the reference_type from PHP tokens * * Attempt to determine what sort of API this is using token_get_all() * * @param string $string - the "api" name * @return string - the reference type determined from token_name() * */ function oikai_determine_from_tokens( $string ) { $reference_type = null; $tokens = token_get_all( "<?php $string" ); $token = array_shift( $tokens ); while ( $token ) { $token = array_shift( $tokens ); if ( is_array( $token ) ) { //print_r( $token ); $token_name = token_name( $token[0] ); //$reference_type = _oikai_determine_reference_type( $ $reference_type = $token_name; $token = null; } } return( $reference_type ); } /** * See if this is a constant name * * @param string $string - could be ABSPATH or WPINC or something * * */ function oikai_check_constants( $string ) { $constants = get_defined_constants( false ); //$reference_type = oikai_query_function_type $constant = bw_array_get( $constants, $string, null ); if ( $constant ) { $reference_type = "constant"; } else { $reference_type = "T_STRING"; } return( $reference_type ); } /** * */ function oikai_check_class_method_or_function( $string ) { $reference_type = "T_STRING"; $class = oikai_get_class( $string, null ); if ( $class ) { $func = oikai_get_func( $string, $class ); if ( $func ) { $reference_type = "method"; } else { $reference_type = "class"; } } else { $reference_type = "function"; } return( $reference_type ); } /** * Determine the reference type for a string * * @param string $string - the passed string literal * @return string - the determined reference type * * Value | Meaning * -------- | ------- * internal | This is a PHP function * user | This is a currently active application function * T_STRING | We couldn't decide * constant | It's a defined constant name ( currently active ) * T_ other | It's a PHP token such as T_REQUIRE, T_REQUIRE_ONCE, etc * class | It's a class * function | It's a function - but it's not active otherwise we'd have received "user" or "internal" * method | It's a method ( with class name ) * null | Not expected at the end of this processing */ function oikai_determine_reference_type( $string ) { $reference_type = oikai_determine_function_type( $string ); if ( !$reference_type ) { $reference_type = oikai_determine_from_tokens( $string ); } if ( $reference_type == "T_STRING" ) { $reference_type = oikai_check_constants( $string ); } if ( $reference_type == "T_STRING" ) { $reference_type = oikai_check_class_method_or_function( $string ); } //p( "$string:$reference_type" ); return( $reference_type ); } /** * Handle a link to a "user" function * */ function oikai_handle_reference_type_user( $api, $reference_type ) { $posts = oikai_get_oik_apis_byname( $api ); bw_trace2( $posts ); if ( $posts ) { oikapi_simple_link( $api, $posts ); } else { e( oikai_link_to_wordpress( $api ) ); } e( "()" ); } /** * Handle a link to an "internal" PHP function * * This includes T_xxx values we don't yet cater for * * */ function oikai_handle_reference_type_internal( $api, $reference_type ) { e( oikai_link_to_php( $api )); e( "()" ); } /** * Handle a link to a "function" */ function oikai_handle_reference_type_function( $api, $reference_type ) { oikai_handle_reference_type_user( $api, $reference_type ); } /** * Handle a link to a "class" * */ function oikai_handle_reference_type_class( $api, $reference_type ) { $posts = oikai_get_oik_class_byname( $api ); bw_trace2( $posts ); if ( $posts ) { oikapi_simple_link( $api, $posts ); } else { e( oikai_link_to_wordpress( $api ) ); } } /** * Produce a link to the API based on the reference_type * * @param string $api - the API name * @param string $reference_type - the determined reference type * */ function oikai_handle_reference_type( $api, $reference_type ) { $funcname = bw_funcname( __FUNCTION__, $reference_type ); //e( $funcname ); if ( $funcname != __FUNCTION__ ) { if ( is_callable( $funcname ) ) { call_user_func( $funcname, $api, $reference_type ); } else { fob(); oikai_handle_reference_type_internal( $api, $reference_type ); } } else { oikai_handle_reference_type_internal( $api, $reference_type ); } } /** * Simplify the API name * * Sometimes we write an API as apiname() * If we wrap this in the API shortcode we should be able to cater for the extraneous ()'s * * There could be other things we could also do... such as sanitization * * @param string $api - the given API name * @return string - the simplified API name * */ function oikai_simplify_apiname( $api ) { $api = str_replace( "()", "", $api ); return( $api ); } /** * Implement [api] shortcode to produce simple links to an API * * If there's just one API it's shown as "api()". * If more than one then they're comma separated, but NOT in an HTML list "api(), api2()" * Links are created to PHP, the local site or the 'preferred' WordPress reference site. * * @param array $atts - shortcode parameters * @param string $content - content * @param string $tag - the shortcode tag * @return string - generated HTML * */ function oikai_api( $atts=null, $content=null, $tag=null ) { oiksc_autoload(); $apis = bw_array_get_from( $atts, "api,0", null ); if ( $apis ) { $apia = bw_as_array( $apis ); oik_require( "shortcodes/oik-apilink.php", "oik-shortcodes" ); oik_require( "shortcodes/oik-api-importer.php", "oik-shortcodes" ); $count = 0; foreach ( $apia as $key => $api ) { $api = oikai_simplify_apiname( $api ); if ( $count ) { e( "," ); e( "&nbsp;" ); } $count++; $type = oikai_determine_reference_type( $api ); oikai_handle_reference_type( $api, $type ); } } else { oik_require( "shortcodes/oik-api-status.php", "oik-shortcodes" ); oikai_api_status( $atts ); } return( bw_ret() ); } /** * OK, but we also want to link to PHP stuff * So we need to be able to call that function * */ function oikapi_simple_link( $api, $posts ) { if ( $posts ) { $post = bw_array_get( $posts, 0, null ); } else { $post = null; } if ( $post ) { alink( "bw_api", get_permalink( $post ), $api, $post->title ); } else { e( $api ); } } /** * Help hook for [api] shortcode */ function api__help( $shortcode="api" ) { return( "Simple API link" ); } /** * Syntax hook for [api] shortcode */ function api__syntax( $shortcode="api" ) { $syntax = array( "api|0" => bw_skv( null, "<i>api</i>", "API name" ) ); return( $syntax ); } /** * Example hook for [api] shortcode */ function api__example( $shortcode="api" ) { oik_require( "includes/oik-sc-help.php" ); $text = "Links to different APIs: PHP,locally documented,WordPress reference" ; $example = "require,oik_require,hello_dolly"; bw_invoke_shortcode( $shortcode, $example, $text ); }
bobbingwide/oik-shortcodes
shortcodes/oik-api.php
PHP
gpl-2.0
7,237
25.509158
101
0.6055
false
;; ******************************************************************* ;; $Id: test.asm,v 1.1 2006-06-05 02:12:19 arniml Exp $ ;; ;; Checks interrupt on a sequence of "transfer of control" ;; instructions. ;; ;; the cpu type is defined on asl's command line include "int_macros.inc" org 0x00 clra int_flag_clear lei 0x02 jp int_mark org 0x030 int_mark: nop nop int_instr: jmp + + jp + + jsrp jsrp_target jsr jsrp_target lqid nop ret_instr: jmp + org 0x040 + int_flag_check jmp pass org 0x080 jsrp_target: ret ;; ******************************************************************* ;; Interrupt routine ;; org 0x0fd jmp fail int_routine: nop save_a_m_c int_flag_set check_sa ret_instr restore_c_m_a ret org 0x200 include "int_pass_fail.asm"
freecores/t400
sw/verif/int/sequence/test.asm
Assembly
gpl-2.0
789
12.603448
71
0.546261
false
<?php /** * Custom Article Page Type * * @package tub */ /* * Register an article post type. */ add_action( 'init', 'tub_articles_init' ); function tub_articles_init() { $labels = array( 'name' => _x( 'Articles', 'post type general name', 'tub' ), 'singular_name' => _x( 'Article', 'post type singular name', 'tub' ), 'menu_name' => _x( 'Articles', 'admin menu', 'tub' ), 'name_admin_bar' => _x( 'Article', 'add new on admin bar', 'tub' ), 'add_new' => _x( 'Add New', 'article', 'tub' ), 'add_new_item' => __( 'Add New Article', 'tub' ), 'new_item' => __( 'New Article', 'tub' ), 'edit_item' => __( 'Edit Article', 'tub' ), 'view_item' => __( 'View Article', 'tub' ), 'all_items' => __( 'All Articles', 'tub' ), 'search_items' => __( 'Search Articles', 'tub' ), 'parent_item_colon' => __( 'Parent Articles:', 'tub' ), 'not_found' => __( 'No articles found.', 'tub' ), 'not_found_in_trash' => __( 'No articles found in Trash.', 'tub' ) ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_nav_menus' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'article' ), 'capability_type' => 'page', 'hierarchical' => true, 'menu_position' => 20, 'menu_icon' => 'dashicons-format-aside', 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'revisions', 'page-attributes' ) ); register_post_type( 'article', $args ); } /** * Change Title Placeholder Text */ function tub_change_article_title( $title ){ $screen = get_current_screen(); if ( 'article' == $screen->post_type ){ $title = 'Enter menu label here'; } return $title; } add_filter( 'enter_title_here', 'tub_change_article_title' ); /** * Add a page title meta box */ // Add box function tub_article_add_title(){ add_meta_box( 'article_title_meta', __('Page Title'), 'tub_article_title_content', 'article', 'normal', 'high' ); } add_action("add_meta_boxes", "tub_article_add_title"); // Print box content function tub_article_title_content( $post ){ // Add an nonce field so we can check for it later. wp_nonce_field( 'tub_article_meta_box', 'tub_article_meta_box_nonce' ); $article_title = get_post_meta( $post->ID, 'tub_article_title', true ); echo '<input type="text" name="tub_article_title" value="' . esc_attr( $article_title ) . '" style="width: 100%;margin-top: 6px;" placeholder="Enter title here" />'; } /** * Save Data */ function tub_article_title_save( $post_id ) { /* * We need to verify this came from our screen and with proper authorization, * because the save_post action can be triggered at other times. */ // Check if our nonce is set. if ( ! isset( $_POST['tub_article_meta_box_nonce'] ) ) { return; } // Verify that the nonce is valid. if ( ! wp_verify_nonce( $_POST['tub_article_meta_box_nonce'], 'tub_article_meta_box' ) ) { return; } // If this is an autosave, our form has not been submitted, so we don't want to do anything. if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } // Check the user's permissions. if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) { if ( ! current_user_can( 'edit_page', $post_id ) ) { return; } } else { if ( ! current_user_can( 'edit_post', $post_id ) ) { return; } } /* OK, it's safe for us to save the data now. */ // Save testimonial date data if the field isset if ( isset( $_POST['tub_article_title'] ) ) { $tub_article_title_data = sanitize_text_field( $_POST['tub_article_title'] ); update_post_meta( $post_id, 'tub_article_title', $tub_article_title_data ); } return; } add_action( 'save_post', 'tub_article_title_save' );
joshevensen/theunassistedbaby.com
wp-content/plugins/tub-functions/cpt/articles.php
PHP
gpl-2.0
4,026
25.662252
167
0.5616
false
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein * is confidential and proprietary to MediaTek Inc. and/or its licensors. * Without the prior written permission of MediaTek inc. and/or its licensors, * any reproduction, modification, use or disclosure of MediaTek Software, * and information contained herein, in whole or in part, shall be strictly prohibited. * * MediaTek Inc. (C) 2010. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek Software") * have been modified by MediaTek Inc. All revisions are subject to any receiver's * applicable license agreements with MediaTek Inc. */ /* * Copyright (C) 2007-2009 Freescale Semiconductor, Inc. * Copyright (C) 2008-2009 MontaVista Software, Inc. * * Authors: Tony Li <tony.li@freescale.com> * Anton Vorontsov <avorontsov@ru.mvista.com> * * 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 */ #include <common.h> #include <pci.h> #include <mpc83xx.h> #include <asm/io.h> DECLARE_GLOBAL_DATA_PTR; #define PCIE_MAX_BUSES 2 #ifdef CONFIG_83XX_GENERIC_PCIE_REGISTER_HOSES static int mpc83xx_pcie_remap_cfg(struct pci_controller *hose, pci_dev_t dev) { int bus = PCI_BUS(dev) - hose->first_busno; immap_t *immr = (immap_t *)CONFIG_SYS_IMMR; pex83xx_t *pex = &immr->pciexp[bus]; struct pex_outbound_window *out_win = &pex->bridge.pex_outbound_win[0]; u8 devfn = PCI_DEV(dev) << 3 | PCI_FUNC(dev); u32 dev_base = bus << 24 | devfn << 16; if (hose->indirect_type == INDIRECT_TYPE_NO_PCIE_LINK) return -1; /* * Workaround for the HW bug: for Type 0 configure transactions the * PCI-E controller does not check the device number bits and just * assumes that the device number bits are 0. */ if (devfn & 0xf8) return -1; out_le32(&out_win->tarl, dev_base); return 0; } #define cfg_read(val, addr, type, op) \ do { *val = op((type)(addr)); } while (0) #define cfg_write(val, addr, type, op) \ do { op((type *)(addr), (val)); } while (0) #define cfg_read_err(val) do { *val = -1; } while (0) #define cfg_write_err(val) do { } while (0) #define PCIE_OP(rw, size, type, op) \ static int pcie_##rw##_config_##size(struct pci_controller *hose, \ pci_dev_t dev, int offset, \ type val) \ { \ int ret; \ \ ret = mpc83xx_pcie_remap_cfg(hose, dev); \ if (ret) { \ cfg_##rw##_err(val); \ return ret; \ } \ cfg_##rw(val, (void *)hose->cfg_addr + offset, type, op); \ return 0; \ } PCIE_OP(read, byte, u8 *, in_8) PCIE_OP(read, word, u16 *, in_le16) PCIE_OP(read, dword, u32 *, in_le32) PCIE_OP(write, byte, u8, out_8) PCIE_OP(write, word, u16, out_le16) PCIE_OP(write, dword, u32, out_le32) static void mpc83xx_pcie_register_hose(int bus, struct pci_region *reg, u8 link) { extern void disable_addr_trans(void); /* start.S */ static struct pci_controller pcie_hose[PCIE_MAX_BUSES]; struct pci_controller *hose = &pcie_hose[bus]; int i; /* * There are no spare BATs to remap all PCI-E windows for U-Boot, so * disable translations. In general, this is not great solution, and * that's why we don't register PCI-E hoses by default. */ disable_addr_trans(); for (i = 0; i < 2; i++, reg++) { if (reg->size == 0) break; hose->regions[i] = *reg; hose->region_count++; } i = hose->region_count++; hose->regions[i].bus_start = 0; hose->regions[i].phys_start = 0; hose->regions[i].size = gd->ram_size; hose->regions[i].flags = PCI_REGION_MEM | PCI_REGION_SYS_MEMORY; i = hose->region_count++; hose->regions[i].bus_start = CONFIG_SYS_IMMR; hose->regions[i].phys_start = CONFIG_SYS_IMMR; hose->regions[i].size = 0x100000; hose->regions[i].flags = PCI_REGION_MEM | PCI_REGION_SYS_MEMORY; hose->first_busno = pci_last_busno() + 1; hose->last_busno = 0xff; if (bus == 0) hose->cfg_addr = (unsigned int *)CONFIG_SYS_PCIE1_CFG_BASE; else hose->cfg_addr = (unsigned int *)CONFIG_SYS_PCIE2_CFG_BASE; pci_set_ops(hose, pcie_read_config_byte, pcie_read_config_word, pcie_read_config_dword, pcie_write_config_byte, pcie_write_config_word, pcie_write_config_dword); if (!link) hose->indirect_type = INDIRECT_TYPE_NO_PCIE_LINK; pci_register_hose(hose); #ifdef CONFIG_PCI_SCAN_SHOW printf("PCI: Bus Dev VenId DevId Class Int\n"); #endif /* * Hose scan. */ hose->last_busno = pci_hose_scan(hose); } #else static void mpc83xx_pcie_register_hose(int bus, struct pci_region *reg, u8 link) {} #endif /* CONFIG_83XX_GENERIC_PCIE_REGISTER_HOSES */ static void mpc83xx_pcie_init_bus(int bus, struct pci_region *reg) { immap_t *immr = (immap_t *)CONFIG_SYS_IMMR; pex83xx_t *pex = &immr->pciexp[bus]; struct pex_outbound_window *out_win; struct pex_inbound_window *in_win; void *hose_cfg_base; unsigned int ram_sz; unsigned int barl; unsigned int tar; u16 reg16; int i; /* Enable pex csb bridge inbound & outbound transactions */ out_le32(&pex->bridge.pex_csb_ctrl, in_le32(&pex->bridge.pex_csb_ctrl) | PEX_CSB_CTRL_OBPIOE | PEX_CSB_CTRL_IBPIOE); /* Enable bridge outbound */ out_le32(&pex->bridge.pex_csb_obctrl, PEX_CSB_OBCTRL_PIOE | PEX_CSB_OBCTRL_MEMWE | PEX_CSB_OBCTRL_IOWE | PEX_CSB_OBCTRL_CFGWE); out_win = &pex->bridge.pex_outbound_win[0]; if (bus) { out_le32(&out_win->ar, PEX_OWAR_EN | PEX_OWAR_TYPE_CFG | CONFIG_SYS_PCIE2_CFG_SIZE); out_le32(&out_win->bar, CONFIG_SYS_PCIE2_CFG_BASE); } else { out_le32(&out_win->ar, PEX_OWAR_EN | PEX_OWAR_TYPE_CFG | CONFIG_SYS_PCIE1_CFG_SIZE); out_le32(&out_win->bar, CONFIG_SYS_PCIE1_CFG_BASE); } out_le32(&out_win->tarl, 0); out_le32(&out_win->tarh, 0); for (i = 0; i < 2; i++, reg++) { u32 ar; if (reg->size == 0) break; out_win = &pex->bridge.pex_outbound_win[i + 1]; out_le32(&out_win->bar, reg->phys_start); out_le32(&out_win->tarl, reg->bus_start); out_le32(&out_win->tarh, 0); ar = PEX_OWAR_EN | (reg->size & PEX_OWAR_SIZE); if (reg->flags & PCI_REGION_IO) ar |= PEX_OWAR_TYPE_IO; else ar |= PEX_OWAR_TYPE_MEM; out_le32(&out_win->ar, ar); } out_le32(&pex->bridge.pex_csb_ibctrl, PEX_CSB_IBCTRL_PIOE); ram_sz = gd->ram_size; barl = 0; tar = 0; i = 0; while (ram_sz > 0) { in_win = &pex->bridge.pex_inbound_win[i]; out_le32(&in_win->barl, barl); out_le32(&in_win->barh, 0x0); out_le32(&in_win->tar, tar); if (ram_sz >= 0x10000000) { /* The maxium windows size is 256M */ out_le32(&in_win->ar, PEX_IWAR_EN | PEX_IWAR_NSOV | PEX_IWAR_TYPE_PF | 0x0FFFF000); barl += 0x10000000; tar += 0x10000000; ram_sz -= 0x10000000; } else { /* The UM is not clear here. * So, round up to even Mb boundary */ ram_sz = ram_sz >> (20 + ((ram_sz & 0xFFFFF) ? 1 : 0)); if (!(ram_sz % 2)) ram_sz -= 1; out_le32(&in_win->ar, PEX_IWAR_EN | PEX_IWAR_NSOV | PEX_IWAR_TYPE_PF | (ram_sz << 20) | 0xFF000); ram_sz = 0; } i++; } in_win = &pex->bridge.pex_inbound_win[i]; out_le32(&in_win->barl, CONFIG_SYS_IMMR); out_le32(&in_win->barh, 0); out_le32(&in_win->tar, CONFIG_SYS_IMMR); out_le32(&in_win->ar, PEX_IWAR_EN | PEX_IWAR_TYPE_NO_PF | PEX_IWAR_SIZE_1M); /* Enable the host virtual INTX interrupts */ out_le32(&pex->bridge.pex_int_axi_misc_enb, in_le32(&pex->bridge.pex_int_axi_misc_enb) | 0x1E0); /* Hose configure header is memory-mapped */ hose_cfg_base = (void *)pex; get_clocks(); /* Configure the PCIE controller core clock ratio */ out_le32(hose_cfg_base + PEX_GCLK_RATIO, (((bus ? gd->pciexp2_clk : gd->pciexp1_clk) / 1000000) * 16) / 333); udelay(1000000); /* Do Type 1 bridge configuration */ out_8(hose_cfg_base + PCI_PRIMARY_BUS, 0); out_8(hose_cfg_base + PCI_SECONDARY_BUS, 1); out_8(hose_cfg_base + PCI_SUBORDINATE_BUS, 255); /* * Write to Command register */ reg16 = in_le16(hose_cfg_base + PCI_COMMAND); reg16 |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY | PCI_COMMAND_IO | PCI_COMMAND_SERR | PCI_COMMAND_PARITY; out_le16(hose_cfg_base + PCI_COMMAND, reg16); /* * Clear non-reserved bits in status register. */ out_le16(hose_cfg_base + PCI_STATUS, 0xffff); out_8(hose_cfg_base + PCI_LATENCY_TIMER, 0x80); out_8(hose_cfg_base + PCI_CACHE_LINE_SIZE, 0x08); printf("PCIE%d: ", bus); reg16 = in_le16(hose_cfg_base + PCI_LTSSM); if (reg16 >= PCI_LTSSM_L0) printf("link\n"); else printf("No link\n"); mpc83xx_pcie_register_hose(bus, reg, reg16 >= PCI_LTSSM_L0); } /* * The caller must have already set SCCR, SERDES and the PCIE_LAW BARs * must have been set to cover all of the requested regions. */ void mpc83xx_pcie_init(int num_buses, struct pci_region **reg, int warmboot) { int i; /* * Release PCI RST Output signal. * Power on to RST high must be at least 100 ms as per PCI spec. * On warm boots only 1 ms is required. */ udelay(warmboot ? 1000 : 100000); for (i = 0; i < num_buses; i++) mpc83xx_pcie_init_bus(i, reg[i]); }
luckasfb/OT_903D-kernel-2.6.35.7
bootable/bootloader/uboot/arch/powerpc/cpu/mpc83xx/pcie.c
C
gpl-2.0
11,152
30.681818
95
0.674049
false
/* VARS -------------------------------------------------------------- */ /* COLORS */ /* DARK GREY */ /* RED */ /* MIX-INS -------------------------------------------------------------- */ .inline_block, #block-system-main-menu li span, #block-system-main-menu li a { display: inline-block; zoom: 1; *display: inline; } .clearfix, .link .image { zoom: 1; } .clearfix:before, .link .image:before, .clearfix:after, .link .image:after { content: "\0020"; display: block; height: 0; overflow: hidden; } .clearfix:after, .link .image:after { clear: both; } /* COMMON -------------------------------------------------------------- */ .soon{ width: 300px; height: 100px; line-height: 100px; font-size: 20px; text-align: center; background: #ea7d67; position: absolute; top: 50%; left: 50%; margin: -80px 0 0 -150px; text-transform: uppercase; } html { background: #f5f3e9; } body { font-family: "Lato", sans-serif; font-weight: 300; color: #444444; font-size: 18px; } a { cursor: pointer; transition: color .3s ease; color: #444444; color: #444444; text-decoration: none; } a:hover { color: #ea7d67; } a:hover { color: #ea7d67; } p a{ color: #ea7d67; } p a:hover{ text-decoration: underline; } li a.active, li.opened span.nolink { color: #ea7d67; } h1 { font-weight: 100; margin-bottom: 40px; padding-bottom: 10px; margin-bottom: 10px; } h1.main-title { text-align: center; font-size: 60px; font-style: italic; font-weight: 100; margin-bottom: 40px; } h2.pane-title{ text-align: center; font-weight: 100; margin: 20px 0; } .node-type-post h1.main-title { display: none; } p { letter-spacing: normal; font-size: 14px; line-height: 24px; position: relative; font-family: "Gilda Display", serif;} ul, ul.menu, ul.menu li { list-style: none; text-align: inherit; } .bull { color: #dddddd; padding: 0 10px; } /* HEADER -------------------------------------------------------------- */ #header { position: fixed; background-color: #ea7d67; height: 40px; line-height: 40px; width: 100%; z-index: 999; } #header .bot { width: 100%; height: 35px; top: 40px; position: absolute; background-color: rgba(245, 243, 233, 0.9); } #header-inner { float: right; } #u-big, #d-big { position: absolute; z-index: 1000; } #u-big { top: 60px; left: 50%; margin-left: -620px; } #d-big { top: 80px; left: 50%; margin-left: -170px; } #ud-sm { position: absolute; top: 0; left: 0; } #ud-sm .logo { right: inherit; margin: 0; line-height: normal; width: 180px; top: 0; left: 240px; } #ud-sm .logo .slogan { margin-top: 5px; } #u-sm { position: absolute; top: 10px; left: 20px; } #d-sm { position: absolute; top: 20px; left: 155px; } .logo { font-size: 16px; position: absolute; } .logo a { cursor: pointer; transition: color .3s ease; color: #444444; text-transform: uppercase; } .logo a:hover { color: white; transition: none; } .logo a span { display: block; margin-left: 20px; } .logo .slogan { color: #ea7d67; font-style: italic; margin-top: 10px; margin-left: 60px; } #block-system-main-menu ul { font-size: 0; position: relative; } #block-system-main-menu li { float: left; list-style: none; position: relative; margin: 0; padding: 0; } #block-system-main-menu li ul { display: none; position: absolute; top: 40px; left: 0; width: 150px; } #block-system-main-menu li ul li { display: block; float: none; } #block-system-main-menu li ul a { cursor: pointer; transition: color .3s ease; color: #ea7d67; display: block; background-color: #555; color: #f5f3e9; border-bottom: #484848 1px solid; } #block-system-main-menu li ul a:hover { color: #ea7d67; transition: none; } #block-system-main-menu li:hover ul { display: block; } #block-system-main-menu li.first span { padding-left: 30px; } #block-system-main-menu li.last a { padding-right: 30px; } #block-system-main-menu li span, #block-system-main-menu li a { cursor: pointer; transition: color .3s ease; color: #444444; font-size: 14px; font-weight: 300; padding: 0 20px; cursor: pointer; text-transform: uppercase; } #block-system-main-menu li span:hover, #block-system-main-menu li a:hover { color: #ea7d67; transition: none; } #block-system-main-menu li span:hover, #block-system-main-menu li span.active, #block-system-main-menu li a:hover, #block-system-main-menu li a.active { color: #fff; } .menu-toggle { display: none; cursor: pointer; } .front #main { padding-top: 400px; } .front #header .bot { display: none; } .front .logo { top: 150px; right: 50%; margin-right: -330px; } .front #ud-sm { top: -180px; } /* MAIN -------------------------------------------------------------- */ #main-content { width: 1100px; margin: 0 auto; z-index: 1; position: relative; } #main { padding-top: 200px; } .sidebar-first #main { float: left; width: 680px; margin: 0 40px 0 0; } .sidebar-first #side { float: left; width: 380px; } /* SIDE -------------------------------------------------------------- */ .side-content h2 { color: #ea7d67; font-size: 30px; font-weight: 100; text-align: center; } .side-content .panel-pane { background-color: #f1eee0; padding: 0 0 20px; margin-bottom: 20px; /*border-bottom: #ccc 1px solid;*/ position: relative; padding: 40px; } .side-content .panel-pane h2.pane-title{ margin-top: 0; } .side-content .panel-pane .views-row + .views-row{ margin-top: 10px; padding-top: 10px; border-top: #f3b99f dashed 1px; } .side-content .panel-pane li{ margin-left: 0; font-size: 14px; } .side-content .view-id-tweets li a{ color: #ea7d67; } #block-menu-menu-categories, #block-views-content-block-1 { text-align: center; } #block-menu-menu-categories ul li, #block-views-content-block-1 ul li { margin: 0; padding: 0; } #block-menu-menu-categories .more-link, #block-views-content-block-1 .more-link { text-align: center; } #follow { text-align: center; } #search-block-form input[type="text"] { width: 80%; float: left; margin-right: 4px; } .pane-menu-menu-categories { text-align: center; } #block-block-2 img { width: 100%; height: auto; } .pane-block-2 img { width: 100%; height: auto; } /* CONTACT -------------------------------------------------------------- */ /* BIO -------------------------------------------------------------- */ /* BLOG POST -------------------------------------------------------------- */ .link, .post { margin-bottom: 60px; padding-bottom: 60px; /*border-bottom: #f3b99f dashed 1px;*/ position: relative; } .link .header h2, .post .header h2 { font-size: 30px; font-weight: 300; margin-bottom: 5px; font-family: "Lato", sans-serif; font-weight: 300; } .link .post-date, .post .post-date { /*font-size: 14px; color: lighten($text_main, 40%);*/ color: #ea7d67; font-size: 40px; position: absolute; top: -20px; left: -20px; font-weight: 100; } .link .post-date-comments, .post .post-date-comments { font-size: 14px; color: #aaaaaa; } .link .comments_btn a, .post .comments_btn a { cursor: pointer; transition: color .3s ease; color: #ea7d67; font-style: italic; font-size: 14px; } .link .comments_btn a:hover, .post .comments_btn a:hover { color: #444444; transition: none; } .link .body, .post .body { font-size: 14px; } .post .body p{ font-size: 14px; } .link .footer, .post .footer { clear: both; margin-top: 10px; border-top: #ccc dashed 1px; font-size: 12px; padding-top: 10px; } .link .footer h3, .post .footer h3 { font-weight: 400; font-size: 12px; text-transform: uppercase; } .link .tags, .post .tags { font-size: 12px; text-transform: uppercase; width: 70%; float: left; } .link .tags h3, .post .tags h3 { display: inline-block; } .link .tags a, .post .tags a { margin-left: 10px; margin-bottom: 4px; display: inline-block; } .link .share, .post .share { float: right; text-align: right; } .link .share h3, .post .share h3 { margin-bottom: 5px; } .link .share .service-links, .post .share .service-links { float: right; } .link .service-links, .post .service-links { /* display: none; */ } .post-teaser .header { margin: 120px 5px 20px -20px; border-left: #ea7d67 solid 5px; padding: 0 0 0 15px; } .post-teaser .main { width: 680px; float: left; margin-right: 20px; } .post-teaser .image { background-color: #fff; padding: 40px; position: relative; } .post-teaser .image img { width: 100%; height: auto; } .post-teaser .side { float: left; position: relative; width: 380px; } .post-teaser .read-more { text-align: center; } .post-teaser .read-more a { color: #ea7d67; margin: 20px; font-size: 40px; font-weight: 100; letter-spacing: 2px; padding: 10px 20px; display: inline-block; text-transform: uppercase; transition: all .3s ease; } .post-teaser .read-more a:hover { color: #444; } .post-teaser .footer a { cursor: pointer; transition: color .3s ease; color: #aaaaaa; } .post-teaser .footer a:hover { color: #ea7d67; transition: none; } .post-teaser .footer .tags { width: 30%; font-weight: 400; } .post-teaser .footer .tags a { display: block; padding: 0; margin: 0 0 4px;; text-transform: uppercase; } .post-full .header { text-align: center; padding: 0 40px; } .post-full .header h1 { font-weight: 300; font-size: 40px; margin-bottom: 5px; } .post-full .summary { font-size: 14px; padding: 20px 0; border-top: #ccc 1px solid; margin-top: 20px; text-align: left; } .post-full .body p { padding: 10px 40px; line-height: 24px; margin: 0; } .post-full .body a { cursor: pointer; transition: color .3s ease; color: #ea7d67; } .post-full .body a:hover { color: #444444; transition: none; } .post-full .body h2, .post-full .body h3, .post-full .body h4, .post-full .body h5 { padding: 0 40px; font-weight: 300; font-style: italic; margin-top: 20px; } .post-full .body h2 { font-size: 30px; } .post-full .body h3 { font-size: 24px; } .post-full .body h4 { font-size: 18px; } .post-full .body h2 + p, .post-full .body h3 + p, .post-full .body h4 + p { padding-top: 10px; } .post-full .body p.image-holder { padding: 40px; text-align: center; background-color: #fff; margin: 10px 0 20px; } .post-full .body ul, .post-full .body ol { padding: 10px 40px; margin-left: 20px; } .post-full .body ul li { list-style: circle; } .post-full .body ol li { list-style: decimal; } .post-full .body img { width: 100%; height: auto; } .post .credits{ font-size: 12px; text-transform: uppercase; margin: 40px 0 20px; } .post .credits h2{ font-weight: 400; font-size: 12px; margin-bottom: 5px; } .item-list .pager{ margin-bottom: 60px; font-size: 30px; font-weight: 100; text-transform: uppercase; letter-spacing: 2px; padding: 40px; background-color: #f1eee0; } .item-list .pager a{ color: #ea7d67; } .item-list .pager a:hover{ color: #444; } .item-list .pager .pager-current{ font-weight: 100; font-size: 20px; } .item-list .pager li{ margin: 0 40px 0; } /* LINKS -------------------------------------------------------------- */ .link .image { float: left; margin-right: 20px; } /* ABOUT & CONTACT -------------------------------------------------------------- */ .left, .right{ width: 48%; float: left; margin-bottom: 60px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .left{ margin-right: 4%; } .page-node-52 #main, .page-node-53 #main{ } .page-node-52 #main img, .page-node-53 #main img{ max-width: 100%; height: auto; } .page-node-53 #main h2{ font-weight: 100; font-size: 60px; margin-bottom: 40px; } .page-node-53 #main a{ font-size: 24px; color: #ea7d67; } .page-node-53 #main a:hover{ color: #444; } .about-right, .about-mid, .about-left { } .about-left, .about-right { width: 48%; margin: 20px auto; } .about-mid { width: 24%; margin: 0 3%; } .about-mid p { font-size: 16px; line-height: 30px; text-align: justify; } .about-page{ max-width: 750px; margin: auto; } .about-page .left img, .about-page .right img{ width: 100%; height: auto; } .about-page h1{ text-align: center; } .team-member h2, .team-member h3{ font-weight: 300; text-align: center; } .team-member h2{ margin-top: 20px; margin-bottom: 10px; } .team-member h3{ margin-bottom: 20px; color: #ea7d67; font-size: 16px; text-transform: uppercase; letter-spacing: 2px; } .contact-page{ text-align: center; max-width: 750px; margin: auto; } /* COMMENTS -------------------------------------------------------------- */ .comments-holder { margin: 30px auto 50px; } .comments-header { font-style: italic; border-bottom: #ccc solid 1px; margin-bottom: 30px; } .comments-header h2 { float: left; font-size: 30px; font-weight: 300; } .comments-header .add-comment-btn { color: #ea7d67; float: right; cursor: pointer; text-transform: uppercase; margin-top: 10px; } .comment-form-holder { padding: 30px 0 30px; display: none; border-bottom: #ccc dashed 1px; } .comment-form { width: 400px; margin: 0 auto; padding: 30px; display: none;} .page-comment-reply .comment-form { display: block; } .page-comment-reply .comment{ margin: 20px auto 0; } .pane-node-comments { padding-top: 20px; } .comments { margin: 0 auto; padding: 30px 0; } .comment { width: 430px; margin-bottom: 40px; } .comment .comment-header { margin: 0 5px 20px -20px; border-left: #ea7d67 solid 5px; padding: 0 0 0 15px; } .comment .comment-header h2 { font-size: 20px; font-weight: 300; } .comment .comment-header h3 { font-size: 14px; color: #ea7d67; font-weight: 300; font-style: italic; } .comment .website a { color: #ea7d67; float: left; } .comment .website a:hover { color: #444444; } .comment .submitted { padding: 5px 10px; background-color: #f2efe2; font-size: 10px; text-transform: uppercase; } .comment .field-name-comment-body { padding: 0; font-size: 14px; } .comment .footer { clear: both; margin-top: 10px; border-top: #ccc dashed 1px; font-size: 12px; padding-top: 10px; text-transform: uppercase; } .comment .footer ul.links { float: right; text-align: right; } /* SERVICE LINKS -------------------------------------------------------------- */ .service-links li { float: left; margin-left: 10px; } /* FOOTER -------------------------------------------------------------- */ #footer { position: relative; clear: both; background-color: #f1eee0; font-size: 14px; margin-top: 60px; } #footer h2{ color: #EA7D67; font-size: 30px; font-weight: 100; text-align: center; margin-bottom: 20px; } #copy{ background-color: #eae6d1; line-height: 100px; text-align: center; } #copy a{ color: #ea7d67; } #copy a:hover{ color: #444; } #footer-main{ max-width: 1100px; margin: auto; padding: 40px; } #block-instagram-block-instagram-block{ float: left; margin-right: 4.5%; width: 30%; position: relative; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } #block-instagram-block-instagram-block img{ border: #fff 20px solid; width: 100%; height: auto; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } #block-views-tweets-block{ width: 30%; float: left; margin-right: 4.5%; } #block-views-tweets-block li + li{ margin-top: 10px; padding-top: 10px; border-top: #f3b99f dashed 1px; } #block-views-tweets-block a{ color: #ea7d67; } #block-block-1{ float: left; width: 30%; margin-top: 60px; } #block-mailchimp-lists-upstairs-downstairs-newsletter{ float: left; width: 30%; } #block-mailchimp-lists-upstairs-downstairs-newsletter .form-submit{ float: right; } /* SOCIAL -------------------------------------------------------------- */ .social-icons .icon { background: #ea7d67 url(../images/bb_social.png) no-repeat; height: 30px; width: 30px; display: inline-block; border-radius: 15px; margin: 10px 0 0 10px; transition: background-color .3s ease; } .social-icons .icon:hover { background-color: #555; } .social-icons .twitter { background-position: -30px 0; } .social-icons .instagram { background-position: -60px 0; } .social-icons .youtube { background-position: -90px 0; } .social-icons .pinterest { background-position: -120px 0; } .social-icons.big{ padding-top: 40px; } .social-icons.big .icon { margin-top: 40px; background: #ea7d67 url(../images/bb_social_big.png) no-repeat; height: 50px; width: 50px; display: inline-block; border-radius: 25px; margin: 10px 0 0 10px; transition: background-color .3s ease; } .social-icons.big .icon:hover { background-color: #555; } .social-icons.big .twitter { background-position: -50px 0; } .social-icons.big .instagram { background-position: -100px 0; } .social-icons.big .youtube { background-position: -150px 0; } .social-icons.big .pinterest { background-position: -200px 0; } /* FORMS -------------------------------------------------------------- */ .form-item { margin-top: 0; } input[type="text"], input[type="password"], input[type="email"], textarea { width: 98%; padding: 5px 1%; border: none; background-color: white; font-size: 18px; font-family: "Lato"; font-weight: 300; color: #c4c4c4; box-shadow: 1px 1px 1px #ccc inset; font-family: 'Lato', sans-serif; } input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, textarea:focus { background-color: #fdfdfb; color: #444444; } label { font-size: 16px; font-style: italic; font-weight: 300; } input[type="submit"] { background-color: #ea7d67; color: #f5f3e9; padding: 15px 20px 10px; cursor: pointer; font-size: 16px; letter-spacing: 2px; font-style: italic; font-weight: 300; border: none; margin-left: 5px; border-radius: 3px; } input[type="submit"]:hover { background-color: white; color: #ea7d67; } .form-actions { text-align: right; margin-bottom: 0; } .marker, .form-required{ color: #ea7d67; } /* EXTRAS -------------------------------------------------------------- */ body.cke_show_borders { width: 680px !important; min-width: 680px; margin: 0 auto; } .image-post_full { position: relative; z-index: 1; } .hover-pinterest { position: absolute; right: 0px; bottom: 0px; z-index: 999; background-image: url("../images/bb_pinit.png"); background-repeat: no-repeat; background-position: bottom right; display: none; width: 100px; height: 100px; transition: all .3s ease; opacity: .8; } .hover-pinterest:hover { opacity: 1; } .hover-pinterest.show-pin-btn{ display: block; } .pin-it-link { height: 100%; width: 100%; display: block; } .front .messages-holder{ z-index: 10000; position: absolute; top: 100px; } .messages-holder .messages{ border: none !important; margin: 40px 0; } .front .messages-holder .messages{ padding-right: 50px; } .messages-holder .messages li{ margin-bottom: 10px; list-style: disc; } .messages-holder .messages.error{ background: none #ef9292; color: #f5f3e9; } .messages-holder .messages.status{ background: none #8fba83; color: #f5f3e9; } /* MOBILE -------------------------------------------------------------- */ @media only screen and (max-width: 1120px) { #main-content { width: 100%; margin: 0; } #wrapper { width: 100%; } #u-big { margin: 0; left: -5%; top: 60px; width: 40%; } #u-big img { width: 100%; height: auto; } #d-big { margin: 0; left: 35%; top: 80px; width: 40%; } #d-big img { width: 100%; height: auto; } .page-node-53 #main a{ font-size: 18px; } #main { padding: 180px 20px 0; } .post-teaser .main { width: 60%; } .post-teaser .side { width: 35%; } .post-teaser .image { padding: 20px; } .sideright-bricks .main-content { width: 60%; } .sideright-bricks .side-content { width: 37%; margin-left: 3%; } .side-content .pane-block { padding: 20px; } .comment { width: 80%; } .comment-form-holder { clear: both; } .comment-form-holder form { padding: 0; width: 100%; } .comments-holder .header h2 { font-size: 24px; } .comments-holder .header .add-comment-btn { font-size: 14px; } } @media only screen and (max-width: 568px) { #main-content { width: 100%; margin: 0; } #main { padding: 100px 20px 0; } #header { margin-bottom: 0; text-align: center; } #header #nav li { float: none; display: inline-block; } #header #nav li a { font-size: 12px; padding: 0 10px; } #header #header-inner { float: none; } #header #nav li ul li { display: list-item; text-align: left; } .front #main { padding-top: 200px; } .logo { float: none; margin: 0 0 10px; } .logo { display: none; } #u-big { margin: 0; left: 20px; top: 60px; } #u-big img { width: 160px; height: auto; } .bot { display: none; } #d-big { margin: 0; left: 185px; top: 80px; } #d-big img { width: 155px; height: auto; } #ud-sm #u-sm, #ud-sm #d-sm { display: none; } #ud-sm .logo { display: none; left: 20px; text-align: left; } /*.menu-toggle{display: block; margin-bottom: 10px;}*/ .sideright-bricks .main-content { width: 100%; } .sideright-bricks .side-content { width: 100%; margin-left: 0; margin-top: 40px; } .post-full .header h1 { font-size: 30px; } .post-full .body p.image-holder { padding: 20px; } .post-teaser .main { width: 100%; } .post-teaser .side { width: 100%; } .post-teaser .image { padding: 20px; } .post-teaser .header { margin: 20px 0 0 -20px; } #block-instagram-block-instagram-block, #block-block-1, #block-mailchimp-lists-upstairs-downstairs-newsletter, #block-views-tweets-block{ float: none; margin-right:0; width: 100%; margin-bottom: 60px; } }
bed718/ud
sites/all/themes/bb/css/style.css
CSS
gpl-2.0
23,222
18.20761
156
0.578503
false
/* $Id$ */ /** @file * IPRT - User & Kernel Memory, Ring-0 Driver, Solaris. */ /* * Copyright (C) 2009 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or modify it under the terms of the GNU * General Public License (GPL) as published by the Free Software * Foundation, in version 2 as it comes in the "COPYING" file of the * VirtualBox OSE distribution. VirtualBox OSE is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. * * The contents of this file may alternatively be used under the terms * of the Common Development and Distribution License Version 1.0 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the * VirtualBox OSE distribution, in which case the provisions of the * CDDL are applicable instead of those of the GPL. * * You may elect to license modified versions of this file under the * terms and conditions of either the GPL or the CDDL or both. */ /******************************************************************************* * Header Files * *******************************************************************************/ #include "the-solaris-kernel.h" #include "internal/iprt.h" #include <iprt/mem.h> #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) # include <iprt/asm-amd64-x86.h> #endif #include <iprt/assert.h> #include <iprt/err.h> RTR0DECL(int) RTR0MemUserCopyFrom(void *pvDst, RTR3PTR R3PtrSrc, size_t cb) { int rc; RT_ASSERT_INTS_ON(); rc = ddi_copyin((const char *)R3PtrSrc, pvDst, cb, 0 /*flags*/); if (RT_LIKELY(rc == 0)) return VINF_SUCCESS; return VERR_ACCESS_DENIED; } RTR0DECL(int) RTR0MemUserCopyTo(RTR3PTR R3PtrDst, void const *pvSrc, size_t cb) { int rc; RT_ASSERT_INTS_ON(); rc = ddi_copyout(pvSrc, (void *)R3PtrDst, cb, 0 /*flags*/); if (RT_LIKELY(rc == 0)) return VINF_SUCCESS; return VERR_ACCESS_DENIED; } RTR0DECL(bool) RTR0MemUserIsValidAddr(RTR3PTR R3Ptr) { return R3Ptr < kernelbase; } RTR0DECL(bool) RTR0MemKernelIsValidAddr(void *pv) { return (uintptr_t)pv >= kernelbase; } RTR0DECL(bool) RTR0MemAreKrnlAndUsrDifferent(void) { return true; }
dezelin/vbox-haiku
src/VBox/Runtime/r0drv/solaris/memuserkernel-r0drv-solaris.c
C
gpl-2.0
2,352
27.682927
80
0.632653
false
/** * @file g_func.c * @brief func_* edicts */ /* All original material Copyright (C) 2002-2011 UFO: Alien Invasion. Original file from Quake 2 v3.21: quake2-2.31/game/g_spawn.c Copyright (C) 1997-2001 Id Software, 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; 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. */ #include "g_local.h" /** * @brief If an actor was standing on the breakable that is going to get destroyed, we have to let him fall to the ground * @param self The breakable edict * @param activator The touching edict * @note This touch function is only executed if the func_breakable edict has a HP level of 0 (e.g. it is already destroyed) * @return false because this is no client action */ static qboolean Touch_Breakable (edict_t *self, edict_t *activator) { /* not yet broken */ if (self->HP != 0) return qfalse; /** @todo check that the actor is standing upon the breakable */ if (G_IsActor(activator)) G_ActorFall(activator); return qfalse; } static qboolean Destroy_Breakable (edict_t *self) { vec3_t origin; const char *model = self->model; VectorCenterFromMinsMaxs(self->absmin, self->absmax, origin); /* the HP value is used to decide whether this was a triggered call or a * call during a fight - a triggered call will be handled differently in * terms of timing and the related particle effects in the client code */ if (self->HP == 0) G_EventModelExplodeTriggered(self); else G_EventModelExplode(self); if (self->particle) G_SpawnParticle(origin, self->spawnflags, self->particle); switch (self->material) { case MAT_GLASS: G_EventSpawnSound(PM_ALL, qfalse, self, origin, "misc/breakglass+"); break; case MAT_METAL: G_EventSpawnSound(PM_ALL, qfalse, self, origin, "misc/breakmetal+"); break; case MAT_ELECTRICAL: G_EventSpawnSound(PM_ALL, qfalse, self, origin, "misc/breakelectric+"); break; case MAT_WOOD: G_EventSpawnSound(PM_ALL, qfalse, self, origin, "misc/breakwood+"); break; case MAT_MAX: break; } G_TouchEdicts(self, 10.0f); /* destroy the door trigger */ if (self->child) G_FreeEdict(self->child); /* now we can destroy the edict completely */ G_FreeEdict(self); G_RecalcRouting(model); return qtrue; } /** * @brief func_breakable (0.3 0.3 0.3) ? * Used for breakable objects. * @note These edicts are added client side as local models, * they are stored in the lmList (because they are inline models) * for tracing (see inlineList in cmodel.c) * @sa CM_EntTestLine * @sa LM_AddModel * @sa SV_SetModel * @sa G_SendEdictsAndBrushModels */ void SP_func_breakable (edict_t *ent) { ent->classname = "breakable"; ent->type = ET_BREAKABLE; ent->flags |= FL_DESTROYABLE; /* set an inline model */ gi.SetModel(ent, ent->model); ent->solid = SOLID_BSP; gi.LinkEdict(ent); Com_DPrintf(DEBUG_GAME, "func_breakable: model (%s) num: %i mins: %i %i %i maxs: %i %i %i origin: %i %i %i\n", ent->model, ent->mapNum, (int)ent->mins[0], (int)ent->mins[1], (int)ent->mins[2], (int)ent->maxs[0], (int)ent->maxs[1], (int)ent->maxs[2], (int)ent->origin[0], (int)ent->origin[1], (int)ent->origin[2]); ent->destroy = Destroy_Breakable; ent->touch = Touch_Breakable; } /* ============================================================================= DOOR FUNCTIONS ============================================================================= */ /** * @brief Slides a door * @note The new door state must already be set * @param[in,out] door The entity of the inline model. The aabb of this bmodel will get updated * in this function to reflect the new door position in the world * @sa LET_SlideDoor */ static void Door_SlidingUse (edict_t *door) { const qboolean open = door->doorState == STATE_OPENED; vec3_t moveAngles, moveDir, distanceVec; int distance; /* get the movement angle vector - a negative speed value will close the door*/ GET_SLIDING_DOOR_SHIFT_VECTOR(door->dir, open ? 1 : -1, moveAngles); /* get the direction vector from the movement angles that were set on the entity */ AngleVectors(moveAngles, moveDir, NULL, NULL); moveDir[0] = fabsf(moveDir[0]); moveDir[1] = fabsf(moveDir[1]); moveDir[2] = fabsf(moveDir[2]); /* calculate the distance from the movement angles and the entity size. This is the * distance the door has to slide to fully open or close */ distance = DotProduct(moveDir, door->size); /* the door is moved in one step on the server side - lerping is not needed here - so we * perform the scalar multiplication with the distance the door must move in order to * fully close/open */ VectorMul(distance, moveAngles, distanceVec); /* set the updated position. The bounding boxes that are used for tracing must be * shifted when the door state changes. As the mins and maxs of the aabb are absolute * world coordinates in the map we have to translate the position by the above * calculated movement vector */ #if 0 /** @todo this is not yet working for tracing and pathfinding - check what must be done to * allow shooting and walking through the opened door */ VectorAdd(door->origin, distanceVec, door->origin); gi.SetInlineModelOrientation(door->model, door->origin, door->angles); #else VectorAdd(door->mins, distanceVec, door->mins); VectorAdd(door->maxs, distanceVec, door->maxs); #endif } /** * @brief Opens/closes a door * @note Use function for func_door * @todo Check if the door can be opened or closed - there should not be * anything in the way (e.g. an actor) */ static qboolean Door_Use (edict_t *door, edict_t *activator) { if (door->doorState == STATE_CLOSED) { door->doorState = STATE_OPENED; /* change rotation/origin and relink */ if (door->type == ET_DOOR) { if (door->dir & DOOR_OPEN_REVERSE) door->angles[door->dir & 3] -= DOOR_ROTATION_ANGLE; else door->angles[door->dir & 3] += DOOR_ROTATION_ANGLE; } else if (door->type == ET_DOOR_SLIDING) { Door_SlidingUse(door); } gi.LinkEdict(door); /* maybe the server called this because the door starts opened */ if (G_MatchIsRunning()) { /* let everybody know, that the door opens */ G_EventDoorOpen(door); if (door->noise[0] != '\0') G_EventSpawnSound(PM_ALL, qfalse, door, door->origin, door->noise); } } else if (door->doorState == STATE_OPENED) { door->doorState = STATE_CLOSED; /* change rotation and relink */ if (door->type == ET_DOOR) { if (door->dir & DOOR_OPEN_REVERSE) door->angles[door->dir & 3] += DOOR_ROTATION_ANGLE; else door->angles[door->dir & 3] -= DOOR_ROTATION_ANGLE; } else if (door->type == ET_DOOR_SLIDING) { Door_SlidingUse(door); } gi.LinkEdict(door); /* closed is the standard, opened is handled above - we need an active * team here already */ if (G_MatchIsRunning()) { /* let everybody know, that the door closes */ G_EventDoorClose(door); if (door->noise[0] != '\0') G_EventSpawnSound(PM_ALL, qfalse, door, door->origin, door->noise); } } else return qfalse; /* Update model orientation */ gi.SetInlineModelOrientation(door->model, door->origin, door->angles); Com_DPrintf(DEBUG_GAME, "Server processed door movement.\n"); /* Update path finding table */ G_RecalcRouting(door->model); if (activator && G_IsLivingActor(activator)) { /* Check if the player appears/perishes, seen from other teams. */ G_CheckVis(activator, qtrue); /* Calc new vis for the activator. */ G_CheckVisTeamAll(activator->team, qfalse, activator); } return qtrue; } /** * @brief Trigger to open the door we are standing in front of it * @sa CL_DoorOpen * @sa LE_CloseOpen * @sa CL_ActorDoorAction * @sa AI_CheckUsingDoor */ static qboolean Touch_DoorTrigger (edict_t *self, edict_t *activator) { if (self->owner && self->owner->inuse) { if (G_IsAI(activator)) { /* let the ai interact with the door */ if (self->flags & FL_GROUPSLAVE) self = self->groupMaster; if (AI_CheckUsingDoor(activator, self->owner)) G_ActorUseDoor(activator, self->owner); /* we don't want the client action stuff to be send for ai actors */ return qfalse; } else { /* prepare for client action */ G_ActorSetClientAction(activator, self->owner); return qtrue; } } return qfalse; } /** * @brief Left the door trigger zone - reset the client action * @param self The trigger * @param activator The edict that left the trigger zone */ static void Reset_DoorTrigger (edict_t *self, edict_t *activator) { if (activator->clientAction == self->owner) G_ActorSetClientAction(activator, NULL); } #define REVERSE 0x00000200 /** * @brief func_door (0 .5 .8) ? * "health" if set, door is destroyable * @sa SV_SetModel * @sa LM_AddModel * @sa G_SendEdictsAndBrushModels */ void SP_func_door (edict_t *ent) { edict_t *other; ent->classname = "door"; ent->type = ET_DOOR; if (!ent->noise) ent->noise = "doors/open_close"; /* set an inline model */ gi.SetModel(ent, ent->model); ent->solid = SOLID_BSP; gi.LinkEdict(ent); ent->doorState = STATE_CLOSED; ent->dir = YAW; if (ent->spawnflags & REVERSE) ent->dir |= DOOR_OPEN_REVERSE; if (ent->HP) ent->flags |= FL_DESTROYABLE; ent->flags |= FL_CLIENTACTION; /* spawn the trigger entity */ other = G_TriggerSpawn(ent); other->touch = Touch_DoorTrigger; other->reset = Reset_DoorTrigger; ent->child = other; G_ActorSetTU(ent, TU_DOOR_ACTION); ent->use = Door_Use; /* the door should start opened */ if (ent->spawnflags & FL_TRIGGERED) G_UseEdict(ent, NULL); ent->destroy = Destroy_Breakable; } void SP_func_door_sliding (edict_t *ent) { ent->classname = "doorsliding"; ent->type = ET_DOOR_SLIDING; if (!ent->noise) ent->noise = "doors/slide"; /* set an inline model */ gi.SetModel(ent, ent->model); ent->solid = SOLID_BSP; gi.LinkEdict(ent); if (ent->spawnflags & REVERSE) ent->dir |= DOOR_OPEN_REVERSE; if (ent->HP) ent->flags |= FL_DESTROYABLE; ent->doorState = STATE_CLOSED; ent->speed = 10; ent->use = Door_Use; ent->destroy = Destroy_Breakable; } /** * @brief Spawns a rotating solid inline brush model * @sa SV_SetModel * @sa LM_AddModel */ void SP_func_rotating (edict_t *ent) { ent->classname = "rotating"; ent->type = ET_ROTATING; /* set an inline model */ gi.SetModel(ent, ent->model); ent->solid = SOLID_BSP; gi.LinkEdict(ent); /* the lower, the faster */ if (!ent->speed) ent->speed = 50; if (ent->HP) ent->flags |= FL_DESTROYABLE; ent->destroy = Destroy_Breakable; }
ptitSeb/UFO--AI-OpenPandora
src/game/g_func.c
C
gpl-2.0
11,042
27.240409
124
0.6785
false
<?php include_once "../libs/myLib.php"; if (!isset($_SESSION['login'])) { session_start(); } $nombre = $_POST['nombre']; $fechaInicio= $_POST['fechaInicio']; $horaInicio = $_POST['horaInicio']; $fechaFin = $_POST['fechaInicio']; $horaFin = $_POST['horaFin']; $precio = $_POST['precio']; $plazas = $_POST['plazas']; $descripcion = $_POST['descripcion']; $requisitos = $_POST['requisitos']; $imagen = "assets/img/evento.png"; $empresa = ""; $usuario = ""; $fechaI = $fechaInicio.' '.$horaInicio; $fechaF = $fechaFin.' '.$horaFin; $todoInicio = date('Y-m-d H:i:s', strtotime($fechaI)); $todoFin = date('Y-m-d H:i:s', strtotime($fechaF)); $salir = false; if ($_POST['empresa'] != "" && $_POST['usuario'] == ""){ $empresa = $_POST['empresa']; $sql = "INSERT INTO evento (nombre,fechaInicio,fechaFin,precio,plazas,descripcion,requisitos,empresa,imagen) VALUES ('$nombre','$todoInicio','$todoFin','$precio','$plazas','$descripcion','$requisitos','$empresa','$imagen')"; } else if ($_POST['empresa'] == "" && $_POST['usuario'] != ""){ $usuario = $_POST['usuario']; $sql = "INSERT INTO evento (nombre,fechaInicio,fechaFin,precio,plazas,descripcion,requisitos,usuario,imagen) VALUES ('$nombre','$todoInicio','$todoFin','$precio','$plazas','$descripcion','$requisitos','$usuario','$imagen')"; } else { $salir = true; } if (!$salir) { $conexion = dbConnect(); $resultado = mysqli_query($conexion, $sql); if ($resultado) { if (isset($_FILES['imagen']) && $_FILES['imagen']['name']) { $subidaCorrecta = false; $sql = "SELECT id FROM evento WHERE id=@@Identity"; $resultado = mysqli_query($conexion, $sql); $row = mysqli_fetch_array($resultado); $id = $row['id']; if ($_FILES['imagen']['error'] > 0) { salir2("Ha ocurrido un error en la carga de la imagen", -1, "gestionarEventos.php"); } else { $extensiones = array("image/jpg", "image/jpeg", "image/png"); $limite = 4096; if (in_array($_FILES['imagen']['type'], $extensiones) && $_FILES['imagen']['size'] < $limite * 1024) { $foldername = "assets/img/eventos"; $foldermkdir = "../" . $foldername; if (!is_dir($foldermkdir)) { mkdir($foldermkdir, 0777, true); } $extension = "." . split("/", $_FILES['imagen']['type'])[1]; $filename = $id . $extension; $ruta = $foldername . "/" . $filename; $rutacrear = $foldermkdir . "/" . $filename; if (!file_exists($rutacrear)) { $subidaCorrecta = @move_uploaded_file($_FILES['imagen']['tmp_name'], $rutacrear); $imagen = $ruta; } } if ($subidaCorrecta) { $sql = "UPDATE evento SET imagen='$imagen' WHERE id=$id"; $resultado = mysqli_query($conexion, $sql); mysqli_close($conexion); if ($resultado) { salir2("Evento añadido correctamente", 0, "gestionarEventos.php"); } else { salir2("Ha ocurrido un error con la imagen", -1, "gestionarEventos.php"); } } else { // No se ha subido la imagen mysqli_close($conexion); salir2("Ha ocurrido un error subiendo la imagen", -1, "gestionarEventos.php"); } } } else { // No hay imagen mysqli_close($conexion); salir2("Evento añadido correctamente", 0, "gestionarEventos.php"); } } else { // Fallo en INSERT mysqli_close($conexion); salir2("Error añadiendo el evento", -1, "gestionarEventos.php"); } } else { salir2("No se ha introducido correctamente el organizador", -1, "gestionarEventos.php"); } ?>
fblupi/grado_informatica-DIU
G-Tech/scripts/crearEvento.php
PHP
gpl-2.0
3,659
36.306122
125
0.575219
false
/* * This file is part of the OregonCore Project. See AUTHORS file for Copyright information * * 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, see <https://www.gnu.org/licenses/>. */ /* ScriptData SDName: Boss_Moam SD%Complete: 100 SDComment: VERIFY SCRIPT AND SQL SDCategory: Ruins of Ahn'Qiraj EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" #define EMOTE_AGGRO -1509000 #define EMOTE_MANA_FULL -1509001 #define SPELL_TRAMPLE 15550 #define SPELL_DRAINMANA 27256 #define SPELL_ARCANEERUPTION 25672 #define SPELL_SUMMONMANA 25681 #define SPELL_GRDRSLEEP 24360 //Greater Dreamless Sleep struct boss_moamAI : public ScriptedAI { boss_moamAI(Creature* c) : ScriptedAI(c) {} Unit* pTarget; uint32 TRAMPLE_Timer; uint32 DRAINMANA_Timer; uint32 SUMMONMANA_Timer; uint32 i; uint32 j; void Reset() { i = 0; j = 0; pTarget = NULL; TRAMPLE_Timer = 30000; DRAINMANA_Timer = 30000; } void EnterCombat(Unit* who) { DoScriptText(EMOTE_AGGRO, me); pTarget = who; } void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; //If we are 100%MANA cast Arcane Erruption //if (j == 1 && me->GetMana()*100 / me->GetMaxMana() == 100 && !me->IsNonMeleeSpellCast(false)) { DoCastVictim(SPELL_ARCANEERUPTION); DoScriptText(EMOTE_MANA_FULL, me); } //If we are <50%HP cast MANA FIEND (Summon Mana) and Sleep //if (i == 0 && me->GetHealth()*100 / me->GetMaxHealth() <= 50 && !me->IsNonMeleeSpellCast(false)) { i = 1; DoCastVictim(SPELL_SUMMONMANA); DoCastVictim(SPELL_GRDRSLEEP); } //SUMMONMANA_Timer if (i == 1 && SUMMONMANA_Timer <= diff) { DoCastVictim(SPELL_SUMMONMANA); SUMMONMANA_Timer = 90000; } else SUMMONMANA_Timer -= diff; //TRAMPLE_Timer if (TRAMPLE_Timer <= diff) { DoCastVictim(SPELL_TRAMPLE); j = 1; TRAMPLE_Timer = 30000; } else TRAMPLE_Timer -= diff; //DRAINMANA_Timer if (DRAINMANA_Timer <= diff) { DoCastVictim(SPELL_DRAINMANA); DRAINMANA_Timer = 30000; } else DRAINMANA_Timer -= diff; DoMeleeAttackIfReady(); } }; CreatureAI* GetAI_boss_moam(Creature* pCreature) { return new boss_moamAI (pCreature); } void AddSC_boss_moam() { Script* newscript; newscript = new Script; newscript->Name = "boss_moam"; newscript->GetAI = &GetAI_boss_moam; newscript->RegisterSelf(); }
OregonCore/OregonCore
src/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp
C++
gpl-2.0
3,347
25.776
106
0.605019
false
.block-ebog_banner .content { position: relative; } .block-ebog_banner .bottom-bar { background-clip: padding-box; -webkit-background-clip: padding-box; -moz-background-clip: padding; background-color: #1b75bc; border-radius: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; -webkit-border-radius: 0 0 4px 4px; bottom: 0; height: 26px; left: 0; position: absolute; width: 100%; } .block-ebog_banner .bottom-bar a { color: #fff; line-height: 26px; padding: 3px 7px; text-decoration: none; } .block-ebog_banner .bottom-bar a:hover { border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; box-shadow: inset 0 0 3px #000000; -webkit-box-shadow: inset 0 0 3px #000000; -moz-box-shadow: inset 0 0 3px #000000; border: 1px solid #3069b3; padding: 2px 6px; text-decoration: underline; } .block-ebog_banner .ebog-banner-image img { height: auto; width: 100%; }
aakb/netlydbog
sites/all/modules/ebog_banner/css/ebog_banner_style.css
CSS
gpl-2.0
927
21.071429
44
0.678533
false
<!DOCTYPE html> <html class="no-js" lang="en"> <head> <meta charset="utf-8"> <title>Titanium Rings Forever style guide</title> <meta name="description" content=""> <meta name="generator" content="kss-node"> <meta name="viewport" content="width=device-width"> <link rel="stylesheet" href="kss-assets/kss.css"> <link rel="stylesheet" href="//brick.a.ssl.fastly.net/Lora:400i/Roboto:500,300,700,900"> <link rel="stylesheet" href="../../css/styles.css"> <link rel="stylesheet" href="../../css/styleguide.css"> </head> <body id="kss-node" class="kss-fullscreen-mode"> <div class="kss-sidebar kss-style"> <header class="kss-header"> <h1 class="kss-doc-title">Titanium Rings Forever style guide</h1> </header> <nav class="kss-nav"> <ul class="kss-nav__menu"> <li class="kss-nav__menu-item"> <a class="kss-nav__menu-link" href="./"> <span class="kss-nav__ref">0</span ><span class="kss-nav__name">Overview</span> </a> </li> <li class="kss-nav__menu-item"> <a class="kss-nav__menu-link" href="section-variables.html"> <span class="kss-nav__ref">1</span><span class="kss-nav__name">Variables</span> </a> </li> <li class="kss-nav__menu-item"> <a class="kss-nav__menu-link" href="section-base.html"> <span class="kss-nav__ref">2</span><span class="kss-nav__name">Base defaults</span> </a> </li> <li class="kss-nav__menu-item"> <a class="kss-nav__menu-link" href="section-components.html"> <span class="kss-nav__ref">3</span><span class="kss-nav__name">Components</span> </a> </li> <li class="kss-nav__menu-item"> <a class="kss-nav__menu-link" href="section-modules.html"> <span class="kss-nav__ref">4</span><span class="kss-nav__name">Modules</span> </a> </li> </ul> </nav> </div> <article role="main" class="kss-main"> <div id="kssref-base-type-headers" class="kss-section kss-section--depth-3 is-fullscreen"> <div class="kss-style"> <h3 class="kss-title kss-title--level-3"> <a class="kss-title__permalink" href="#kssref-base-type-headers"> <span class="kss-title__ref"> 2.3.3 <span class="kss-title__permalink-hash"> #base.type.headers </span> </span> Headers </a> </h3> </div> <div class="kss-source kss-style"> Source: <code>base/typography/_headers.scss</code>, line 1 </div> </div> </article> <!-- SCRIPTS --> <script src="kss-assets/kss.js"></script> <script src="kss-assets/scrollspy.js"></script> <script src="kss-assets/prettify.js"></script> <script src="kss-assets/kss-fullscreen.js"></script> <script src="kss-assets/kss-guides.js"></script> <script src="kss-assets/kss-markup.js"></script> <script> prettyPrint(); var spy = new ScrollSpy('#kss-node', { nav: '.kss-nav__menu-child > li > a', className: 'is-in-viewport' }); var kssFullScreen = new KssFullScreen({ idPrefix: 'kss-fullscreen-', bodyClass: 'kss-fullscreen-mode', elementClass: 'is-fullscreen' }); var kssGuides = new KssGuides({ bodyClass: 'kss-guides-mode' }); var kssMarkup = new KssMarkup({ bodyClass: 'kss-markup-mode', detailsClass: 'kss-markup' }); </script> <script src="../../js/fastclick.min.js"></script> <script src="../../js/jquery.tooltipster.min.js"></script> <script src="../../js/trf.js"></script> <script src="../../js/styleguide_slideout.min.js"></script> <script src="../../js/styleguide.js"></script> <!-- Automatically built using <a href="https://github.com/kss-node/kss-node">kss-node</a>. --> </body> </html>
rootwork/ringsforever
themes/trf/documentation/styleguide/item-base-type-headers.html
HTML
gpl-2.0
3,777
30.739496
95
0.592799
false
/* * Copyright (c) 2006 - 2012 LinogistiX GmbH * * www.linogistix.com * * Project myWMS-LOS */ package de.linogistix.los.reference.customization.common; import javax.ejb.Stateless; import de.linogistix.los.customization.LOSEventConsumerBean; import de.linogistix.los.util.event.LOSEventConsumer; /** * @author krane * */ @Stateless public class Ref_EventConsumerBean extends LOSEventConsumerBean implements LOSEventConsumer { }
Jacksson/mywmsnb
mywms.as/project-ejb/src/java/de/linogistix/los/reference/customization/common/Ref_EventConsumerBean.java
Java
gpl-2.0
446
19.272727
93
0.762332
false
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator https://lammps.sandia.gov/, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #include "fix_nve.h" #include "atom.h" #include "error.h" #include "force.h" #include "respa.h" #include "update.h" using namespace LAMMPS_NS; using namespace FixConst; /* ---------------------------------------------------------------------- */ FixNVE::FixNVE(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { if (!utils::strmatch(style,"^nve/sphere") && narg < 3) error->all(FLERR,"Illegal fix nve command"); dynamic_group_allow = 1; time_integrate = 1; } /* ---------------------------------------------------------------------- */ int FixNVE::setmask() { int mask = 0; mask |= INITIAL_INTEGRATE; mask |= FINAL_INTEGRATE; mask |= INITIAL_INTEGRATE_RESPA; mask |= FINAL_INTEGRATE_RESPA; return mask; } /* ---------------------------------------------------------------------- */ void FixNVE::init() { dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) step_respa = ((Respa *) update->integrate)->step; } /* ---------------------------------------------------------------------- allow for both per-type and per-atom mass ------------------------------------------------------------------------- */ void FixNVE::initial_integrate(int /*vflag*/) { double dtfm; // update v and x of atoms in group double **x = atom->x; double **v = atom->v; double **f = atom->f; double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; if (rmass) { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { dtfm = dtf / rmass[i]; v[i][0] += dtfm * f[i][0]; v[i][1] += dtfm * f[i][1]; v[i][2] += dtfm * f[i][2]; x[i][0] += dtv * v[i][0]; x[i][1] += dtv * v[i][1]; x[i][2] += dtv * v[i][2]; } } else { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { dtfm = dtf / mass[type[i]]; v[i][0] += dtfm * f[i][0]; v[i][1] += dtfm * f[i][1]; v[i][2] += dtfm * f[i][2]; x[i][0] += dtv * v[i][0]; x[i][1] += dtv * v[i][1]; x[i][2] += dtv * v[i][2]; } } } /* ---------------------------------------------------------------------- */ void FixNVE::final_integrate() { double dtfm; // update v of atoms in group double **v = atom->v; double **f = atom->f; double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; if (rmass) { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { dtfm = dtf / rmass[i]; v[i][0] += dtfm * f[i][0]; v[i][1] += dtfm * f[i][1]; v[i][2] += dtfm * f[i][2]; } } else { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { dtfm = dtf / mass[type[i]]; v[i][0] += dtfm * f[i][0]; v[i][1] += dtfm * f[i][1]; v[i][2] += dtfm * f[i][2]; } } } /* ---------------------------------------------------------------------- */ void FixNVE::initial_integrate_respa(int vflag, int ilevel, int /*iloop*/) { dtv = step_respa[ilevel]; dtf = 0.5 * step_respa[ilevel] * force->ftm2v; // innermost level - NVE update of v and x // all other levels - NVE update of v if (ilevel == 0) initial_integrate(vflag); else final_integrate(); } /* ---------------------------------------------------------------------- */ void FixNVE::final_integrate_respa(int ilevel, int /*iloop*/) { dtf = 0.5 * step_respa[ilevel] * force->ftm2v; final_integrate(); } /* ---------------------------------------------------------------------- */ void FixNVE::reset_dt() { dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; }
rbberger/lammps
src/fix_nve.cpp
C++
gpl-2.0
4,538
25.538012
76
0.45725
false
<?php /** * @file * Zen theme's implementation for comments. * * Available variables: * - $author: Comment author. Can be link or plain text. * - $content: An array of comment items. Use render($content) to print them all, or * print a subset such as render($content['field_example']). Use * hide($content['field_example']) to temporarily suppress the printing of a * given element. * - $created: Formatted date and time for when the comment was created. * Preprocess functions can reformat it by calling format_date() with the * desired parameters on the $comment->created variable. * - $pubdate: Formatted date and time for when the comment was created wrapped * in a HTML5 time element. * - $changed: Formatted date and time for when the comment was last changed. * Preprocess functions can reformat it by calling format_date() with the * desired parameters on the $comment->changed variable. * - $new: New comment marker. * - $permalink: Comment permalink. * - $submitted: Submission information created from $author and $created during * template_preprocess_comment(). * - $picture: Authors picture. * - $signature: Authors signature. * - $status: Comment status. Possible values are: * comment-unpublished, comment-published or comment-preview. * - $title: Linked title. * - $classes: String of classes that can be used to style contextually through * CSS. It can be manipulated through the variable $classes_array from * preprocess functions. The default values can be one or more of the following: * - comment: The current template type, i.e., "theming hook". * - comment-by-anonymous: Comment by an unregistered user. * - comment-by-node-author: Comment by the author of the parent node. * - comment-preview: When previewing a new or edited comment. * - first: The first comment in the list of displayed comments. * - last: The last comment in the list of displayed comments. * - odd: An odd-numbered comment in the list of displayed comments. * - even: An even-numbered comment in the list of displayed comments. * The following applies only to viewers who are registered users: * - comment-unpublished: An unpublished comment visible only to administrators. * - comment-by-viewer: Comment by the user currently viewing the page. * - comment-new: New comment since the last visit. * - $title_prefix (array): An array containing additional output populated by * modules, intended to be displayed in front of the main title tag that * appears in the template. * - $title_suffix (array): An array containing additional output populated by * modules, intended to be displayed after the main title tag that appears in * the template. * * These two variables are provided for context: * - $comment: Full comment object. * - $node: Node object the comments are attached to. * * Other variables: * - $classes_array: Array of html class attribute values. It is flattened * into a string within the variable $classes. * * @see template_preprocess() * @see template_preprocess_comment() * @see zen_preprocess_comment() * @see template_process() * @see theme_comment() */ ?> <article class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>> <header> <p class="submitted"> <?php print 'Dodany przez '.$author.' <i>(dnia: '.format_date($node->created, 'custom', 'd.m.Y').')</i>'; ?> </p> <?php print render($title_prefix); ?> <?php if ($title): ?> <h3<?php print $title_attributes; ?>> <?php print $title; ?> <?php if ($new): ?> <mark class="new"><?php print $new; ?></mark> <?php endif; ?> </h3> <?php elseif ($new): ?> <mark class="new"><?php print $new; ?></mark> <?php endif; ?> <?php print render($title_suffix); ?> <?php if ($status == 'comment-unpublished'): ?> <p class="unpublished"><?php print t('Unpublished'); ?></p> <?php endif; ?> </header> <?php // We hide the comments and links now so that we can render them later. hide($content['links']); print render($content); ?> <?php if ($signature): ?> <footer class="user-signature clearfix"> <?php print $signature; ?> </footer> <?php endif; ?> <?php print render($content['links']) ?> </article><!-- /.comment -->
codialsoftware/hunting-project
themes/zen/zen/templates/comment.tpl.php
PHP
gpl-2.0
4,351
39.663551
101
0.669961
false
<?php namespace Drupal\commerce_order; use Drupal\commerce_price\Price; /** * Represents an adjustment. */ final class Adjustment { /** * The adjustment type. * * @var string */ protected $type; /** * The adjustment label. * * @var string */ protected $label; /** * The adjustment amount. * * @var \Drupal\commerce_price\Price */ protected $amount; /** * The adjustment percentage. * * @var string */ protected $percentage; /** * The source identifier of the adjustment. * * Points to the source object, if known. For example, a promotion entity for * a discount adjustment. * * @var string */ protected $sourceId; /** * Whether the adjustment is included in the base price. * * @var bool */ protected $included = FALSE; /** * Whether the adjustment is locked. * * @var bool */ protected $locked = FALSE; /** * Constructs a new Adjustment object. * * @param array $definition * The definition. */ public function __construct(array $definition) { foreach (['type', 'label', 'amount'] as $required_property) { if (empty($definition[$required_property])) { throw new \InvalidArgumentException(sprintf('Missing required property %s.', $required_property)); } } if (!$definition['amount'] instanceof Price) { throw new \InvalidArgumentException(sprintf('Property "amount" should be an instance of %s.', Price::class)); } $adjustment_type_manager = \Drupal::service('plugin.manager.commerce_adjustment_type'); $types = $adjustment_type_manager->getDefinitions(); if (empty($types[$definition['type']])) { throw new \InvalidArgumentException(sprintf('%s is an invalid adjustment type.', $definition['type'])); } if (!empty($definition['percentage'])) { if (is_float($definition['percentage'])) { throw new \InvalidArgumentException(sprintf('The provided percentage "%s" must be a string, not a float.', $definition['percentage'])); } if (!is_numeric($definition['percentage'])) { throw new \InvalidArgumentException(sprintf('The provided percentage "%s" is not a numeric value.', $definition['percentage'])); } } // Assume that 'custom' adjustments are always locked, for BC reasons. if ($definition['type'] == 'custom' && !isset($definition['locked'])) { $definition['locked'] = TRUE; } $this->type = $definition['type']; $this->label = (string) $definition['label']; $this->amount = $definition['amount']; $this->percentage = !empty($definition['percentage']) ? $definition['percentage'] : NULL; $this->sourceId = !empty($definition['source_id']) ? $definition['source_id'] : NULL; $this->included = !empty($definition['included']); $this->locked = !empty($definition['locked']); } /** * Gets the adjustment type. * * @return string * The adjustment type. */ public function getType() { return $this->type; } /** * Gets the adjustment label. * * @return string * The adjustment label. */ public function getLabel() { return $this->label; } /** * Gets the adjustment amount. * * @return \Drupal\commerce_price\Price * The adjustment amount. */ public function getAmount() { return $this->amount; } /** * Gets whether the adjustment is positive. * * @return bool * TRUE if the adjustment is positive, FALSE otherwise. */ public function isPositive() { return $this->amount->getNumber() >= 0; } /** * Gets whether the adjustment is negative. * * @return bool * TRUE if the adjustment is negative, FALSE otherwise. */ public function isNegative() { return $this->amount->getNumber() < 0; } /** * Gets the adjustment percentage. * * @return string|null * The percentage as a decimal. For example, "0.2" for a 20% adjustment. * Otherwise NULL, if the adjustment was not calculated from a percentage. */ public function getPercentage() { return $this->percentage; } /** * Get the source identifier. * * @return string * The source identifier. */ public function getSourceId() { return $this->sourceId; } /** * Gets whether the adjustment is included in the base price. * * @return bool * TRUE if the adjustment is included in the base price, FALSE otherwise. */ public function isIncluded() { return $this->included; } /** * Gets whether the adjustment is locked. * * Locked adjustments are not removed during the order refresh process. * * @return bool * TRUE if the adjustment is locked, FALSE otherwise. */ public function isLocked() { return $this->locked; } /** * Gets the array representation of the adjustment. * * @return array * The array representation of the adjustment. */ public function toArray() { return [ 'type' => $this->type, 'label' => $this->label, 'amount' => $this->amount, 'percentage' => $this->percentage, 'source_id' => $this->sourceId, 'included' => $this->included, 'locked' => $this->locked, ]; } /** * Adds the given adjustment to the current adjustment. * * @param \Drupal\commerce_order\Adjustment $adjustment * The adjustment. * * @return static * The resulting adjustment. */ public function add(Adjustment $adjustment) { $this->assertSameType($adjustment); $this->assertSameSourceId($adjustment); $definition = [ 'amount' => $this->amount->add($adjustment->getAmount()), ] + $this->toArray(); return new static($definition); } /** * Subtracts the given adjustment from the current adjustment. * * @param \Drupal\commerce_order\Adjustment $adjustment * The adjustment. * * @return static * The resulting adjustment. */ public function subtract(Adjustment $adjustment) { $this->assertSameType($adjustment); $this->assertSameSourceId($adjustment); $definition = [ 'amount' => $this->amount->subtract($adjustment->getAmount()), ] + $this->toArray(); return new static($definition); } /** * Multiplies the adjustment amount by the given number. * * @param string $number * The number. * * @return static * The resulting adjustment. */ public function multiply($number) { $definition = [ 'amount' => $this->amount->multiply($number), ] + $this->toArray(); return new static($definition); } /** * Divides the adjustment amount by the given number. * * @param string $number * The number. * * @return static * The resulting adjustment. */ public function divide($number) { $definition = [ 'amount' => $this->amount->divide($number), ] + $this->toArray(); return new static($definition); } /** * Asserts that the given adjustment's type matches the current one. * * @param \Drupal\commerce_order\Adjustment $adjustment * The adjustment to compare. * * @throws \InvalidArgumentException * Thrown when the adjustment type does not match the current one. */ protected function assertSameType(Adjustment $adjustment) { if ($this->type != $adjustment->getType()) { throw new \InvalidArgumentException(sprintf('Adjustment type "%s" does not match "%s".', $adjustment->getType(), $this->type)); } } /** * Asserts that the given adjustment's source ID matches the current one. * * @param \Drupal\commerce_order\Adjustment $adjustment * The adjustment to compare. * * @throws \InvalidArgumentException * Thrown when the adjustment source ID does not match the current one. */ protected function assertSameSourceId(Adjustment $adjustment) { if ($this->sourceId != $adjustment->getSourceId()) { throw new \InvalidArgumentException(sprintf('Adjustment source ID "%s" does not match "%s".', $adjustment->getSourceId(), $this->sourceId)); } } }
nmacd85/drupal-nicoledawn
modules/contrib/commerce/modules/order/src/Adjustment.php
PHP
gpl-2.0
8,130
24.485893
146
0.624477
false
package xyz.zyzhu.model; import org.junit.*; import org.junit.Assert.*; public class TestHelloWorld { @Test public void tesySayHello() { Assert.assertEquals("hello world",new HelloWorld().sayHello()); } }
zyz963272311/testGitHub
testMaven/src/test/java/xyz/zyzhu/model/TestHelloWorld.java
Java
gpl-2.0
212
15.384615
65
0.726415
false
/* * blockio.cc * * */ #define _LARGEFILE_SOURCE #define _FILE_OFFSET_BITS 64 #include "version.h" #include "blockio.h" #include "osutils.h" #include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <stdint.h> __ID("@(#) $Id: blockio.cc 2069 2009-02-12 22:53:09Z lyonel $"); ssize_t readlogicalblocks(source & s, void * buffer, long long pos, long long count) { long long result = 0; memset(buffer, 0, count*s.blocksize); /* attempt to read past the end of the section */ if((s.size>0) && ((pos+count)*s.blocksize>s.size)) return 0; result = lseek(s.fd, s.offset + pos*s.blocksize, SEEK_SET); if(result == -1) return 0; result = read(s.fd, buffer, count*s.blocksize); if(result!=count*s.blocksize) return 0; else return count; }
kaseya/lshw
src/core/blockio.cc
C++
gpl-2.0
891
19.25
99
0.617284
false
/* * Copyright (C) 2003 Robert Kooima * * NEVERBALL 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. */ #include <math.h> #include "vec3.h" #include "common.h" #include "solid_vary.h" #include "solid_sim.h" #include "solid_all.h" #include "solid_cmd.h" #define LARGE 1.0e+5f #define SMALL 1.0e-3f /*---------------------------------------------------------------------------*/ /* Solves (p + v * t) . (p + v * t) == r * r for smallest t. */ /* * Given vectors A = P, B = V * t, C = A + B, |C| = r, solve for * smallest t. * * Some useful dot product properties: * * 1) A . A = |A| * |A| * 2) A . (B + C) = A . B + A . C * 3) (r * A) . B = r * (A . B) * * Deriving a quadratic equation: * * C . C = r * r (1) * (A + B) . (A + B) = r * r * A . (A + B) + B . (A + B) = r * r (2) * A . A + A . B + B . A + B . B = r * r (2) * A . A + 2 * (A . B) + B . B = r * r * P . P + 2 * (P . V * t) + (V * t . V * t) = r * r * P . P + 2 * (P . V) * t + (V . V) * t * t = r * r (3) * (V . V) * t * t + 2 * (P . V) * t + P . P - r * r = 0 * * This equation is solved using the quadratic formula. */ static float v_sol(const float p[3], const float v[3], float r) { float a = v_dot(v, v); float b = v_dot(v, p) * 2.0f; float c = v_dot(p, p) - r * r; float d = b * b - 4.0f * a * c; /* HACK: This seems to cause failures to detect low-velocity collision Yet, the potential division by zero below seems fine. if (fabsf(a) < SMALL) return LARGE; */ if (d < 0.0f) return LARGE; else if (d > 0.0f) { float t0 = 0.5f * (-b - fsqrtf(d)) / a; float t1 = 0.5f * (-b + fsqrtf(d)) / a; float t = (t0 < t1) ? t0 : t1; return (t < 0.0f) ? LARGE : t; } else return -b * 0.5f / a; } /*---------------------------------------------------------------------------*/ /* * Compute the earliest time and position of the intersection of a * sphere and a vertex. * * The sphere has radius R and moves along vector V from point P. The * vertex moves along vector W from point Q in a coordinate system * based at O. */ static float v_vert(float Q[3], const float o[3], const float q[3], const float w[3], const float p[3], const float v[3], float r) { float O[3], P[3], V[3]; float t = LARGE; v_add(O, o, q); v_sub(P, p, O); v_sub(V, v, w); if (v_dot(P, V) < 0.0f) { t = v_sol(P, V, r); if (t < LARGE) v_mad(Q, O, w, t); } return t; } /* * Compute the earliest time and position of the intersection of a * sphere and an edge. * * The sphere has radius R and moves along vector V from point P. The * edge moves along vector W from point Q in a coordinate system based * at O. The edge extends along the length of vector U. */ static float v_edge(float Q[3], const float o[3], const float q[3], const float u[3], const float w[3], const float p[3], const float v[3], float r) { float d[3], e[3]; float P[3], V[3]; float du, eu, uu, s, t; v_sub(d, p, o); v_sub(d, d, q); v_sub(e, v, w); /* * Think projections. Vectors D, extending from the edge vertex Q * to the sphere, and E, the relative velocity of sphere wrt the * edge, are made orthogonal to the edge vector U. Division of * the dot products is required to obtain the true projection * ratios since U does not have unit length. */ du = v_dot(d, u); eu = v_dot(e, u); uu = v_dot(u, u); v_mad(P, d, u, -du / uu); /* First, test for intersection. */ if (v_dot(P, P) < r * r) { /* The sphere already intersects the line of the edge. */ if (du < 0 || du > uu) { /* * The sphere is behind the endpoints of the edge, and * can't hit the edge without hitting the vertices first. */ return LARGE; } /* The sphere already intersects the edge. */ if (v_dot(P, e) >= 0) { /* Moving apart. */ return LARGE; } v_nrm(P, P); v_mad(Q, p, P, -r); return 0; } v_mad(V, e, u, -eu / uu); t = v_sol(P, V, r); s = (du + eu * t) / uu; /* Projection of D + E * t on U. */ if (0.0f <= t && t < LARGE && 0.0f < s && s < 1.0f) { v_mad(d, o, w, t); v_mad(e, q, u, s); v_add(Q, e, d); } else t = LARGE; return t; } /* * Compute the earliest time and position of the intersection of a * sphere and a plane. * * The sphere has radius R and moves along vector V from point P. The * plane moves along vector W. The plane has normal N and is * positioned at distance D from the origin O along that normal. */ static float v_side(float Q[3], const float o[3], const float w[3], const float n[3], float d, const float p[3], const float v[3], float r) { float vn = v_dot(v, n); float wn = v_dot(w, n); float t = LARGE; if (vn - wn <= 0.0f) { float on = v_dot(o, n); float pn = v_dot(p, n); float u = (r + d + on - pn) / (vn - wn); float a = ( d + on - pn) / (vn - wn); if (0.0f <= u) { t = u; v_mad(Q, p, v, +t); v_mad(Q, Q, n, -r); } else if (0.0f <= a) { t = 0; v_mad(Q, p, v, +t); v_mad(Q, Q, n, -r); } } return t; } /*---------------------------------------------------------------------------*/ /* * Compute the new linear and angular velocities of a bouncing ball. * Q gives the position of the point of impact and W gives the * velocity of the object being impacted. */ static float sol_bounce(struct v_ball *up, const float q[3], const float w[3], float dt) { float n[3], r[3], d[3], vn, wn; float *p = up->p; float *v = up->v; /* Find the normal of the impact. */ v_sub(r, p, q); v_sub(d, v, w); v_nrm(n, r); /* Find the new angular velocity. */ v_crs(up->w, d, r); v_scl(up->w, up->w, -1.0f / (up->r * up->r)); /* Find the new linear velocity. */ vn = v_dot(v, n); wn = v_dot(w, n); v_mad(v, v, n, 1.7 * (wn - vn)); v_mad(p, q, n, up->r); /* Return the "energy" of the impact, to determine the sound amplitude. */ return fabsf(v_dot(n, d)); } /*---------------------------------------------------------------------------*/ static float sol_test_vert(float dt, float T[3], const struct v_ball *up, const struct b_vert *vp, const float o[3], const float w[3]) { return v_vert(T, o, vp->p, w, up->p, up->v, up->r); } static float sol_test_edge(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_edge *ep, const float o[3], const float w[3]) { float q[3]; float u[3]; v_cpy(q, base->vv[ep->vi].p); v_sub(u, base->vv[ep->vj].p, base->vv[ep->vi].p); return v_edge(T, o, q, u, w, up->p, up->v, up->r); } static float sol_test_side(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_lump *lp, const struct b_side *sp, const float o[3], const float w[3]) { float t = v_side(T, o, w, sp->n, sp->d, up->p, up->v, up->r); int i; if (t < dt) for (i = 0; i < lp->sc; i++) { const struct b_side *sq = base->sv + base->iv[lp->s0 + i]; if (sp != sq && v_dot(T, sq->n) - v_dot(o, sq->n) - v_dot(w, sq->n) * t > sq->d) return LARGE; } return t; } /*---------------------------------------------------------------------------*/ static int sol_test_fore(float dt, const struct v_ball *up, const struct b_side *sp, const float o[3], const float w[3]) { float q[3], d; /* If the ball is not behind the plane, the test passes. */ v_sub(q, up->p, o); d = sp->d; if (v_dot(q, sp->n) - d + up->r >= 0) return 1; /* If it's not behind the plane after DT seconds, the test passes. */ v_mad(q, q, up->v, dt); d += v_dot(w, sp->n) * dt; if (v_dot(q, sp->n) - d + up->r >= 0) return 1; /* Else, test fails. */ return 0; } static int sol_test_back(float dt, const struct v_ball *up, const struct b_side *sp, const float o[3], const float w[3]) { float q[3], d; /* If the ball is not in front of the plane, the test passes. */ v_sub(q, up->p, o); d = sp->d; if (v_dot(q, sp->n) - d - up->r <= 0) return 1; /* If it's not in front of the plane after DT seconds, the test passes. */ v_mad(q, q, up->v, dt); d += v_dot(w, sp->n) * dt; if (v_dot(q, sp->n) - d - up->r <= 0) return 1; /* Else, test fails. */ return 0; } /*---------------------------------------------------------------------------*/ static float sol_test_lump(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_lump *lp, const float o[3], const float w[3]) { float U[3] = { 0.0f, 0.0f, 0.0f }; float u, t = dt; int i; /* Short circuit a non-solid lump. */ if (lp->fl & L_DETAIL) return t; /* Test all verts */ if (up->r > 0.0f) for (i = 0; i < lp->vc; i++) { const struct b_vert *vp = base->vv + base->iv[lp->v0 + i]; if ((u = sol_test_vert(t, U, up, vp, o, w)) < t) { v_cpy(T, U); t = u; } } /* Test all edges */ if (up->r > 0.0f) for (i = 0; i < lp->ec; i++) { const struct b_edge *ep = base->ev + base->iv[lp->e0 + i]; if ((u = sol_test_edge(t, U, up, base, ep, o, w)) < t) { v_cpy(T, U); t = u; } } /* Test all sides */ for (i = 0; i < lp->sc; i++) { const struct b_side *sp = base->sv + base->iv[lp->s0 + i]; if ((u = sol_test_side(t, U, up, base, lp, sp, o, w)) < t) { v_cpy(T, U); t = u; } } return t; } static float sol_test_node(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_node *np, const float o[3], const float w[3]) { float U[3], u, t = dt; int i; /* Test all lumps */ for (i = 0; i < np->lc; i++) { const struct b_lump *lp = base->lv + np->l0 + i; if ((u = sol_test_lump(t, U, up, base, lp, o, w)) < t) { v_cpy(T, U); t = u; } } /* Test in front of this node */ if (np->ni >= 0 && sol_test_fore(t, up, base->sv + np->si, o, w)) { const struct b_node *nq = base->nv + np->ni; if ((u = sol_test_node(t, U, up, base, nq, o, w)) < t) { v_cpy(T, U); t = u; } } /* Test behind this node */ if (np->nj >= 0 && sol_test_back(t, up, base->sv + np->si, o, w)) { const struct b_node *nq = base->nv + np->nj; if ((u = sol_test_node(t, U, up, base, nq, o, w)) < t) { v_cpy(T, U); t = u; } } return t; } static float sol_test_body(float dt, float T[3], float V[3], const struct v_ball *up, const struct s_vary *vary, const struct v_body *bp) { float U[3], O[3], E[4], W[3], u; const struct b_node *np = vary->base->nv + bp->base->ni; sol_body_p(O, vary, bp, 0.0f); sol_body_v(W, vary, bp, dt); sol_body_e(E, vary, bp, 0.0f); /* * For rotating bodies, rather than rotate every normal and vertex * of the body, we temporarily pretend the ball is rotating and * moving about a static body. */ /* * Linear velocity of a point rotating about the origin: * v = w x p */ if (E[0] != 1.0f || sol_body_w(vary, bp)) { /* The body has a non-identity orientation or it is rotating. */ struct v_ball ball; float e[4], p0[3], p1[3]; const float z[3] = { 0 }; /* First, calculate position at start and end of time interval. */ v_sub(p0, up->p, O); v_cpy(p1, p0); q_conj(e, E); q_rot(p0, e, p0); v_mad(p1, p1, up->v, dt); v_mad(p1, p1, W, -dt); sol_body_e(e, vary, bp, dt); q_conj(e, e); q_rot(p1, e, p1); /* Set up ball struct with values relative to body. */ ball = *up; v_cpy(ball.p, p0); /* Calculate velocity from start/end positions and time. */ v_sub(ball.v, p1, p0); v_scl(ball.v, ball.v, 1.0f / dt); if ((u = sol_test_node(dt, U, &ball, vary->base, np, z, z)) < dt) { /* Compute the final orientation. */ sol_body_e(e, vary, bp, u); /* Return world space coordinates. */ q_rot(T, e, U); v_add(T, O, T); /* Move forward. */ v_mad(T, T, W, u); /* Express "non-ball" velocity. */ q_rot(V, e, ball.v); v_sub(V, up->v, V); dt = u; } } else { if ((u = sol_test_node(dt, U, up, vary->base, np, O, W)) < dt) { v_cpy(T, U); v_cpy(V, W); dt = u; } } return dt; } static float sol_test_file(float dt, float T[3], float V[3], const struct v_ball *up, const struct s_vary *vary) { float U[3], W[3], u, t = dt; int i; for (i = 0; i < vary->bc; i++) { const struct v_body *bp = vary->bv + i; if ((u = sol_test_body(t, U, W, up, vary, bp)) < t) { v_cpy(T, U); v_cpy(V, W); t = u; } } return t; } /*---------------------------------------------------------------------------*/ /* * Track simulation steps in integer milliseconds. */ static float ms_accum; static void ms_init(void) { ms_accum = 0.0f; } static int ms_step(float dt) { int ms = 0; ms_accum += dt; while (ms_accum >= 0.001f) { ms_accum -= 0.001f; ms += 1; } return ms; } static int ms_peek(float dt) { int ms = 0; float at; at = ms_accum + dt; while (at >= 0.001f) { at -= 0.001f; ms += 1; } return ms; } /*---------------------------------------------------------------------------*/ /* * Step the physics forward DT seconds under the influence of gravity * vector G. If the ball gets pinched between two moving solids, this * loop might not terminate. It is better to do something physically * impossible than to lock up the game. So, if we make more than C * iterations, punt it. */ float sol_step(struct s_vary *vary, const float *g, float dt, int ui, int *m) { float P[3], V[3], v[3], r[3], a[3], d, e, nt, b = 0.0f, tt = dt; int c; union cmd cmd; if (ui < vary->uc) { struct v_ball *up = vary->uv + ui; /* If the ball is in contact with a surface, apply friction. */ v_cpy(a, up->v); v_cpy(v, up->v); v_cpy(up->v, g); if (m && sol_test_file(tt, P, V, up, vary) < 0.0005f) { v_cpy(up->v, v); v_sub(r, P, up->p); if ((d = v_dot(r, g) / (v_len(r) * v_len(g))) > 0.999f) { if ((e = (v_len(up->v) - dt)) > 0.0f) { /* Scale the linear velocity. */ v_nrm(up->v, up->v); v_scl(up->v, up->v, e); /* Scale the angular velocity. */ v_sub(v, V, up->v); v_crs(up->w, v, r); v_scl(up->w, up->w, -1.0f / (up->r * up->r)); } else { /* Friction has brought the ball to a stop. */ up->v[0] = 0.0f; up->v[1] = 0.0f; up->v[2] = 0.0f; (*m)++; } } else v_mad(up->v, v, g, tt); } else v_mad(up->v, v, g, tt); /* Test for collision. */ for (c = 16; c > 0 && tt > 0; c--) { float st; int mi, ms; /* HACK: avoid stepping across path changes. */ st = tt; for (mi = 0; mi < vary->mc; mi++) { struct v_move *mp = vary->mv + mi; struct v_path *pp = vary->pv + mp->pi; if (!pp->f) continue; if (mp->tm + ms_peek(st) > pp->base->tm) st = MS_TO_TIME(pp->base->tm - mp->tm); } /* Miss collisions if we reach the iteration limit. */ if (c > 1) nt = sol_test_file(st, P, V, up, vary); else nt = tt; cmd.type = CMD_STEP_SIMULATION; cmd.stepsim.dt = nt; sol_cmd_enq(&cmd); ms = ms_step(nt); sol_move_step(vary, nt, ms); sol_swch_step(vary, nt, ms); sol_ball_step(vary, nt); if (nt < st) if (b < (d = sol_bounce(up, P, V, nt))) b = d; tt -= nt; } v_sub(a, up->v, a); sol_pendulum(up, a, g, dt); } return b; } /*---------------------------------------------------------------------------*/ void sol_init_sim(struct s_vary *vary) { ms_init(); } void sol_quit_sim(void) { return; } /*---------------------------------------------------------------------------*/
drodin/neverball-old
share/solid_sim_sol.c
C
gpl-2.0
19,801
23.813283
79
0.412605
false
/* * PS3 Media Server, for streaming any medias to your PS3. * Copyright (C) 2012 Ph.Waeber * * 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; version 2 * of the License only. * * 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. */ package net.pms.medialibrary.commons.dataobjects; import net.pms.medialibrary.commons.enumarations.ThumbnailPrioType; public class DOThumbnailPriority { private long id; private ThumbnailPrioType thumbnailPriorityType; private String picturePath; private int seekPosition; private int priorityIndex; public DOThumbnailPriority(){ this(-1, ThumbnailPrioType.THUMBNAIL, "", 0); } public DOThumbnailPriority(long id, ThumbnailPrioType thumbnailPriorityType, String picturePath, int priorityIndex){ this(id, thumbnailPriorityType, -1, picturePath, priorityIndex); } public DOThumbnailPriority(long id, ThumbnailPrioType thumbnailPriorityType, int seekPosition, int priorityIndex){ this(id, thumbnailPriorityType, seekPosition, "", priorityIndex); } public DOThumbnailPriority(long id, ThumbnailPrioType thumbnailPriorityType, int seekPosition, String picturePath, int priorityIndex){ setId(id); setThumbnailPriorityType(thumbnailPriorityType); setSeekPosition(seekPosition); setPicturePath(picturePath); setPriorityIndex(priorityIndex); } public void setThumbnailPriorityType(ThumbnailPrioType thumbnailPriorityType) { this.thumbnailPriorityType = thumbnailPriorityType; } public ThumbnailPrioType getThumbnailPriorityType() { return thumbnailPriorityType; } public void setPicturePath(String picturePath) { this.picturePath = picturePath; } public String getPicturePath() { return picturePath; } public void setSeekPosition(int seekPosition) { this.seekPosition = seekPosition; } public int getSeekPosition() { return seekPosition; } public void setPriorityIndex(int priorityIndex) { this.priorityIndex = priorityIndex; } public int getPriorityIndex() { return priorityIndex; } public void setId(long id) { this.id = id; } public long getId() { return id; } @Override public boolean equals(Object obj){ if(!(obj instanceof DOThumbnailPriority)){ return false; } DOThumbnailPriority compObj = (DOThumbnailPriority) obj; if(getId() == compObj.getId() && getThumbnailPriorityType() == compObj.getThumbnailPriorityType() && getPicturePath().equals(compObj.getPicturePath()) && getSeekPosition() == compObj.getSeekPosition() && getPriorityIndex() == compObj.getPriorityIndex()){ return true; } return false; } @Override public int hashCode(){ int hashCode = 24 + String.valueOf(getId()).hashCode(); hashCode *= 24 + getPicturePath().hashCode(); hashCode *= 24 + getSeekPosition(); hashCode *= 24 + getPriorityIndex(); return hashCode; } @Override public DOThumbnailPriority clone(){ return new DOThumbnailPriority(getId(), getThumbnailPriorityType(), getSeekPosition(), getPicturePath(), getPriorityIndex()); } @Override public String toString(){ return String.format("id=%s, prioIndex=%s, type=%s, seekPos=%s, picPath=%s", getId(), getPriorityIndex(), getThumbnailPriorityType(), getSeekPosition(), getPicturePath()); } }
taconaut/pms-mlx
core/src/main/java/net/pms/medialibrary/commons/dataobjects/DOThumbnailPriority.java
Java
gpl-2.0
3,813
29.023622
173
0.741411
false
/* * This file is part of ePipe * Copyright (C) 2019, Logical Clocks AB. All rights reserved * * 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. */ #ifndef TBLSTAILER_H #define TBLSTAILER_H #include "TableTailer.h" #include "tables/hive/TBLSTable.h" #include "tables/hive/SDSTable.h" #include "tables/hive/TABCOLSTATSTable.h" #include "tables/hive/TABLEPARAMSTable.h" class TBLSTailer : public TableTailer<TBLSRow> { public: TBLSTailer(Ndb *ndb, const int poll_maxTimeToWait, const Barrier barrier) : TableTailer(ndb, new TBLSTable(), poll_maxTimeToWait, barrier) {} virtual ~TBLSTailer() {} private: SDSTable mSDSTable; TABLEPARAMSTable mTABLEPARAMSTable; TABCOLSTATSTable mTABCOLSTATSTable; virtual void handleEvent(NdbDictionary::Event::TableEvent eventType, TBLSRow pre, TBLSRow row) { LOG_INFO("Delete TBLS event received. Primary Key value: " << pre.mTBLID); mTABLEPARAMSTable.remove(mNdbConnection, pre.mTBLID); mTABCOLSTATSTable.remove(mNdbConnection, pre.mTBLID); mSDSTable.remove(mNdbConnection, pre.mSDID); } }; #endif /* TBLSTAILER_H */
hopshadoop/ePipe
include/hive/TBLSTailer.h
C
gpl-2.0
1,763
34.26
78
0.748157
false
#!/bin/sh # Copyright (C) 1999-2005 ImageMagick Studio LLC # # This program is covered by multiple licenses, which are described in # LICENSE. You should have received a copy of LICENSE with this # package; otherwise see http://www.imagemagick.org/script/license.php. . ${srcdir}/tests/common.shi ${RUNENV} ${MEMCHECK} ./rwfile ${SRCDIR}/input_truecolor16.dpx PPM
atmark-techno/atmark-dist
user/imagemagick/tests/rwfile_PPM_truecolor16.sh
Shell
gpl-2.0
365
39.555556
71
0.750685
false
package cmd import ( "github.com/spf13/cobra" ) // rotateCmd represents the shuffletips command var rotateCmd = &cobra.Command{ Use: "rotate", Short: "Rotates children of internal nodes", Long: `Rotates children of internal nodes by different means. Either randomly with "rand" subcommand, either sorting by number of tips with "sort" subcommand. It does not change the topology, but just the order of neighbors of all node and thus the newick representation. ------C ------A x |z x |z A---------*ROOT => B---------*ROOT |t |t ------B ------C Example of usage: gotree rotate rand -i t.nw gotree rotate sort -i t.nw `, } func init() { RootCmd.AddCommand(rotateCmd) rotateCmd.PersistentFlags().StringVarP(&intreefile, "input", "i", "stdin", "Input tree") rotateCmd.PersistentFlags().StringVarP(&outtreefile, "output", "o", "stdout", "Rotated tree output file") }
fredericlemoine/gotree
cmd/rotate.go
GO
gpl-2.0
1,028
27.555556
106
0.595331
false
/* * Copyright 2015 AASHTO/ITE/NEMA. * American Association of State Highway and Transportation Officials, * Institute of Transportation Engineers and * National Electrical Manufacturers Association. * * This file is part of the Advanced Transportation Controller (ATC) * Application Programming Interface Validation Suite (APIVS). * * The APIVS 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. * * The APIVS 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 the APIVS. If not, see <http://www.gnu.org/licenses/>. */ /***************************************************************************** * \file emfio_setupCommands.h * * (c) Copyright 2010 ITE * All rights reserved. Copying or other reproduction of this program * except for archival purposes is prohibited without the prior written * consent of ITE. * * \brief This file declares the functions that setup and teardown the command structures. * * \date 12/22/2010 * * \author Steve Kapp * * \version 1.0 *****************************************************************************/ #ifndef emfio_setupCommands_h #define emfio_setupCommands_h //============================================================================= /** * Includes */ #include <stdint.h> // STD IEEE Type Definitions - int16_t, uint8_t, etc. //============================================================================= /** * External Global Routines */ extern int16_t emfio_setupCommands(); extern int16_t emfio_teardownCommands(); extern int16_t emfio_setupResponses(); extern int16_t emfio_teardownResponses(); extern uint32_t emfio_getNextLoadCounter(); extern uint32_t emfio_getNextReceiveCounter(); #endif
dcrawford1/APIVS
include/emfio_setupCommands.h
C
gpl-2.0
2,147
34.783333
90
0.633908
false
<div class="header"><h1 class="slidetitle">Make the most of the web</h1></div> <div class="main"> <div class="text"> <div> <p>Ubuntu MATE includes Firefox, the web browser used by millions of people around the world. And web applications you use frequently (like Facebook or Gmail, for example) can be pinned to your desktop for faster access, just like apps on your computer.</p> </div> <div class="featured"> <h2 class="subtitle">Included software</h2> <ul> <li> <img class="icon" src="icons/firefox.png" /> <p class="caption">Firefox web browser</p> </li> <li> <img class="icon" src="icons/thunderbird.png" /> <p class="caption">Thunderbird Mail </p> </li> </ul> <h2 class="subtitle">Supported software</h2> <ul> <li> <img class="icon" src="icons/chromium.png" /> <p class="caption">Chromium</p> </li> </ul> </div> </div> <img class="screenshot" src="screenshots/06_browse.jpg" /> </div>
mohegan/ubiquity-slideshow-ubuntu
slideshows/ubuntu-mate/slides/06_browse.html
HTML
gpl-2.0
910
23.594595
257
0.682418
false
<?php include_once('sites/all/themes/artonair/custom_functions/custom_variable.php'); /* mp3 folder path */ ?> <?php include_once('sites/all/themes/artonair/custom_functions/default_image.php'); /* function for displaying default images */ ?> <?php $listen_url = "/drupal/play/" . $node->nid . "/" . $node->path; ?> <?php global $base_url; $vgvr = views_get_view_result('archive_popular', 'default'); $node_status = ""; foreach($vgvr as $vresult) { if($vresult->nid == $node->nid) $node_status = "Popular!"; } ?> <div class="<?php print $node->type; ?>-body bodyview <?php foreach($node->taxonomy as $term) { $your_vocabulary_id = 108; if ($term->vid == $your_vocabulary_id) { print $term->name; } } ?>"> <div class="content-section"> <div class="left-column" id="header-info"> <div class="header"> <div class="info"> <?php // if($node->field_series[0]['view']) { ?> <!-- <h6 class="type"> <span><?php// print l("Radio Show", "radio"); ?></span>ABC</h6> <h6 class="dates"><?php //print $node->field_series[0]['view']; ?></h6>--> <?php // } ?> <?php // if($node->type == "series") { ?> <!-- <span><?php // print l("Radio Series", "radio/series"); ?></span><?php $view = views_get_view('series_contents'); $args = array($node->nid); $view->set_display('default', $args); // like 'block_1' $view->render(); ?> <div class="episode-count"><?php // print sizeof($view->result);?> Episodes</div> <?php // } ?> --> <?php // if($node->type == "news") { ?> <!-- <span><?php // print l("Radio", "radio"); ?></span>Featured Shows This Week --> <?php // } ?> <?php if($node->type == "blog") { ?> <h6 class="type"><span><?php print l("News", "news"); ?></span></h6> <h6 class="dates"> <?php foreach($node->taxonomy as $term) { $your_vocabulary_id = 108; if ($term->vid == $your_vocabulary_id) { print $term->name; } } ?></h6> <?php } ?> <?php if($node->type == "host") { ?> <span><?php print l("People", "radio/hosts"); ?></span><?php $view = views_get_view('series_contents'); $args = array($node->nid); $view->set_display('default', $args); // like 'block_1' $view->render(); ?> <div class="episode-count"><?php print sizeof($view->result);?> Programs</div> <?php } ?> </h6><!-- /.type --> <?php if($node->type != "news") { ?> <div class="title"> <h1><?php print $node->title; ?></h1> </div><!-- /.title --> <?php } ?> <?php if($node->field_host[0]['view']) { ?> <h6 class="hosts"> Hosted by <?php $hostno = 0; foreach ($node->field_host as $one_host) { ?> <?php if($hostno > 0) print "<span class='comma'>,</a>"; ?> <span class="host"><?php print $one_host['view']; ?></span> <?php $hostno++; } ?> </h6> <?php } ?> <?php if(!empty($node->field_host_type[0]['view'])) { ?> <h6 class="host-types"> <?php $hosttypesno = 0; foreach ($node->field_host_type as $one_host_type) { ?> <?php if($hosttypesno > 0) print "<span class='comma'>,</a>"; ?> <span class="host-type"><?php print $one_host_type['view']; ?></span> <?php $hosttypesno++; } ?> </h6> <?php } ?> </div> <!-- /.info --> </div><!-- /.header --> </div> <!-- left-column --> <?php if($node->type != "news") { ?> <?php if($node->field_image[0]['view']) { ?> <div class="right-column"> <div class="header-image"> <div class="image"><?php print $node->field_image[0]['view']; ?> </div> <div class="image-description"><?php print $node->field_image[0]['data']['description']; ?> </div> </div><!-- /.header-image --> </div><!-- /.right-column --> <div class="left-column" id="node-content"> <?php } else { ?> <div class="single-column" id="node-content"> <?php } ?> <?php } ?> <!--<div class="left-column" id="node-content">--> <?php if ($node->taxonomy[13701]) { ?> <?php if($node->field_media_embed[0]['view']) { ?> <div class="video"><?php print $node->field_media_embed[0]['view']; ?></div> <?php } ?> <?php } ?> <?php if($node->type == "series") { ?> <?php print views_embed_view('also_in_this_series', 'series_listen', $node->nid); ?> <!-- <div class="plus-button"><?php // print $_COOKIE["air-playlist"]; ?></div>--> <?php } ?> <?php if($node->type != "news") { ?> <div class="share listen"> <?php if($node->field_audio_path[0]['safe']) { ?> <div class="play"> <div class="listen-button"> <a href="<?php print $listen_url; ?>" onclick="popUpAIR(this.href,'fixed', 440, 570); return false;" target="artonair_music_popup"><img src="<?php print $base_url; ?>/sites/all/themes/artonair/images/triangle-white.png"></a> </div> <div class="listen-text"><a href="<?php print $listen_url; ?>" onclick="popUpAIR(this.href,'fixed', 440, 570); return false;" target="artonair_music_popup">Listen</a> </div> <!-- /.listen-button --> </div><!-- /.listen --> <div class="plus-button"><?php print $_COOKIE["air-playlist"]; ?></div> <?php } ?> <div class="social"> <div class="addthis_toolbox addthis_default_style facebook"><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a></div> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=xa-520a6a3258c56e49"></script> <div class="twitter"> <a href="https://twitter.com/share" class="twitter-share-button" data-via="clocktower_nyc">Tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> </div><!-- /.twitter --> </div> <!-- /.social --> </div><!-- /.share .listen --> <div class="content"> <?php print $node->content['body']['#value']; ?> <?php if($node->field_long_description[0]['view']) { ?> <?php print $node->field_long_description[0]['view']; ?> <?php } ?> <div class="content-foot"> <?php if($node->field_support[0]['view']) { ?> <em><?php print $node->field_support[0]['view']; ?></em> <?php } ?> <?php if($node->type == "blog") { ?> <h6 class="dates">Posted <?php print format_date($created, 'custom', 'F d, Y')?></h6> <?php } ?> <?php if($node->type == "show") { ?> <?php if($node->field_aired_date[0]['view']) { ?> <h6 class="aired_date">Originally aired <span class="aired_date_itself"><?php print $node->field_aired_date[0]['view']; ?></span></h6> <?php } ?> <div class="tags"> <h6 class="category"><?php print views_embed_view("radio_categories", "radio_tags", $node->nid); ?></h6> </div> <?php } ?> <?php if($node->type == "series") { ?> <h6 class="aired_date"><?php print views_embed_view('also_in_this_series', 'series_updated', $node->nid); ?></h6> <div class="tags"> <h6 class="category"><?php print views_embed_view("radio_categories", "radio_tags", $node->nid); ?></h6> </div> <?php } ?> <?php } ?> <?php if($node->type == "blog") { ?> <div class="tags"> <h6 class="category"><?php print views_embed_view("radio_categories", "radio_tags", $node->nid); ?></h6> </div> <?php } ?> </div><!-- /.content-foot --> </div><!-- /.content --> </div><!-- /.left-column --> <div class="right-column"> <div class="image-gallery"> <?php if($node->field_image[12]['view']) { ?> <div class="thumbnails three"> <?php print views_embed_view('exhibition_thumbnails_slider', 'default', $node->nid); ?> </div> <?php } else { ?> <?php if($node->field_image[1]['view']) { ?> <div class="thumbnails"> <?php print views_embed_view('exhibition_thumbnails_slider', 'default', $node->nid); ?> </div> <?php } ?> <?php } ?> </div><!-- /.image-gallery --> </div><!-- /.right-column --> </div><!-- /.bodyview --> <?php if($node->type == "news") { ?> <div class="in_this_news masonry"> <div class="news-body"> <?php print views_embed_view("new_this_week", "front_news_text", $node->nid); ?> </div> <div class="featured_projects" style="display:none;visibility:hidden;"> <?php print views_embed_view("in_this_news", "default", $node->nid); ?> </div> <div class="featured_radio" style="display:none;visibility:hidden;"> <?php print views_embed_view("in_this_news", "featured_radio", $node->nid); ?> </div> <div class="soundcloud item"> <?php $block = (object) module_invoke('block', 'block', 'view', "60"); print theme('block',$block); ?> </div> <div class="subscribe item"> <?php $block = (object) module_invoke('block', 'block', 'view', "42"); print theme('block',$block); ?> </div> </div><!-- /.in-this-news --> <?php } ?> <?php if($node->type != "news") { ?> <?php $tags_display = views_embed_view('tags_for_node', 'default', $node->nid); ?> <?php } ?> <?php if($node->type == "blog") { ?> <div class="also-list related"> <?php print views_embed_view('clocktower_related_radio', 'related_to_event', $node->nid); ?> </div> <!-- also-list --> <?php } ?> <?php if($node->type == "show" && $node->field_series[0]['view']) { ?> <div class="also-list masonry"> <div class="title item"> <h6>Other Episodes From</h6> <h1><?php print $node->field_series[0]['view']; ?></h1> </div> <div class="series-contents"> <?php print views_embed_view('also_in_this_series', 'grid_related_shows', $node->field_series[0]['nid'], $node->nid); ?> </div> </div><!-- also-list --> <div class="also-list"> <div class="block block-staffpicks"> <?php $view = views_get_view('staffpicks'); print $view->preview('block_2'); ?> </div><!-- block-staffpicks --> <div class="block block-popular"> <?php $view = views_get_view('most_viewed_sidebar'); print $view->preview('block_2'); ?> </div><!-- block-popular --> </div><!-- also-list --> <?php } ?> <?php if($node->type == "series") { ?> <div class="also-list masonry"> <div class="series-contents"> <?php print views_embed_view('series_contents', 'grid_related_shows', $node->nid); ?> </div> </div><!-- also-list --> <?php } ?> <?php if($node->type == "host") { ?> <div class="also-list masonry"> <div class="title item"><h1>Radio Featuring <?php print $node->title; ?></h1></div> <div class="by-this-host-browse smallgrid listview gridlist-choice-apply"> <!-- the gridlist choice applies to this div --> <?php print views_embed_view('by_this_host', 'of_this_host', $node->nid); ?> <?php print views_embed_view('by_this_host', 'block_2', $node->nid); ?> </div> </div> <?php } ?> </div> <!-- for addthis analytics --> <div id="nid-for-javascript" style="display:none;"><?php print $node->nid; ?></div>
artonair/clocktower
sites/all/node-blog-body.tpl.php
PHP
gpl-2.0
11,545
32.463768
299
0.530706
false
/* * (C) Copyright 2008-2013 STMicroelectronics. * * Sean McGoogan <Sean.McGoogan@st.com> * * See file CREDITS for list of people who contributed to this * project. * * 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 */ #include <common.h> #include <command.h> #include <asm/soc.h> #include <asm/socregs.h> #include <asm/io.h> #include <asm/pio.h> void flashWriteEnable(void) { /* Enable Vpp for writing to flash */ /* Nothing to do! */ } void flashWriteDisable(void) { /* Disable Vpp for writing to flash */ /* Nothing to do! */ } #if defined(CONFIG_ST40_STXH415) #define PIOALT(port, pin, alt, dir) \ do \ { \ stxh415_pioalt_select((port), (pin), (alt)); \ stxh415_pioalt_pad((port), (pin), (dir)); \ } while(0) #elif defined(CONFIG_ST40_STXH416) #define PIOALT(port, pin, alt, dir) \ do \ { \ stxh416_pioalt_select((port), (pin), (alt)); \ stxh416_pioalt_pad((port), (pin), (dir)); \ } while(0) #endif /* CONFIG_ST40_STXH415/CONFIG_ST40_STXH416 */ /* * MII0: PIO106[2] = GMII0_notRESET * MII0: PIO13[4] = PIO6_CLKSEL (DVO_CK) * * MII1: PIO4[7] = GMII1_notRESET (needs J39 fitted) * MII1: PIO2[5] = PIO6_CLKSEL (PIO_HDMI_TX_HPD) */ #if CONFIG_SYS_STM_STMAC_BASE == CONFIG_SYS_STM_STMAC0_BASE /* MII0, on CN22 */ # define GMII_PHY_NOT_RESET 106, 2 # define GMII_PHY_CLKOUT_NOT_TXCLK_SEL 13, 4 #elif CONFIG_SYS_STM_STMAC_BASE == CONFIG_SYS_STM_STMAC1_BASE /* MII1, on CN23 */ # define GMII_PHY_NOT_RESET 4, 7 # define GMII_PHY_CLKOUT_NOT_TXCLK_SEL 2, 5 #endif static void configPIO(void) { /* Setup PIOs for ASC device */ #if defined(CONFIG_ST40_STXH415) #if CONFIG_SYS_STM_ASC_BASE == STXH415_ASC2_BASE /* Route UART2 via PIO17 for TX, RX, CTS & RTS (Alternative #1) */ PIOALT(17, 4, 2, stm_pad_direction_output); /* UART2-TX */ PIOALT(17, 5, 2, stm_pad_direction_input); /* UART2-RX */ PIOALT(17, 7, 2, stm_pad_direction_output); /* UART2-RTS */ PIOALT(17, 6, 2, stm_pad_direction_input); /* UART2-CTS */ #elif CONFIG_SYS_STM_ASC_BASE == STXH415_SBC_ASC0_BASE /* Route SBC_UART0 via PIO3 for TX, RX, CTS & RTS (Alternative #1) */ PIOALT(3, 4, 1, stm_pad_direction_output); /* SBC_UART0-TX */ PIOALT(3, 5, 1, stm_pad_direction_input); /* SBC_UART0-RX */ PIOALT(3, 7, 1, stm_pad_direction_output); /* SBC_UART0-RTS */ PIOALT(3, 6, 1, stm_pad_direction_input); /* SBC_UART0-CTS */ #elif CONFIG_SYS_STM_ASC_BASE == STXH415_SBC_ASC1_BASE /* Route SBC_UART1 via PIO2,3 for TX, RX, CTS & RTS (Alternative #3) */ PIOALT(2, 6, 3, stm_pad_direction_output); /* SBC_UART1-TX */ PIOALT(2, 7, 3, stm_pad_direction_input); /* SBC_UART1-RX */ PIOALT(3, 1, 3, stm_pad_direction_output); /* SBC_UART1-RTS */ PIOALT(3, 0, 3, stm_pad_direction_input); /* SBC_UART1-CTS */ #else #error Unknown ASC port selected! #endif /* CONFIG_SYS_STM_ASC_BASE == STXH415_ASCx_REGS_BASE */ #elif defined(CONFIG_ST40_STXH416) #if CONFIG_SYS_STM_ASC_BASE == STXH416_ASC2_BASE /* Route UART2 via PIO17 for TX, RX, CTS & RTS (Alternative #1) */ PIOALT(17, 4, 2, stm_pad_direction_output); /* UART2-TX */ PIOALT(17, 5, 2, stm_pad_direction_input); /* UART2-RX */ PIOALT(17, 7, 2, stm_pad_direction_output); /* UART2-RTS */ PIOALT(17, 6, 2, stm_pad_direction_input); /* UART2-CTS */ #elif CONFIG_SYS_STM_ASC_BASE == STXH416_SBC_ASC0_BASE /* Route SBC_UART0 via PIO3 for TX, RX, CTS & RTS (Alternative #1) */ PIOALT(3, 4, 1, stm_pad_direction_output); /* SBC_UART0-TX */ PIOALT(3, 5, 1, stm_pad_direction_input); /* SBC_UART0-RX */ PIOALT(3, 7, 1, stm_pad_direction_output); /* SBC_UART0-RTS */ PIOALT(3, 6, 1, stm_pad_direction_input); /* SBC_UART0-CTS */ #elif CONFIG_SYS_STM_ASC_BASE == STXH416_SBC_ASC1_BASE /* Route SBC_UART1 via PIO2,3 for TX, RX, CTS & RTS (Alternative #3) */ PIOALT(2, 6, 3, stm_pad_direction_output); /* SBC_UART1-TX */ PIOALT(2, 7, 3, stm_pad_direction_input); /* SBC_UART1-RX */ PIOALT(3, 1, 3, stm_pad_direction_output); /* SBC_UART1-RTS */ PIOALT(3, 0, 3, stm_pad_direction_input); /* SBC_UART1-CTS */ #else #error Unknown ASC port selected! #endif /* CONFIG_SYS_STM_ASC_BASE == STXH416_ASCx_REGS_BASE */ #endif /* CONFIG_ST40_STXH415/CONFIG_ST40_STXH416 */ #ifdef CONFIG_DRIVER_NET_STM_GMAC /* * Configure the Ethernet PHY Reset signal */ SET_PIO_PIN2(GMII_PHY_NOT_RESET, STPIO_OUT); /* * Configure the Ethernet PHY Mux PIO clock signal, * as an output, which controls the speed of the MAC. */ SET_PIO_PIN2(GMII_PHY_CLKOUT_NOT_TXCLK_SEL, STPIO_OUT); STPIO_SET_PIN2(GMII_PHY_CLKOUT_NOT_TXCLK_SEL, 1); #endif /* CONFIG_DRIVER_NET_STM_GMAC */ } #ifdef CONFIG_DRIVER_NET_STM_GMAC extern void stmac_phy_reset(void) { /* * Reset the Ethernet PHY. */ STPIO_SET_PIN2(GMII_PHY_NOT_RESET, 0); udelay(10000); /* 10 ms */ STPIO_SET_PIN2(GMII_PHY_NOT_RESET, 1); udelay(10000); /* 10 ms */ } #endif /* CONFIG_DRIVER_NET_STM_GMAC */ #ifdef CONFIG_DRIVER_NET_STM_GMAC extern void stmac_set_mac_speed(int speed) { /* Manage the MAC speed */ STPIO_SET_PIN2(GMII_PHY_CLKOUT_NOT_TXCLK_SEL, (speed==1000)?1:0); } #endif /* CONFIG_DRIVER_NET_STM_GMAC */ extern int board_init(void) { configPIO(); #if 0 /* QQQ - TO IMPLEMENT */ #if defined(CONFIG_ST40_STM_SATA) stx7105_configure_sata (); #endif /* CONFIG_ST40_STM_SATA */ #endif /* QQQ - TO IMPLEMENT */ /* * B2032A (MII) Ethernet card (*not* GMII) * On B2000B board, to get GMAC0 working make sure that jumper * on PIN 9-10 on CN35 and CN36 are removed. * ******************************************************************* * * B2035A (RMII + MMC(on CN22)) Ethernet + MMC card * B2035A board has IP101ALF PHY connected in RMII mode * and an MMC card * It is designed to be connected to GMAC0 (CN22) to get MMC working, * however we can connect it to GMAC1 for RMII testing. * ******************************************************************* * * Note: The following (default) configuration assumes we are using * the B2032 daughter board, in MII mode (not GMII). To use other * configurations, then please have a look in the STLinux kernel * distribution source trees for: arch/sh/boards/mach-b2000/setup.c */ #ifdef CONFIG_DRIVER_NET_STM_GMAC #if CONFIG_SYS_STM_STMAC_BASE == CONFIG_SYS_STM_STMAC0_BASE /* MII0, on CN22 */ # if defined(CONFIG_STMAC_IP1001) /* IC+ IP1001 (B2032) */ #if defined(CONFIG_ST40_STXH415) stxh415_configure_ethernet(0, &(struct stxh415_ethernet_config) { .mode = stxh415_ethernet_mode_mii, .ext_clk = 1, .phy_bus = 0, }); #elif defined(CONFIG_ST40_STXH416) stxh416_configure_ethernet(0, &(struct stxh416_ethernet_config) { .mode = stxh416_ethernet_mode_mii, .ext_clk = 1, .phy_bus = 0, }); #endif /* CONFIG_ST40_STXH415/CONFIG_ST40_STXH416 */ # elif defined(CONFIG_STMAC_IP101A) /* IC+ IP101A (B2035) */ #if defined(CONFIG_ST40_STXH415) stxh415_configure_ethernet(0, &(struct stxh415_ethernet_config) { .mode = stxh415_ethernet_mode_rmii, .ext_clk = 0, .phy_bus = 0, }); #elif defined(CONFIG_ST40_STXH416) stxh416_configure_ethernet(0, &(struct stxh416_ethernet_config) { .mode = stxh416_ethernet_mode_rmii, .ext_clk = 0, .phy_bus = 0, }); #endif /* CONFIG_ST40_STXH415/CONFIG_ST40_STXH416 */ # else # error Unknown PHY type associated with STM GMAC #0 # endif /* CONFIG_STMAC_IP1001 || CONFIG_STMAC_IP101A */ #elif CONFIG_SYS_STM_STMAC_BASE == CONFIG_SYS_STM_STMAC1_BASE /* MII1, on CN23 */ # if defined(CONFIG_STMAC_IP1001) /* IC+ IP1001 (B2032) */ #if defined(CONFIG_ST40_STXH415) stxh415_configure_ethernet(1, &(struct stxh415_ethernet_config) { .mode = stxh415_ethernet_mode_mii, .ext_clk = 1, .phy_bus = 1, }); #elif defined(CONFIG_ST40_STXH416) stxh416_configure_ethernet(1, &(struct stxh416_ethernet_config) { .mode = stxh416_ethernet_mode_mii, .ext_clk = 1, .phy_bus = 1, }); #endif /* CONFIG_ST40_STXH415/CONFIG_ST40_STXH416 */ # elif defined(CONFIG_STMAC_IP101A) /* IC+ IP101A (B2035) */ #if defined(CONFIG_ST40_STXH415) stxh415_configure_ethernet(1, &(struct stxh415_ethernet_config) { .mode = stxh415_ethernet_mode_rmii, .ext_clk = 0, .phy_bus = 1, }); #elif defined(CONFIG_ST40_STXH416) stxh416_configure_ethernet(1, &(struct stxh416_ethernet_config) { .mode = stxh416_ethernet_mode_rmii, .ext_clk = 0, .phy_bus = 1, }); #endif /* CONFIG_ST40_STXH415/CONFIG_ST40_STXH416 */ # else # error Unknown PHY type associated with STM GMAC #1 # endif /* CONFIG_STMAC_IP1001 || CONFIG_STMAC_IP101A */ #else #error Unknown base address for the STM GMAC #endif /* Hard Reset the PHY -- do after we have configured the MAC */ stmac_phy_reset(); #endif /* CONFIG_DRIVER_NET_STM_GMAC */ #if defined(CONFIG_CMD_I2C) #if defined(CONFIG_ST40_STXH415) stxh415_configure_i2c(); #elif defined(CONFIG_ST40_STXH416) stxh416_configure_i2c(); #endif /* CONFIG_ST40_STXH415/CONFIG_ST40_STXH416 */ #endif /* CONFIG_CMD_I2C */ return 0; } int checkboard (void) { printf ("\n\nBoard: B2000" #if defined(CONFIG_ST40_STXH415) "-STxH415" #elif defined(CONFIG_ST40_STXH416) "-STxH416" #endif #ifdef CONFIG_ST40_SE_MODE " [32-bit mode]" #else " [29-bit mode]" #endif "\n"); #if defined(CONFIG_SOFT_SPI) /* * Configure for the SPI Serial Flash. * Note: for CONFIG_SYS_BOOT_FROM_SPI + CONFIG_ENV_IS_IN_EEPROM, this * needs to be done after env_init(), hence it is done * here, and not in board_init(). */ #if defined(CONFIG_ST40_STXH415) stxh415_configure_spi(); #elif defined(CONFIG_ST40_STXH416) stxh416_configure_spi(); #endif /* CONFIG_ST40_STXH415/CONFIG_ST40_STXH416 */ #endif /* CONFIG_SPI */ return 0; }
Blagus/STB8000-U-Boot
board/st/b2000/b2000.c
C
gpl-2.0
10,205
30.791277
81
0.668104
false
<?php get_header(); ?> <div id="content" class="clearfix"> <div id="main" class="col620 clearfix" role="main"> <article id="post-0" class="post error404 not-found"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Error 404 - Page Not Found', 'newschannel' ); ?></h1> </header> <div class="entry-content post_content"> <h4><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching, or one of the links below, can help.', 'newschannel' ); ?></h4> <div style="margin-bottom: 25px"><?php get_search_form(); ?></div> <?php the_widget( 'WP_Widget_Recent_Posts' ); ?> <div class="widget"> <h2 class="widgettitle"><?php _e( 'Most Used Categories', 'newschannel' ); ?></h2> <ul> <?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?> </ul> </div> <?php /* translators: %1$s: smilie */ $archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'newschannel' ), convert_smilies( ':)' ) ) . '</p>'; the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" ); ?> <?php the_widget( 'WP_Widget_Tag_Cloud' ); ?> </div><!-- .entry-content --> </article><!-- #post-0 --> </div> <!-- end #main --> <?php get_sidebar(); ?> </div> <!-- end #content --> <?php get_footer(); ?>
mxr1027/Xinrui-Ma
wp-content/themes/newschannel/404.php
PHP
gpl-2.0
1,539
34
162
0.530214
false
package scatterbox.utils; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStreamReader; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.sql.Timestamp; import java.util.HashMap; import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; public class ImportVanKasteren { String dataFileName = "/Users/knoxs/Documents/datasets/kasterenDataset/kasterenSenseData.txt"; String annotationFileName = "/Users/knoxs/Documents/datasets/kasterenDataset/kasterenActData.txt"; File dataFile = new File(dataFileName); File annotationFile = new File(annotationFileName); BufferedReader dataFileReader; BufferedReader annotationFileReader; Connection conn = null; String insertDataCommand = "insert into events (start_time, end_time, id, java_type) values (\"START\", \"END\", \"OBJECT\", \"scatterbox.event.KasterenEvent\")"; String insertAnnotationCommand = "insert into annotations (start_time, end_time, annotation) values (\"START\", \"END\", \"ANNOTATION\")"; HashMap<Integer, String> objects = new HashMap<Integer, String>(); HashMap<Integer, String> annotations = new HashMap<Integer, String>(); //String[] annotations = {"leavehouse", "usetoilet", "takeshower", "gotobed", "preparebreakfast", "preparedinner", "getdrink"}; /** * Format of the sql timestamp. Allows easy conversion to date format */ final DateTimeFormatter dateTimeFormatter = DateTimeFormat .forPattern("dd-MMM-yyyy HH:mm:ss"); public static void main(String[] args) throws FileNotFoundException { ImportVanKasteren ivk = new ImportVanKasteren(); ivk.connectToDatabase(); ivk.dataFileReader = new BufferedReader(new InputStreamReader( new DataInputStream(new FileInputStream(ivk.dataFileName)))); ivk.annotationFileReader = new BufferedReader(new InputStreamReader( new DataInputStream(new FileInputStream(ivk.annotationFileName)))); ivk.setUpAnnotations(); ivk.setUpObjects(); ivk.getData(); ivk.getAnnotations(); } private void getData() { String line; try { while ((line = dataFileReader.readLine()) != null) { String[] readingArray = line.split("\t"); DateTime startTime = dateTimeFormatter .parseDateTime(readingArray[0]); Timestamp startTimestamp = new Timestamp(startTime.getMillis()); DateTime endTime = dateTimeFormatter.parseDateTime(readingArray[1]); Timestamp endTimestamp = new Timestamp(endTime.getMillis()); int id = Integer.parseInt(readingArray[2]); //The reason for -1 is because, kasteren starts id names at 1, not 0, but the array starts at 0. String object = objects.get(id); insertStatement(insertDataCommand.replace("START", startTimestamp.toString()).replace("END", endTimestamp.toString()).replace("OBJECT", object)); } } catch (Exception ioe) { ioe.printStackTrace(); } } private void getAnnotations() { String line; try { while ((line = annotationFileReader.readLine()) != null) { String[] readingArray = line.split("\t"); DateTime startTime = dateTimeFormatter .parseDateTime(readingArray[0]); Timestamp startTimestamp = new Timestamp(startTime.getMillis()); DateTime endTime = dateTimeFormatter.parseDateTime(readingArray[1]); Timestamp endTimestamp = new Timestamp(endTime.getMillis()); int id = Integer.parseInt(readingArray[2]); //The reason for -1 is because, kasteren starts id names at 1, not 0, but the array starts at 0. String annotation = annotations.get(id); insertStatement(insertAnnotationCommand.replace("START", startTimestamp.toString()).replace("END", endTimestamp.toString()).replace("ANNOTATION", annotation)); } } catch (Exception ioe) { ioe.printStackTrace(); } } public boolean insertStatement(String an_sql_statement) { System.out.println(an_sql_statement); boolean success = false; //System.out.println(an_sql_statement); Statement statement; try { statement = conn.createStatement(); if (conn != null) { success = statement.execute(an_sql_statement); statement.close(); } else { System.err.println("No database connection!!!"); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return success; } public boolean connectToDatabase() { boolean connected = false; String userName = "root"; String password = ""; String url = "jdbc:mysql://localhost:3306/tvk"; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection(url, userName, password); if (conn != null) { connected = true; } } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { e.printStackTrace(); } return connected; } private void setUpObjects() { objects.put(1, "microwave"); objects.put(5, "halltoiletdoor"); objects.put(6, "hallbathroomdoor"); objects.put(7, "cupscupboard"); objects.put(8, "fridge"); objects.put(9, "platescupboard"); objects.put(12, "frontdoor"); objects.put(13, "dishwasher"); objects.put(14, "toiletflush"); objects.put(17, "freezer"); objects.put(18, "panscupboard"); objects.put(20, "washingmachine"); objects.put(23, "groceriescupboard"); objects.put(24, "hallbedroomdoor"); } private void setUpAnnotations() { annotations.put(1, "leavehouse"); annotations.put(4, "usetoilet"); annotations.put(5, "takeshower"); annotations.put(10, "gotobed"); annotations.put(13, "preparebreakfast"); annotations.put(15, "preparedinner"); annotations.put(17, "getdrink"); } }
knoxsp/Concept
src/scatterbox/utils/ImportVanKasteren.java
Java
gpl-2.0
6,596
33.899471
165
0.644178
false
<?php /* * @version $Id: preference.php 20129 2013-02-04 16:53:59Z moyo $ ------------------------------------------------------------------------- GLPI - Gestionnaire Libre de Parc Informatique Copyright (C) 2003-2013 by the INDEPNET Development Team. http://indepnet.net/ http://glpi-project.org ------------------------------------------------------------------------- LICENSE This file is part of GLPI. GLPI 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. GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ /** @file * @brief */ include ('../inc/includes.php'); $user = new User(); // Manage lost password if (isset($_GET['lostpassword'])) { Html::nullHeader(); if (isset($_GET['password_forget_token'])) { User::showPasswordForgetChangeForm($_GET['password_forget_token']); } else { User::showPasswordForgetRequestForm(); } Html::nullFooter(); exit(); } Session::checkLoginUser(); if (isset($_POST["update"]) && ($_POST["id"] === Session::getLoginUserID())) { $user->update($_POST); Event::log($_POST["id"], "users", 5, "setup", //TRANS: %s is the user login sprintf(__('%s updates an item'), $_SESSION["glpiname"])); Html::back(); } else { if ($_SESSION["glpiactiveprofile"]["interface"] == "central") { Html::header(Preference::getTypeName(1), $_SERVER['PHP_SELF'],'preference'); } else { Html::helpHeader(Preference::getTypeName(1), $_SERVER['PHP_SELF']); } $pref = new Preference(); $pref->show(); if ($_SESSION["glpiactiveprofile"]["interface"] == "central") { Html::footer(); } else { Html::helpFooter(); } } ?>
opusappteam/PLGLPI0842
front/preference.php
PHP
gpl-2.0
2,239
27.717949
82
0.584636
false
<?php /** * @package Joomla.Administrator * @subpackage com_templates * * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; // Include the component HTML helpers. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('bootstrap.tooltip'); JHtml::_('behavior.formvalidator'); JHtml::_('behavior.keepalive'); JHtml::_('behavior.tabstate'); $input = JFactory::getApplication()->input; // No access if not global SuperUser if (!JFactory::getUser()->authorise('core.admin')) { JFactory::getApplication()->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'danger'); } if ($this->type == 'image') { JHtml::_('script', 'vendor/cropperjs/cropper.min.js', array('version' => 'auto', 'relative' => true)); JHtml::_('stylesheet', 'vendor/cropperjs/cropper.min.css', array('version' => 'auto', 'relative' => true)); } JFactory::getDocument()->addScriptDeclaration(" jQuery(document).ready(function($){ // Hide all the folder when the page loads $('.folder ul, .component-folder ul').hide(); // Display the tree after loading $('.directory-tree').removeClass('directory-tree'); // Show all the lists in the path of an open file $('.show > ul').show(); // Stop the default action of anchor tag on a click event $('.folder-url, .component-folder-url').click(function(event){ event.preventDefault(); }); // Prevent the click event from proliferating $('.file, .component-file-url').bind('click',function(e){ e.stopPropagation(); }); // Toggle the child indented list on a click event $('.folder, .component-folder').bind('click',function(e){ $(this).children('ul').toggle(); e.stopPropagation(); }); // New file tree $('#fileModal .folder-url').bind('click',function(e){ $('.folder-url').removeClass('selected'); e.stopPropagation(); $('#fileModal input.address').val($(this).attr('data-id')); $(this).addClass('selected'); }); // Folder manager tree $('#folderModal .folder-url').bind('click',function(e){ $('.folder-url').removeClass('selected'); e.stopPropagation(); $('#folderModal input.address').val($(this).attr('data-id')); $(this).addClass('selected'); }); var containerDiv = document.querySelector('.span3.tree-holder'), treeContainer = containerDiv.querySelector('.nav.nav-list'), liEls = treeContainer.querySelectorAll('.folder.show'), filePathEl = document.querySelector('p.lead.hidden.path'); if(filePathEl) var filePathTmp = document.querySelector('p.lead.hidden.path').innerText; if(filePathTmp && filePathTmp.charAt( 0 ) === '/' ) { filePathTmp = filePathTmp.slice( 1 ); filePathTmp = filePathTmp.split('/'); filePathTmp = filePathTmp[filePathTmp.length - 1]; var re = new RegExp( filePathTmp ); for (var i = 0, l = liEls.length; i < l; i++) { liEls[i].querySelector('a').classList.add('active'); if (i === liEls.length - 1) { var parentUl = liEls[i].querySelector('ul'), allLi = parentUl.querySelectorAll('li'); for (var i = 0, l = allLi.length; i < l; i++) { aEl = allLi[i].querySelector('a'), spanEl = aEl.querySelector('span'); if (spanEl && re.test(spanEl.innerText)) { aEl.classList.add('active'); } } } } } });"); if ($this->type == 'image') { JFactory::getDocument()->addScriptDeclaration(" document.addEventListener('DOMContentLoaded', function() { // Configuration for image cropping var image = document.getElementById('image-crop'); var cropper = new Cropper(image, { viewMode: 0, scalable: true, zoomable: true, minCanvasWidth: " . $this->image['width'] . ", minCanvasHeight: " . $this->image['height'] . ", }); image.addEventListener('crop', function (e) { document.getElementById('x').value = e.detail.x; document.getElementById('y').value = e.detail.y; document.getElementById('w').value = e.detail.width; document.getElementById('h').value = e.detail.height; }); // Function for clearing the coordinates function clearCoords() { var inputs = querySelectorAll('#adminForm input'); for(i=0, l=inputs.length; l>i; i++) { inputs[i].value = ''; }; } });"); } JFactory::getDocument()->addStyleDeclaration(' /* Styles for modals */ .selected { background: #08c; color: #fff; } .selected:hover { background: #08c !important; color: #fff; } .modal-body .column-left { float: left; max-height: 70vh; overflow-y: auto; } .modal-body .column-right { float: right; } @media (max-width: 767px) { .modal-body .column-right { float: left; } } #deleteFolder { margin: 0; } #image-crop { max-width: 100% !important; width: auto; height: auto; } .directory-tree { display: none; } .tree-holder { overflow-x: auto; } '); if ($this->type == 'font') { JFactory::getDocument()->addStyleDeclaration( "/* Styles for font preview */ @font-face { font-family: previewFont; src: url('" . $this->font['address'] . "') } .font-preview{ font-family: previewFont !important; }" ); } ?> <?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'editor')); ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'editor', JText::_('COM_TEMPLATES_TAB_EDITOR')); ?> <div class="row"> <div class="col-md-12"> <?php if($this->type == 'file') : ?> <p class="lead"><?php echo JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', $this->source->filename, $this->template->element); ?></p> <p class="lead path hidden"><?php echo $this->source->filename; ?></p> <?php endif; ?> <?php if($this->type == 'image') : ?> <p class="lead"><?php echo JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', $this->image['path'], $this->template->element); ?></p> <p class="lead path hidden"><?php echo $this->image['path']; ?></p> <?php endif; ?> <?php if($this->type == 'font') : ?> <p class="lead"><?php echo JText::sprintf('COM_TEMPLATES_TEMPLATE_FILENAME', $this->font['rel_path'], $this->template->element); ?></p> <p class="lead path hidden"><?php echo $this->font['rel_path']; ?></p> <?php endif; ?> </div> </div> <div class="row"> <div class="col-md-3 tree-holder"> <?php echo $this->loadTemplate('tree'); ?> </div> <div class="col-md-9"> <?php if ($this->type == 'home') : ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm"> <input type="hidden" name="task" value=""> <?php echo JHtml::_('form.token'); ?> <h2><?php echo JText::_('COM_TEMPLATES_HOME_HEADING'); ?></h2> <p><?php echo JText::_('COM_TEMPLATES_HOME_TEXT'); ?></p> <p> <a href="https://docs.joomla.org/J3.x:How_to_use_the_Template_Manager" target="_blank" class="btn btn-primary btn-lg"> <?php echo JText::_('COM_TEMPLATES_HOME_BUTTON'); ?> </a> </p> </form> <?php endif; ?> <?php if ($this->type == 'file') : ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm"> <div class="editor-border"> <?php echo $this->form->getInput('source'); ?> </div> <input type="hidden" name="task" value="" /> <?php echo JHtml::_('form.token'); ?> <?php echo $this->form->getInput('extension_id'); ?> <?php echo $this->form->getInput('filename'); ?> </form> <?php endif; ?> <?php if ($this->type == 'archive') : ?> <legend><?php echo JText::_('COM_TEMPLATES_FILE_CONTENT_PREVIEW'); ?></legend> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm"> <ul class="nav flex-column well"> <?php foreach ($this->archive as $file) : ?> <li> <?php if (substr($file, -1) === DIRECTORY_SEPARATOR) : ?> <i class="fa-fw fa fa-folder"></i>&nbsp;<?php echo $file; ?> <?php endif; ?> <?php if (substr($file, -1) != DIRECTORY_SEPARATOR) : ?> <i class="fa-fw fa fa-file-o"></i>&nbsp;<?php echo $file; ?> <?php endif; ?> </li> <?php endforeach; ?> </ul> <input type="hidden" name="task" value=""> <?php echo JHtml::_('form.token'); ?> </form> <?php endif; ?> <?php if ($this->type == 'image') : ?> <img id="image-crop" src="<?php echo $this->image['address'] . '?' . time(); ?>"> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm"> <fieldset class="adminform"> <input type ="hidden" id="x" name="x"> <input type ="hidden" id="y" name="y"> <input type ="hidden" id="h" name="h"> <input type ="hidden" id="w" name="w"> <input type="hidden" name="task" value=""> <?php echo JHtml::_('form.token'); ?> </fieldset> </form> <?php endif; ?> <?php if ($this->type == 'font') : ?> <div class="font-preview"> <form action="<?php echo JRoute::_('index.php?option=com_templates&view=template&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm"> <fieldset class="adminform"> <h1>H1. Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML</h1> <h2>H2. Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML</h2> <h3>H3. Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML</h3> <h4>H4. Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML</h4> <h5>H5. Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML</h5> <h6>H6. Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML</h6> <p><b>Bold. Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML</b></p> <p><i>Italics. Quickly gaze at Joomla! views from HTML, CSS, JavaScript and XML</i></p> <p>Unordered List</p> <ul> <li>Item</li> <li>Item</li> <li>Item<br> <ul> <li>Item</li> <li>Item</li> <li>Item<br> <ul> <li>Item</li> <li>Item</li> <li>Item</li> </ul> </li> </ul> </li> </ul> <p class="lead">Ordered List</p> <ol> <li>Item</li> <li>Item</li> <li>Item<br> <ul> <li>Item</li> <li>Item</li> <li>Item<br> <ul> <li>Item</li> <li>Item</li> <li>Item</li> </ul> </li> </ul> </li> </ol> <input type="hidden" name="task" value=""> <?php echo JHtml::_('form.token'); ?> </fieldset> </form> </div> <?php endif; ?> </div> </div> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'overrides', JText::_('COM_TEMPLATES_TAB_OVERRIDES')); ?> <div class="row"> <div class="col-md-4"> <legend><?php echo JText::_('COM_TEMPLATES_OVERRIDES_MODULES'); ?></legend> <ul class="list-unstyled"> <?php $token = JSession::getFormToken() . '=' . 1; ?> <?php foreach ($this->overridesList['modules'] as $module) : ?> <li> <?php $overrideLinkUrl = 'index.php?option=com_templates&view=template&task=template.overrides&folder=' . $module->path . '&id=' . $input->getInt('id') . '&file=' . $this->file . '&' . $token; ?> <a href="<?php echo JRoute::_($overrideLinkUrl); ?>"> <i class="fa fa-files-o"></i>&nbsp;<?php echo $module->name; ?> </a> </li> <?php endforeach; ?> </ul> </div> <div class="col-md-4"> <legend><?php echo JText::_('COM_TEMPLATES_OVERRIDES_COMPONENTS'); ?></legend> <ul class="list-unstyled"> <?php $token = JSession::getFormToken() . '=' . 1; ?> <?php foreach ($this->overridesList['components'] as $key => $value) : ?> <li class="component-folder"> <a href="#" class="component-folder-url"> <i class="fa fa-folder"></i>&nbsp;<?php echo $key; ?> </a> <ul class="list-unstyled"> <?php foreach ($value as $view) : ?> <li> <?php $overrideLinkUrl = 'index.php?option=com_templates&view=template&task=template.overrides&folder=' . $view->path . '&id=' . $input->getInt('id') . '&file=' . $this->file . '&' . $token; ?> <a class="component-file-url" href="<?php echo JRoute::_($overrideLinkUrl); ?>"> <i class="fa fa-files-o"></i>&nbsp;<?php echo $view->name; ?> </a> </li> <?php endforeach; ?> </ul> </li> <?php endforeach; ?> </ul> </div> <div class="col-md-4"> <legend><?php echo JText::_('COM_TEMPLATES_OVERRIDES_LAYOUTS'); ?></legend> <ul class="nav flex-column"> <?php $token = JSession::getFormToken() . '=' . 1; ?> <?php foreach ($this->overridesList['layouts'] as $layout) : ?> <li> <?php $overrideLinkUrl = 'index.php?option=com_templates&view=template&task=template.overrides&folder=' . $layout->path . '&id=' . $input->getInt('id') . '&file=' . $this->file . '&' . $token; ?> <a href="<?php echo JRoute::_($overrideLinkUrl); ?>"> <i class="fa fa-files-o"></i>&nbsp;<?php echo $layout->name; ?> </a> </li> <?php endforeach; ?> </ul> </div> </div> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php echo JHtml::_('bootstrap.addTab', 'myTab', 'description', JText::_('COM_TEMPLATES_TAB_DESCRIPTION')); ?> <?php echo $this->loadTemplate('description'); ?> <?php echo JHtml::_('bootstrap.endTab'); ?> <?php echo JHtml::_('bootstrap.endTabSet'); ?> <?php // Collapse Modal $copyModalData = array( 'selector' => 'copyModal', 'params' => array( 'title' => JText::_('COM_TEMPLATES_TEMPLATE_COPY'), 'footer' => $this->loadTemplate('modal_copy_footer') ), 'body' => $this->loadTemplate('modal_copy_body') ); ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&task=template.copy&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post" name="adminForm" id="adminForm"> <?php echo JLayoutHelper::render('joomla.modal.main', $copyModalData); ?> <?php echo JHtml::_('form.token'); ?> </form> <?php if ($this->type != 'home') : ?> <?php // Rename Modal $renameModalData = array( 'selector' => 'renameModal', 'params' => array( 'title' => JText::sprintf('COM_TEMPLATES_RENAME_FILE', $this->fileName), 'footer' => $this->loadTemplate('modal_rename_footer') ), 'body' => $this->loadTemplate('modal_rename_body') ); ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&task=template.renameFile&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post"> <?php echo JLayoutHelper::render('joomla.modal.main', $renameModalData); ?> <?php echo JHtml::_('form.token'); ?> </form> <?php endif; ?> <?php if ($this->type != 'home') : ?> <?php // Delete Modal $deleteModalData = array( 'selector' => 'deleteModal', 'params' => array( 'title' => JText::_('COM_TEMPLATES_ARE_YOU_SURE'), 'footer' => $this->loadTemplate('modal_delete_footer') ), 'body' => $this->loadTemplate('modal_delete_body') ); ?> <?php echo JLayoutHelper::render('joomla.modal.main', $deleteModalData); ?> <?php endif; ?> <?php // File Modal $fileModalData = array( 'selector' => 'fileModal', 'params' => array( 'title' => JText::_('COM_TEMPLATES_NEW_FILE_HEADER'), 'footer' => $this->loadTemplate('modal_file_footer') ), 'body' => $this->loadTemplate('modal_file_body') ); ?> <?php echo JLayoutHelper::render('joomla.modal.main', $fileModalData); ?> <?php // Folder Modal $folderModalData = array( 'selector' => 'folderModal', 'params' => array( 'title' => JText::_('COM_TEMPLATES_MANAGE_FOLDERS'), 'footer' => $this->loadTemplate('modal_folder_footer') ), 'body' => $this->loadTemplate('modal_folder_body') ); ?> <?php echo JLayoutHelper::render('joomla.modal.main', $folderModalData); ?> <?php if ($this->type != 'home') : ?> <?php // Resize Modal $resizeModalData = array( 'selector' => 'resizeModal', 'params' => array( 'title' => JText::_('COM_TEMPLATES_RESIZE_IMAGE'), 'footer' => $this->loadTemplate('modal_resize_footer') ), 'body' => $this->loadTemplate('modal_resize_body') ); ?> <form action="<?php echo JRoute::_('index.php?option=com_templates&task=template.resizeImage&id=' . $input->getInt('id') . '&file=' . $this->file); ?>" method="post"> <?php echo JLayoutHelper::render('joomla.modal.main', $resizeModalData); ?> <?php echo JHtml::_('form.token'); ?> </form> <?php endif; ?>
ylahav/joomla-cms
administrator/components/com_templates/views/template/tmpl/default.php
PHP
gpl-2.0
16,786
33.470226
191
0.594781
false
<!-- This HTML file has been created by texi2html 1.27 from emacs.texi on 3 March 1994 --> <TITLE>GNU Emacs Manual - Commands for Human Languages</TITLE> <P>Go to the <A HREF="emacs_24.html">previous</A>, <A HREF="emacs_26.html">next</A> section.<P> <A NAME="IDX723"></A> <A NAME="IDX724"></A> <H1><A NAME="SEC155" HREF="emacs_toc.html#SEC155">Commands for Human Languages</A></H1> <P> The term <DFN>text</DFN> has two widespread meanings in our area of the computer field. One is data that is a sequence of characters. Any file that you edit with Emacs is text, in this sense of the word. The other meaning is more restrictive: a sequence of characters in a human language for humans to read (possibly after processing by a text formatter), as opposed to a program or commands for a program. <P> Human languages have syntactic/stylistic conventions that can be supported or used to advantage by editor commands: conventions involving words, sentences, paragraphs, and capital letters. This chapter describes Emacs commands for all of these things. There are also commands for <DFN>filling</DFN>, which means rearranging the lines of a paragraph to be approximately equal in length. The commands for moving over and killing words, sentences and paragraphs, while intended primarily for editing text, are also often useful for editing programs. <P> Emacs has several major modes for editing human language text. If the file contains text pure and simple, use Text mode, which customizes Emacs in small ways for the syntactic conventions of text. For text which contains embedded commands for text formatters, Emacs has other major modes, each for a particular text formatter. Thus, for input to TeX, you would use TeX mode; for input to nroff, Nroff mode. <P> <A NAME="IDX725"></A> <A NAME="IDX726"></A> <H2><A NAME="SEC156" HREF="emacs_toc.html#SEC156">Words</A></H2> <P> Emacs has commands for moving over or operating on words. By convention, the keys for them are all Meta characters. <P> <DL COMPACT> <DT><KBD>M-f</KBD> <DD>Move forward over a word (<CODE>forward-word</CODE>). <DT><KBD>M-b</KBD> <DD>Move backward over a word (<CODE>backward-word</CODE>). <DT><KBD>M-d</KBD> <DD>Kill up to the end of a word (<CODE>kill-word</CODE>). <DT><KBD>M-<KBD>DEL</KBD></KBD> <DD>Kill back to the beginning of a word (<CODE>backward-kill-word</CODE>). <DT><KBD>M-@</KBD> <DD>Mark the end of the next word (<CODE>mark-word</CODE>). <DT><KBD>M-t</KBD> <DD>Transpose two words or drag a word across other words (<CODE>transpose-words</CODE>). </DL> <P> Notice how these keys form a series that parallels the character-based <KBD>C-f</KBD>, <KBD>C-b</KBD>, <KBD>C-d</KBD>, <KBD>C-t</KBD> and <KBD>DEL</KBD>. <KBD>M-@</KBD> is related to <KBD>C-@</KBD>, which is an alias for <KBD>C-<KBD>SPC</KBD></KBD>.<A NAME="IDX727"></A> <A NAME="IDX728"></A> <A NAME="IDX729"></A> <A NAME="IDX730"></A> <P> The commands <KBD>M-f</KBD> (<CODE>forward-word</CODE>) and <KBD>M-b</KBD> (<CODE>backward-word</CODE>) move forward and backward over words. These Meta characters are thus analogous to the corresponding control characters, <KBD>C-f</KBD> and <KBD>C-b</KBD>, which move over single characters in the text. The analogy extends to numeric arguments, which serve as repeat counts. <KBD>M-f</KBD> with a negative argument moves backward, and <KBD>M-b</KBD> with a negative argument moves forward. Forward motion stops right after the last letter of the word, while backward motion stops right before the first letter.<A NAME="IDX731"></A> <A NAME="IDX732"></A> <P> <KBD>M-d</KBD> (<CODE>kill-word</CODE>) kills the word after point. To be precise, it kills everything from point to the place <KBD>M-f</KBD> would move to. Thus, if point is in the middle of a word, <KBD>M-d</KBD> kills just the part after point. If some punctuation comes between point and the next word, it is killed along with the word. (If you wish to kill only the next word but not the punctuation before it, simply do <KBD>M-f</KBD> to get the end, and kill the word backwards with <KBD>M-<KBD>DEL</KBD></KBD>.) <KBD>M-d</KBD> takes arguments just like <KBD>M-f</KBD>. <A NAME="IDX733"></A> <A NAME="IDX734"></A> <P> <KBD>M-<KBD>DEL</KBD></KBD> (<CODE>backward-kill-word</CODE>) kills the word before point. It kills everything from point back to where <KBD>M-b</KBD> would move to. If point is after the space in <SAMP>`FOO, BAR'</SAMP>, then <SAMP>`FOO, '</SAMP> is killed. (If you wish to kill just <SAMP>`FOO'</SAMP>, do <KBD>M-b M-d</KBD> instead of <KBD>M-<KBD>DEL</KBD></KBD>.) <A NAME="IDX735"></A> <A NAME="IDX736"></A> <P> <KBD>M-t</KBD> (<CODE>transpose-words</CODE>) exchanges the word before or containing point with the following word. The delimiter characters between the words do not move. For example, <SAMP>`FOO, BAR'</SAMP> transposes into <SAMP>`BAR, FOO'</SAMP> rather than <SAMP>`BAR FOO,'</SAMP>. See section <A HREF="emacs_18.html#SEC93">Transposing Text</A>, for more on transposition and on arguments to transposition commands. <A NAME="IDX737"></A> <A NAME="IDX738"></A> <P> To operate on the next <VAR>n</VAR> words with an operation which applies between point and mark, you can either set the mark at point and then move over the words, or you can use the command <KBD>M-@</KBD> (<CODE>mark-word</CODE>) which does not move point, but sets the mark where <KBD>M-f</KBD> would move to. <KBD>M-@</KBD> accepts a numeric argument that says how many words to scan for the place to put the mark. <P> The word commands' understanding of syntax is completely controlled by the syntax table. Any character can, for example, be declared to be a word delimiter. See section <A HREF="emacs_35.html#SEC355">The Syntax Table</A>. <P> <A NAME="IDX739"></A> <A NAME="IDX740"></A> <H2><A NAME="SEC157" HREF="emacs_toc.html#SEC157">Sentences</A></H2> <P> The Emacs commands for manipulating sentences and paragraphs are mostly on Meta keys, so as to be like the word-handling commands. <P> <DL COMPACT> <DT><KBD>M-a</KBD> <DD>Move back to the beginning of the sentence (<CODE>backward-sentence</CODE>). <DT><KBD>M-e</KBD> <DD>Move forward to the end of the sentence (<CODE>forward-sentence</CODE>). <DT><KBD>M-k</KBD> <DD>Kill forward to the end of the sentence (<CODE>kill-sentence</CODE>). <DT><KBD>C-x <KBD>DEL</KBD></KBD> <DD>Kill back to the beginning of the sentence (<CODE>backward-kill-sentence</CODE>). </DL> <A NAME="IDX741"></A> <A NAME="IDX742"></A> <A NAME="IDX743"></A> <A NAME="IDX744"></A> <P> The commands <KBD>M-a</KBD> and <KBD>M-e</KBD> (<CODE>backward-sentence</CODE> and <CODE>forward-sentence</CODE>) move to the beginning and end of the current sentence, respectively. They were chosen to resemble <KBD>C-a</KBD> and <KBD>C-e</KBD>, which move to the beginning and end of a line. Unlike them, <KBD>M-a</KBD> and <KBD>M-e</KBD> if repeated or given numeric arguments move over successive sentences. Emacs assumes that the typist's convention is followed, and thus considers a sentence to end wherever there is a <SAMP>`.'</SAMP>, <SAMP>`?'</SAMP> or <SAMP>`!'</SAMP> followed by the end of a line or two spaces, with any number of <SAMP>`)'</SAMP>, <SAMP>`]'</SAMP>, <SAMP>`''</SAMP>, or <SAMP>`"'</SAMP> characters allowed in between. A sentence also begins or ends wherever a paragraph begins or ends.<P> Neither <KBD>M-a</KBD> nor <KBD>M-e</KBD> moves past the newline or spaces beyond the sentence edge at which it is stopping. <A NAME="IDX745"></A> <A NAME="IDX746"></A> <A NAME="IDX747"></A> <A NAME="IDX748"></A> <P> Just as <KBD>C-a</KBD> and <KBD>C-e</KBD> have a kill command, <KBD>C-k</KBD>, to go with them, so <KBD>M-a</KBD> and <KBD>M-e</KBD> have a corresponding kill command <KBD>M-k</KBD> (<CODE>kill-sentence</CODE>) which kills from point to the end of the sentence. With minus one as an argument it kills back to the beginning of the sentence. Larger arguments serve as a repeat count.<P> There is a special command, <KBD>C-x <KBD>DEL</KBD></KBD> (<CODE>backward-kill-sentence</CODE>) for killing back to the beginning of a sentence, because this is useful when you change your mind in the middle of composing text.<A NAME="IDX749"></A> <P> The variable <CODE>sentence-end</CODE> controls recognition of the end of a sentence. It is a regexp that matches the last few characters of a sentence, together with the whitespace following the sentence. Its normal value is <P> <PRE> "[.?!][]\"')]*\\($\\|\t\\| \\)[ \t\n]*" </PRE> <P> This example is explained in the section on regexps. See section <A HREF="emacs_17.html#SEC83">Syntax of Regular Expressions</A>. <P> <A NAME="IDX750"></A> <A NAME="IDX751"></A> <A NAME="IDX752"></A> <A NAME="IDX753"></A> <A NAME="IDX754"></A> <A NAME="IDX755"></A> <H2><A NAME="SEC158" HREF="emacs_toc.html#SEC158">Paragraphs</A></H2> <P> The Emacs commands for manipulating paragraphs are also Meta keys. <P> <DL COMPACT> <DT><KBD>M-{</KBD> <DD>Move back to previous paragraph beginning (<CODE>backward-paragraph</CODE>). <DT><KBD>M-}</KBD> <DD>Move forward to next paragraph end (<CODE>forward-paragraph</CODE>). <DT><KBD>M-h</KBD> <DD>Put point and mark around this or next paragraph (<CODE>mark-paragraph</CODE>). </DL> <P> <KBD>M-{</KBD> moves to the beginning of the current or previous paragraph, while <KBD>M-}</KBD> moves to the end of the current or next paragraph. Blank lines and text formatter command lines separate paragraphs and are not part of any paragraph. Also, an indented line starts a new paragraph. <P> In major modes for programs (as opposed to Text mode), paragraphs begin and end only at blank lines. This makes the paragraph commands continue to be useful even though there are no paragraphs per se. <P> When there is a fill prefix, then paragraphs are delimited by all lines which don't start with the fill prefix. See section <A HREF="emacs_25.html#SEC160">Filling Text</A>. <A NAME="IDX756"></A> <A NAME="IDX757"></A> <P> When you wish to operate on a paragraph, you can use the command <KBD>M-h</KBD> (<CODE>mark-paragraph</CODE>) to set the region around it. This command puts point at the beginning and mark at the end of the paragraph point was in. If point is between paragraphs (in a run of blank lines, or at a boundary), the paragraph following point is surrounded by point and mark. If there are blank lines preceding the first line of the paragraph, one of these blank lines is included in the region. Thus, for example, <KBD>M-h C-w</KBD> kills the paragraph around or after point. <A NAME="IDX758"></A> <A NAME="IDX759"></A> <P> The precise definition of a paragraph boundary is controlled by the variables <CODE>paragraph-separate</CODE> and <CODE>paragraph-start</CODE>. The value of <CODE>paragraph-start</CODE> is a regexp that should match any line that either starts or separates paragraphs. The value of <CODE>paragraph-separate</CODE> is another regexp that should match only lines that separate paragraphs without being part of any paragraph. Lines that start a new paragraph and are contained in it must match only <CODE>paragraph-start</CODE>, not <CODE>paragraph-separate</CODE>. For example, normally <CODE>paragraph-start</CODE> is <CODE>"^[ <TT>\</TT>t<TT>\</TT>n<TT>\</TT>f]"</CODE> and <CODE>paragraph-separate</CODE> is <CODE>"^[ <TT>\</TT>t<TT>\</TT>f]*$"</CODE>.<P> Normally it is desirable for page boundaries to separate paragraphs. The default values of these variables recognize the usual separator for pages. <P> <H2><A NAME="SEC159" HREF="emacs_toc.html#SEC159">Pages</A></H2> <A NAME="IDX760"></A> <A NAME="IDX761"></A> <P> Files are often thought of as divided into <DFN>pages</DFN> by the <DFN>formfeed</DFN> character (ASCII control-L, octal code 014). For example, if a file is printed on a line printer, each page of the file, in this sense, will start on a new page of paper. Emacs treats a page-separator character just like any other character. You can insert it with <KBD>C-q C-l</KBD>, or delete it with <KBD>DEL</KBD>. Thus, you are free to paginate your file or not. However, since pages are often meaningful divisions of the file, Emacs provides commands to move over them and operate on them. <P> <DL COMPACT> <DT><KBD>C-x [</KBD> <DD>Move point to previous page boundary (<CODE>backward-page</CODE>). <DT><KBD>C-x ]</KBD> <DD>Move point to next page boundary (<CODE>forward-page</CODE>). <DT><KBD>C-x C-p</KBD> <DD>Put point and mark around this page (or another page) (<CODE>mark-page</CODE>). <DT><KBD>C-x l</KBD> <DD>Count the lines in this page (<CODE>count-lines-page</CODE>). </DL> <A NAME="IDX762"></A> <A NAME="IDX763"></A> <A NAME="IDX764"></A> <A NAME="IDX765"></A> <P> The <KBD>C-x [</KBD> (<CODE>backward-page</CODE>) command moves point to immediately after the previous page delimiter. If point is already right after a page delimiter, it skips that one and stops at the previous one. A numeric argument serves as a repeat count. The <KBD>C-x ]</KBD> (<CODE>forward-page</CODE>) command moves forward past the next page delimiter. <A NAME="IDX766"></A> <A NAME="IDX767"></A> <P> The <KBD>C-x C-p</KBD> command (<CODE>mark-page</CODE>) puts point at the beginning of the current page and the mark at the end. The page delimiter at the end is included (the mark follows it). The page delimiter at the front is excluded (point follows it). This command can be followed by <KBD>C-w</KBD> to kill a page which is to be moved elsewhere. If it is inserted after a page delimiter, at a place where <KBD>C-x ]</KBD> or <KBD>C-x [</KBD> would take you, then the page will be properly delimited before and after once again. <P> A numeric argument to <KBD>C-x C-p</KBD> is used to specify which page to go to, relative to the current one. Zero means the current page. One means the next page, and -1 means the previous one. <A NAME="IDX768"></A> <A NAME="IDX769"></A> <P> The <KBD>C-x l</KBD> command (<CODE>count-lines-page</CODE>) is good for deciding where to break a page in two. It prints in the echo area the total number of lines in the current page, and then divides it up into those preceding the current line and those following, as in <P> <PRE> Page has 96 (72+25) lines </PRE> <P> Notice that the sum is off by one; this is correct if point is not at the beginning of a line. <A NAME="IDX770"></A> <P> The variable <CODE>page-delimiter</CODE> controls where pages begin. Its value is a regexp that matches the beginning of a line that separates pages. The normal value of this variable is <CODE>"^<TT>\</TT>f"</CODE>, which matches a formfeed character at the beginning of a line. <P> <A NAME="IDX771"></A> <H2><A NAME="SEC160" HREF="emacs_toc.html#SEC160">Filling Text</A></H2> <P> With Auto Fill mode, text can be <DFN>filled</DFN> (broken up into lines that fit in a specified width) as you insert it. If you alter existing text it may no longer be properly filled; then you can use the explicit fill commands to fill the paragraph again. <P> <A NAME="IDX772"></A> <A NAME="IDX773"></A> <H3><A NAME="SEC161" HREF="emacs_toc.html#SEC161">Auto Fill Mode</A></H3> <P> <DFN>Auto Fill</DFN> mode is a minor mode in which lines are broken automatically when they become too wide. Breaking happens only when you type a <KBD>SPC</KBD> or <KBD>RET</KBD>. <P> <DL COMPACT> <DT><KBD>M-x auto-fill-mode</KBD> <DD>Enable or disable Auto Fill mode. <DT><KBD><KBD>SPC</KBD></KBD> <DD><DT><KBD><KBD>RET</KBD></KBD> <DD>In Auto Fill mode, break lines when appropriate. </DL> <A NAME="IDX774"></A> <P> <KBD>M-x auto-fill-mode</KBD> turns Auto Fill mode on if it was off, or off if it was on. With a positive numeric argument it always turns Auto Fill mode on, and with a negative argument always turns it off. You can see when Auto Fill mode is in effect by the presence of the word <SAMP>`Fill'</SAMP> in the mode line, inside the parentheses. Auto Fill mode is a minor mode, turned on or off for each buffer individually. See section <A HREF="emacs_35.html#SEC333">Minor Modes</A>. <P> In Auto Fill mode, lines are broken automatically at spaces when they get longer than the desired width. Line breaking and rearrangement takes place only when you type <KBD>SPC</KBD> or <KBD>RET</KBD>. If you wish to insert a space or newline without permitting line-breaking, type <KBD>C-q <KBD>SPC</KBD></KBD> or <KBD>C-q <KBD>LFD</KBD></KBD> (recall that a newline is really a linefeed). Also, <KBD>C-o</KBD> inserts a newline without line breaking. <P> Auto Fill mode works well with Lisp mode, because when it makes a new line in Lisp mode it indents that line with <KBD>TAB</KBD>. If a line ending in a comment gets too long, the text of the comment is split into two comment lines. Optionally new comment delimiters are inserted at the end of the first line and the beginning of the second so that each line is a separate comment; the variable <CODE>comment-multi-line</CODE> controls the choice (see section <A HREF="emacs_26.html#SEC187">Manipulating Comments</A>). <P> Auto Fill mode does not refill entire paragraphs. It can break lines but cannot merge lines. So editing in the middle of a paragraph can result in a paragraph that is not correctly filled. The easiest way to make the paragraph properly filled again is usually with the explicit fill commands. <P> Many users like Auto Fill mode and want to use it in all text files. The section on init files says how to arrange this permanently for yourself. See section <A HREF="emacs_35.html#SEC356">The Init File, <TT>`~/.emacs'</TT></A>. <P> <H3><A NAME="SEC162" HREF="emacs_toc.html#SEC162">Explicit Fill Commands</A></H3> <P> <DL COMPACT> <DT><KBD>M-q</KBD> <DD>Fill current paragraph (<CODE>fill-paragraph</CODE>). <DT><KBD>C-x f</KBD> <DD>Set the fill column (<CODE>set-fill-column</CODE>). <DT><KBD>M-x fill-region</KBD> <DD>Fill each paragraph in the region (<CODE>fill-region</CODE>). <DT><KBD>M-x fill-region-as-paragraph.</KBD> <DD>Fill the region, considering it as one paragraph. <DT><KBD>M-s</KBD> <DD>Center a line. </DL> <A NAME="IDX775"></A> <A NAME="IDX776"></A> <P> To refill a paragraph, use the command <KBD>M-q</KBD> (<CODE>fill-paragraph</CODE>). This operates on the paragraph that point is inside, or the one after point if point is between paragraphs. Refilling works by removing all the line-breaks, then inserting new ones where necessary. <A NAME="IDX777"></A> <A NAME="IDX778"></A> <A NAME="IDX779"></A> <P> The command <KBD>M-s</KBD> (<CODE>center-line</CODE>) centers the current line within the current fill column. With an argument, it centers several lines individually and moves past them. <A NAME="IDX780"></A> <P> To refill many paragraphs, use <KBD>M-x fill-region</KBD>, which divides the region into paragraphs and fills each of them. <A NAME="IDX781"></A> <P> <KBD>M-q</KBD> and <CODE>fill-region</CODE> use the same criteria as <KBD>M-h</KBD> for finding paragraph boundaries (see section <A HREF="emacs_25.html#SEC158">Paragraphs</A>). For more control, you can use <KBD>M-x fill-region-as-paragraph</KBD>, which refills everything between point and mark. This command deletes any blank lines within the region, so separate blocks of text end up combined into one block.<A NAME="IDX782"></A> <P> A numeric argument to <KBD>M-q</KBD> causes it to <DFN>justify</DFN> the text as well as filling it. This means that extra spaces are inserted to make the right margin line up exactly at the fill column. To remove the extra spaces, use <KBD>M-q</KBD> with no argument. (Likewise for <CODE>fill-region</CODE>.) <A NAME="IDX783"></A> <A NAME="IDX784"></A> <P> When <CODE>adaptive-fill-mode</CODE> is non-<CODE>nil</CODE> (which is normally the case), if you use <CODE>fill-region-as-paragraph</CODE> on an indented paragraph and you don't have a fill prefix, it uses the indentation of the second line of the paragraph as the fill prefix. The effect of adaptive filling is not noticeable in Text mode, because an indented line counts as a paragraph starter and thus each line of an indented paragraph is considered a paragraph of its own. But you do notice the effect in Indented Text mode and some other major modes. <A NAME="IDX785"></A> <P> The maximum line width for filling is in the variable <CODE>fill-column</CODE>. Altering the value of <CODE>fill-column</CODE> makes it local to the current buffer; until that time, the default value is in effect. The default is initially 70. See section <A HREF="emacs_35.html#SEC338">Local Variables</A>. <A NAME="IDX786"></A> <A NAME="IDX787"></A> <P> The easiest way to set <CODE>fill-column</CODE> is to use the command <KBD>C-x f</KBD> (<CODE>set-fill-column</CODE>). With no argument, it sets <CODE>fill-column</CODE> to the current horizontal position of point. With a numeric argument, it uses that as the new fill column. <P> <H3><A NAME="SEC163" HREF="emacs_toc.html#SEC163">The Fill Prefix</A></H3> <A NAME="IDX788"></A> <P> To fill a paragraph in which each line starts with a special marker (which might be a few spaces, giving an indented paragraph), use the <DFN>fill prefix</DFN> feature. The fill prefix is a string which Emacs expects every line to start with, and which is not included in filling. <P> <DL COMPACT> <DT><KBD>C-x .</KBD> <DD>Set the fill prefix (<CODE>set-fill-prefix</CODE>). <DT><KBD>M-q</KBD> <DD>Fill a paragraph using current fill prefix (<CODE>fill-paragraph</CODE>). <DT><KBD>M-x fill-individual-paragraphs</KBD> <DD>Fill the region, considering each change of indentation as starting a new paragraph. <DT><KBD>M-x fill-nonuniform-paragraphs</KBD> <DD>Fill the region, considering only paragraph-separator lines as starting a new paragraph. </DL> <A NAME="IDX789"></A> <A NAME="IDX790"></A> <P> To specify a fill prefix, move to a line that starts with the desired prefix, put point at the end of the prefix, and give the command <KBD>C-x .</KBD> (<CODE>set-fill-prefix</CODE>). That's a period after the <KBD>C-x</KBD>. To turn off the fill prefix, specify an empty prefix: type <KBD>C-x .</KBD> with point at the beginning of a line.<P> When a fill prefix is in effect, the fill commands remove the fill prefix from each line before filling and insert it on each line after filling. The fill prefix is also inserted on new lines made automatically by Auto Fill mode. Lines that do not start with the fill prefix are considered to start paragraphs, both in <KBD>M-q</KBD> and the paragraph commands; this is just right if you are using paragraphs with hanging indentation (every line indented except the first one). Lines which are blank or indented once the prefix is removed also separate or start paragraphs; this is what you want if you are writing multi-paragraph comments with a comment delimiter on each line. <P> For example, if <CODE>fill-column</CODE> is 40 and you set the fill prefix to <SAMP>`;; '</SAMP>, then <KBD>M-q</KBD> in the following text <P> <PRE> ;; This is an ;; example of a paragraph ;; inside a Lisp-style comment. </PRE> <P> produces this: <P> <PRE> ;; This is an example of a paragraph ;; inside a Lisp-style comment. </PRE> <P> The <KBD>C-o</KBD> command inserts the fill prefix on new lines it creates, when you use it at the beginning of a line (see section <A HREF="emacs_8.html#SEC25">Blank Lines</A>). Conversely, the command <KBD>M-^</KBD> deletes the prefix (if it occurs) after the newline that it deletes (see section <A HREF="emacs_24.html#SEC151">Indentation</A>). <A NAME="IDX791"></A> <P> You can use <KBD>M-x fill-individual-paragraphs</KBD> to set the fill prefix for each paragraph automatically. This command divides the region into paragraphs, treating every change in the amount of indentation as the start of a new paragraph, and fills each of these paragraphs. Thus, all the lines in one "paragraph" have the same amount of indentation. That indentation serves as the fill prefix for that paragraph. <A NAME="IDX792"></A> <P> <KBD>M-x fill-nonuniform-paragraphs</KBD> is a similar command that divides the region into paragraphs in a different way. It considers only paragraph-separating lines (as defined by <CODE>paragraph-separate</CODE>) as starting a new paragraph. Since this means that the lines of one paragraph may have different amounts of indentation, the fill prefix used is the smallest amount of indentation of any of the lines of the paragraph. <A NAME="IDX793"></A> <P> The fill prefix is stored in the variable <CODE>fill-prefix</CODE>. Its value is a string, or <CODE>nil</CODE> when there is no fill prefix. This is a per-buffer variable; altering the variable affects only the current buffer, but there is a default value which you can change as well. See section <A HREF="emacs_35.html#SEC338">Local Variables</A>. <P> <A NAME="IDX794"></A> <H2><A NAME="SEC164" HREF="emacs_toc.html#SEC164">Case Conversion Commands</A></H2> <P> Emacs has commands for converting either a single word or any arbitrary range of text to upper case or to lower case. <P> <DL COMPACT> <DT><KBD>M-l</KBD> <DD>Convert following word to lower case (<CODE>downcase-word</CODE>). <DT><KBD>M-u</KBD> <DD>Convert following word to upper case (<CODE>upcase-word</CODE>). <DT><KBD>M-c</KBD> <DD>Capitalize the following word (<CODE>capitalize-word</CODE>). <DT><KBD>C-x C-l</KBD> <DD>Convert region to lower case (<CODE>downcase-region</CODE>). <DT><KBD>C-x C-u</KBD> <DD>Convert region to upper case (<CODE>upcase-region</CODE>). </DL> <A NAME="IDX795"></A> <A NAME="IDX796"></A> <A NAME="IDX797"></A> <A NAME="IDX798"></A> <A NAME="IDX799"></A> <A NAME="IDX800"></A> <A NAME="IDX801"></A> <A NAME="IDX802"></A> <A NAME="IDX803"></A> <P> The word conversion commands are the most useful. <KBD>M-l</KBD> (<CODE>downcase-word</CODE>) converts the word after point to lower case, moving past it. Thus, repeating <KBD>M-l</KBD> converts successive words. <KBD>M-u</KBD> (<CODE>upcase-word</CODE>) converts to all capitals instead, while <KBD>M-c</KBD> (<CODE>capitalize-word</CODE>) puts the first letter of the word into upper case and the rest into lower case. All these commands convert several words at once if given an argument. They are especially convenient for converting a large amount of text from all upper case to mixed case, because you can move through the text using <KBD>M-l</KBD>, <KBD>M-u</KBD> or <KBD>M-c</KBD> on each word as appropriate, occasionally using <KBD>M-f</KBD> instead to skip a word. <P> When given a negative argument, the word case conversion commands apply to the appropriate number of words before point, but do not move point. This is convenient when you have just typed a word in the wrong case: you can give the case conversion command and continue typing. <P> If a word case conversion command is given in the middle of a word, it applies only to the part of the word which follows point. This is just like what <KBD>M-d</KBD> (<CODE>kill-word</CODE>) does. With a negative argument, case conversion applies only to the part of the word before point. <A NAME="IDX804"></A> <A NAME="IDX805"></A> <A NAME="IDX806"></A> <A NAME="IDX807"></A> <P> The other case conversion commands are <KBD>C-x C-u</KBD> (<CODE>upcase-region</CODE>) and <KBD>C-x C-l</KBD> (<CODE>downcase-region</CODE>), which convert everything between point and mark to the specified case. Point and mark do not move. <P> The region case conversion commands <CODE>upcase-region</CODE> and <CODE>downcase-region</CODE> are normally disabled. This means that they ask for confirmation if you try to use them. When you confirm, you may enable the command, which means it will not ask for confirmation again. See section <A HREF="emacs_35.html#SEC353">Disabling Commands</A>. <P> <A NAME="IDX808"></A> <A NAME="IDX809"></A> <A NAME="IDX810"></A> <H2><A NAME="SEC165" HREF="emacs_toc.html#SEC165">Text Mode</A></H2> <P> When you edit files of text in a human language, it's more convenient to use Text mode rather than Fundamental mode. Invoke <KBD>M-x text-mode</KBD> to enter Text mode. In Text mode, <KBD>TAB</KBD> runs the function <CODE>tab-to-tab-stop</CODE>, which allows you to use arbitrary tab stops set with <KBD>M-x edit-tab-stops</KBD> (see section <A HREF="emacs_24.html#SEC153">Tab Stops</A>). Features concerned with comments in programs are turned off except when explicitly invoked. The syntax table is changed so that periods are not considered part of a word, while apostrophes, backspaces and underlines are. <A NAME="IDX811"></A> <A NAME="IDX812"></A> <A NAME="IDX813"></A> <A NAME="IDX814"></A> <P> A similar variant mode is Indented Text mode, intended for editing text in which most lines are indented. This mode defines <KBD>TAB</KBD> to run <CODE>indent-relative</CODE> (see section <A HREF="emacs_24.html#SEC151">Indentation</A>), and makes Auto Fill indent the lines it creates. The result is that normally a line made by Auto Filling, or by <KBD>LFD</KBD>, is indented just like the previous line. In Indented Text mode, only blank lines separate paragraphs--indented lines continue the current paragraph. Use <KBD>M-x indented-text-mode</KBD> to select this mode. <A NAME="IDX815"></A> <P> Text mode, and all the modes based on it, define <KBD>M-<KBD>TAB</KBD></KBD> as the command <CODE>ispell-complete-word</CODE>, which performs completion of the partial word in the buffer before point, using the spelling dictionary as the space of possible words. See section <A HREF="emacs_18.html#SEC95">Checking and Correcting Spelling</A>. <A NAME="IDX816"></A> <P> Entering Text mode or Indented Text mode runs the hook <CODE>text-mode-hook</CODE>. Other major modes related to Text mode also run this hook, followed by hooks of their own; this includes Nroff mode, TeX mode, Outline mode and Mail mode. Hook functions on <CODE>text-mode-hook</CODE> can look at the value of <CODE>major-mode</CODE> to see which of these modes is actually being entered. See section <A HREF="emacs_35.html#SEC337">Hooks</A>. <P> <A NAME="IDX817"></A> <A NAME="IDX818"></A> <A NAME="IDX819"></A> <A NAME="IDX820"></A> <H2><A NAME="SEC166" HREF="emacs_toc.html#SEC166">Outline Mode</A></H2> <A NAME="IDX821"></A> <A NAME="IDX822"></A> <P> Outline mode is a major mode much like Text mode but intended for editing outlines. It allows you to make parts of the text temporarily invisible so that you can see just the overall structure of the outline. Type <KBD>M-x outline-mode</KBD> to switch to Outline mode as the major mode of the current buffer. Type <KBD>M-x outline-minor-mode</KBD> to enable Outline mode as a minor mode in the current buffer. When Outline minor mode is enabled, the <KBD>C-c</KBD> commands of Outline mode replace those of the major mode. <P> When a line is invisible in outline mode, it does not appear on the screen. The screen appears exactly as if the invisible line were deleted, except that an ellipsis (three periods in a row) appears at the end of the previous visible line (only one ellipsis no matter how many invisible lines follow). <P> All editing commands treat the text of the invisible line as part of the previous visible line. For example, <KBD>C-n</KBD> moves onto the next visible line. Killing an entire visible line, including its terminating newline, really kills all the following invisible lines along with it; yanking it all back yanks the invisible lines and they remain invisible. <A NAME="IDX823"></A> <P> Entering Outline mode runs the hook <CODE>text-mode-hook</CODE> followed by the hook <CODE>outline-mode-hook</CODE> (see section <A HREF="emacs_35.html#SEC337">Hooks</A>). <P> <H3><A NAME="SEC167" HREF="emacs_toc.html#SEC167">Format of Outlines</A></H3> <A NAME="IDX824"></A> <A NAME="IDX825"></A> <P> Outline mode assumes that the lines in the buffer are of two types: <DFN>heading lines</DFN> and <DFN>body lines</DFN>. A heading line represents a topic in the outline. Heading lines start with one or more stars; the number of stars determines the depth of the heading in the outline structure. Thus, a heading line with one star is a major topic; all the heading lines with two stars between it and the next one-star heading are its subtopics; and so on. Any line that is not a heading line is a body line. Body lines belong with the preceding heading line. Here is an example: <P> <PRE> * Food This is the body, which says something about the topic of food. ** Delicious Food This is the body of the second-level header. ** Distasteful Food This could have a body too, with several lines. *** Dormitory Food * Shelter A second first-level topic with its header line. </PRE> <P> A heading line together with all following body lines is called collectively an <DFN>entry</DFN>. A heading line together with all following deeper heading lines and their body lines is called a <DFN>subtree</DFN>. <A NAME="IDX826"></A> <P> You can customize the criterion for distinguishing heading lines by setting the variable <CODE>outline-regexp</CODE>. Any line whose beginning has a match for this regexp is considered a heading line. Matches that start within a line (not at the beginning) do not count. The length of the matching text determines the level of the heading; longer matches make a more deeply nested level. Thus, for example, if a text formatter has commands <SAMP>`@chapter'</SAMP>, <SAMP>`@section'</SAMP> and <SAMP>`@subsection'</SAMP> to divide the document into chapters and sections, you could make those lines count as heading lines by setting <CODE>outline-regexp</CODE> to <SAMP>`"@chap\\|@\\(sub\\)*section"'</SAMP>. Note the trick: the two words <SAMP>`chapter'</SAMP> and <SAMP>`section'</SAMP> are equally long, but by defining the regexp to match only <SAMP>`chap'</SAMP> we ensure that the length of the text matched on a chapter heading is shorter, so that Outline mode will know that sections are contained in chapters. This works as long as no other command starts with <SAMP>`@chap'</SAMP>. <P> Outline mode makes a line invisible by changing the newline before it into an ASCII control-M (code 015). Most editing commands that work on lines treat an invisible line as part of the previous line because, strictly speaking, it <EM>is</EM> part of that line, since there is no longer a newline in between. When you save the file in Outline mode, control-M characters are saved as newlines, so the invisible lines become ordinary lines in the file. But saving does not change the visibility status of a line inside Emacs. <P> <H3><A NAME="SEC168" HREF="emacs_toc.html#SEC168">Outline Motion Commands</A></H3> <P> There are some special motion commands in Outline mode that move backward and forward to heading lines. <P> <DL COMPACT> <DT><KBD>C-c C-n</KBD> <DD>Move point to the next visible heading line (<CODE>outline-next-visible-heading</CODE>). <DT><KBD>C-c C-p</KBD> <DD>Move point to the previous visible heading line <BR> (<CODE>outline-previous-visible-heading</CODE>). <DT><KBD>C-c C-f</KBD> <DD>Move point to the next visible heading line at the same level as the one point is on (<CODE>outline-forward-same-level</CODE>). <DT><KBD>C-c C-b</KBD> <DD>Move point to the previous visible heading line at the same level (<CODE>outline-backward-same-level</CODE>). <DT><KBD>C-c C-u</KBD> <DD>Move point up to a lower-level (more inclusive) visible heading line (<CODE>outline-up-heading</CODE>). </DL> <A NAME="IDX827"></A> <A NAME="IDX828"></A> <A NAME="IDX829"></A> <A NAME="IDX830"></A> <P> <KBD>C-c C-n</KBD> (<CODE>next-visible-heading</CODE>) moves down to the next heading line. <KBD>C-c C-p</KBD> (<CODE>previous-visible-heading</CODE>) moves similarly backward. Both accept numeric arguments as repeat counts. The names emphasize that invisible headings are skipped, but this is not really a special feature. All editing commands that look for lines ignore the invisible lines automatically.<A NAME="IDX831"></A> <A NAME="IDX832"></A> <A NAME="IDX833"></A> <A NAME="IDX834"></A> <A NAME="IDX835"></A> <A NAME="IDX836"></A> <P> More powerful motion commands understand the level structure of headings. <KBD>C-c C-f</KBD> (<CODE>outline-forward-same-level</CODE>) and <KBD>C-c C-b</KBD> (<CODE>outline-backward-same-level</CODE>) move from one heading line to another visible heading at the same depth in the outline. <KBD>C-c C-u</KBD> (<CODE>outline-up-heading</CODE>) moves backward to another heading that is less deeply nested. <P> <H3><A NAME="SEC169" HREF="emacs_toc.html#SEC169">Outline Visibility Commands</A></H3> <P> The other special commands of outline mode are used to make lines visible or invisible. Their names all start with <CODE>hide</CODE> or <CODE>show</CODE>. Most of them fall into pairs of opposites. They are not undoable; instead, you can undo right past them. Making lines visible or invisible is simply not recorded by the undo mechanism. <P> <DL COMPACT> <DT><KBD>M-x hide-body</KBD> <DD>Make all body lines in the buffer invisible. <DT><KBD>M-x show-all</KBD> <DD>Make all lines in the buffer visible. <DT><KBD>C-c C-h</KBD> <DD>Make everything under this heading invisible, not including this heading itself<BR> (<CODE>hide-subtree</CODE>). <DT><KBD>C-c C-s</KBD> <DD>Make everything under this heading visible, including body, subheadings, and their bodies (<CODE>show-subtree</CODE>). <DT><KBD>M-x hide-leaves</KBD> <DD>Make the body of this heading line, and of all its subheadings, invisible. <DT><KBD>M-x show-branches</KBD> <DD>Make all subheadings of this heading line, at all levels, visible. <DT><KBD>C-c C-i</KBD> <DD>Make immediate subheadings (one level down) of this heading line visible (<CODE>show-children</CODE>). <DT><KBD>M-x hide-entry</KBD> <DD>Make this heading line's body invisible. <DT><KBD>M-x show-entry</KBD> <DD>Make this heading line's body visible. </DL> <A NAME="IDX837"></A> <A NAME="IDX838"></A> <P> Two commands that are exact opposites are <KBD>M-x hide-entry</KBD> and <KBD>M-x show-entry</KBD>. They are used with point on a heading line, and apply only to the body lines of that heading. The subtopics and their bodies are not affected. <A NAME="IDX839"></A> <A NAME="IDX840"></A> <A NAME="IDX841"></A> <A NAME="IDX842"></A> <A NAME="IDX843"></A> <P> Two more powerful opposites are <KBD>C-c C-h</KBD> (<CODE>hide-subtree</CODE>) and <KBD>C-c C-s</KBD> (<CODE>show-subtree</CODE>). Both expect to be used when point is on a heading line, and both apply to all the lines of that heading's <DFN>subtree</DFN>: its body, all its subheadings, both direct and indirect, and all of their bodies. In other words, the subtree contains everything following this heading line, up to and not including the next heading of the same or higher rank.<A NAME="IDX844"></A> <A NAME="IDX845"></A> <P> Intermediate between a visible subtree and an invisible one is having all the subheadings visible but none of the body. There are two commands for doing this, depending on whether you want to hide the bodies or make the subheadings visible. They are <KBD>M-x hide-leaves</KBD> and <KBD>M-x show-branches</KBD>. <A NAME="IDX846"></A> <A NAME="IDX847"></A> <P> A little weaker than <CODE>show-branches</CODE> is <KBD>C-c C-i</KBD> (<CODE>show-children</CODE>). It makes just the direct subheadings visible--those one level down. Deeper subheadings remain invisible, if they were invisible.<A NAME="IDX848"></A> <A NAME="IDX849"></A> <P> Two commands have a blanket effect on the whole file. <KBD>M-x hide-body</KBD> makes all body lines invisible, so that you see just the outline structure. <KBD>M-x show-all</KBD> makes all lines visible. These commands can be thought of as a pair of opposites even though <KBD>M-x show-all</KBD> applies to more than just body lines. <P> You can turn off the use of ellipses at the ends of visible lines by setting <CODE>selective-display-ellipses</CODE> to <CODE>nil</CODE>. Then there is no visible indication of the presence of invisible lines. <P> <A NAME="IDX850"></A> <A NAME="IDX851"></A> <A NAME="IDX852"></A> <A NAME="IDX853"></A> <A NAME="IDX854"></A> <A NAME="IDX855"></A> <A NAME="IDX856"></A> <H2><A NAME="SEC170" HREF="emacs_toc.html#SEC170">TeX Mode</A></H2> <P> TeX is a powerful text formatter written by Donald Knuth; it is also free, like GNU Emacs. LaTeX is a simplified input format for TeX, implemented by TeX macros; it comes with TeX. SliTeX is a special form of LaTeX.<P> Emacs has a special TeX mode for editing TeX input files. It provides facilities for checking the balance of delimiters and for invoking TeX on all or part of the file. <A NAME="IDX857"></A> <P> TeX mode has three variants, Plain TeX mode, LaTeX mode, and SliTeX mode (these three distinct major modes differ only slightly). They are designed for editing the three different formats. The command <KBD>M-x tex-mode</KBD> looks at the contents of the buffer to determine whether the contents appear to be either LaTeX input or SliTeX input; it then selects the appropriate mode. If it can't tell which is right (e.g., the buffer is empty), the variable <CODE>tex-default-mode</CODE> controls which mode is used. <P> When <KBD>M-x tex-mode</KBD> does not guess right, you can use the commands <KBD>M-x plain-tex-mode</KBD>, <KBD>M-x latex-mode</KBD>, and <KBD>M-x slitex-mode</KBD> to select explicitly the particular variants of TeX mode. <P> <H3><A NAME="SEC171" HREF="emacs_toc.html#SEC171">TeX Editing Commands</A></H3> <P> Here are the special commands provided in TeX mode for editing the text of the file. <P> <DL COMPACT> <DT><KBD>"</KBD> <DD>Insert, according to context, either <SAMP>`"'</SAMP> or <SAMP>`"'</SAMP> or <SAMP>`"'</SAMP> (<CODE>tex-insert-quote</CODE>). <DT><KBD><KBD>LFD</KBD></KBD> <DD>Insert a paragraph break (two newlines) and check the previous paragraph for unbalanced braces or dollar signs (<CODE>tex-terminate-paragraph</CODE>). <DT><KBD>M-x validate-tex-region</KBD> <DD>Check each paragraph in the region for unbalanced braces or dollar signs. <DT><KBD>C-c {</KBD> <DD>Insert <SAMP>`{}'</SAMP> and position point between them (<CODE>tex-insert-braces</CODE>). <DT><KBD>C-c }</KBD> <DD>Move forward past the next unmatched close brace (<CODE>up-list</CODE>). </DL> <A NAME="IDX858"></A> <A NAME="IDX859"></A> <P> In TeX, the character <SAMP>`"'</SAMP> is not normally used; we use <SAMP>`"'</SAMP> to start a quotation and <SAMP>`"'</SAMP> to end one. To make editing easier under this formatting convention, TeX mode overrides the normal meaning of the key <KBD>"</KBD> with a command that inserts a pair of single-quotes or backquotes (<CODE>tex-insert-quote</CODE>). To be precise, this command inserts <SAMP>`"'</SAMP> after whitespace or an open brace, <SAMP>`"'</SAMP> after a backslash, and <SAMP>`"'</SAMP> after any other character. <P> If you need the character <SAMP>`"'</SAMP> itself in unusual contexts, use <KBD>C-q</KBD> to insert it. Also, <KBD>"</KBD> with a numeric argument always inserts that number of <SAMP>`"'</SAMP> characters. <P> In TeX mode, <SAMP>`$'</SAMP> has a special syntax code which attempts to understand the way TeX math mode delimiters match. When you insert a <SAMP>`$'</SAMP> that is meant to exit math mode, the position of the matching <SAMP>`$'</SAMP> that entered math mode is displayed for a second. This is the same feature that displays the open brace that matches a close brace that is inserted. However, there is no way to tell whether a <SAMP>`$'</SAMP> enters math mode or leaves it; so when you insert a <SAMP>`$'</SAMP> that enters math mode, the previous <SAMP>`$'</SAMP> position is shown as if it were a match, even though they are actually unrelated. <A NAME="IDX860"></A> <A NAME="IDX861"></A> <A NAME="IDX862"></A> <A NAME="IDX863"></A> <P> TeX uses braces as delimiters that must match. Some users prefer to keep braces balanced at all times, rather than inserting them singly. Use <KBD>C-c {</KBD> (<CODE>tex-insert-braces</CODE>) to insert a pair of braces. It leaves point between the two braces so you can insert the text that belongs inside. Afterward, use the command <KBD>C-c }</KBD> (<CODE>up-list</CODE>) to move forward past the close brace. <A NAME="IDX864"></A> <A NAME="IDX865"></A> <A NAME="IDX866"></A> <P> There are two commands for checking the matching of braces. <KBD>LFD</KBD> (<CODE>tex-terminate-paragraph</CODE>) checks the paragraph before point, and inserts two newlines to start a new paragraph. It prints a message in the echo area if any mismatch is found. <KBD>M-x validate-tex-region</KBD> checks a region, paragraph by paragraph. When it finds a paragraph that contains a mismatch, it displays point at the beginning of the paragraph for a few seconds and pushes a mark at that spot. Scanning continues until the whole buffer has been checked or until you type another key. The positions of the last several paragraphs with mismatches can be found in the mark ring (see section <A HREF="emacs_13.html#SEC52">The Mark Ring</A>). <P> Note that Emacs commands count square brackets and parentheses in TeX mode, not just braces. This is not strictly correct for the purpose of checking TeX syntax. However, parentheses and square brackets are likely to be used in text as matching delimiters and it is useful for the various motion commands and automatic match display to work with them. <P> <H3><A NAME="SEC172" HREF="emacs_toc.html#SEC172">LaTeX Editing Commands</A></H3> <P> LaTeX mode provides a few extra features not applicable to plain TeX. <P> <DL COMPACT> <DT><KBD>C-c C-o</KBD> <DD>Insert <SAMP>`\begin'</SAMP> and <SAMP>`\end'</SAMP> for LaTeX block and position point on a line between them. (<CODE>tex-latex-block</CODE>). <DT><KBD>C-c C-e</KBD> <DD>Close the last unended block for LaTeX (<CODE>tex-close-latex-block</CODE>). </DL> <A NAME="IDX867"></A> <A NAME="IDX868"></A> <P> In LaTeX input, <SAMP>`\begin'</SAMP> and <SAMP>`\end'</SAMP> commands are used to group blocks of text. To insert a <SAMP>`\begin'</SAMP> and a matching <SAMP>`\end'</SAMP> (on a new line following the <SAMP>`\begin'</SAMP>), use <KBD>C-c C-o</KBD> (<CODE>tex-latex-block</CODE>). A blank line is inserted between the two, and point is left there.<A NAME="IDX869"></A> <P> Emacs knows all of the standard LaTeX block names and will permissively complete a partially entered block name (see section <A HREF="emacs_10.html#SEC33">Completion</A>). You can add your own list of block names to those known by Emacs with the variable <CODE>latex-block-names</CODE>. For example, to add <SAMP>`theorem'</SAMP>, <SAMP>`corollary'</SAMP>, and <SAMP>`proof'</SAMP>, include the line <P> <PRE> (setq latex-block-names '("theorem" "corollary" "proof")) </PRE> <P> to your <TT>`.emacs'</TT> file. <A NAME="IDX870"></A> <A NAME="IDX871"></A> <P> In LaTeX input, <SAMP>`\begin'</SAMP> and <SAMP>`\end'</SAMP> commands must balance. You can use <KBD>C-c C-e</KBD> (<CODE>tex-close-latex-block</CODE>) to insert automatically a matching <SAMP>`\end'</SAMP> to match the last unmatched <SAMP>`\begin'</SAMP>. The <SAMP>`\end'</SAMP> will be indented to match the corresponding <SAMP>`\begin'</SAMP>. The <SAMP>`\end'</SAMP> will be followed by a newline if point is at the beginning of a line.<P> <H3><A NAME="SEC173" HREF="emacs_toc.html#SEC173">TeX Printing Commands</A></H3> <P> You can invoke TeX as an inferior of Emacs on either the entire contents of the buffer or just a region at a time. Running TeX in this way on just one chapter is a good way to see what your changes look like without taking the time to format the entire file. <P> <DL COMPACT> <DT><KBD>C-c C-r</KBD> <DD>Invoke TeX on the current region, together with the buffer's header (<CODE>tex-region</CODE>). <DT><KBD>C-c C-b</KBD> <DD>Invoke TeX on the entire current buffer (<CODE>tex-buffer</CODE>). <DT><KBD>C-c TAB</KBD> <DD>Invoke BibTeX on the current file (<CODE>tex-bibtex-file</CODE>). <DT><KBD>C-c C-f</KBD> <DD>Invoke TeX on the current file (<CODE>tex-file</CODE>). <DT><KBD>C-c C-l</KBD> <DD>Recenter the window showing output from the inferior TeX so that the last line can be seen (<CODE>tex-recenter-output-buffer</CODE>). <DT><KBD>C-c C-k</KBD> <DD>Kill the TeX subprocess (<CODE>tex-kill-job</CODE>). <DT><KBD>C-c C-p</KBD> <DD>Print the output from the last <KBD>C-c C-r</KBD>, <KBD>C-c C-b</KBD>, or <KBD>C-c C-f</KBD> command (<CODE>tex-print</CODE>). <DT><KBD>C-c C-v</KBD> <DD>Preview the output from the last <KBD>C-c C-r</KBD>, <KBD>C-c C-b</KBD>, or <KBD>C-c C-f</KBD> command (<CODE>tex-view</CODE>). <DT><KBD>C-c C-q</KBD> <DD>Show the printer queue (<CODE>tex-show-print-queue</CODE>). </DL> <A NAME="IDX872"></A> <A NAME="IDX873"></A> <A NAME="IDX874"></A> <A NAME="IDX875"></A> <A NAME="IDX876"></A> <A NAME="IDX877"></A> <A NAME="IDX878"></A> <A NAME="IDX879"></A> <P> You can pass the current buffer through an inferior TeX by means of <KBD>C-c C-b</KBD> (<CODE>tex-buffer</CODE>). The formatted output appears in a temporary; to print it, type <KBD>C-c C-p</KBD> (<CODE>tex-print</CODE>). Afterward use <KBD>C-c C-q</KBD> (<CODE>tex-show-print-queue</CODE>) to view the progress of your output towards being printed. If your terminal has the ability to display TeX output files, you can preview the output on the terminal with <KBD>C-c C-v</KBD> (<CODE>tex-view</CODE>). <A NAME="IDX880"></A> <A NAME="IDX881"></A> <P> You can specify the directory to use for running TeX by setting the variable <CODE>tex-directory</CODE>. <CODE>"."</CODE> is the default value. If your environment variable <CODE>TEXINPUTS</CODE> contains relative directory names, or if your files contains <SAMP>`\input'</SAMP> commands with relative file names, then <CODE>tex-directory</CODE> <EM>must</EM> be <CODE>"."</CODE> or you will get the wrong results. Otherwise, it is safe to specify some other directory, such as <TT>`/tmp'</TT>. <A NAME="IDX882"></A> <A NAME="IDX883"></A> <A NAME="IDX884"></A> <A NAME="IDX885"></A> <A NAME="IDX886"></A> <A NAME="IDX887"></A> <P> If you want to specify which shell commands are used in the inferior TeX, you can do so by setting the values of the variables <CODE>tex-run-command</CODE>, <CODE>latex-run-command</CODE>, <CODE>slitex-run-command</CODE>, <CODE>tex-dvi-print-command</CODE>, <CODE>tex-dvi-view-command</CODE>, and <CODE>tex-show-queue-command</CODE>. You <EM>must</EM> set the value of <CODE>tex-dvi-view-command</CODE> for your particular terminal; this variable has no default value. The other variables have default values that may (or may not) be appropriate for your system. <P> Normally, the file name given to these commands comes at the end of the command string; for example, <SAMP>`latex <VAR>filename</VAR>'</SAMP>. In some cases, however, the file name needs to be embedded in the command; an example is when you need to provide the file name as an argument to one command whose output is piped to another. You can specify where to put the file name with <SAMP>`*'</SAMP> in the command string. For example, <P> <PRE> (setq tex-dvi-print-command "dvips -f * | lpr") </PRE> <A NAME="IDX888"></A> <A NAME="IDX889"></A> <A NAME="IDX890"></A> <A NAME="IDX891"></A> <P> The terminal output from TeX, including any error messages, appears in a buffer called <SAMP>`*tex-shell*'</SAMP>. If TeX gets an error, you can switch to this buffer and feed it input (this works as in Shell mode; see section <A HREF="emacs_34.html#SEC316">Interactive Inferior Shell</A>). Without switching to this buffer you can scroll it so that its last line is visible by typing <KBD>C-c C-l</KBD>. <P> Type <KBD>C-c C-k</KBD> (<CODE>tex-kill-job</CODE>) to kill the TeX process if you see that its output is no longer useful. Using <KBD>C-c C-b</KBD> or <KBD>C-c C-r</KBD> also kills any TeX process still running.<A NAME="IDX892"></A> <A NAME="IDX893"></A> <P> You can also pass an arbitrary region through an inferior TeX by typing <KBD>C-c C-r</KBD> (<CODE>tex-region</CODE>). This is tricky, however, because most files of TeX input contain commands at the beginning to set parameters and define macros, without which no later part of the file will format correctly. To solve this problem, <KBD>C-c C-r</KBD> allows you to designate a part of the file as containing essential commands; it is included before the specified region as part of the input to TeX. The designated part of the file is called the <DFN>header</DFN>. <A NAME="IDX894"></A> <P> To indicate the bounds of the header in Plain TeX mode, you insert two special strings in the file. Insert <SAMP>`%**start of header'</SAMP> before the header, and <SAMP>`%**end of header'</SAMP> after it. Each string must appear entirely on one line, but there may be other text on the line before or after. The lines containing the two strings are included in the header. If <SAMP>`%**start of header'</SAMP> does not appear within the first 100 lines of the buffer, <KBD>C-c C-r</KBD> assumes that there is no header. <P> In LaTeX mode, the header begins with <SAMP>`\documentstyle'</SAMP> and ends with <SAMP>`\begin{document}'</SAMP>. These are commands that LaTeX requires you to use in any case, so nothing special needs to be done to identify the header. <A NAME="IDX895"></A> <A NAME="IDX896"></A> <P> The commands (<CODE>tex-buffer</CODE>) and (<CODE>tex-region</CODE>) do all of their work in a temporary directory, and do not have available any of the auxiliary files needed by TeX for cross-references; these commands are generally not suitable for running the final copy in which all of the cross-references need to be correct. When you want the auxiliary files, use <KBD>C-c C-f</KBD> (<CODE>tex-file</CODE>) which runs TeX on the current buffer's file, in that file's directory. Before TeX runs, you will be asked about saving any modified buffers. Generally, you need to use (<CODE>tex-file</CODE>) twice to get cross-references correct. <A NAME="IDX897"></A> <A NAME="IDX898"></A> <A NAME="IDX899"></A> <P> For LaTeX files, you can use BibTeX to process the auxiliary file for the current buffer's file. BibTeX looks up bibliographic citations in a data base and prepares the cited references for the bibliography section. The command <KBD>C-c TAB</KBD> (<CODE>tex-bibtex-file</CODE>) runs the shell command (<CODE>tex-bibtex-command</CODE>) to produce a <SAMP>`.bbl'</SAMP> file for the current buffer's file. Generally, you need to do <KBD>C-c C-f</KBD> (<CODE>tex-file</CODE>) once to generate the <SAMP>`.aux'</SAMP> file, then do <KBD>C-c TAB</KBD> (<CODE>tex-bibtex-file</CODE>), and then repeat <KBD>C-c C-f</KBD> (<CODE>tex-file</CODE>) twice more to get the cross-references correct. <A NAME="IDX900"></A> <A NAME="IDX901"></A> <A NAME="IDX902"></A> <A NAME="IDX903"></A> <A NAME="IDX904"></A> <P> Entering any kind of TeX mode runs the hooks <CODE>text-mode-hook</CODE> and <CODE>tex-mode-hook</CODE>. Then it runs either <CODE>plain-tex-mode-hook</CODE> or <CODE>latex-mode-hook</CODE>, whichever is appropriate. For SliTeX files, it calls <CODE>slitex-mode-hook</CODE>. Starting the TeX shell runs the hook <CODE>tex-shell-hook</CODE>. See section <A HREF="emacs_35.html#SEC337">Hooks</A>. <P> <H3><A NAME="SEC174" HREF="emacs_toc.html#SEC174">Unix TeX Distribution</A></H3> <P> TeX for Unix systems can be obtained from the University of Washington for a distribution fee. <P> To order a full distribution, send $200.00 for a 1/2-inch 9-track 1600 bpi (tar or cpio) tape reel, or $210.00 for a 1/4-inch 4-track QIC-24 (tar or cpio) cartridge, payable to the University of Washington to: <P> <PRE> Northwest Computing Support Center DR-10, Thomson Hall 35 University of Washington Seattle, Washington 98195 </PRE> <P> Purchase orders are acceptable, but there is an extra charge of $10.00, to pay for processing charges. <P> For overseas orders please add $20.00 to the base cost for shipment via air parcel post, or $30.00 for shipment via courier. <P> The normal distribution is a tar tape, blocked 20, 1600 bpi, on an industry standard 2400 foot half-inch reel. The physical format for the 1/4 inch streamer cartridges uses QIC-11, 8000 bpi, 4-track serpentine recording for the SUN. Also, System V tapes can be written in cpio format, blocked 5120 bytes, ASCII headers. <P> <H2><A NAME="SEC175" HREF="emacs_toc.html#SEC175">Nroff Mode</A></H2> <A NAME="IDX905"></A> <A NAME="IDX906"></A> <P> Nroff mode is a mode like Text mode but modified to handle nroff commands present in the text. Invoke <KBD>M-x nroff-mode</KBD> to enter this mode. It differs from Text mode in only a few ways. All nroff command lines are considered paragraph separators, so that filling will never garble the nroff commands. Pages are separated by <SAMP>`.bp'</SAMP> commands. Comments start with backslash-doublequote. Also, three special commands are provided that are not in Text mode: <A NAME="IDX907"></A> <A NAME="IDX908"></A> <A NAME="IDX909"></A> <A NAME="IDX910"></A> <A NAME="IDX911"></A> <A NAME="IDX912"></A> <P> <DL COMPACT> <DT><KBD>M-n</KBD> <DD>Move to the beginning of the next line that isn't an nroff command (<CODE>forward-text-line</CODE>). An argument is a repeat count. <DT><KBD>M-p</KBD> <DD>Like <KBD>M-n</KBD> but move up (<CODE>backward-text-line</CODE>). <DT><KBD>M-?</KBD> <DD>Prints in the echo area the number of text lines (lines that are not nroff commands) in the region (<CODE>count-text-lines</CODE>). </DL> <A NAME="IDX913"></A> <P> The other feature of Nroff mode is that you can turn on Electric Nroff mode. This is a minor mode that you can turn on or off with <KBD>M-x electric-nroff-mode</KBD> (see section <A HREF="emacs_35.html#SEC333">Minor Modes</A>). When the mode is on, each time you use <KBD>RET</KBD> to end a line that contains an nroff command that opens a kind of grouping, the matching nroff command to close that grouping is automatically inserted on the following line. For example, if you are at the beginning of a line and type <KBD>. ( b <KBD>RET</KBD></KBD>, this inserts the matching command <SAMP>`.)b'</SAMP> on a new line following point. <A NAME="IDX914"></A> <P> Entering Nroff mode runs the hook <CODE>text-mode-hook</CODE>, followed by the hook <CODE>nroff-mode-hook</CODE> (see section <A HREF="emacs_35.html#SEC337">Hooks</A>). <P>Go to the <A HREF="emacs_24.html">previous</A>, <A HREF="emacs_26.html">next</A> section.<P>
alji2106/CS1300Terminal
doc/emacs/emacs_25.html
HTML
gpl-2.0
58,474
46.694943
130
0.723433
false
SELECT id_registrazione, dat_registrazione, des_registrazione FROM contabilita.registrazione WHERE id_cliente = %id_cliente% AND num_fattura = '%num_fattura%' AND dat_registrazione = '%dat_registrazione%' AND extract(year from dat_registrazione) = extract(year from current_date)
StebaKite/chopin
query/primanota/ricercaFatturaCliente.sql
SQL
gpl-2.0
288
31.111111
76
0.770833
false
/* * MATRIX COMPUTATION FOR RESERVATION BASED SYSTEMS * * Copyright (C) 2013, University of Trento * Authors: Luigi Palopoli <palopoli@disi.unitn.it> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef MATRIX_HPP #define MATRIX_HPP double matrix_prob_ts(int i, int j, int q, const cdf &p, const pmf &u); double matrix_prob_ts_compressed(int i, int j, int q, const cdf &p, const pmf &u); void compute_matrixes(const MatrixXd & mat, int dim, MatrixXd & B, MatrixXd & A0, MatrixXd & A1, MatrixXd & A2); #endif
luigipalopoli/PROSIT
tool/matrix.hpp
C++
gpl-2.0
693
26.72
81
0.692641
false
from __future__ import print_function """ Deprecated. Use ``update-tld-names`` command instead. """ __title__ = 'tld.update' __author__ = 'Artur Barseghyan' __copyright__ = '2013-2015 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' from tld.utils import update_tld_names _ = lambda x: x if __name__ == '__main__': update_tld_names() print(_("Local TLD names file has been successfully updated!"))
underdogio/tld
src/tld/update.py
Python
gpl-2.0
414
20.789474
67
0.644928
false
<?php /** * PESCMS for PHP 5.6+ * * Copyright (c) 2015 PESCMS (http://www.pescms.com) * * For the full copyright and license information, please view * the file LICENSE.md that was distributed with this source code. */ namespace App\Team\GET; class Project extends Content{ /** * 项目数据分析 */ public function analyze(){ $param = []; if(empty($_GET['begin']) && empty($_GET['end']) ){ $param['begin'] = time() - 86400 * 30; $param['end'] = time(); }else{ $param['begin'] = strtotime(self::g('begin'). '00:00:00'); $param['end'] = strtotime(self::g('end'). '23:59:59'); } $result = self::db('project AS p') ->field('p.project_id AS id, p.project_title AS name, t.task_status, COUNT(t.task_status) AS total ') ->join("{$this->prefix}task AS t ON t.task_project_id = p.project_id") ->where("t.task_submit_time BETWEEN :begin AND :end") ->group('p.project_id, t.task_status') ->select($param); $list = []; $project = \Model\Content::listContent(['table' => 'project', 'order' => 'project_listsort ASC, project_id DESC']); foreach ($project as $item){ $list[$item['project_id']]['name'] = $item['project_title']; } if(!empty($result)){ foreach ($result as $value){ if(empty($list[$value['id']]['total'])){ $list[$value['id']]['total'] = 0; } $list[$value['id']]['total'] += $value['total']; $list[$value['id']]['task_status'][$value['task_status']] = $value['total']; } } $this->assign('title', '项目数据分析'); $this->assign('list', $list); $this->layout('User/User_analyze'); } }
lazyphp/PESCMS-TEAM
App/Team/GET/Project.php
PHP
gpl-2.0
1,870
30.305085
123
0.501083
false
<?php /** * --------------------------------------------------------------------- * GLPI - Gestionnaire Libre de Parc Informatique * Copyright (C) 2015-2017 Teclib' and contributors. * * http://glpi-project.org * * based on GLPI - Gestionnaire Libre de Parc Informatique * Copyright (C) 2003-2014 by the INDEPNET Development Team. * * --------------------------------------------------------------------- * * LICENSE * * This file is part of GLPI. * * GLPI 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. * * GLPI 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 GLPI. If not, see <http://www.gnu.org/licenses/>. * --------------------------------------------------------------------- */ /** @file * @brief */ include ('../inc/includes.php'); Session::checkRight("sla", READ); Html::header(SLA::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "config", "sla"); Search::show('SLA'); Html::footer();
eltharin/glpi
front/sla.php
PHP
gpl-2.0
1,394
29.977778
98
0.593974
false
/* $Id: mpnotification-r0drv-solaris.c $ */ /** @file * IPRT - Multiprocessor Event Notifications, Ring-0 Driver, Solaris. */ /* * Copyright (C) 2008-2015 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or modify it under the terms of the GNU * General Public License (GPL) as published by the Free Software * Foundation, in version 2 as it comes in the "COPYING" file of the * VirtualBox OSE distribution. VirtualBox OSE is distributed in the * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. * * The contents of this file may alternatively be used under the terms * of the Common Development and Distribution License Version 1.0 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the * VirtualBox OSE distribution, in which case the provisions of the * CDDL are applicable instead of those of the GPL. * * You may elect to license modified versions of this file under the * terms and conditions of either the GPL or the CDDL or both. */ /********************************************************************************************************************************* * Header Files * *********************************************************************************************************************************/ #include "the-solaris-kernel.h" #include "internal/iprt.h" #include <iprt/err.h> #include <iprt/mp.h> #include <iprt/cpuset.h> #include <iprt/string.h> #include <iprt/thread.h> #include "r0drv/mp-r0drv.h" /********************************************************************************************************************************* * Global Variables * *********************************************************************************************************************************/ /** Whether CPUs are being watched or not. */ static volatile bool g_fSolCpuWatch = false; /** Set of online cpus that is maintained by the MP callback. * This avoids locking issues querying the set from the kernel as well as * eliminating any uncertainty regarding the online status during the * callback. */ RTCPUSET g_rtMpSolCpuSet; /** * Internal solaris representation for watching CPUs. */ typedef struct RTMPSOLWATCHCPUS { /** Function pointer to Mp worker. */ PFNRTMPWORKER pfnWorker; /** Argument to pass to the Mp worker. */ void *pvArg; } RTMPSOLWATCHCPUS; typedef RTMPSOLWATCHCPUS *PRTMPSOLWATCHCPUS; /** * Solaris callback function for Mp event notification. * * @returns Solaris error code. * @param CpuState The current event/state of the CPU. * @param iCpu Which CPU is this event for. * @param pvArg Ignored. * * @remarks This function assumes index == RTCPUID. * We may -not- be firing on the CPU going online/offline and called * with preemption enabled. */ static int rtMpNotificationCpuEvent(cpu_setup_t CpuState, int iCpu, void *pvArg) { RTMPEVENT enmMpEvent; /* * Update our CPU set structures first regardless of whether we've been * scheduled on the right CPU or not, this is just atomic accounting. */ if (CpuState == CPU_ON) { enmMpEvent = RTMPEVENT_ONLINE; RTCpuSetAdd(&g_rtMpSolCpuSet, iCpu); } else if (CpuState == CPU_OFF) { enmMpEvent = RTMPEVENT_OFFLINE; RTCpuSetDel(&g_rtMpSolCpuSet, iCpu); } else return 0; rtMpNotificationDoCallbacks(enmMpEvent, iCpu); NOREF(pvArg); return 0; } DECLHIDDEN(int) rtR0MpNotificationNativeInit(void) { if (ASMAtomicReadBool(&g_fSolCpuWatch) == true) return VERR_WRONG_ORDER; /* * Register the callback building the online cpu set as we do so. */ RTCpuSetEmpty(&g_rtMpSolCpuSet); mutex_enter(&cpu_lock); register_cpu_setup_func(rtMpNotificationCpuEvent, NULL /* pvArg */); for (int i = 0; i < (int)RTMpGetCount(); ++i) if (cpu_is_online(cpu[i])) rtMpNotificationCpuEvent(CPU_ON, i, NULL /* pvArg */); ASMAtomicWriteBool(&g_fSolCpuWatch, true); mutex_exit(&cpu_lock); return VINF_SUCCESS; } DECLHIDDEN(void) rtR0MpNotificationNativeTerm(void) { if (ASMAtomicReadBool(&g_fSolCpuWatch) == true) { mutex_enter(&cpu_lock); unregister_cpu_setup_func(rtMpNotificationCpuEvent, NULL /* pvArg */); ASMAtomicWriteBool(&g_fSolCpuWatch, false); mutex_exit(&cpu_lock); } }
miguelinux/vbox
src/VBox/Runtime/r0drv/solaris/mpnotification-r0drv-solaris.c
C
gpl-2.0
4,766
33.28777
130
0.578053
false
<ul class="tw"> <?php foreach ($rows as $id => $row) { ?> <li><?php print $row; ?></li> <?php } ?> </ul>
allen12345/miqa
sites/all/themes/questionsanswers/views-view-unformatted--tweets--block.tpl.php
PHP
gpl-2.0
104
20
41
0.480769
false
(function($) { function ACFTableField() { var t = this; t.version = '1.3.4'; t.param = {}; // DIFFERENT IN ACF VERSION 4 and 5 { t.param.classes = { btn_small: 'acf-icon small', // "acf-icon-plus" becomes "-plus" since ACF Pro Version 5.3.2 btn_add_row: 'acf-icon-plus -plus', btn_add_col: 'acf-icon-plus -plus', btn_remove_row: 'acf-icon-minus -minus', btn_remove_col: 'acf-icon-minus -minus', }; t.param.htmlbuttons = { add_row: '<a href="#" class="acf-table-add-row ' + t.param.classes.btn_small + ' ' + t.param.classes.btn_add_row + '"></a>', remove_row: '<a href="#" class="acf-table-remove-row ' + t.param.classes.btn_small + ' ' + t.param.classes.btn_remove_row + '"></a>', add_col: '<a href="#" class="acf-table-add-col ' + t.param.classes.btn_small + ' ' + t.param.classes.btn_add_col + '"></a>', remove_col: '<a href="#" class="acf-table-remove-col ' + t.param.classes.btn_small + ' ' + t.param.classes.btn_remove_row + '"></a>', }; // } t.param.htmltable = { body_row: '<div class="acf-table-body-row">' + '<div class="acf-table-body-left">' + t.param.htmlbuttons.add_row + '<div class="acf-table-body-cont"><!--ph--></div>' + '</div>' + '<div class="acf-table-body-right">' + t.param.htmlbuttons.remove_row + '</div>' + '</div>', top_cell: '<div class="acf-table-top-cell" data-colparam="">' + t.param.htmlbuttons.add_col + '<div class="acf-table-top-cont"><!--ph--></div>' + '</div>', header_cell: '<div class="acf-table-header-cell">' + '<div class="acf-table-header-cont"><!--ph--></div>' + '</div>', body_cell: '<div class="acf-table-body-cell">' + '<div class="acf-table-body-cont"><!--ph--></div>' + '</div>', bottom_cell: '<div class="acf-table-bottom-cell">' + t.param.htmlbuttons.remove_col + '</div>', table: '<div class="acf-table-wrap">' + '<div class="acf-table-table">' + // acf-table-hide-header acf-table-hide-left acf-table-hide-top '<div class="acf-table-top-row">' + '<div class="acf-table-top-left">' + t.param.htmlbuttons.add_col + '</div>' + '<div class="acf-table-top-right"></div>' + '</div>' + '<div class="acf-table-header-row acf-table-header-hide-off">' + '<div class="acf-table-header-left">' + t.param.htmlbuttons.add_row + '</div>' + '<div class="acf-table-header-right"></div>' + '</div>' + '<div class="acf-table-bottom-row">' + '<div class="acf-table-bottom-left"></div>' + '<div class="acf-table-bottom-right"></div>' + '</div>' + '</div>' + '</div>', }; t.param.htmleditor = '<div class="acf-table-cell-editor">' + '<textarea name="acf-table-cell-editor-textarea" class="acf-table-cell-editor-textarea"></textarea>' + '</div>'; t.obj = { body: $( 'body' ), }; t.var = { ajax: false, }; t.state = { 'current_cell_obj': false, 'cell_editor_cell': false, 'cell_editor_last_keycode': false }; t.init = function() { t.init_workflow(); }; t.init_workflow = function() { t.each_table(); t.table_add_col_event(); t.table_remove_col(); t.table_add_row_event(); t.table_remove_row(); t.cell_editor(); t.cell_editor_tab_navigation(); t.prevent_cell_links(); t.sortable_row(); t.sortable_col(); t.ui_event_use_header(); t.ui_event_caption(); t.ui_event_new_flex_field(); t.ui_event_change_location_rule(); t.ui_event_ajax(); }; t.ui_event_ajax = function() { $( document ).ajaxComplete( function( event ) { t.each_table(); }); } t.ui_event_change_location_rule = function() { t.obj.body.on( 'change', '[name="post_category[]"], [name="post_format"], [name="page_template"], [name="parent_id"], [name="role"], [name^="tax_input"]', function() { var interval = setInterval( function() { var table_fields = $( '.field_type-table' ); if ( table_fields.length > 0 ) { t.each_table(); clearInterval( interval ); } }, 100 ); } ); }; t.each_table = function( ) { $( '.acf-field-table .acf-table-root' ).not( '.acf-table-rendered' ).each( function() { var p = {}; p.obj_root = $( this ), table = p.obj_root.find( '.acf-table-wrap' ); if ( table.length > 0 ) { return; } p.obj_root.addClass( 'acf-table-rendered' ); t.data_get( p ); t.data_default( p ); t.field_options_get( p ); t.table_render( p ); t.misc_render( p ); if ( typeof p.data.b[ 1 ] === 'undefined' && typeof p.data.b[ 0 ][ 1 ] === 'undefined' && p.data.b[ 0 ][ 0 ].c === '' ) { p.obj_root.find( '.acf-table-remove-col' ).hide(), p.obj_root.find( '.acf-table-remove-row' ).hide(); } } ); }; t.field_options_get = function( p ) { try { p.field_options = $.parseJSON( decodeURIComponent( p.obj_root.find( '[data-field-options]' ).data( 'field-options' ) ) ); } catch (e) { p.field_options = { use_header: 2 }; console.log( 'The tablefield options value is not a valid JSON string:', decodeURIComponent( p.obj_root.find( '[data-field-options]' ).data( 'field-options' ) ) ); console.log( 'The parsing error:', e ); } }; t.ui_event_use_header = function() { // HEADER: SELECT FIELD ACTIONS { t.obj.body.on( 'change', '.acf-table-fc-opt-use-header', function() { var that = $( this ), p = {}; p.obj_root = that.parents( '.acf-table-root' ); p.obj_table = p.obj_root.find( '.acf-table-table' ); t.data_get( p ); t.data_default( p ); if ( that.val() === '1' ) { p.obj_table.removeClass( 'acf-table-hide-header' ); p.data.p.o.uh = 1; t.update_table_data_field( p ); } else { p.obj_table.addClass( 'acf-table-hide-header' ); p.data.p.o.uh = 0; t.update_table_data_field( p ); } } ); // } }; t.ui_event_caption = function() { // CAPTION: INPUT FIELD ACTIONS { t.obj.body.on( 'change', '.acf-table-fc-opt-caption', function() { var that = $( this ), p = {}; p.obj_root = that.parents( '.acf-table-root' ); p.obj_table = p.obj_root.find( '.acf-table-table' ); t.data_get( p ); t.data_default( p ); p.data.p.ca = that.val(); t.update_table_data_field( p ); } ); // } }; t.ui_event_new_flex_field = function() { t.obj.body.on( 'click', '.acf-fc-popup', function() { // SORTABLE { $( '.acf-table-table' ) .sortable('destroy') .unbind(); window.setTimeout( function() { t.sortable_row(); }, 300 ); // } } ); }; t.data_get = function( p ) { // DATA FROM FIELD { var val = p.obj_root.find( 'input.table' ).val(); p.data = false; // CHECK FIELD CONTEXT { if ( p.obj_root.closest( '.acf-fields' ).hasClass( 'acf-block-fields' ) ) { p.field_context = 'block'; } else { p.field_context = 'box'; } // } if ( val !== '' ) { try { if ( p.field_context === 'box' ) { p.data = $.parseJSON( decodeURIComponent( val.replace(/\+/g, '%20') ) ); } if ( p.field_context === 'block' ) { p.data = $.parseJSON( decodeURIComponent( decodeURIComponent( val.replace(/\+/g, '%20') ) ) ); } } catch (e) { if ( p.field_context === 'box' ) { console.log( 'The tablefield value is not a valid JSON string:', decodeURIComponent( val.replace(/\+/g, '%20') ) ); console.log( 'The parsing error:', e ); } if ( p.field_context === 'block' ) { console.log( 'The tablefield value is not a valid JSON string:', decodeURIComponent( decodeURIComponent( val.replace(/\+/g, '%20') ) ) ); console.log( 'The tablefield value is not a valid JSON string:', decodeURIComponent( decodeURIComponent( decodeURIComponent( val.replace(/\+/g, '%20') ) ) ) ); console.log( 'The parsing error:', e ); } } } return p.data; // } }; t.data_default = function( p ) { // DEFINE DEFAULT DATA { p.data_defaults = { acftf: { v: t.version, }, p: { o: { uh: 0, // use header }, ca: '', // caption content }, // from data-colparam c: [ { c: '', }, ], // header h: [ { c: '', }, ], // body b: [ [ { c: '', }, ], ], }; // } // MERGE DEFAULT DATA { if ( p.data ) { if ( typeof p.data.b === 'array' ) { $.extend( true, p.data, p.data_defaults ); } } else { p.data = p.data_defaults; } // } }; t.table_render = function( p ) { // TABLE HTML MAIN { p.obj_root.find( '.acf-table-wrap' ).remove(); p.obj_root.append( t.param.htmltable.table ); // } // TABLE GET OBJECTS { p.obj_table = p.obj_root.find( '.acf-table-table' ); p.obj_top_row = p.obj_root.find( '.acf-table-top-row' ), p.obj_top_insert = p.obj_top_row.find( '.acf-table-top-right' ), p.obj_header_row = p.obj_root.find( '.acf-table-header-row' ), p.obj_header_insert = p.obj_header_row.find( '.acf-table-header-right' ), p.obj_bottom_row = p.obj_root.find( '.acf-table-bottom-row' ), p.obj_bottom_insert = p.obj_bottom_row.find( '.acf-table-bottom-right' ); // } // TOP CELLS { if ( p.data.c ) { for ( i in p.data.c ) { p.obj_top_insert.before( t.param.htmltable.top_cell ); } } t.table_top_labels( p ); // } // HEADER CELLS { if ( p.data.h ) { for ( i in p.data.h ) { p.obj_header_insert.before( t.param.htmltable.header_cell.replace( '<!--ph-->', p.data.h[ i ].c.replace( /xxx&quot/g, '"' ) ) ); } } // } // BODY ROWS { if ( p.data.b ) { for ( i in p.data.b ) { p.obj_bottom_row.before( t.param.htmltable.body_row.replace( '<!--ph-->', parseInt(i) + 1 ) ); } } // } // BODY ROWS CELLS { var body_rows = p.obj_root.find( '.acf-table-body-row'), row_i = 0; if ( body_rows ) { body_rows.each( function() { var body_row = $( this ), row_insert = body_row.find( '.acf-table-body-right' ); for( i in p.data.b[ row_i ] ) { row_insert.before( t.param.htmltable.body_cell.replace( '<!--ph-->', p.data.b[ row_i ][ i ].c.replace( /xxx&quot/g, '"' ) ) ); } row_i = row_i + 1 } ); } // } // TABLE BOTTOM { if ( p.data.c ) { for ( i in p.data.c ) { p.obj_bottom_insert.before( t.param.htmltable.bottom_cell ); } } // } }; t.misc_render = function( p ) { t.init_option_use_header( p ); t.init_option_caption( p ); }; t.init_option_use_header = function( p ) { // VARS { var v = {}; v.obj_use_header = p.obj_root.find( '.acf-table-fc-opt-use-header' ); // } // HEADER { // HEADER: FIELD OPTIONS, THAT AFFECTS DATA { // HEADER IS NOT ALLOWED if ( p.field_options.use_header === 2 ) { p.obj_table.addClass( 'acf-table-hide-header' ); p.data.p.o.uh = 0; t.update_table_data_field( p ); } // HEADER IS REQUIRED if ( p.field_options.use_header === 1 ) { p.data.p.o.uh = 1; t.update_table_data_field( p ); } // } // HEADER: SET CHECKBOX STATUS { if ( p.data.p.o.uh === 1 ) { v.obj_use_header.val( '1' ); } if ( p.data.p.o.uh === 0 ) { v.obj_use_header.val( '0' ); } // } // HEADER: SET HEADER VISIBILITY { if ( p.data.p.o.uh === 1 ) { p.obj_table.removeClass( 'acf-table-hide-header' ); } if ( p.data.p.o.uh === 0 ) { p.obj_table.addClass( 'acf-table-hide-header' ); } // } // } }; t.init_option_caption = function( p ) { if ( typeof p.field_options.use_caption !== 'number' || p.field_options.use_caption === 2 ) { return; } // VARS { var v = {}; v.obj_caption = p.obj_root.find( '.acf-table-fc-opt-caption' ); // } // SET CAPTION VALUE { v.obj_caption.val( p.data.p.ca ); // } }; t.table_add_col_event = function() { t.obj.body.on( 'click', '.acf-table-add-col', function( e ) { e.preventDefault(); var that = $( this ), p = {}; p.obj_col = that.parent(); t.table_add_col( p ); } ); }; t.table_add_col = function( p ) { // requires // p.obj_col var that_index = p.obj_col.index(); p.obj_root = p.obj_col.parents( '.acf-table-root' ); p.obj_table = p.obj_root.find( '.acf-table-table' ); $( p.obj_table.find( '.acf-table-top-row' ).children()[ that_index ] ).after( t.param.htmltable.top_cell.replace( '<!--ph-->', '' ) ); $( p.obj_table.find( '.acf-table-header-row' ).children()[ that_index ] ).after( t.param.htmltable.header_cell.replace( '<!--ph-->', '' ) ); p.obj_table.find( '.acf-table-body-row' ).each( function() { $( $( this ).children()[ that_index ] ).after( t.param.htmltable.body_cell.replace( '<!--ph-->', '' ) ); } ); $( p.obj_table.find( '.acf-table-bottom-row' ).children()[ that_index ] ).after( t.param.htmltable.bottom_cell.replace( '<!--ph-->', '' ) ); t.table_top_labels( p ); p.obj_table.find( '.acf-table-remove-col' ).show(); p.obj_table.find( '.acf-table-remove-row' ).show(); t.table_build_json( p ); }; t.table_remove_col = function() { t.obj.body.on( 'click', '.acf-table-remove-col', function( e ) { e.preventDefault(); var p = {}, that = $( this ), that_index = that.parent().index(), obj_rows = undefined, cols_count = false; p.obj_root = that.parents( '.acf-table-root' ); p.obj_table = p.obj_root.find( '.acf-table-table' ); p.obj_top = p.obj_root.find( '.acf-table-top-row' ); obj_rows = p.obj_table.find( '.acf-table-body-row' ); cols_count = p.obj_top.find( '.acf-table-top-cell' ).length; $( p.obj_table.find( '.acf-table-top-row' ).children()[ that_index ] ).remove(); $( p.obj_table.find( '.acf-table-header-row' ).children()[ that_index ] ).remove(); if ( cols_count == 1 ) { obj_rows.remove(); t.table_add_col( { obj_col: p.obj_table.find( '.acf-table-top-left' ) } ); t.table_add_row( { obj_row: p.obj_table.find( '.acf-table-header-row' ) } ); p.obj_table.find( '.acf-table-remove-col' ).hide(); p.obj_table.find( '.acf-table-remove-row' ).hide(); } else { obj_rows.each( function() { $( $( this ).children()[ that_index ] ).remove(); } ); } $( p.obj_table.find( '.acf-table-bottom-row' ).children()[ that_index ] ).remove(); t.table_top_labels( p ); t.table_build_json( p ); } ); }; t.table_add_row_event = function() { t.obj.body.on( 'click', '.acf-table-add-row', function( e ) { e.preventDefault(); var that = $( this ), p = {}; p.obj_row = that.parent().parent(); t.table_add_row( p ); }); }; t.table_add_row = function( p ) { // requires // p.obj_row var that_index = 0, col_amount = 0, body_cells_html = ''; p.obj_root = p.obj_row.parents( '.acf-table-root' ); p.obj_table = p.obj_root.find( '.acf-table-table' ); p.obj_table_rows = p.obj_table.children(); col_amount = p.obj_table.find( '.acf-table-top-cell' ).size(); that_index = p.obj_row.index(); for ( i = 0; i < col_amount; i++ ) { body_cells_html = body_cells_html + t.param.htmltable.body_cell.replace( '<!--ph-->', '' ); } $( p.obj_table_rows[ that_index ] ) .after( t.param.htmltable.body_row ) .next() .find('.acf-table-body-left') .after( body_cells_html ); t.table_left_labels( p ); p.obj_table.find( '.acf-table-remove-col' ).show(); p.obj_table.find( '.acf-table-remove-row' ).show(); t.table_build_json( p ); }; t.table_remove_row = function() { t.obj.body.on( 'click', '.acf-table-remove-row', function( e ) { e.preventDefault(); var p = {}, that = $( this ), rows_count = false; p.obj_root = that.parents( '.acf-table-root' ); p.obj_table = p.obj_root.find( '.acf-table-table' ); p.obj_rows = p.obj_root.find( '.acf-table-body-row' ); rows_count = p.obj_rows.length; that.parent().parent().remove(); if ( rows_count == 1 ) { t.table_add_row( { obj_row: p.obj_table.find( '.acf-table-header-row' ) } ); p.obj_table.find( '.acf-table-remove-row' ).hide(); } t.table_left_labels( p ); t.table_build_json( p ); } ); }; t.table_top_labels = function( p ) { var letter_i_1 = 'A'.charCodeAt( 0 ), letter_i_2 = 'A'.charCodeAt( 0 ), use_2 = false; p.obj_table.find( '.acf-table-top-cont' ).each( function() { var string = ''; if ( !use_2 ) { string = String.fromCharCode( letter_i_1 ); if ( letter_i_1 === 'Z'.charCodeAt( 0 ) ) { letter_i_1 = 'A'.charCodeAt( 0 ); use_2 = true; } else { letter_i_1 = letter_i_1 + 1; } } else { string = String.fromCharCode( letter_i_1 ) + String.fromCharCode( letter_i_2 ); if ( letter_i_2 === 'Z'.charCodeAt( 0 ) ) { letter_i_1 = letter_i_1 + 1; letter_i_2 = 'A'.charCodeAt( 0 ); } else { letter_i_2 = letter_i_2 + 1; } } $( this ).text( string ); } ); }; t.table_left_labels = function( p ) { var i = 0; p.obj_table.find( '.acf-table-body-left' ).each( function() { i = i + 1; $( this ).find( '.acf-table-body-cont' ).text( i ); } ); }; t.table_build_json = function( p ) { var i = 0, i2 = 0; p.data = t.data_get( p ); t.data_default( p ); p.data.c = []; p.data.h = []; p.data.b = []; // TOP { i = 0; p.obj_table.find( '.acf-table-top-cont' ).each( function() { p.data.c[ i ] = {}; p.data.c[ i ].p = $( this ).parent().data( 'colparam' ); i = i + 1; } ); // } // HEADER { i = 0; p.obj_table.find( '.acf-table-header-cont' ).each( function() { p.data.h[ i ] = {}; p.data.h[ i ].c = $( this ).html(); i = i + 1; } ); // } // BODY { i = 0; i2 = 0; p.obj_table.find( '.acf-table-body-row' ).each( function() { p.data.b[ i ] = []; $( this ).find( '.acf-table-body-cell .acf-table-body-cont' ).each( function() { p.data.b[ i ][ i2 ] = {}; p.data.b[ i ][ i2 ].c = $( this ).html(); i2 = i2 + 1; } ); i2 = 0; i = i + 1; } ); // } // UPDATE INPUT WITH NEW DATA { t.update_table_data_field( p ); // } }; t.update_table_data_field = function( p ) { // UPDATE INPUT WITH NEW DATA { p.data = t.update_table_data_version( p.data ); // makes json string from data object var data = JSON.stringify( p.data ); // adds backslash to all \" in JSON string because encodeURIComponent() strippes backslashes data.replace( /\\"/g, '\\"' ); // encodes the JSON string to URI component, the format, the JSON string is saved to the database data = encodeURIComponent( data ) p.obj_root.find( 'input.table' ).val( data ); t.field_changed( p ); // } }; t.update_table_data_version = function( data ) { if ( typeof data.acftf === 'undefined' ) { data.acftf = {}; } data.acftf.v = t.version; return data; } t.cell_editor = function() { t.obj.body.on( 'click', '.acf-table-body-cell, .acf-table-header-cell', function( e ) { e.stopImmediatePropagation(); t.cell_editor_save(); var that = $( this ); t.cell_editor_add_editor({ 'that': that }); } ); t.obj.body.on( 'click', '.acf-table-cell-editor-textarea', function( e ) { e.stopImmediatePropagation(); } ); t.obj.body.on( 'click', function( e ) { t.cell_editor_save(); } ); }; t.cell_editor_add_editor = function( p ) { var defaults = { 'that': false }; p = $.extend( true, defaults, p ); if ( p['that'] ) { var that_val = p['that'].find( '.acf-table-body-cont, .acf-table-header-cont' ).html(); t.state.current_cell_obj = p['that']; t.state.cell_editor_is_open = true; p['that'].prepend( t.param.htmleditor ).find( '.acf-table-cell-editor-textarea' ).html( that_val ).focus(); } }; t.get_next_table_cell = function( p ) { var defaults = { 'key': false }; p = $.extend( true, defaults, p ); // next cell of current row var next_cell = t.state.current_cell_obj .next( '.acf-table-body-cell, .acf-table-header-cell' ); // else if get next row if ( next_cell.length === 0 ) { next_cell = t.state.current_cell_obj .parent() .next( '.acf-table-body-row' ) .find( '.acf-table-body-cell') .first(); } // if next row, get first cell of that row if ( next_cell.length !== 0 ) { t.state.current_cell_obj = next_cell; } else { t.state.current_cell_obj = false; } }; t.get_prev_table_cell = function( p ) { var defaults = { 'key': false }; p = $.extend( true, defaults, p ); // prev cell of current row var table_obj = t.state.current_cell_obj.closest( '.acf-table-table' ), no_header = table_obj.hasClass( 'acf-table-hide-header' ); prev_cell = t.state.current_cell_obj .prev( '.acf-table-body-cell, .acf-table-header-cell' ); // else if get prev row if ( prev_cell.length === 0 ) { var row_selectors = [ '.acf-table-body-row' ]; // prevents going to header cell if table header is hidden if ( no_header === false ) { row_selectors.push( '.acf-table-header-row' ); } prev_cell = t.state.current_cell_obj .parent() .prev( row_selectors.join( ',' ) ) .find( '.acf-table-body-cell, .acf-table-header-cell' ) .last(); } // if next row, get first cell of that row if ( prev_cell.length !== 0 ) { t.state.current_cell_obj = prev_cell; } else { t.state.current_cell_obj = false; } }; t.cell_editor_save = function() { var cell_editor = t.obj.body.find( '.acf-table-cell-editor' ), cell_editor_textarea = cell_editor.find( '.acf-table-cell-editor-textarea' ), p = {}, cell_editor_val = ''; if ( typeof cell_editor_textarea.val() !== 'undefined' ) { p.obj_root = cell_editor.parents( '.acf-table-root' ); p.obj_table = p.obj_root.find( '.acf-table-table' ); var cell_editor_val = cell_editor_textarea.val(); // prevent XSS injection cell_editor_val = cell_editor_val.replace( /\<(script)/ig, '&#060;$1' ); cell_editor_val = cell_editor_val.replace( /\<\/(script)/ig, '&#060;/$1' ); cell_editor.next().html( cell_editor_val ); t.table_build_json( p ); cell_editor.remove(); t.state.cell_editor_is_open = false; p.obj_root.find( '.acf-table-remove-col' ).show(), p.obj_root.find( '.acf-table-remove-row' ).show(); } }; t.cell_editor_tab_navigation = function() { t.obj.body.on( 'keydown', '.acf-table-cell-editor', function( e ) { var keyCode = e.keyCode || e.which; if ( keyCode == 9 ) { e.preventDefault(); t.cell_editor_save(); if ( t.state.cell_editor_last_keycode === 16 ) { t.get_prev_table_cell(); } else { t.get_next_table_cell(); } t.cell_editor_add_editor({ 'that': t.state.current_cell_obj }); } t.state.cell_editor_last_keycode = keyCode; }); }; t.prevent_cell_links = function() { t.obj.body.on( 'click', '.acf-table-body-cont a, .acf-table-header-cont a', function( e ) { e.preventDefault(); } ); }; t.sortable_fix_width = function(e, ui) { ui.children().each( function() { var that = $( this ); that.width( that.width() ); } ); return ui; }; t.sortable_row = function() { var param = { axis: 'y', items: '> .acf-table-body-row', containment: 'parent', handle: '.acf-table-body-left', helper: t.sortable_fix_width, update: function( event, ui ) { var p = {}; p.obj_root = ui.item.parents( '.acf-table-root' ); p.obj_table = p.obj_root.find( '.acf-table-table' ); t.table_left_labels( p ); t.table_build_json( p ); }, }; $( '.acf-table-table' ).sortable( param ); }; t.sortable_col = function() { var p = {}; p.start_index = 0; p.end_index = 0; var param = { axis: 'x', items: '> .acf-table-top-cell', containment: 'parent', helper: t.sortable_fix_width, start: function(event, ui) { p.start_index = ui.item.index(); }, update: function( event, ui ) { p.end_index = ui.item.index(); p.obj_root = ui.item.parents( '.acf-table-root' ); p.obj_table = p.obj_root.find( '.acf-table-table' ); t.table_top_labels( p ); t.sort_cols( p ); t.table_build_json( p ); }, }; $( '.acf-table-top-row' ).sortable( param ); t.obj.body.on( 'click', '.acf-fc-popup', function() { $( '.acf-table-top-row' ) .sortable('destroy') .unbind(); window.setTimeout( function() { $( '.acf-table-top-row' ).sortable( param ); }, 300 ); } ); }; t.field_changed = function( p ) { if ( p.field_context === 'block' ) { p.obj_root.change(); } }; t.sort_cols = function( p ) { p.obj_table.find('.acf-table-header-row').each( function() { p.header_row = $(this), p.header_row_children = p.header_row.children(); if ( p.end_index < p.start_index ) { $( p.header_row_children[ p.end_index ] ).before( $( p.header_row_children[ p.start_index ] ) ); } if ( p.end_index > p.start_index ) { $( p.header_row_children[ p.end_index ] ).after( $( p.header_row_children[ p.start_index ] ) ); } } ); p.obj_table.find('.acf-table-body-row').each( function() { p.body_row = $(this), p.body_row_children = p.body_row.children(); if ( p.end_index < p.start_index ) { $( p.body_row_children[ p.end_index ] ).before( $( p.body_row_children[ p.start_index ] ) ); } if ( p.end_index > p.start_index ) { $( p.body_row_children[ p.end_index ] ).after( $( p.body_row_children[ p.start_index ] ) ); } } ); }; t.helper = { getLength: function( o ) { var len = o.length ? --o.length : -1; for (var k in o) { len++; } return len; }, }; }; var acf_table_field = new ACFTableField(); acf_table_field.init(); })( jQuery );
johannheyne/acf-table
advanced-custom-fields-table-field/tags/1.3.4/js/input-v5.js
JavaScript
gpl-2.0
26,869
19.828682
170
0.526592
false
FROM kucing/node:latest MAINTAINER Ivan <ivan@marsud.id> RUN npm install -g bower gulp phantomjs eslint node-gyp WORKDIR /app
ivanp/dockerbuilds
node-tools/Dockerfile
Dockerfile
gpl-2.0
134
20.333333
55
0.753731
false
/* * minimum data types for MIPS and the Ultra64 RCP * * No copyright is intended on this file. :) * * To work with features of the RCP hardware, we need at the very least: * 1. a 64-bit type or a type which can encompass 64-bit operations * 2. signed and unsigned 32-or-more-bit types (s32, u32) * 3. signed and unsigned 16-or-more-bit types (s16, u16) * 4. signed and unsigned 8-or-more-bit types (s8, u8) * * This tends to coincide with the regulations of <stdint.h> and even most of * what is guaranteed by simple preprocessor logic and the C89 standard, so * the deduction of RCP hardware types will have the following priority: * 1. compiler implementation of the <stdint.h> extension * 2. 64-bit ABI detection by the preprocessor * 3. preprocessor derivation of literal integer interpretation * 4. the presumption of C89 conformance for 8-, 16-, and 32-bit types * and the presumption of `long long` support for 64-bit types * * In situations where the compiler's implementation chooses to control these * arbitrary sizes on its own or to exchange portability with C99 compliance, * the standard types (either built-in or external <stdint.h>) will be preferred. */ /* * Rather than call it "n64_types.h" or "my_stdint.h", the idea is that this * header should be maintainable to any independent implementation's needs, * especially in the event that one decides that type requirements should be * mandated by the user and not permanently merged into the C specifications. * * Compilers always have had, always should have, and always will have the * right to choose whether it is the programmer's job to establish the * arbitrary sizes they prefer to have or whether the C language should * be complicated enough to specify additional built-in criteria such as * this, such that it should be able to depend on a system header for it. */ #ifndef _MY_TYPES_H_ #define _MY_TYPES_H_ /* * Until proven otherwise, there are no standard integer types. */ #undef HAVE_STANDARD_INTEGER_TYPES /* * an optional facility which could be used as an external alternative to * deducing minimum-width types (if the compiler agrees to rely on this level * of the language specifications to have it) * * Because no standard system is required to have any exact-width type, the * C99 enforcement of <stdint.h> is more of an early initiative (as in, * "better early than late" or "better early than never at all") rather than * a fully portable resource available or even possible all of the time. */ #if defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901L) /* * Something which strictly emphasizes pre-C99 standard compliance likely * does not have any <stdint.h> that we could include (nor built-in types). */ #elif defined(_XBOX) || defined(_XENON) /* * Since the Microsoft APIs frequently use `long` instead of `int` to ensure * a minimum of 32-bit DWORD size, they were forced to propose a "LLP64" ABI. */ #define MICROSOFT_ABI #elif defined(_MSC_VER) && (_MSC_VER < 1600) /* * In some better, older versions of MSVC, there often was no <stdint.h>. * We can still use the built-in MSVC types to create the <stdint.h> types. */ #define MICROSOFT_ABI #else #include <stdint.h> #endif /* * With or without external or internal support for <stdint.h>, we need to * confirm the level of support for RCP data types on the Nintendo 64. * * We only need minimum-width data types, not exact-width types. * Systems on which there is no 16- or 32-bit type, for example, can easily * be accounted for by the code itself using optimizable AND bit-masks. */ #if defined(INT8_MIN) && defined(INT8_MAX) #define HAVE_INT8_EXACT #endif #if defined(INT_FAST8_MIN) && defined(INT_FAST8_MAX) #define HAVE_INT8_FAST #endif #if defined(INT_LEAST8_MIN) && defined(INT_LEAST8_MAX) #define HAVE_INT8_MINIMUM #endif #if defined(INT16_MIN) && defined(INT16_MAX) #define HAVE_INT16_EXACT #endif #if defined(INT_FAST16_MIN) && defined(INT_FAST16_MAX) #define HAVE_INT16_FAST #endif #if defined(INT_LEAST16_MIN) && defined(INT_LEAST16_MAX) #define HAVE_INT16_MINIMUM #endif #if defined(INT32_MIN) && defined(INT32_MAX) #define HAVE_INT32_EXACT #endif #if defined(INT_FAST32_MIN) && defined(INT_FAST32_MAX) #define HAVE_INT32_FAST #endif #if defined(INT_LEAST32_MIN) && defined(INT_LEAST32_MAX) #define HAVE_INT32_MINIMUM #endif #if defined(INT64_MIN) && defined(INT64_MAX) #define HAVE_INT64_EXACT #endif #if defined(INT_FAST64_MIN) && defined(INT_FAST64_MAX) #define HAVE_INT64_FAST #endif #if defined(INT_LEAST64_MIN) && defined(INT_LEAST64_MAX) #define HAVE_INT64_MINIMUM #endif #if defined(HAVE_INT8_EXACT)\ || defined(HAVE_INT8_FAST) \ || defined(HAVE_INT8_MINIMUM) #define HAVE_INT8 #endif #if defined(HAVE_INT16_EXACT)\ || defined(HAVE_INT16_FAST) \ || defined(HAVE_INT16_MINIMUM) #define HAVE_INT16 #endif #if defined(HAVE_INT32_EXACT)\ || defined(HAVE_INT32_FAST) \ || defined(HAVE_INT32_MINIMUM) #define HAVE_INT32 #endif #if defined(HAVE_INT64_EXACT)\ || defined(HAVE_INT64_FAST) \ || defined(HAVE_INT64_MINIMUM) #define HAVE_INT64 #endif /* * This determines whether or not it is possible to use the evolution of the * C standards for compiler advice on how to define the types or whether we * will instead rely on preprocessor logic and ABI detection or C89 rules to * define each of the types. */ #if defined(HAVE_INT8) \ && defined(HAVE_INT16)\ && defined(HAVE_INT32)\ && defined(HAVE_INT64) #define HAVE_STANDARD_INTEGER_TYPES #endif #if defined(HAVE_INT8_EXACT) typedef int8_t s8; typedef uint8_t u8; typedef s8 i8; #elif defined(HAVE_INT8_FAST) typedef int_fast8_t s8; typedef uint_fast8_t u8; typedef s8 i8; #elif defined(HAVE_INT8_MINIMUM) typedef int_least8_t s8; typedef uint_least8_t u8; typedef s8 i8; #elif defined(MICROSOFT_ABI) typedef signed __int8 s8; typedef unsigned __int8 u8; typedef __int8 i8; #else typedef signed char s8; typedef unsigned char u8; typedef char i8; #endif #if defined(HAVE_INT16_EXACT) typedef int16_t s16; typedef uint16_t u16; #elif defined(HAVE_INT16_FAST) typedef int_fast16_t s16; typedef uint_fast16_t u16; #elif defined(HAVE_INT16_MINIMUM) typedef int_least16_t s16; typedef uint_least16_t u16; #elif defined(MICROSOFT_ABI) typedef signed __int16 s16; typedef unsigned __int16 u16; #else typedef signed short s16; typedef unsigned short u16; #endif #if defined(HAVE_INT32_EXACT) typedef int32_t s32; typedef uint32_t u32; #elif defined(HAVE_INT32_FAST) typedef int_fast32_t s32; typedef uint_fast32_t u32; #elif defined(HAVE_INT32_MINIMUM) typedef int_least32_t s32; typedef uint_least32_t u32; #elif defined(MICROSOFT_ABI) typedef signed __int32 s32; typedef unsigned __int32 u32; #elif !defined(__LP64__) && (0xFFFFFFFFL < 0xFFFFFFFFUL) typedef signed long s32; typedef unsigned long u32; #else typedef signed int s32; typedef unsigned int u32; #endif #if defined(HAVE_INT64_EXACT) typedef int64_t s64; typedef uint64_t u64; #elif defined(HAVE_INT64_FAST) typedef int_fast64_t s64; typedef uint_fast64_t u64; #elif defined(HAVE_INT64_MINIMUM) typedef int_least64_t s64; typedef uint_least64_t u64; #elif defined(MICROSOFT_ABI) typedef signed __int64 s64; typedef unsigned __int64 u64; #elif defined(__LP64__) && (0x00000000FFFFFFFFUL < ~0UL) typedef signed long s64; typedef unsigned long u64; #else typedef signed long long s64; typedef unsigned long long u64; #endif /* * Although most types are signed by default, using `int' instead of `signed * int' and `i32' instead of `s32' can be preferable to denote cases where * the signedness of something operated on is irrelevant to the algorithm. */ typedef s16 i16; typedef s32 i32; typedef s64 i64; /* * If <stdint.h> was unavailable or not included (should be included before * "my_types.h" if it is ever to be included), then perhaps this is the * right opportunity to try defining the <stdint.h> types ourselves. * * Due to sole popularity, code can sometimes be easier to read when saying * things like "int8_t" instead of "i8", just because more people are more * likely to understand the <stdint.h> type names in generic C code. To be * as neutral as possible, people will have every right to sometimes prefer * saying "uint32_t" instead of "u32" for the sake of modern standards. * * The below macro just means whether or not we had access to <stdint.h> * material to deduce any of our 8-, 16-, 32-, or 64-bit type definitions. */ #ifndef HAVE_STANDARD_INTEGER_TYPES typedef s8 int8_t; typedef u8 uint8_t; typedef s16 int16_t; typedef u16 uint16_t; typedef s32 int32_t; typedef u32 uint32_t; typedef s64 int64_t; typedef u64 uint64_t; #define HAVE_STANDARD_INTEGER_TYPES #endif /* * Single- and double-precision floating-point data types have a little less * room for maintenance across different CPU processors, as the C standard * just provides `float' and `[long] double'. However, if we are going to * need 32- and 64-bit floating-point precision (which MIPS emulation does * require), then it could be nice to have these names just to be consistent. */ typedef float f32; typedef double f64; /* * Pointer types, serving as the memory reference address to the actual type. * I thought this was useful to have due to the various reasons for declaring * or using variable pointers in various styles and complex scenarios. * ex) i32* pointer; * ex) i32 * pointer; * ex) i32 *a, *b, *c; * neutral: `pi32 pointer;' or `pi32 a, b, c;' */ typedef i8* pi8; typedef i16* pi16; typedef i32* pi32; typedef i64* pi64; typedef s8* ps8; typedef s16* ps16; typedef s32* ps32; typedef s64* ps64; typedef u8* pu8; typedef u16* pu16; typedef u32* pu32; typedef u64* pu64; typedef f32* pf32; typedef f64* pf64; typedef void* p_void; typedef void(*p_func)(void); /* * helper macros with exporting functions for shared objects or dynamically * loaded libraries */ #if defined(_XBOX) #define EXPORT #define CALL #elif defined(_WIN32) #define EXPORT __declspec(dllexport) #define CALL __cdecl #elif (__GNUC__) #define EXPORT __attribute__((visibility("default"))) #define CALL #endif /* * Optimizing compilers aren't necessarily perfect compilers, but they do * have that extra chance of supporting explicit [anti-]inline instructions. */ #ifdef _MSC_VER #define INLINE __inline #define NOINLINE __declspec(noinline) #define ALIGNED _declspec(align(16)) #elif defined(__GNUC__) #define INLINE inline #define NOINLINE __attribute__((noinline)) #define ALIGNED __attribute__((aligned(16))) #else #define INLINE #define NOINLINE #define ALIGNED #endif /* * aliasing helpers * Strictly put, this may be unspecified behavior, but it's nice to have! */ typedef union { u8 B[2]; s8 SB[2]; i16 W; u16 UW; s16 SW; /* Here, again, explicitly writing "signed" may help clarity. */ } word_16; typedef union { u8 B[4]; s8 SB[4]; i16 H[2]; u16 UH[2]; s16 SH[2]; i32 W; u32 UW; s32 SW; } word_32; typedef union { u8 B[8]; s8 SB[8]; i16 F[4]; u16 UF[4]; s16 SF[4]; i32 H[2]; u32 UH[2]; s32 SH[2]; i64 W; u64 UW; s64 SW; } word_64; /* * helper macros for indexing memory in the above unions * EEP! Currently concentrates mostly on 32-bit endianness. */ #ifndef ENDIAN_M #if defined(__BIG_ENDIAN__) | (__BYTE_ORDER != __LITTLE_ENDIAN) #define ENDIAN_M ( 0) #else #define ENDIAN_M (~0) #endif #endif #define ENDIAN_SWAP_BYTE (ENDIAN_M & 0x7 & 3) #define ENDIAN_SWAP_HALF (ENDIAN_M & 0x6 & 2) #define ENDIAN_SWAP_BIMI (ENDIAN_M & 0x5 & 1) #define ENDIAN_SWAP_WORD (ENDIAN_M & 0x4 & 0) #define BES(address) ((address) ^ ENDIAN_SWAP_BYTE) #define HES(address) ((address) ^ ENDIAN_SWAP_HALF) #define MES(address) ((address) ^ ENDIAN_SWAP_BIMI) #define WES(address) ((address) ^ ENDIAN_SWAP_WORD) /* * extra types of encoding for the well-known MIPS RISC architecture * Possibly implement other machine types in future versions of this header. */ typedef struct { unsigned opcode: 6; unsigned rs: 5; unsigned rt: 5; unsigned rd: 5; unsigned sa: 5; unsigned function: 6; } MIPS_type_R; typedef struct { unsigned opcode: 6; unsigned rs: 5; unsigned rt: 5; unsigned imm: 16; } MIPS_type_I; /* * Maybe worth including, maybe not. * It's sketchy since bit-fields pertain to `int' type, of which the size is * not necessarily going to be even 4 bytes. On C compilers for MIPS itself, * almost certainly, but is this really important to have? */ #if 0 typedef struct { unsigned opcode: 6; unsigned target: 26; } MIPS_type_J; #endif /* * Saying "int" all the time for variables of true/false meaning can be sort * of misleading. (So can adding dumb features to C99, like "bool".) * * Boolean is a proper noun, so the correct name has a capital 'B'. */ typedef int Boolean; #if !defined(FALSE) && !defined(TRUE) #define FALSE 0 #define TRUE 1 #endif #endif
LegendOfDragoon/AziAudio
AziAudio/my_types.h
C
gpl-2.0
14,081
30.291111
81
0.661388
false
/* * Rasengan - Manga and Comic Downloader * Copyright (C) 2013 Sauriel * * 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 3 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, see <http://www.gnu.org/licenses/>. */ package de.sauriel.rasengan.ui; import java.awt.BorderLayout; import javax.swing.JDialog; import javax.swing.JProgressBar; import javax.swing.JLabel; import java.util.Observable; import java.util.Observer; public class DownloadDialog extends JDialog implements Observer { private static final long serialVersionUID = 4251447351437107605L; JProgressBar progressBar; public DownloadDialog() { // Configure Dialog setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); setAlwaysOnTop(true); setModal(true); setModalityType(ModalityType.MODELESS); setResizable(false); setTitle("Downloading: " + RasenganMainFrame.comic.getName()); setBounds(100, 100, 300, 60); setLayout(new BorderLayout(0, 0)); // Set Content JLabel labelDownload = new JLabel("Downloading: " + RasenganMainFrame.comic.getName()); add(labelDownload, BorderLayout.NORTH); progressBar = new JProgressBar(); add(progressBar, BorderLayout.CENTER); } @Override public void update(Observable comicService, Object imagesCount) { int[] newImagesCount= (int[]) imagesCount; progressBar.setMaximum(newImagesCount[1]); progressBar.setValue(newImagesCount[0]); if (newImagesCount[0] == newImagesCount[1]) { dispose(); } } }
Sauriel/rasengan
src/de/sauriel/rasengan/ui/DownloadDialog.java
Java
gpl-2.0
2,082
28.617647
89
0.708934
false
% To rebuild the .pdf from this source, use something like the following % latex quickref.tex % dvips -t letter -f -Pcmz < quickref.dvi >| quickref.ps % ps2pdf -sPAPERSIZE=letter quickref.ps \documentclass[12pt]{article} \usepackage[utf-8]{inputenc} \usepackage{lscape} \usepackage{setspace} \usepackage{graphicx} \usepackage{multicol} \usepackage[normalem]{ulem} \usepackage[english]{babel} \usepackage{color} \usepackage{hyperref} \usepackage[T1]{fontenc} \textheight=9in \textwidth=7.5in \headheight=0pt \headsep=0pt \topmargin=0in \oddsidemargin=-0.4in \evensidemargin=-0.6in \parindent=0pt \parsep=1pt \pagestyle{empty} \date {} \makeatother \begin{document} \begin{landscape} % \textit{Dan Kuester's all-leather} \begin{center} \begin{minipage}[m] {1in}\includegraphics[height=0.9in]{../evolution-logo.eps}\hspace{5mm} \end{minipage} \hspace{5mm} \textbf{\Huge{Skedë referimi e shpejtë për Evolution}} \end{center} \begin{center} \begin{multicols}{2} \section*{Globale} \begin{tabular*}{4in}{rp{1.5in}} \textit{\textbf{Përbërës}} & \\ Posta & \textbf{Ctrl+1} \\ Kontakte & \textbf{Ctrl+2} \\ Kalendari & \textbf{Ctrl+3} \\ Aktivitete & \textbf{Ctrl+4} \\ \vspace{1.5mm} Shënime & \textbf{Ctrl+5} \\ \textit{\textbf{Kontrolle}} & \\ Element i ri në modalitetin aktual & \textbf{Ctrl+N} \\ Shkëmbe fokusin midis panelëve & \textbf{F6} \\ Pastro fushën e kërkimit & \textbf{Shift+Ctrl+Q} \\ Mbyll dritaren & \textbf{Ctrl+W} \\ Hap një dritare të re & \textbf{Shift+Ctrl+W} \\ \vspace{1.5mm} Mbyll evolution & \textbf{Ctrl+Q} \\ \textit{\textbf{Zgjedhja}} & \\ Printo zgjedhjen & \textbf{Ctrl+P} \\ Ruaj zgjedhjen & \textbf{Ctrl+S} \\ Elemino zgjedhjen & \textbf{Del} ose \textbf{Backspace} \\ Lëviz mesazhe/kontakte tek kartela & \textbf{Shift+Ctrl+V} \\ Kopjo mesazhe/kontakte tek kartela & \textbf{Shift+Ctrl+Y} \\ \end{tabular*} \section*{Përbërsit e kontakteve/Shënime} \begin{tabular*}{4in}{rp{1.5in}} \textit{\textbf{Komandat e përgjithshme}} & \\ Kontakt i ri & \textbf{Shift+Ctrl+C} \\ Listë e re kontaktesh & \textbf{Shift+Ctrl+L} \\ Shënim i ri & \textbf{Shift+Ctrl+O} \\ \end{tabular*} % {\\ \vspace{5mm} \footnotesize \textit{* denotes the feature may not be implemented yet}} \section*{Komponenti i postës} \begin{tabular*}{4in}{rp{1.5in}} \textit{\textbf{Komandat e përgjithshme}} & \\ Mesazh i ri & \textbf{Shift+Ctrl+M} \\ \vspace{1.5mm} Dërgo/Merr mesazhe & \textbf{F9} \\ \textit{\textbf{Zgjedhja}} & \\ Apliko filtrat & \textbf{Ctrl+Y} \\ Hap në një dritare të re & \textbf{Return} ose \textbf{Ctrl+O} \\ \vspace{1.5mm} Përcill zgjedhjen & \textbf{Ctrl+F} \\ \textit{\textbf{Paneli i listës së mesazheve}} & \\ Mesazhi në vijim i palexuar & \textbf{.} ose \textbf{]} \\ \vspace{1.5mm} Mesazhi paraardhës i palexuar & \textbf{,} ose \textbf{[} \\ \textit{\textbf{Paneli i pamjes së parë}} & \\ Përgjigju dërguesit & \textbf{Ctrl+R} \\ Përgjigju në listë & \textbf{Ctrl+L} \\ Përgjigju të gjithë dërguesve & \textbf{Shift+Ctrl+R} \\ Rrotullo për sipër & \textbf{Backspace} \\ Rrotullo për poshtë & \textbf{Space} \\ \end{tabular*} \section*{Përbërsit Kalendari/Aktivitete} \begin{tabular*}{4in}{rp{1.5in}} \textit{\textbf{Komandat e përgjithshme}} & \\ Takim i ri & \textbf{Shift+Ctrl+A} \\ Mbledhje e re & \textbf{Shift+Ctrl+E} \\ \vspace{1.5mm} Aktivitet i ri & \textbf{Shift+Ctrl+T} \\ % \vspace{1.5mm} % Expunge/Purge old schedules & \textbf{Ctrl+E} \\ \textit{\textbf{Lundrimi}} & \\ Shko tek dita e sotme & \textbf{Ctrl+T} \\ Shko tek data & \textbf{Ctrl+G} \\ \end{tabular*} \end{multicols} \end{center} \end{landscape} \end{document}
johnnyjacob/evolution
help/quickref/sq/quickref.tex
TeX
gpl-2.0
3,964
32.452991
91
0.641799
false
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager Connection editor -- Connection editor for NetworkManager * * 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., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright 2012 Red Hat, Inc. */ #ifndef __PAGE_MASTER_H__ #define __PAGE_MASTER_H__ #include <nm-connection.h> #include <glib.h> #include <glib-object.h> #include "ce-page.h" #include "connection-helpers.h" #define CE_TYPE_PAGE_MASTER (ce_page_master_get_type ()) #define CE_PAGE_MASTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CE_TYPE_PAGE_MASTER, CEPageMaster)) #define CE_PAGE_MASTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CE_TYPE_PAGE_MASTER, CEPageMasterClass)) #define CE_IS_PAGE_MASTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CE_TYPE_PAGE_MASTER)) #define CE_IS_PAGE_MASTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CE_TYPE_PAGE_MASTER)) #define CE_PAGE_MASTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CE_TYPE_PAGE_MASTER, CEPageMasterClass)) typedef struct { CEPage parent; gboolean aggregating; } CEPageMaster; typedef struct { CEPageClass parent; /* signals */ void (*create_connection) (CEPageMaster *self, NMConnection *connection); void (*connection_added) (CEPageMaster *self, NMConnection *connection); void (*connection_removed) (CEPageMaster *self, NMConnection *connection); /* methods */ void (*add_slave) (CEPageMaster *self, NewConnectionResultFunc result_func); } CEPageMasterClass; GType ce_page_master_get_type (void); gboolean ce_page_master_has_slaves (CEPageMaster *self); #endif /* __PAGE_MASTER_H__ */
pavlix/nm-applet
src/connection-editor/page-master.h
C
gpl-2.0
2,296
36.032258
114
0.720383
false
/** * App Control * * Central controller attached to the top level <html> * element */ "use strict"; ( function ( angular, app ) { // get user profile data app.controller( "AppCtrl", [ '$rootScope', '$scope', '$state', 'UserService', function ( $rootScope, $scope, $state, UserService ) { // // bodyClass definitions // // in a larger project this would be abstracted to allow for multiple // classes to easily be added or removed // // current state $rootScope.$on( '$stateChangeStart', function ( event, toState, toParams, fromState, fromParams ) { var currentState = toState.name.replace( '.', '-' ); $scope.bodyClass = 'state-' + currentState; } ); /** * Format Avatar */ $scope.currentUserAvatar = function ( src, size ) { return UserService.getCurrentUserAvatar( size ); }; } ] ); } )( angular, SimplySocial );
Kevinlearynet/angular-trial-app
scripts/controllers/app-controller.js
JavaScript
gpl-2.0
901
21.55
78
0.618202
false
package org.openzal.zal.ldap; import javax.annotation.Nonnull; public class LdapServerType { @Nonnull private final com.zimbra.cs.ldap.LdapServerType mLdapServerType; public final static LdapServerType MASTER = new LdapServerType(com.zimbra.cs.ldap.LdapServerType.MASTER); public final static LdapServerType REPLICA = new LdapServerType(com.zimbra.cs.ldap.LdapServerType.REPLICA); public LdapServerType(@Nonnull Object ldapServerType) { mLdapServerType = (com.zimbra.cs.ldap.LdapServerType)ldapServerType; } protected <T> T toZimbra(Class<T> cls) { return cls.cast(mLdapServerType); } public boolean isMaster() { return mLdapServerType.isMaster(); } }
ZeXtras/OpenZAL
src/java/org/openzal/zal/ldap/LdapServerType.java
Java
gpl-2.0
694
25.692308
109
0.76513
false
package Opsview::Schema::Useragents; use strict; use warnings; use base 'Opsview::DBIx::Class'; __PACKAGE__->load_components(qw/InflateColumn::DateTime Core/); __PACKAGE__->table( __PACKAGE__->opsviewdb . ".useragents" ); __PACKAGE__->add_columns( "id", { data_type => "VARCHAR", default_value => undef, is_nullable => 0, size => 255 }, "last_update", { data_type => "DATETIME", timezone => "UTC", default_value => undef, is_nullable => 0 } ); __PACKAGE__->set_primary_key( "id" ); # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-09-17 13:24:37 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:24E+L+rBEoeFJ5x/7Y4nUQ # # AUTHORS: # Copyright (C) 2003-2013 Opsview Limited. All rights reserved # # This file is part of Opsview # # Opsview 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. # # Opsview 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 Opsview; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # You can replace this text with custom content, and it will be preserved on regeneration 1;
ruo91/opsview-core-3.20131016.0.14175.utf8
lib/Opsview/Schema/Useragents.pm
Perl
gpl-2.0
1,671
31.134615
89
0.658288
false
'use strict'; /** * @ngdoc function * @name quickNewsApp.controller:CbcCtrl * @description * # CbcCtrl * Controller of the quickNewsApp */ angular.module('quickNewsApp') .controller('CbcCtrl', function ($scope, $http) { this.awesomeThings = [ 'HTML5 Boilerplate', 'AngularJS', 'Karma' ]; $scope.postLimit = 10; $scope.showMorePosts = function() { $scope.postLimit += 5; }; $scope.isSet = function(checkTab) { return this.tab === checkTab; }; $scope.setTab = function(activeTab) { this.tab = activeTab; $scope.postLimit = 10; $scope.getFeed(activeTab); }; $scope.getActiveTab = function() { return this.tab; }; $scope.getFeed = function(category) { /*jshint unused: false */ $scope.loading = true; var url = '//quicknews.amanuppal.ca:5000/cbc?url=' + category; $http.get(url) .success(function(data, status, headers, config) { $scope.entries = data.items; console.log($scope.entries); $scope.numEntries = Object.keys($scope.entries).length; $scope.loading = false; }) .error(function(data, status, headers, config) { console.log('Error loading feed: ' + url + ', status: ' + status); }); }; });
amtux/quick-news
app/scripts/controllers/cbc.js
JavaScript
gpl-2.0
1,204
21.296296
69
0.63289
false
package org.hectordam.proyectohector; import java.util.ArrayList; import org.hectordam.proyectohector.R; import org.hectordam.proyectohector.base.Bar; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesNotAvailableException; import com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks; import com.google.android.gms.common.GooglePlayServicesClient.OnConnectionFailedListener; import com.google.android.gms.location.LocationClient; import com.google.android.gms.location.LocationListener; import com.google.android.gms.location.LocationRequest; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.CameraUpdate; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.MapsInitializer; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; import android.location.Location; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.view.Menu; public class Mapa extends FragmentActivity implements LocationListener,ConnectionCallbacks, OnConnectionFailedListener{ private GoogleMap mapa; private LocationClient locationClient; private CameraUpdate camara; private static final LocationRequest LOC_REQUEST = LocationRequest.create() .setInterval(5000) .setFastestInterval(16) .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mapa); try { MapsInitializer.initialize(this); } catch (GooglePlayServicesNotAvailableException e) { e.printStackTrace(); } mapa = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap(); ArrayList<Bar> bares = getIntent().getParcelableArrayListExtra("bares"); if (bares != null) { //marcarBares(bares); } mapa.setMyLocationEnabled(true); configuraLocalizador(); camara = CameraUpdateFactory.newLatLng(new LatLng(41.6561, -0.8773)); mapa.moveCamera(camara); mapa.animateCamera(CameraUpdateFactory.zoomTo(11.0f), 2000, null); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.mapa, menu); return true; } /** * Añade las marcas de todas las gasolineras * @param gasolineras */ private void marcarBares(ArrayList<Bar> bares) { if (bares.size() > 0) { for (Bar bar : bares) { mapa.addMarker(new MarkerOptions() .position(new LatLng(bar.getLatitud(), bar.getLongitud())) .title(bar.getNombre())); } } } /** * Se muestra la Activity */ @Override protected void onStart() { super.onStart(); locationClient.connect(); } @Override protected void onStop() { super.onStop(); locationClient.disconnect(); } private void configuraLocalizador() { if (locationClient == null) { locationClient = new LocationClient(this, this, this); } } @Override public void onConnected(Bundle arg0) { locationClient.requestLocationUpdates(LOC_REQUEST, this); } @Override public void onConnectionFailed(ConnectionResult arg0) { } @Override public void onDisconnected() { } @Override public void onLocationChanged(Location arg0) { } }
gilmh/PracticaAndroid
AgenBar/src/org/hectordam/proyectohector/Mapa.java
Java
gpl-2.0
3,630
25.304348
119
0.71405
false
/* * mms_ts.c - Touchscreen driver for Melfas MMS-series touch controllers * * Copyright (C) 2011 Google Inc. * Author: Dima Zavin <dima@android.com> * Simon Wilson <simonwilson@google.com> * * ISP reflashing code based on original code from Melfas. * * 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. * */ #define DEBUG /* #define VERBOSE_DEBUG */ /*#define SEC_TSP_DEBUG*/ /* #define SEC_TSP_VERBOSE_DEBUG */ /* #define FORCE_FW_FLASH */ /* #define FORCE_FW_PASS */ /* #define ESD_DEBUG */ #define SEC_TSP_FACTORY_TEST #define SEC_TSP_FW_UPDATE #define TSP_BUF_SIZE 1024 #define FAIL -1 #include <linux/delay.h> #include <linux/earlysuspend.h> #include <linux/firmware.h> #include <linux/gpio.h> #include <linux/i2c.h> #include <linux/init.h> #include <linux/input.h> #include <linux/input/mt.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/slab.h> #include <mach/gpio.h> #include <linux/uaccess.h> #include <mach/cpufreq.h> #include <mach/dev.h> #include <linux/platform_data/mms_ts.h> #include <asm/unaligned.h> #define MAX_FINGERS 10 #define MAX_WIDTH 30 #define MAX_PRESSURE 255 #define MAX_ANGLE 90 #define MIN_ANGLE -90 /* Registers */ #define MMS_MODE_CONTROL 0x01 #define MMS_XYRES_HI 0x02 #define MMS_XRES_LO 0x03 #define MMS_YRES_LO 0x04 #define MMS_INPUT_EVENT_PKT_SZ 0x0F #define MMS_INPUT_EVENT0 0x10 #define FINGER_EVENT_SZ 8 #define MMS_TSP_REVISION 0xF0 #define MMS_HW_REVISION 0xF1 #define MMS_COMPAT_GROUP 0xF2 #define MMS_FW_VERSION 0xF3 enum { ISP_MODE_FLASH_ERASE = 0x59F3, ISP_MODE_FLASH_WRITE = 0x62CD, ISP_MODE_FLASH_READ = 0x6AC9, }; /* each address addresses 4-byte words */ #define ISP_MAX_FW_SIZE (0x1F00 * 4) #define ISP_IC_INFO_ADDR 0x1F00 #ifdef SEC_TSP_FW_UPDATE #define WORD_SIZE 4 #define ISC_PKT_SIZE 1029 #define ISC_PKT_DATA_SIZE 1024 #define ISC_PKT_HEADER_SIZE 3 #define ISC_PKT_NUM 31 #define ISC_ENTER_ISC_CMD 0x5F #define ISC_ENTER_ISC_DATA 0x01 #define ISC_CMD 0xAE #define ISC_ENTER_UPDATE_DATA 0x55 #define ISC_ENTER_UPDATE_DATA_LEN 9 #define ISC_DATA_WRITE_SUB_CMD 0xF1 #define ISC_EXIT_ISC_SUB_CMD 0x0F #define ISC_EXIT_ISC_SUB_CMD2 0xF0 #define ISC_CHECK_STATUS_CMD 0xAF #define ISC_CONFIRM_CRC 0x03 #define ISC_DEFAULT_CRC 0xFFFF #endif #ifdef SEC_TSP_FACTORY_TEST #define TX_NUM 26 #define RX_NUM 14 #define NODE_NUM 364 /* 26x14 */ /* VSC(Vender Specific Command) */ #define MMS_VSC_CMD 0xB0 /* vendor specific command */ #define MMS_VSC_MODE 0x1A /* mode of vendor */ #define MMS_VSC_CMD_ENTER 0X01 #define MMS_VSC_CMD_CM_DELTA 0X02 #define MMS_VSC_CMD_CM_ABS 0X03 #define MMS_VSC_CMD_EXIT 0X05 #define MMS_VSC_CMD_INTENSITY 0X04 #define MMS_VSC_CMD_RAW 0X06 #define MMS_VSC_CMD_REFER 0X07 #define TSP_CMD_STR_LEN 32 #define TSP_CMD_RESULT_STR_LEN 512 #define TSP_CMD_PARAM_NUM 8 #endif /* SEC_TSP_FACTORY_TEST */ /* Touch booster */ #if defined(CONFIG_EXYNOS4_CPUFREQ) &&\ defined(CONFIG_BUSFREQ_OPP) #define TOUCH_BOOSTER 1 #define TOUCH_BOOSTER_OFF_TIME 100 #define TOUCH_BOOSTER_CHG_TIME 200 #else #define TOUCH_BOOSTER 0 #endif struct device *sec_touchscreen; static struct device *bus_dev; int touch_is_pressed = 0; #define ISC_DL_MODE 1 /* 4.8" OCTA LCD */ #define FW_VERSION_4_8 0xBD #define MAX_FW_PATH 255 #define TSP_FW_FILENAME "melfas_fw.bin" #if ISC_DL_MODE /* ISC_DL_MODE start */ /* * Default configuration of ISC mode */ #define DEFAULT_SLAVE_ADDR 0x48 #define SECTION_NUM 4 #define SECTION_NAME_LEN 5 #define PAGE_HEADER 3 #define PAGE_DATA 1024 #define PAGE_TAIL 2 #define PACKET_SIZE (PAGE_HEADER + PAGE_DATA + PAGE_TAIL) #define TS_WRITE_REGS_LEN 1030 #define TIMEOUT_CNT 10 #define STRING_BUF_LEN 100 /* State Registers */ #define MIP_ADDR_INPUT_INFORMATION 0x01 #define ISC_ADDR_VERSION 0xE1 #define ISC_ADDR_SECTION_PAGE_INFO 0xE5 /* Config Update Commands */ #define ISC_CMD_ENTER_ISC 0x5F #define ISC_CMD_ENTER_ISC_PARA1 0x01 #define ISC_CMD_UPDATE_MODE 0xAE #define ISC_SUBCMD_ENTER_UPDATE 0x55 #define ISC_SUBCMD_DATA_WRITE 0XF1 #define ISC_SUBCMD_LEAVE_UPDATE_PARA1 0x0F #define ISC_SUBCMD_LEAVE_UPDATE_PARA2 0xF0 #define ISC_CMD_CONFIRM_STATUS 0xAF #define ISC_STATUS_UPDATE_MODE 0x01 #define ISC_STATUS_CRC_CHECK_SUCCESS 0x03 #define ISC_CHAR_2_BCD(num) (((num/10)<<4) + (num%10)) #define ISC_MAX(x, y) (((x) > (y)) ? (x) : (y)) static const char section_name[SECTION_NUM][SECTION_NAME_LEN] = { "BOOT", "CORE", "PRIV", "PUBL" }; static const unsigned char crc0_buf[31] = { 0x1D, 0x2C, 0x05, 0x34, 0x95, 0xA4, 0x8D, 0xBC, 0x59, 0x68, 0x41, 0x70, 0xD1, 0xE0, 0xC9, 0xF8, 0x3F, 0x0E, 0x27, 0x16, 0xB7, 0x86, 0xAF, 0x9E, 0x7B, 0x4A, 0x63, 0x52, 0xF3, 0xC2, 0xEB }; static const unsigned char crc1_buf[31] = { 0x1E, 0x9C, 0xDF, 0x5D, 0x76, 0xF4, 0xB7, 0x35, 0x2A, 0xA8, 0xEB, 0x69, 0x42, 0xC0, 0x83, 0x01, 0x04, 0x86, 0xC5, 0x47, 0x6C, 0xEE, 0xAD, 0x2F, 0x30, 0xB2, 0xF1, 0x73, 0x58, 0xDA, 0x99 }; static tISCFWInfo_t mbin_info[SECTION_NUM]; static tISCFWInfo_t ts_info[SECTION_NUM]; /* read F/W version from IC */ static bool section_update_flag[SECTION_NUM]; const struct firmware *fw_mbin[SECTION_NUM]; static unsigned char g_wr_buf[1024 + 3 + 2]; #endif enum fw_flash_mode { ISP_FLASH, ISC_FLASH, }; enum { BUILT_IN = 0, UMS, REQ_FW, }; struct tsp_callbacks { void (*inform_charger)(struct tsp_callbacks *tsp_cb, bool mode); }; struct mms_ts_info { struct i2c_client *client; struct input_dev *input_dev; char phys[32]; int max_x; int max_y; bool invert_x; bool invert_y; const u8 *config_fw_version; int irq; int (*power) (bool on); struct melfas_tsi_platform_data *pdata; struct early_suspend early_suspend; /* protects the enabled flag */ struct mutex lock; bool enabled; void (*register_cb)(void *); struct tsp_callbacks callbacks; bool ta_status; bool noise_mode; unsigned char finger_state[MAX_FINGERS]; #if defined(SEC_TSP_FW_UPDATE) u8 fw_update_state; #endif u8 fw_ic_ver; enum fw_flash_mode fw_flash_mode; #if TOUCH_BOOSTER struct delayed_work work_dvfs_off; struct delayed_work work_dvfs_chg; bool dvfs_lock_status; int cpufreq_level; struct mutex dvfs_lock; #endif #if defined(SEC_TSP_FACTORY_TEST) struct list_head cmd_list_head; u8 cmd_state; char cmd[TSP_CMD_STR_LEN]; int cmd_param[TSP_CMD_PARAM_NUM]; char cmd_result[TSP_CMD_RESULT_STR_LEN]; struct mutex cmd_lock; bool cmd_is_running; unsigned int reference[NODE_NUM]; unsigned int raw[NODE_NUM]; /* CM_ABS */ unsigned int inspection[NODE_NUM];/* CM_DELTA */ unsigned int intensity[NODE_NUM]; bool ft_flag; #endif /* SEC_TSP_FACTORY_TEST */ }; struct mms_fw_image { __le32 hdr_len; __le32 data_len; __le32 fw_ver; __le32 hdr_ver; u8 data[0]; } __packed; #ifdef CONFIG_HAS_EARLYSUSPEND static void mms_ts_early_suspend(struct early_suspend *h); static void mms_ts_late_resume(struct early_suspend *h); #endif #if TOUCH_BOOSTER static bool dvfs_lock_status = false; static bool press_status = false; #endif #if defined(SEC_TSP_FACTORY_TEST) #define TSP_CMD(name, func) .cmd_name = name, .cmd_func = func struct tsp_cmd { struct list_head list; const char *cmd_name; void (*cmd_func)(void *device_data); }; static void fw_update(void *device_data); static void get_fw_ver_bin(void *device_data); static void get_fw_ver_ic(void *device_data); static void get_config_ver(void *device_data); static void get_threshold(void *device_data); static void module_off_master(void *device_data); static void module_on_master(void *device_data); static void module_off_slave(void *device_data); static void module_on_slave(void *device_data); static void get_chip_vendor(void *device_data); static void get_chip_name(void *device_data); static void get_reference(void *device_data); static void get_cm_abs(void *device_data); static void get_cm_delta(void *device_data); static void get_intensity(void *device_data); static void get_x_num(void *device_data); static void get_y_num(void *device_data); static void run_reference_read(void *device_data); static void run_cm_abs_read(void *device_data); static void run_cm_delta_read(void *device_data); static void run_intensity_read(void *device_data); static void not_support_cmd(void *device_data); struct tsp_cmd tsp_cmds[] = { {TSP_CMD("fw_update", fw_update),}, {TSP_CMD("get_fw_ver_bin", get_fw_ver_bin),}, {TSP_CMD("get_fw_ver_ic", get_fw_ver_ic),}, {TSP_CMD("get_config_ver", get_config_ver),}, {TSP_CMD("get_threshold", get_threshold),}, /* {TSP_CMD("module_off_master", module_off_master),}, {TSP_CMD("module_on_master", module_on_master),}, {TSP_CMD("module_off_slave", not_support_cmd),}, {TSP_CMD("module_on_slave", not_support_cmd),}, */ {TSP_CMD("get_chip_vendor", get_chip_vendor),}, {TSP_CMD("get_chip_name", get_chip_name),}, {TSP_CMD("get_x_num", get_x_num),}, {TSP_CMD("get_y_num", get_y_num),}, {TSP_CMD("get_reference", get_reference),}, {TSP_CMD("get_cm_abs", get_cm_abs),}, {TSP_CMD("get_cm_delta", get_cm_delta),}, {TSP_CMD("get_intensity", get_intensity),}, {TSP_CMD("run_reference_read", run_reference_read),}, {TSP_CMD("run_cm_abs_read", run_cm_abs_read),}, {TSP_CMD("run_cm_delta_read", run_cm_delta_read),}, {TSP_CMD("run_intensity_read", run_intensity_read),}, {TSP_CMD("not_support_cmd", not_support_cmd),}, }; #endif #if TOUCH_BOOSTER static void change_dvfs_lock(struct work_struct *work) { struct mms_ts_info *info = container_of(work, struct mms_ts_info, work_dvfs_chg.work); int ret; mutex_lock(&info->dvfs_lock); ret = dev_lock(bus_dev, sec_touchscreen, 267160); /* 266 Mhz setting */ if (ret < 0) pr_err("%s: dev change bud lock failed(%d)\n",\ __func__, __LINE__); else pr_info("[TSP] change_dvfs_lock"); mutex_unlock(&info->dvfs_lock); } static void set_dvfs_off(struct work_struct *work) { struct mms_ts_info *info = container_of(work, struct mms_ts_info, work_dvfs_off.work); int ret; mutex_lock(&info->dvfs_lock); ret = dev_unlock(bus_dev, sec_touchscreen); if (ret < 0) pr_err("%s: dev unlock failed(%d)\n", __func__, __LINE__); exynos_cpufreq_lock_free(DVFS_LOCK_ID_TSP); info->dvfs_lock_status = false; pr_info("[TSP] DVFS Off!"); mutex_unlock(&info->dvfs_lock); } static void set_dvfs_lock(struct mms_ts_info *info, uint32_t on) { int ret; mutex_lock(&info->dvfs_lock); if (info->cpufreq_level <= 0) { ret = exynos_cpufreq_get_level(800000, &info->cpufreq_level); if (ret < 0) pr_err("[TSP] exynos_cpufreq_get_level error"); goto out; } if (on == 0) { if (info->dvfs_lock_status) { cancel_delayed_work(&info->work_dvfs_chg); schedule_delayed_work(&info->work_dvfs_off, msecs_to_jiffies(TOUCH_BOOSTER_OFF_TIME)); } } else if (on == 1) { cancel_delayed_work(&info->work_dvfs_off); if (!info->dvfs_lock_status) { ret = dev_lock(bus_dev, sec_touchscreen, 400200); if (ret < 0) { pr_err("%s: dev lock failed(%d)\n",\ __func__, __LINE__); } ret = exynos_cpufreq_lock(DVFS_LOCK_ID_TSP, info->cpufreq_level); if (ret < 0) pr_err("%s: cpu lock failed(%d)\n",\ __func__, __LINE__); schedule_delayed_work(&info->work_dvfs_chg, msecs_to_jiffies(TOUCH_BOOSTER_CHG_TIME)); info->dvfs_lock_status = true; pr_info("[TSP] DVFS On![%d]", info->cpufreq_level); } } else if (on == 2) { cancel_delayed_work(&info->work_dvfs_off); cancel_delayed_work(&info->work_dvfs_chg); schedule_work(&info->work_dvfs_off.work); } out: mutex_unlock(&info->dvfs_lock); } #endif static inline void mms_pwr_on_reset(struct mms_ts_info *info) { struct i2c_adapter *adapter = to_i2c_adapter(info->client->dev.parent); if (!info->pdata->mux_fw_flash) { dev_info(&info->client->dev, "missing platform data, can't do power-on-reset\n"); return; } i2c_lock_adapter(adapter); info->pdata->mux_fw_flash(true); info->pdata->power(false); gpio_direction_output(info->pdata->gpio_sda, 0); gpio_direction_output(info->pdata->gpio_scl, 0); gpio_direction_output(info->pdata->gpio_int, 0); msleep(50); info->pdata->power(true); msleep(200); info->pdata->mux_fw_flash(false); i2c_unlock_adapter(adapter); /* TODO: Seems long enough for the firmware to boot. * Find the right value */ msleep(250); } static void release_all_fingers(struct mms_ts_info *info) { struct i2c_client *client = info->client; int i; pr_debug(KERN_DEBUG "[TSP] %s\n", __func__); for (i = 0; i < MAX_FINGERS; i++) { if (info->finger_state[i] == 1) { dev_notice(&client->dev, "finger %d up(force)\n", i); } info->finger_state[i] = 0; input_mt_slot(info->input_dev, i); input_mt_report_slot_state(info->input_dev, MT_TOOL_FINGER, false); } input_sync(info->input_dev); #if TOUCH_BOOSTER set_dvfs_lock(info, 2); pr_info("[TSP] dvfs_lock free.\n "); #endif } static void mms_set_noise_mode(struct mms_ts_info *info) { struct i2c_client *client = info->client; if (!(info->noise_mode && info->enabled)) return; dev_notice(&client->dev, "%s\n", __func__); if (info->ta_status) { dev_notice(&client->dev, "noise_mode & TA connect!!!\n"); i2c_smbus_write_byte_data(info->client, 0x30, 0x1); } else { dev_notice(&client->dev, "noise_mode & TA disconnect!!!\n"); i2c_smbus_write_byte_data(info->client, 0x30, 0x2); } } static void reset_mms_ts(struct mms_ts_info *info) { struct i2c_client *client = info->client; if (info->enabled == false) return; dev_notice(&client->dev, "%s++\n", __func__); disable_irq_nosync(info->irq); info->enabled = false; touch_is_pressed = 0; release_all_fingers(info); mms_pwr_on_reset(info); enable_irq(info->irq); info->enabled = true; if (info->ta_status) { dev_notice(&client->dev, "TA connect!!!\n"); i2c_smbus_write_byte_data(info->client, 0x33, 0x1); } else { dev_notice(&client->dev, "TA disconnect!!!\n"); i2c_smbus_write_byte_data(info->client, 0x33, 0x2); } mms_set_noise_mode(info); dev_notice(&client->dev, "%s--\n", __func__); } static void melfas_ta_cb(struct tsp_callbacks *cb, bool ta_status) { struct mms_ts_info *info = container_of(cb, struct mms_ts_info, callbacks); struct i2c_client *client = info->client; dev_notice(&client->dev, "%s\n", __func__); info->ta_status = ta_status; if (info->enabled) { if (info->ta_status) { dev_notice(&client->dev, "TA connect!!!\n"); i2c_smbus_write_byte_data(info->client, 0x33, 0x1); } else { dev_notice(&client->dev, "TA disconnect!!!\n"); i2c_smbus_write_byte_data(info->client, 0x33, 0x2); } mms_set_noise_mode(info); } } static irqreturn_t mms_ts_interrupt(int irq, void *dev_id) { struct mms_ts_info *info = dev_id; struct i2c_client *client = info->client; u8 buf[MAX_FINGERS * FINGER_EVENT_SZ] = { 0 }; int ret; int i; int sz; u8 reg = MMS_INPUT_EVENT0; struct i2c_msg msg[] = { { .addr = client->addr, .flags = 0, .buf = &reg, .len = 1, }, { .addr = client->addr, .flags = I2C_M_RD, .buf = buf, }, }; sz = i2c_smbus_read_byte_data(client, MMS_INPUT_EVENT_PKT_SZ); if (sz < 0) { dev_err(&client->dev, "%s bytes=%d\n", __func__, sz); for (i = 0; i < 50; i++) { sz = i2c_smbus_read_byte_data(client, MMS_INPUT_EVENT_PKT_SZ); if (sz > 0) break; } if (i == 50) { dev_dbg(&client->dev, "i2c failed... reset!!\n"); reset_mms_ts(info); goto out; } } /* BUG_ON(sz > MAX_FINGERS*FINGER_EVENT_SZ); */ if (sz == 0) goto out; if (sz > MAX_FINGERS*FINGER_EVENT_SZ) { dev_err(&client->dev, "[TSP] abnormal data inputed.\n"); goto out; } msg[1].len = sz; ret = i2c_transfer(client->adapter, msg, ARRAY_SIZE(msg)); if (ret != ARRAY_SIZE(msg)) { dev_err(&client->dev, "failed to read %d bytes of touch data (%d)\n", sz, ret); goto out; } #if defined(VERBOSE_DEBUG) print_hex_dump(KERN_DEBUG, "mms_ts raw: ", DUMP_PREFIX_OFFSET, 32, 1, buf, sz, false); #endif if (buf[0] == 0x0F) { /* ESD */ dev_dbg(&client->dev, "ESD DETECT.... reset!!\n"); reset_mms_ts(info); goto out; } if (buf[0] == 0x0E) { /* NOISE MODE */ dev_dbg(&client->dev, "[TSP] noise mode enter!!\n"); info->noise_mode = 1 ; mms_set_noise_mode(info); goto out; } for (i = 0; i < sz; i += FINGER_EVENT_SZ) { u8 *tmp = &buf[i]; int id = (tmp[0] & 0xf) - 1; int x = tmp[2] | ((tmp[1] & 0xf) << 8); int y = tmp[3] | (((tmp[1] >> 4) & 0xf) << 8); int angle = (tmp[5] >= 127) ? (-(256 - tmp[5])) : tmp[5]; int palm = (tmp[0] & 0x10) >> 4; if (info->invert_x) { x = info->max_x - x; if (x < 0) x = 0; } if (info->invert_y) { y = info->max_y - y; if (y < 0) y = 0; } if (id >= MAX_FINGERS) { dev_notice(&client->dev, \ "finger id error [%d]\n", id); reset_mms_ts(info); goto out; } if ((tmp[0] & 0x80) == 0) { #if defined(SEC_TSP_DEBUG) dev_dbg(&client->dev, "finger id[%d]: x=%d y=%d p=%d w=%d major=%d minor=%d angle=%d palm=%d\n", id, x, y, tmp[5], tmp[4], tmp[6], tmp[7] , angle, palm); #else if (info->finger_state[id] != 0) { dev_notice(&client->dev, "finger [%d] up, palm %d\n", id, palm); } #endif input_mt_slot(info->input_dev, id); input_mt_report_slot_state(info->input_dev, MT_TOOL_FINGER, false); info->finger_state[id] = 0; continue; } input_mt_slot(info->input_dev, id); input_mt_report_slot_state(info->input_dev, MT_TOOL_FINGER, true); input_report_abs(info->input_dev, ABS_MT_WIDTH_MAJOR, tmp[4]); input_report_abs(info->input_dev, ABS_MT_POSITION_X, x); input_report_abs(info->input_dev, ABS_MT_POSITION_Y, y); input_report_abs(info->input_dev, ABS_MT_TOUCH_MAJOR, tmp[6]); input_report_abs(info->input_dev, ABS_MT_TOUCH_MINOR, tmp[7]); input_report_abs(info->input_dev, ABS_MT_ANGLE, angle); input_report_abs(info->input_dev, ABS_MT_PALM, palm); #if defined(SEC_TSP_DEBUG) if (info->finger_state[id] == 0) { info->finger_state[id] = 1; dev_dbg(&client->dev, "finger id[%d]: x=%d y=%d w=%d major=%d minor=%d angle=%d palm=%d\n", id, x, y, tmp[4], tmp[6], tmp[7] , angle, palm); if (finger_event_sz == 10) dev_dbg(&client->dev, \ "pressure = %d\n", tmp[8]); } #else if (info->finger_state[id] == 0) { info->finger_state[id] = 1; dev_notice(&client->dev, "finger [%d] down, palm %d\n", id, palm); } #endif } input_sync(info->input_dev); touch_is_pressed = 0; for (i = 0; i < MAX_FINGERS; i++) { if (info->finger_state[i] == 1) touch_is_pressed++; } #if TOUCH_BOOSTER set_dvfs_lock(info, !!touch_is_pressed); #endif out: return IRQ_HANDLED; } int get_tsp_status(void) { return touch_is_pressed; } EXPORT_SYMBOL(get_tsp_status); #if ISC_DL_MODE static int mms100_i2c_read(struct i2c_client *client, u16 addr, u16 length, u8 *value) { struct i2c_adapter *adapter = client->adapter; struct i2c_msg msg; int ret = -1; msg.addr = client->addr; msg.flags = 0x00; msg.len = 1; msg.buf = (u8 *) &addr; ret = i2c_transfer(adapter, &msg, 1); if (ret >= 0) { msg.addr = client->addr; msg.flags = I2C_M_RD; msg.len = length; msg.buf = (u8 *) value; ret = i2c_transfer(adapter, &msg, 1); } if (ret < 0) pr_err("[TSP] : read error : [%d]", ret); return ret; } static int mms100_reset(struct mms_ts_info *info) { info->pdata->power(false); msleep(30); info->pdata->power(true); msleep(300); return ISC_SUCCESS; } /* static int mms100_check_operating_mode(struct i2c_client *_client, const int _error_code) { int ret; unsigned char rd_buf = 0x00; unsigned char count = 0; if(_client == NULL) pr_err("[TSP ISC] _client is null"); ret = mms100_i2c_read(_client, ISC_ADDR_VERSION, 1, &rd_buf); if (ret<0) { pr_info("[TSP ISC] %s,%d: i2c read fail[%d]\n", __func__, __LINE__, ret); return _error_code; } return ISC_SUCCESS; } */ static int mms100_get_version_info(struct i2c_client *_client) { int i, ret; unsigned char rd_buf[8]; /* config version brust read (core, private, public) */ ret = mms100_i2c_read(_client, ISC_ADDR_VERSION, 4, rd_buf); if (ret < 0) { pr_info("[TSP ISC] %s,%d: i2c read fail[%d]\n", __func__, __LINE__, ret); return ISC_I2C_ERROR; } for (i = 0; i < SECTION_NUM; i++) ts_info[i].version = rd_buf[i]; ts_info[SEC_CORE].compatible_version = ts_info[SEC_BOOTLOADER].version; ts_info[SEC_PRIVATE_CONFIG].compatible_version = ts_info[SEC_PUBLIC_CONFIG].compatible_version = ts_info[SEC_CORE].version; ret = mms100_i2c_read(_client, ISC_ADDR_SECTION_PAGE_INFO, 8, rd_buf); if (ret < 0) { pr_info("[TSP ISC] %s,%d: i2c read fail[%d]\n", __func__, __LINE__, ret); return ISC_I2C_ERROR; } for (i = 0; i < SECTION_NUM; i++) { ts_info[i].start_addr = rd_buf[i]; ts_info[i].end_addr = rd_buf[i + SECTION_NUM]; } for (i = 0; i < SECTION_NUM; i++) { pr_info("TS : Section(%d) version: 0x%02X\n", i, ts_info[i].version); pr_info("TS : Section(%d) Start Address: 0x%02X\n", i, ts_info[i].start_addr); pr_info("TS : Section(%d) End Address: 0x%02X\n", i, ts_info[i].end_addr); pr_info("TS : Section(%d) Compatibility: 0x%02X\n", i, ts_info[i].compatible_version); } return ISC_SUCCESS; } static int mms100_seek_section_info(void) { int i; char str_buf[STRING_BUF_LEN]; char name_buf[SECTION_NAME_LEN]; int version; int page_num; const unsigned char *buf; int next_ptr; for (i = 0; i < SECTION_NUM; i++) { if (fw_mbin[i] == NULL) { buf = NULL; pr_info("[TSP ISC] fw_mbin[%d]->data is NULL", i); } else { buf = fw_mbin[i]->data; } if (buf == NULL) { mbin_info[i].version = ts_info[i].version; mbin_info[i].compatible_version = ts_info[i].compatible_version; mbin_info[i].start_addr = ts_info[i].start_addr; mbin_info[i].end_addr = ts_info[i].end_addr; } else { next_ptr = 0; do { sscanf(buf + next_ptr, "%s", str_buf); next_ptr += strlen(str_buf) + 1; } while (!strstr(str_buf, "SECTION_NAME")); sscanf(buf + next_ptr, "%s%s", str_buf, name_buf); if (strncmp(section_name[i], name_buf, SECTION_NAME_LEN)) return ISC_FILE_FORMAT_ERROR; do { sscanf(buf + next_ptr, "%s", str_buf); next_ptr += strlen(str_buf) + 1; } while (!strstr(str_buf, "SECTION_VERSION")); sscanf(buf + next_ptr, "%s%d", str_buf, &version); mbin_info[i].version = ISC_CHAR_2_BCD(version); do { sscanf(buf + next_ptr, "%s", str_buf); next_ptr += strlen(str_buf) + 1; } while (!strstr(str_buf, "START_PAGE_ADDR")); sscanf(buf + next_ptr, "%s%d", str_buf, &page_num); mbin_info[i].start_addr = page_num; do { sscanf(buf + next_ptr, "%s", str_buf); next_ptr += strlen(str_buf) + 1; } while (!strstr(str_buf, "END_PAGE_ADDR")); sscanf(buf + next_ptr, "%s%d", str_buf, &page_num); mbin_info[i].end_addr = page_num; do { sscanf(buf + next_ptr, "%s", str_buf); next_ptr += strlen(str_buf) + 1; } while (!strstr(str_buf, "COMPATIBLE_VERSION")); sscanf(buf + next_ptr, "%s%d", str_buf, &version); mbin_info[i].compatible_version = ISC_CHAR_2_BCD(version); do { sscanf(buf + next_ptr, "%s", str_buf); next_ptr += strlen(str_buf) + 1; } while (!strstr(str_buf, "[Binary]")); if (mbin_info[i].version == 0xFF) return ISC_FILE_FORMAT_ERROR; } } for (i = 0; i < SECTION_NUM; i++) { pr_info("[TSP ISC] MBin : Section(%d) Version: 0x%02X\n", i, mbin_info[i].version); pr_info("[TSP ISC] MBin : Section(%d) Start Address: 0x%02X\n", i, mbin_info[i].start_addr); pr_info("[TSP ISC] MBin : Section(%d) End Address: 0x%02X\n", i, mbin_info[i].end_addr); pr_info("[TSP ISC] MBin : Section(%d) Compatibility: 0x%02X\n", i, mbin_info[i].compatible_version); } return ISC_SUCCESS; } static eISCRet_t mms100_compare_version_info(struct i2c_client *_client) { int i, ret; unsigned char expected_compatibility[SECTION_NUM]; if (mms100_get_version_info(_client) != ISC_SUCCESS) return ISC_I2C_ERROR; ret = mms100_seek_section_info(); /* Check update areas , 0 : bootloader 1: core 2: private 3: public */ for (i = 0; i < SECTION_NUM; i++) { if ((mbin_info[i].version == 0) || (mbin_info[i].version != ts_info[i].version)) { section_update_flag[i] = true; pr_info("[TSP ISC] [%d] section will be updated!", i); } } section_update_flag[0] = false; pr_info("[TSP ISC] [%d] [%d] [%d]", section_update_flag[1], section_update_flag[2], section_update_flag[3]); if (section_update_flag[SEC_BOOTLOADER]) { expected_compatibility[SEC_CORE] = mbin_info[SEC_BOOTLOADER].version; } else { expected_compatibility[SEC_CORE] = ts_info[SEC_BOOTLOADER].version; } if (section_update_flag[SEC_CORE]) { expected_compatibility[SEC_PUBLIC_CONFIG] = expected_compatibility[SEC_PRIVATE_CONFIG] = mbin_info[SEC_CORE].version; } else { expected_compatibility[SEC_PUBLIC_CONFIG] = expected_compatibility[SEC_PRIVATE_CONFIG] = ts_info[SEC_CORE].version; } for (i = SEC_CORE; i < SEC_PUBLIC_CONFIG; i++) { if (section_update_flag[i]) { pr_info("[TSP ISC] section_update_flag(%d), 0x%02x, 0x%02x\n", i, expected_compatibility[i], mbin_info[i].compatible_version); if (expected_compatibility[i] != mbin_info[i].compatible_version) return ISC_COMPATIVILITY_ERROR; } else { pr_info("[TSP ISC] !section_update_flag(%d), 0x%02x, 0x%02x\n", i, expected_compatibility[i], ts_info[i].compatible_version); if (expected_compatibility[i] != ts_info[i].compatible_version) return ISC_COMPATIVILITY_ERROR; } } return ISC_SUCCESS; } static int mms100_enter_ISC_mode(struct i2c_client *_client) { int ret; unsigned char wr_buf[2]; pr_info("[TSP ISC] %s\n", __func__); wr_buf[0] = ISC_CMD_ENTER_ISC; wr_buf[1] = ISC_CMD_ENTER_ISC_PARA1; ret = i2c_master_send(_client, wr_buf, 2); if (ret < 0) { pr_info("[TSP ISC] %s,%d: i2c write fail[%d]\n", __func__, __LINE__, ret); return ISC_I2C_ERROR; } msleep(50); return ISC_SUCCESS; } static int mms100_enter_config_update(struct i2c_client *_client) { int ret; unsigned char wr_buf[10] = {0,}; unsigned char rd_buf; wr_buf[0] = ISC_CMD_UPDATE_MODE; wr_buf[1] = ISC_SUBCMD_ENTER_UPDATE; ret = i2c_master_send(_client, wr_buf, 10); if (ret < 0) { pr_info("[TSP ISC] %s,%d: i2c write fail[%d]\n", __func__, __LINE__, ret); return ISC_I2C_ERROR; } ret = mms100_i2c_read(_client, ISC_CMD_CONFIRM_STATUS, 1, &rd_buf); if (ret < 0) { pr_info("[TSP ISC] %s,%d: i2c read fail[%d]\n", __func__, __LINE__, ret); return ISC_I2C_ERROR; } if (rd_buf != ISC_STATUS_UPDATE_MODE) return ISC_UPDATE_MODE_ENTER_ERROR; pr_info("[TSP ISC]End mms100_enter_config_update()\n"); return ISC_SUCCESS; } static int mms100_ISC_clear_page(struct i2c_client *_client, unsigned char _page_addr) { int ret; unsigned char rd_buf; memset(&g_wr_buf[3], 0xFF, PAGE_DATA); g_wr_buf[0] = ISC_CMD_UPDATE_MODE; /* command */ g_wr_buf[1] = ISC_SUBCMD_DATA_WRITE; /* sub_command */ g_wr_buf[2] = _page_addr; g_wr_buf[PAGE_HEADER + PAGE_DATA] = crc0_buf[_page_addr]; g_wr_buf[PAGE_HEADER + PAGE_DATA + 1] = crc1_buf[_page_addr]; ret = i2c_master_send(_client, g_wr_buf, PACKET_SIZE); if (ret < 0) { pr_info("[TSP ISC] %s,%d: i2c write fail[%d]\n", __func__, __LINE__, ret); return ISC_I2C_ERROR; } ret = mms100_i2c_read(_client, ISC_CMD_CONFIRM_STATUS, 1, &rd_buf); if (ret < 0) { pr_info("[TSP ISC] %s,%d: i2c read fail[%d]\n", __func__, __LINE__, ret); return ISC_I2C_ERROR; } if (rd_buf != ISC_STATUS_CRC_CHECK_SUCCESS) return ISC_UPDATE_MODE_ENTER_ERROR; pr_info("[TSP ISC]End mms100_ISC_clear_page()\n"); return ISC_SUCCESS; } static int mms100_ISC_clear_validate_markers(struct i2c_client *_client) { int ret_msg; int i, j; bool is_matched_address; for (i = SEC_CORE; i <= SEC_PUBLIC_CONFIG; i++) { if (section_update_flag[i]) { if (ts_info[i].end_addr <= 30 && ts_info[i].end_addr > 0) { ret_msg = mms100_ISC_clear_page(_client, ts_info[i].end_addr); if (ret_msg != ISC_SUCCESS) return ret_msg; } } } for (i = SEC_CORE; i <= SEC_PUBLIC_CONFIG; i++) { if (section_update_flag[i]) { is_matched_address = false; for (j = SEC_CORE; j <= SEC_PUBLIC_CONFIG; j++) { if (mbin_info[i].end_addr == ts_info[i].end_addr) { is_matched_address = true; break; } } if (!is_matched_address) { if (mbin_info[i].end_addr <= 30 && mbin_info[i].end_addr > 0) { ret_msg = mms100_ISC_clear_page(_client, mbin_info[i].end_addr); if (ret_msg != ISC_SUCCESS) return ret_msg; } } } } return ISC_SUCCESS; } static int mms100_update_section_data(struct i2c_client *_client) { int i, ret, next_ptr; unsigned char rd_buf; const unsigned char *ptr_fw; char str_buf[STRING_BUF_LEN]; int page_addr; for (i = 0; i < SECTION_NUM; i++) { if (section_update_flag[i]) { pr_info("[TSP ISC] section data i2c flash : [%d]", i); next_ptr = 0; ptr_fw = fw_mbin[i]->data; do { sscanf(ptr_fw + next_ptr, "%s", str_buf); next_ptr += strlen(str_buf) + 1; } while (!strstr(str_buf, "[Binary]")); ptr_fw = ptr_fw + next_ptr + 2; for (page_addr = mbin_info[i].start_addr; page_addr <= mbin_info[i].end_addr; page_addr++) { if (page_addr - mbin_info[i].start_addr > 0) ptr_fw += PACKET_SIZE; if ((ptr_fw[0] != ISC_CMD_UPDATE_MODE) || (ptr_fw[1] != ISC_SUBCMD_DATA_WRITE) || (ptr_fw[2] != page_addr)) return ISC_WRITE_BUFFER_ERROR; ret = i2c_master_send(_client, ptr_fw, PACKET_SIZE); if (ret < 0) { pr_info("[TSP ISC] %s,%d: i2c write fail[%d]\n", __func__, __LINE__, ret); return ISC_I2C_ERROR; } ret = mms100_i2c_read(_client, ISC_CMD_CONFIRM_STATUS, 1, &rd_buf); if (ret < 0) { pr_info("[TSP ISC] %s,%d: i2c read fail[%d]\n", __func__, __LINE__, ret); return ISC_I2C_ERROR; } if (rd_buf != ISC_STATUS_CRC_CHECK_SUCCESS) return ISC_CRC_ERROR; section_update_flag[i] = false; } } } pr_info("[TSP ISC]End mms100_update_section_data()\n"); return ISC_SUCCESS; } static eISCRet_t mms100_open_mbinary(struct i2c_client *_client) { int i; char file_name[64]; int ret = 0; ret += request_firmware(&(fw_mbin[1]),\ "tsp_melfas/CORE.fw", &_client->dev); ret += request_firmware(&(fw_mbin[2]),\ "tsp_melfas/PRIV.fw", &_client->dev); ret += request_firmware(&(fw_mbin[3]),\ "tsp_melfas/PUBL.fw", &_client->dev); if (!ret) return ISC_SUCCESS; else { pr_info("[TSP ISC] request_firmware fail"); return ret; } } static eISCRet_t mms100_close_mbinary(void) { int i; for (i = 0; i < SECTION_NUM; i++) { if (fw_mbin[i] != NULL) release_firmware(fw_mbin[i]); } return ISC_SUCCESS; } eISCRet_t mms100_ISC_download_mbinary(struct mms_ts_info *info) { struct i2c_client *_client = info->client; eISCRet_t ret_msg = ISC_NONE; pr_info("[TSP ISC] %s\n", __func__); mms100_reset(info); /* ret_msg = mms100_check_operating_mode(_client, EC_BOOT_ON_SUCCEEDED); if (ret_msg != ISC_SUCCESS) goto ISC_ERROR_HANDLE; */ ret_msg = mms100_open_mbinary(_client); if (ret_msg != ISC_SUCCESS) goto ISC_ERROR_HANDLE; /*Config version Check*/ ret_msg = mms100_compare_version_info(_client); if (ret_msg != ISC_SUCCESS) goto ISC_ERROR_HANDLE; ret_msg = mms100_enter_ISC_mode(_client); if (ret_msg != ISC_SUCCESS) goto ISC_ERROR_HANDLE; ret_msg = mms100_enter_config_update(_client); if (ret_msg != ISC_SUCCESS) goto ISC_ERROR_HANDLE; ret_msg = mms100_ISC_clear_validate_markers(_client); if (ret_msg != ISC_SUCCESS) goto ISC_ERROR_HANDLE; pr_info("[TSP ISC]mms100_update_section_data start"); ret_msg = mms100_update_section_data(_client); if (ret_msg != ISC_SUCCESS) goto ISC_ERROR_HANDLE; pr_info("[TSP ISC]mms100_update_section_data end"); /* mms100_reset(info); */ pr_info("[TSP ISC]FIRMWARE_UPDATE_FINISHED!!!\n"); ret_msg = ISC_SUCCESS; ISC_ERROR_HANDLE: if (ret_msg != ISC_SUCCESS) pr_info("[TSP ISC]ISC_ERROR_CODE: %d\n", ret_msg); mms100_reset(info); mms100_close_mbinary(); return ret_msg; } #endif /* ISC_DL_MODE start */ static void hw_reboot(struct mms_ts_info *info, bool bootloader) { info->pdata->power(false); gpio_direction_output(info->pdata->gpio_sda, bootloader ? 0 : 1); gpio_direction_output(info->pdata->gpio_scl, bootloader ? 0 : 1); gpio_direction_output(info->pdata->gpio_int, 0); msleep(30); info->pdata->power(true); msleep(30); if (bootloader) { gpio_set_value(info->pdata->gpio_scl, 0); gpio_set_value(info->pdata->gpio_sda, 1); } else { gpio_set_value(info->pdata->gpio_int, 1); gpio_direction_input(info->pdata->gpio_int); gpio_direction_input(info->pdata->gpio_scl); gpio_direction_input(info->pdata->gpio_sda); } msleep(40); } static inline void hw_reboot_bootloader(struct mms_ts_info *info) { hw_reboot(info, true); } static inline void hw_reboot_normal(struct mms_ts_info *info) { hw_reboot(info, false); } static void isp_toggle_clk(struct mms_ts_info *info, int start_lvl, int end_lvl, int hold_us) { gpio_set_value(info->pdata->gpio_scl, start_lvl); udelay(hold_us); gpio_set_value(info->pdata->gpio_scl, end_lvl); udelay(hold_us); } /* 1 <= cnt <= 32 bits to write */ static void isp_send_bits(struct mms_ts_info *info, u32 data, int cnt) { gpio_direction_output(info->pdata->gpio_int, 0); gpio_direction_output(info->pdata->gpio_scl, 0); gpio_direction_output(info->pdata->gpio_sda, 0); /* clock out the bits, msb first */ while (cnt--) { gpio_set_value(info->pdata->gpio_sda, (data >> cnt) & 1); udelay(3); isp_toggle_clk(info, 1, 0, 3); } } /* 1 <= cnt <= 32 bits to read */ static u32 isp_recv_bits(struct mms_ts_info *info, int cnt) { u32 data = 0; gpio_direction_output(info->pdata->gpio_int, 0); gpio_direction_output(info->pdata->gpio_scl, 0); gpio_set_value(info->pdata->gpio_sda, 0); gpio_direction_input(info->pdata->gpio_sda); /* clock in the bits, msb first */ while (cnt--) { isp_toggle_clk(info, 0, 1, 1); data = (data << 1) | (!!gpio_get_value(info->pdata->gpio_sda)); } gpio_direction_output(info->pdata->gpio_sda, 0); return data; } static void isp_enter_mode(struct mms_ts_info *info, u32 mode) { int cnt; unsigned long flags; local_irq_save(flags); gpio_direction_output(info->pdata->gpio_int, 0); gpio_direction_output(info->pdata->gpio_scl, 0); gpio_direction_output(info->pdata->gpio_sda, 1); mode &= 0xffff; for (cnt = 15; cnt >= 0; cnt--) { gpio_set_value(info->pdata->gpio_int, (mode >> cnt) & 1); udelay(3); isp_toggle_clk(info, 1, 0, 3); } gpio_set_value(info->pdata->gpio_int, 0); local_irq_restore(flags); } static void isp_exit_mode(struct mms_ts_info *info) { int i; unsigned long flags; local_irq_save(flags); gpio_direction_output(info->pdata->gpio_int, 0); udelay(3); for (i = 0; i < 10; i++) isp_toggle_clk(info, 1, 0, 3); local_irq_restore(flags); } static void flash_set_address(struct mms_ts_info *info, u16 addr) { /* Only 13 bits of addr are valid. * The addr is in bits 13:1 of cmd */ isp_send_bits(info, (u32) (addr & 0x1fff) << 1, 18); } static void flash_erase(struct mms_ts_info *info) { isp_enter_mode(info, ISP_MODE_FLASH_ERASE); gpio_direction_output(info->pdata->gpio_int, 0); gpio_direction_output(info->pdata->gpio_scl, 0); gpio_direction_output(info->pdata->gpio_sda, 1); /* 4 clock cycles with different timings for the erase to * get processed, clk is already 0 from above */ udelay(7); isp_toggle_clk(info, 1, 0, 3); udelay(7); isp_toggle_clk(info, 1, 0, 3); usleep_range(25000, 35000); isp_toggle_clk(info, 1, 0, 3); usleep_range(150, 200); isp_toggle_clk(info, 1, 0, 3); gpio_set_value(info->pdata->gpio_sda, 0); isp_exit_mode(info); } static u32 flash_readl(struct mms_ts_info *info, u16 addr) { int i; u32 val; unsigned long flags; local_irq_save(flags); isp_enter_mode(info, ISP_MODE_FLASH_READ); flash_set_address(info, addr); gpio_direction_output(info->pdata->gpio_scl, 0); gpio_direction_output(info->pdata->gpio_sda, 0); udelay(40); /* data load cycle */ for (i = 0; i < 6; i++) isp_toggle_clk(info, 1, 0, 10); val = isp_recv_bits(info, 32); isp_exit_mode(info); local_irq_restore(flags); return val; } static void flash_writel(struct mms_ts_info *info, u16 addr, u32 val) { unsigned long flags; local_irq_save(flags); isp_enter_mode(info, ISP_MODE_FLASH_WRITE); flash_set_address(info, addr); isp_send_bits(info, val, 32); gpio_direction_output(info->pdata->gpio_sda, 1); /* 6 clock cycles with different timings for the data to get written * into flash */ isp_toggle_clk(info, 0, 1, 3); isp_toggle_clk(info, 0, 1, 3); isp_toggle_clk(info, 0, 1, 6); isp_toggle_clk(info, 0, 1, 12); isp_toggle_clk(info, 0, 1, 3); isp_toggle_clk(info, 0, 1, 3); isp_toggle_clk(info, 1, 0, 1); gpio_direction_output(info->pdata->gpio_sda, 0); isp_exit_mode(info); local_irq_restore(flags); usleep_range(300, 400); } static bool flash_is_erased(struct mms_ts_info *info) { struct i2c_client *client = info->client; u32 val; u16 addr; for (addr = 0; addr < (ISP_MAX_FW_SIZE / 4); addr++) { udelay(40); val = flash_readl(info, addr); if (val != 0xffffffff) { dev_dbg(&client->dev, "addr 0x%x not erased: 0x%08x != 0xffffffff\n", addr, val); return false; } } return true; } static int fw_write_image(struct mms_ts_info *info, const u8 * data, size_t len) { struct i2c_client *client = info->client; u16 addr = 0; for (addr = 0; addr < (len / 4); addr++, data += 4) { u32 val = get_unaligned_le32(data); u32 verify_val; int retries = 3; while (retries--) { flash_writel(info, addr, val); verify_val = flash_readl(info, addr); if (val == verify_val) break; dev_err(&client->dev, "mismatch @ addr 0x%x: 0x%x != 0x%x\n", addr, verify_val, val); continue; } if (retries < 0) return -ENXIO; } return 0; } static int fw_download(struct mms_ts_info *info, const u8 * data, size_t len) { struct i2c_client *client = info->client; u32 val; int ret = 0; if (len % 4) { dev_err(&client->dev, "fw image size (%d) must be a multiple of 4 bytes\n", len); return -EINVAL; } else if (len > ISP_MAX_FW_SIZE) { dev_err(&client->dev, "fw image is too big, %d > %d\n", len, ISP_MAX_FW_SIZE); return -EINVAL; } dev_info(&client->dev, "fw download start\n"); info->pdata->power(false); gpio_direction_output(info->pdata->gpio_sda, 0); gpio_direction_output(info->pdata->gpio_scl, 0); gpio_direction_output(info->pdata->gpio_int, 0); hw_reboot_bootloader(info); val = flash_readl(info, ISP_IC_INFO_ADDR); dev_info(&client->dev, "IC info: 0x%02x (%x)\n", val & 0xff, val); dev_info(&client->dev, "fw erase...\n"); flash_erase(info); if (!flash_is_erased(info)) { ret = -ENXIO; goto err; } dev_info(&client->dev, "fw write...\n"); /* XXX: what does this do?! */ flash_writel(info, ISP_IC_INFO_ADDR, 0xffffff00 | (val & 0xff)); usleep_range(1000, 1500); ret = fw_write_image(info, data, len); if (ret) goto err; usleep_range(1000, 1500); hw_reboot_normal(info); usleep_range(1000, 1500); dev_info(&client->dev, "fw download done...\n"); return 0; err: dev_err(&client->dev, "fw download failed...\n"); hw_reboot_normal(info); return ret; } #if defined(SEC_TSP_ISC_FW_UPDATE) static u16 gen_crc(u8 data, u16 pre_crc) { u16 crc; u16 cur; u16 temp; u16 bit_1; u16 bit_2; int i; crc = pre_crc; for (i = 7; i >= 0; i--) { cur = ((data >> i) & 0x01) ^ (crc & 0x0001); bit_1 = cur ^ (crc >> 11 & 0x01); bit_2 = cur ^ (crc >> 4 & 0x01); temp = (cur << 4) | (crc >> 12 & 0x0F); temp = (temp << 7) | (bit_1 << 6) | (crc >> 5 & 0x3F); temp = (temp << 4) | (bit_2 << 3) | (crc >> 1 & 0x0007); crc = temp; } return crc; } static int isc_fw_download(struct mms_ts_info *info, const u8 * data, size_t len) { u8 *buff; u16 crc_buf; int src_idx; int dest_idx; int ret; int i, j; buff = kzalloc(ISC_PKT_SIZE, GFP_KERNEL); if (!buff) { dev_err(&info->client->dev, "%s: failed to allocate memory\n", __func__); ret = -1; goto err_mem_alloc; } /* enterring ISC mode */ *buff = ISC_ENTER_ISC_DATA; ret = i2c_smbus_write_byte_data(info->client, ISC_ENTER_ISC_CMD, *buff); if (ret < 0) { dev_err(&info->client->dev, "fail to enter ISC mode(err=%d)\n", ret); goto fail_to_isc_enter; } usleep_range(10000, 20000); dev_info(&info->client->dev, "Enter ISC mode\n"); /*enter ISC update mode */ *buff = ISC_ENTER_UPDATE_DATA; ret = i2c_smbus_write_i2c_block_data(info->client, ISC_CMD, ISC_ENTER_UPDATE_DATA_LEN, buff); if (ret < 0) { dev_err(&info->client->dev, "fail to enter ISC update mode(err=%d)\n", ret); goto fail_to_isc_update; } dev_info(&info->client->dev, "Enter ISC update mode\n"); /* firmware write */ *buff = ISC_CMD; *(buff + 1) = ISC_DATA_WRITE_SUB_CMD; for (i = 0; i < ISC_PKT_NUM; i++) { *(buff + 2) = i; crc_buf = gen_crc(*(buff + 2), ISC_DEFAULT_CRC); for (j = 0; j < ISC_PKT_DATA_SIZE; j++) { dest_idx = ISC_PKT_HEADER_SIZE + j; src_idx = i * ISC_PKT_DATA_SIZE + ((int)(j / WORD_SIZE)) * WORD_SIZE - (j % WORD_SIZE) + 3; *(buff + dest_idx) = *(data + src_idx); crc_buf = gen_crc(*(buff + dest_idx), crc_buf); } *(buff + ISC_PKT_DATA_SIZE + ISC_PKT_HEADER_SIZE + 1) = crc_buf & 0xFF; *(buff + ISC_PKT_DATA_SIZE + ISC_PKT_HEADER_SIZE) = crc_buf >> 8 & 0xFF; ret = i2c_master_send(info->client, buff, ISC_PKT_SIZE); if (ret < 0) { dev_err(&info->client->dev, "fail to firmware writing on packet %d.(%d)\n", i, ret); goto fail_to_fw_write; } usleep_range(1, 5); /* confirm CRC */ ret = i2c_smbus_read_byte_data(info->client, ISC_CHECK_STATUS_CMD); if (ret == ISC_CONFIRM_CRC) { dev_info(&info->client->dev, "updating %dth firmware data packet.\n", i); } else { dev_err(&info->client->dev, "fail to firmware update on %dth (%X).\n", i, ret); ret = -1; goto fail_to_confirm_crc; } } ret = 0; fail_to_confirm_crc: fail_to_fw_write: /* exit ISC mode */ *buff = ISC_EXIT_ISC_SUB_CMD; *(buff + 1) = ISC_EXIT_ISC_SUB_CMD2; i2c_smbus_write_i2c_block_data(info->client, ISC_CMD, 2, buff); usleep_range(10000, 20000); fail_to_isc_update: hw_reboot_normal(info); fail_to_isc_enter: kfree(buff); err_mem_alloc: return ret; } #endif /* SEC_TSP_ISC_FW_UPDATE */ static int get_fw_version(struct mms_ts_info *info) { int ret; int retries = 3; /* this seems to fail sometimes after a reset.. retry a few times */ do { ret = i2c_smbus_read_byte_data(info->client, MMS_FW_VERSION); } while (ret < 0 && retries-- > 0); return ret; } static int get_hw_version(struct mms_ts_info *info) { int ret; int retries = 3; /* this seems to fail sometimes after a reset.. retry a few times */ do { ret = i2c_smbus_read_byte_data(info->client, MMS_HW_REVISION); } while (ret < 0 && retries-- > 0); return ret; } static int mms_ts_enable(struct mms_ts_info *info, int wakeupcmd) { mutex_lock(&info->lock); if (info->enabled) goto out; /* wake up the touch controller. */ if (wakeupcmd == 1) { i2c_smbus_write_byte_data(info->client, 0, 0); usleep_range(3000, 5000); } info->enabled = true; enable_irq(info->irq); out: mutex_unlock(&info->lock); return 0; } static int mms_ts_disable(struct mms_ts_info *info, int sleepcmd) { mutex_lock(&info->lock); if (!info->enabled) goto out; disable_irq_nosync(info->irq); if (sleepcmd == 1) { i2c_smbus_write_byte_data(info->client, MMS_MODE_CONTROL, 0); usleep_range(10000, 12000); } info->enabled = false; touch_is_pressed = 0; out: mutex_unlock(&info->lock); return 0; } static int mms_ts_finish_config(struct mms_ts_info *info) { struct i2c_client *client = info->client; int ret; ret = request_threaded_irq(client->irq, NULL, mms_ts_interrupt, IRQF_TRIGGER_LOW | IRQF_ONESHOT, MELFAS_TS_NAME, info); if (ret < 0) { ret = 1; dev_err(&client->dev, "Failed to register interrupt\n"); goto err_req_irq; } info->irq = client->irq; barrier(); dev_info(&client->dev, "Melfas MMS-series touch controller initialized\n"); return 0; err_req_irq: return ret; } static int mms_ts_fw_info(struct mms_ts_info *info) { struct i2c_client *client = info->client; struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); int ret = 0; int ver, hw_rev; ver = get_fw_version(info); info->fw_ic_ver = ver; dev_info(&client->dev, "[TSP]fw version 0x%02x !!!!\n", ver); hw_rev = get_hw_version(info); dev_info(&client->dev, "[TSP] hw rev = %x\n", hw_rev); if (ver < 0 || hw_rev < 0) { ret = 1; dev_err(&client->dev, "i2c fail...tsp driver unload.\n"); return ret; } if (!info->pdata || !info->pdata->mux_fw_flash) { ret = 1; dev_err(&client->dev, "fw cannot be updated, missing platform data\n"); return ret; } ret = mms_ts_finish_config(info); return ret; } static int mms_ts_fw_load(struct mms_ts_info *info) { struct i2c_client *client = info->client; struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); int ret = 0; int ver, hw_rev; int retries = 3; ver = get_fw_version(info); info->fw_ic_ver = ver; dev_info(&client->dev, "[TSP]fw version 0x%02x !!!!\n", ver); hw_rev = get_hw_version(info); dev_info(&client->dev, "[TSP]hw rev = 0x%02x\n", hw_rev); pr_err("[TSP] ISC Ver [0x%02x] [0x%02x] [0x%02x]", i2c_smbus_read_byte_data(info->client, 0xF3), i2c_smbus_read_byte_data(info->client, 0xF4), i2c_smbus_read_byte_data(info->client, 0xF5)); if (!info->pdata || !info->pdata->mux_fw_flash) { ret = 1; dev_err(&client->dev, "fw cannot be updated, missing platform data\n"); goto out; } /* 4.8" OCTA LCD FW */ if (ver >= FW_VERSION_4_8 && ver != 0xFF\ && ver != 0x00 && ver != 0x45) { dev_info(&client->dev, "4.8 fw version update does not need\n"); goto done; } while (retries--) { ret = mms100_ISC_download_mbinary(info); ver = get_fw_version(info); info->fw_ic_ver = ver; if (ret == 0) { pr_err("[TSP] mms100_ISC_download_mbinary success"); goto done; } else { pr_err("[TSP] mms100_ISC_download_mbinary fail [%d]", ret); ret = 1; } dev_err(&client->dev, "retrying flashing\n"); } out: return ret; done: #if ISC_DL_MODE /* ISC_DL_MODE start */ pr_err("[TSP] ISC Ver [0x%02x] [0x%02x] [0x%02x]", i2c_smbus_read_byte_data(info->client, 0xF3), i2c_smbus_read_byte_data(info->client, 0xF4), i2c_smbus_read_byte_data(info->client, 0xF5)); #endif ret = mms_ts_finish_config(info); return ret; } #ifdef SEC_TSP_FACTORY_TEST static void set_cmd_result(struct mms_ts_info *info, char *buff, int len) { strncat(info->cmd_result, buff, len); } static void get_raw_data_all(struct mms_ts_info *info, u8 cmd) { u8 w_buf[6]; u8 read_buffer[2]; /* 52 */ int gpio; int ret; int i, j; u32 max_value = 0, min_value = 0; u32 raw_data; char buff[TSP_CMD_STR_LEN] = {0}; gpio = info->pdata->gpio_int; /* gpio = msm_irq_to_gpio(info->irq); */ disable_irq(info->irq); w_buf[0] = MMS_VSC_CMD; /* vendor specific command id */ w_buf[1] = MMS_VSC_MODE; /* mode of vendor */ w_buf[2] = 0; /* tx line */ w_buf[3] = 0; /* rx line */ w_buf[4] = 0; /* reserved */ w_buf[5] = 0; /* sub command */ if (cmd == MMS_VSC_CMD_EXIT) { w_buf[5] = MMS_VSC_CMD_EXIT; /* exit test mode */ ret = i2c_smbus_write_i2c_block_data(info->client, w_buf[0], 5, &w_buf[1]); if (ret < 0) goto err_i2c; enable_irq(info->irq); msleep(200); return; } /* MMS_VSC_CMD_CM_DELTA or MMS_VSC_CMD_CM_ABS * this two mode need to enter the test mode * exit command must be followed by testing. */ if (cmd == MMS_VSC_CMD_CM_DELTA || cmd == MMS_VSC_CMD_CM_ABS) { /* enter the debug mode */ w_buf[2] = 0x0; /* tx */ w_buf[3] = 0x0; /* rx */ w_buf[5] = MMS_VSC_CMD_ENTER; ret = i2c_smbus_write_i2c_block_data(info->client, w_buf[0], 5, &w_buf[1]); if (ret < 0) goto err_i2c; /* wating for the interrupt */ while (gpio_get_value(gpio)) udelay(100); } for (i = 0; i < RX_NUM; i++) { for (j = 0; j < TX_NUM; j++) { w_buf[2] = j; /* tx */ w_buf[3] = i; /* rx */ w_buf[5] = cmd; ret = i2c_smbus_write_i2c_block_data(info->client, w_buf[0], 5, &w_buf[1]); if (ret < 0) goto err_i2c; usleep_range(1, 5); ret = i2c_smbus_read_i2c_block_data(info->client, 0xBF, 2, read_buffer); if (ret < 0) goto err_i2c; raw_data = ((u16) read_buffer[1] << 8) | read_buffer[0]; if (i == 0 && j == 0) { max_value = min_value = raw_data; } else { max_value = max(max_value, raw_data); min_value = min(min_value, raw_data); } if (cmd == MMS_VSC_CMD_INTENSITY) { info->intensity[i * TX_NUM + j] = raw_data; dev_dbg(&info->client->dev, "[TSP] intensity[%d][%d] = %d\n", j, i, info->intensity[i * TX_NUM + j]); } else if (cmd == MMS_VSC_CMD_CM_DELTA) { info->inspection[i * TX_NUM + j] = raw_data; dev_dbg(&info->client->dev, "[TSP] delta[%d][%d] = %d\n", j, i, info->inspection[i * TX_NUM + j]); } else if (cmd == MMS_VSC_CMD_CM_ABS) { info->raw[i * TX_NUM + j] = raw_data; dev_dbg(&info->client->dev, "[TSP] raw[%d][%d] = %d\n", j, i, info->raw[i * TX_NUM + j]); } else if (cmd == MMS_VSC_CMD_REFER) { info->reference[i * TX_NUM + j] = raw_data >> 3; dev_dbg(&info->client->dev, "[TSP] reference[%d][%d] = %d\n", j, i, info->reference[i * TX_NUM + j]); } } } snprintf(buff, sizeof(buff), "%d,%d", min_value, max_value); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); enable_irq(info->irq); err_i2c: dev_err(&info->client->dev, "%s: fail to i2c (cmd=%d)\n", __func__, cmd); } static u32 get_raw_data_one(struct mms_ts_info *info, u16 rx_idx, u16 tx_idx, u8 cmd) { u8 w_buf[6]; u8 read_buffer[2]; int ret; u32 raw_data; w_buf[0] = MMS_VSC_CMD; /* vendor specific command id */ w_buf[1] = MMS_VSC_MODE; /* mode of vendor */ w_buf[2] = 0; /* tx line */ w_buf[3] = 0; /* rx line */ w_buf[4] = 0; /* reserved */ w_buf[5] = 0; /* sub command */ if (cmd != MMS_VSC_CMD_INTENSITY && cmd != MMS_VSC_CMD_RAW && cmd != MMS_VSC_CMD_REFER) { dev_err(&info->client->dev, "%s: not profer command(cmd=%d)\n", __func__, cmd); return FAIL; } w_buf[2] = tx_idx; /* tx */ w_buf[3] = rx_idx; /* rx */ w_buf[5] = cmd; /* sub command */ ret = i2c_smbus_write_i2c_block_data(info->client, w_buf[0], 5, &w_buf[1]); if (ret < 0) goto err_i2c; ret = i2c_smbus_read_i2c_block_data(info->client, 0xBF, 2, read_buffer); if (ret < 0) goto err_i2c; raw_data = ((u16) read_buffer[1] << 8) | read_buffer[0]; if (cmd == MMS_VSC_CMD_REFER) raw_data = raw_data >> 4; return raw_data; err_i2c: dev_err(&info->client->dev, "%s: fail to i2c (cmd=%d)\n", __func__, cmd); return FAIL; } static ssize_t show_close_tsp_test(struct device *dev, struct device_attribute *attr, char *buf) { struct mms_ts_info *info = dev_get_drvdata(dev); get_raw_data_all(info, MMS_VSC_CMD_EXIT); info->ft_flag = 0; return snprintf(buf, TSP_BUF_SIZE, "%u\n", 0); } static void set_default_result(struct mms_ts_info *info) { char delim = ':'; memset(info->cmd_result, 0x00, ARRAY_SIZE(info->cmd_result)); memcpy(info->cmd_result, info->cmd, strlen(info->cmd)); strncat(info->cmd_result, &delim, 1); } static int check_rx_tx_num(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[TSP_CMD_STR_LEN] = {0}; int node; if (info->cmd_param[0] < 0 || info->cmd_param[0] >= TX_NUM || info->cmd_param[1] < 0 || info->cmd_param[1] >= RX_NUM) { snprintf(buff, sizeof(buff) , "%s", "NG"); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 3; dev_info(&info->client->dev, "%s: parameter error: %u,%u\n", __func__, info->cmd_param[0], info->cmd_param[1]); node = -1; return node; } node = info->cmd_param[1] * TX_NUM + info->cmd_param[0]; dev_info(&info->client->dev, "%s: node = %d\n", __func__, node); return node; } static void not_support_cmd(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; set_default_result(info); sprintf(buff, "%s", "NA"); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 4; dev_info(&info->client->dev, "%s: \"%s(%d)\"\n", __func__, buff, strnlen(buff, sizeof(buff))); return; } static void fw_update(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; struct i2c_client *client = info->client; struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); int ret = 0; int ver = 0, fw_bin_ver = 0; int retries = 5; const u8 *buff = 0; mm_segment_t old_fs = {0}; struct file *fp = NULL; long fsize = 0, nread = 0; char fw_path[MAX_FW_PATH+1]; char result[16] = {0}; set_default_result(info); dev_info(&client->dev, "fw_ic_ver = 0x%02x, fw_bin_ver = 0x%02x\n", info->fw_ic_ver, fw_bin_ver); switch (info->cmd_param[0]) { case BUILT_IN: dev_info(&client->dev, "built in 4.8 fw is loaded!!\n"); while (retries--) { ret = mms100_ISC_download_mbinary(info); ver = get_fw_version(info); info->fw_ic_ver = ver; if (ret == 0) { pr_err("[TSP] mms100_ISC_download_mbinary success"); info->cmd_state = 2; return; } else { pr_err("[TSP] mms100_ISC_download_mbinary fail[%d]", ret); info->cmd_state = 3; } } return; break; case UMS: old_fs = get_fs(); set_fs(get_ds()); snprintf(fw_path, MAX_FW_PATH, "/sdcard/%s", TSP_FW_FILENAME); fp = filp_open(fw_path, O_RDONLY, 0); if (IS_ERR(fp)) { dev_err(&client->dev, "file %s open error:%d\n", fw_path, (s32)fp); info->cmd_state = 3; goto err_open; } fsize = fp->f_path.dentry->d_inode->i_size; buff = kzalloc((size_t)fsize, GFP_KERNEL); if (!buff) { dev_err(&client->dev, "fail to alloc buffer for fw\n"); info->cmd_state = 3; goto err_alloc; } nread = vfs_read(fp, (char __user *)buff, fsize, &fp->f_pos); if (nread != fsize) { /*dev_err("fail to read file %s (nread = %d)\n", fw_path, nread);*/ info->cmd_state = 3; goto err_fw_size; } filp_close(fp, current->files); set_fs(old_fs); dev_info(&client->dev, "ums fw is loaded!!\n"); break; default: dev_err(&client->dev, "invalid fw file type!!\n"); goto not_support; } disable_irq(info->irq); while (retries--) { i2c_lock_adapter(adapter); info->pdata->mux_fw_flash(true); ret = fw_download(info, (const u8 *)buff, (const size_t)fsize); info->pdata->mux_fw_flash(false); i2c_unlock_adapter(adapter); if (ret < 0) { dev_err(&client->dev, "retrying flashing\n"); continue; } ver = get_fw_version(info); info->fw_ic_ver = ver; if (info->cmd_param[0] == 1 || info->cmd_param[0] == 2) { dev_info(&client->dev, "fw update done. ver = 0x%02x\n", ver); info->cmd_state = 2; snprintf(result, sizeof(result) , "%s", "OK"); set_cmd_result(info, result, strnlen(result, sizeof(result))); enable_irq(info->irq); kfree(buff); return; } else if (ver == fw_bin_ver) { dev_info(&client->dev, "fw update done. ver = 0x%02x\n", ver); info->cmd_state = 2; snprintf(result, sizeof(result) , "%s", "OK"); set_cmd_result(info, result, strnlen(result, sizeof(result))); enable_irq(info->irq); return; } else { dev_err(&client->dev, "ERROR : fw version is still wrong (0x%x != 0x%x)\n", ver, fw_bin_ver); } dev_err(&client->dev, "retrying flashing\n"); } if (fp != NULL) { err_fw_size: kfree(buff); err_alloc: filp_close(fp, NULL); err_open: set_fs(old_fs); } not_support: do_not_need_update: snprintf(result, sizeof(result) , "%s", "NG"); set_cmd_result(info, result, strnlen(result, sizeof(result))); return; } static void get_fw_ver_bin(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; int hw_rev; set_default_result(info); snprintf(buff, sizeof(buff), "%#02x", FW_VERSION_4_8); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void get_fw_ver_ic(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; int ver; set_default_result(info); ver = info->fw_ic_ver; snprintf(buff, sizeof(buff), "%#02x", ver); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void get_config_ver(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[20] = {0}; set_default_result(info); snprintf(buff, sizeof(buff), "%s", info->config_fw_version); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void get_threshold(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; int threshold; set_default_result(info); threshold = i2c_smbus_read_byte_data(info->client, 0x05); if (threshold < 0) { snprintf(buff, sizeof(buff), "%s", "NG"); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 3; return; } snprintf(buff, sizeof(buff), "%d", threshold); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } /* static void module_off_master(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[3] = {0}; mutex_lock(&info->lock); if (info->enabled) { disable_irq(info->irq); info->enabled = false; touch_is_pressed = 0; } mutex_unlock(&info->lock); info->pdata->power(0); if (info->pdata->is_vdd_on() == 0) snprintf(buff, sizeof(buff), "%s", "OK"); else snprintf(buff, sizeof(buff), "%s", "NG"); set_default_result(info); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); if (strncmp(buff, "OK", 2) == 0) info->cmd_state = 2; else info->cmd_state = 3; dev_info(&info->client->dev, "%s: %s\n", __func__, buff); } static void module_on_master(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[3] = {0}; mms_pwr_on_reset(info); mutex_lock(&info->lock); if (!info->enabled) { enable_irq(info->irq); info->enabled = true; } mutex_unlock(&info->lock); if (info->pdata->is_vdd_on() == 1) snprintf(buff, sizeof(buff), "%s", "OK"); else snprintf(buff, sizeof(buff), "%s", "NG"); set_default_result(info); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); if (strncmp(buff, "OK", 2) == 0) info->cmd_state = 2; else info->cmd_state = 3; dev_info(&info->client->dev, "%s: %s\n", __func__, buff); } static void module_off_slave(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; not_support_cmd(info); } static void module_on_slave(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; not_support_cmd(info); } */ static void get_chip_vendor(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; set_default_result(info); snprintf(buff, sizeof(buff), "%s", "MELFAS"); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void get_chip_name(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; set_default_result(info); snprintf(buff, sizeof(buff), "%s", "MMS144"); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void get_reference(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; unsigned int val; int node; set_default_result(info); node = check_rx_tx_num(info); if (node < 0) return; val = info->reference[node]; snprintf(buff, sizeof(buff), "%u", val); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void get_cm_abs(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; unsigned int val; int node; set_default_result(info); node = check_rx_tx_num(info); if (node < 0) return; val = info->raw[node]; snprintf(buff, sizeof(buff), "%u", val); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void get_cm_delta(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; unsigned int val; int node; set_default_result(info); node = check_rx_tx_num(info); if (node < 0) return; val = info->inspection[node]; snprintf(buff, sizeof(buff), "%u", val); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void get_intensity(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; unsigned int val; int node; set_default_result(info); node = check_rx_tx_num(info); if (node < 0) return; val = info->intensity[node]; snprintf(buff, sizeof(buff), "%u", val); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void get_x_num(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; int val; set_default_result(info); val = i2c_smbus_read_byte_data(info->client, 0xEF); if (val < 0) { snprintf(buff, sizeof(buff), "%s", "NG"); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 3; dev_info(&info->client->dev, "%s: fail to read num of x (%d).\n", __func__, val); return; } snprintf(buff, sizeof(buff), "%u", val); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void get_y_num(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; char buff[16] = {0}; int val; set_default_result(info); val = i2c_smbus_read_byte_data(info->client, 0xEE); if (val < 0) { snprintf(buff, sizeof(buff), "%s", "NG"); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 3; dev_info(&info->client->dev, "%s: fail to read num of y (%d).\n", __func__, val); return; } snprintf(buff, sizeof(buff), "%u", val); set_cmd_result(info, buff, strnlen(buff, sizeof(buff))); info->cmd_state = 2; dev_info(&info->client->dev, "%s: %s(%d)\n", __func__, buff, strnlen(buff, sizeof(buff))); } static void run_reference_read(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; set_default_result(info); get_raw_data_all(info, MMS_VSC_CMD_REFER); info->cmd_state = 2; /* dev_info(&info->client->dev, "%s: %s(%d)\n", __func__); */ } static void run_cm_abs_read(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; set_default_result(info); get_raw_data_all(info, MMS_VSC_CMD_CM_ABS); get_raw_data_all(info, MMS_VSC_CMD_EXIT); info->cmd_state = 2; /* dev_info(&info->client->dev, "%s: %s(%d)\n", __func__); */ } static void run_cm_delta_read(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; set_default_result(info); get_raw_data_all(info, MMS_VSC_CMD_CM_DELTA); get_raw_data_all(info, MMS_VSC_CMD_EXIT); info->cmd_state = 2; /* dev_info(&info->client->dev, "%s: %s(%d)\n", __func__); */ } static void run_intensity_read(void *device_data) { struct mms_ts_info *info = (struct mms_ts_info *)device_data; set_default_result(info); get_raw_data_all(info, MMS_VSC_CMD_INTENSITY); info->cmd_state = 2; /* dev_info(&info->client->dev, "%s: %s(%d)\n", __func__); */ } static ssize_t store_cmd(struct device *dev, struct device_attribute *devattr, const char *buf, size_t count) { struct mms_ts_info *info = dev_get_drvdata(dev); struct i2c_client *client = info->client; char *cur, *start, *end; char buff[TSP_CMD_STR_LEN] = {0}; int len, i; struct tsp_cmd *tsp_cmd_ptr = NULL; char delim = ','; bool cmd_found = false; int param_cnt = 0; int ret; if (info->cmd_is_running == true) { dev_err(&info->client->dev, "tsp_cmd: other cmd is running.\n"); goto err_out; } /* check lock */ mutex_lock(&info->cmd_lock); info->cmd_is_running = true; mutex_unlock(&info->cmd_lock); info->cmd_state = 1; for (i = 0; i < ARRAY_SIZE(info->cmd_param); i++) info->cmd_param[i] = 0; len = (int)count; if (*(buf + len - 1) == '\n') len--; memset(info->cmd, 0x00, ARRAY_SIZE(info->cmd)); memcpy(info->cmd, buf, len); cur = strchr(buf, (int)delim); if (cur) memcpy(buff, buf, cur - buf); else memcpy(buff, buf, len); /* find command */ list_for_each_entry(tsp_cmd_ptr, &info->cmd_list_head, list) { if (!strcmp(buff, tsp_cmd_ptr->cmd_name)) { cmd_found = true; break; } } /* set not_support_cmd */ if (!cmd_found) { list_for_each_entry(tsp_cmd_ptr, &info->cmd_list_head, list) { if (!strcmp("not_support_cmd", tsp_cmd_ptr->cmd_name)) break; } } /* parsing parameters */ if (cur && cmd_found) { cur++; start = cur; memset(buff, 0x00, ARRAY_SIZE(buff)); do { if (*cur == delim || cur - buf == len) { end = cur; memcpy(buff, start, end - start); *(buff + strlen(buff)) = '\0'; ret = kstrtoint(buff, 10,\ info->cmd_param + param_cnt); start = cur + 1; memset(buff, 0x00, ARRAY_SIZE(buff)); param_cnt++; } cur++; } while (cur - buf <= len); } dev_info(&client->dev, "cmd = %s\n", tsp_cmd_ptr->cmd_name); for (i = 0; i < param_cnt; i++) dev_info(&client->dev, "cmd param %d= %d\n", i, info->cmd_param[i]); tsp_cmd_ptr->cmd_func(info); err_out: return count; } static ssize_t show_cmd_status(struct device *dev, struct device_attribute *devattr, char *buf) { struct mms_ts_info *info = dev_get_drvdata(dev); char buff[16] = {0}; dev_info(&info->client->dev, "tsp cmd: status:%d\n", info->cmd_state); if (info->cmd_state == 0) snprintf(buff, sizeof(buff), "WAITING"); else if (info->cmd_state == 1) snprintf(buff, sizeof(buff), "RUNNING"); else if (info->cmd_state == 2) snprintf(buff, sizeof(buff), "OK"); else if (info->cmd_state == 3) snprintf(buff, sizeof(buff), "FAIL"); else if (info->cmd_state == 4) snprintf(buff, sizeof(buff), "NOT_APPLICABLE"); return snprintf(buf, TSP_BUF_SIZE, "%s\n", buff); } static ssize_t show_cmd_result(struct device *dev, struct device_attribute *devattr, char *buf) { struct mms_ts_info *info = dev_get_drvdata(dev); dev_info(&info->client->dev, "tsp cmd: result: %s\n", info->cmd_result); mutex_lock(&info->cmd_lock); info->cmd_is_running = false; mutex_unlock(&info->cmd_lock); info->cmd_state = 0; return snprintf(buf, TSP_BUF_SIZE, "%s\n", info->cmd_result); } #ifdef ESD_DEBUG static bool intensity_log_flag; static ssize_t show_intensity_logging_on(struct device *dev, struct device_attribute *devattr, char *buf) { struct mms_ts_info *info = dev_get_drvdata(dev); struct i2c_client *client = info->client; struct file *fp; char log_data[160] = { 0, }; char buff[16] = { 0, }; mm_segment_t old_fs; long nwrite; u32 val; int i, y, c; old_fs = get_fs(); set_fs(KERNEL_DS); #define MELFAS_DEBUG_LOG_PATH "/sdcard/melfas_log" dev_info(&client->dev, "%s: start.\n", __func__); fp = filp_open(MELFAS_DEBUG_LOG_PATH, O_RDWR | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO); if (IS_ERR(fp)) { dev_err(&client->dev, "%s: fail to open log file\n", __func__); goto open_err; } intensity_log_flag = 1; do { for (y = 0; y < 3; y++) { /* for tx chanel 0~2 */ memset(log_data, 0x00, 160); snprintf(buff, 16, "%1u: ", y); strncat(log_data, buff, strnlen(buff, 16)); for (i = 0; i < RX_NUM; i++) { val = get_raw_data_one(info, i, y, MMS_VSC_CMD_INTENSITY); snprintf(buff, 16, "%5u, ", val); strncat(log_data, buff, strnlen(buff, 16)); } memset(buff, '\n', 2); c = (y == 2) ? 2 : 1; strncat(log_data, buff, c); nwrite = vfs_write(fp, (const char __user *)log_data, strnlen(log_data, 160), &fp->f_pos); } usleep_range(5000); } while (intensity_log_flag); filp_close(fp, current->files); set_fs(old_fs); return 0; open_err: set_fs(old_fs); return FAIL; } static ssize_t show_intensity_logging_off(struct device *dev, struct device_attribute *devattr, char *buf) { struct mms_ts_info *info = dev_get_drvdata(dev); intensity_log_flag = 0; usleep_range(10000); get_raw_data_all(info, MMS_VSC_CMD_EXIT); return 0; } #endif static DEVICE_ATTR(close_tsp_test, S_IRUGO, show_close_tsp_test, NULL); static DEVICE_ATTR(cmd, S_IWUSR | S_IWGRP, NULL, store_cmd); static DEVICE_ATTR(cmd_status, S_IRUGO, show_cmd_status, NULL); static DEVICE_ATTR(cmd_result, S_IRUGO, show_cmd_result, NULL); #ifdef ESD_DEBUG static DEVICE_ATTR(intensity_logging_on, S_IRUGO, show_intensity_logging_on, NULL); static DEVICE_ATTR(intensity_logging_off, S_IRUGO, show_intensity_logging_off, NULL); #endif static struct attribute *sec_touch_facotry_attributes[] = { &dev_attr_close_tsp_test.attr, &dev_attr_cmd.attr, &dev_attr_cmd_status.attr, &dev_attr_cmd_result.attr, #ifdef ESD_DEBUG &dev_attr_intensity_logging_on.attr, &dev_attr_intensity_logging_off.attr, #endif NULL, }; static struct attribute_group sec_touch_factory_attr_group = { .attrs = sec_touch_facotry_attributes, }; #endif /* SEC_TSP_FACTORY_TEST */ static int __devinit mms_ts_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); struct mms_ts_info *info; struct input_dev *input_dev; int ret = 0; char buf[4] = { 0, }; #ifdef SEC_TSP_FACTORY_TEST int i; struct device *fac_dev_ts; #endif touch_is_pressed = 0; #if 0 gpio_request(GPIO_OLED_DET, "OLED_DET"); ret = gpio_get_value(GPIO_OLED_DET); printk(KERN_DEBUG "[TSP] OLED_DET = %d\n", ret); if (ret == 0) { printk(KERN_DEBUG "[TSP] device wasn't connected to board\n"); return -EIO; } #endif if (!i2c_check_functionality(adapter, I2C_FUNC_I2C)) return -EIO; info = kzalloc(sizeof(struct mms_ts_info), GFP_KERNEL); if (!info) { dev_err(&client->dev, "Failed to allocate memory\n"); ret = -ENOMEM; goto err_alloc; } input_dev = input_allocate_device(); if (!input_dev) { dev_err(&client->dev, "Failed to allocate memory for input device\n"); ret = -ENOMEM; goto err_input_alloc; } info->client = client; info->input_dev = input_dev; info->pdata = client->dev.platform_data; if (NULL == info->pdata) { pr_err("failed to get platform data\n"); goto err_reg_input_dev; } info->irq = -1; mutex_init(&info->lock); if (info->pdata) { info->max_x = info->pdata->max_x; info->max_y = info->pdata->max_y; info->invert_x = info->pdata->invert_x; info->invert_y = info->pdata->invert_y; info->config_fw_version = info->pdata->config_fw_version; info->register_cb = info->pdata->register_cb; } else { info->max_x = 720; info->max_y = 1280; } snprintf(info->phys, sizeof(info->phys), "%s/input0", dev_name(&client->dev)); input_dev->name = "sec_touchscreen"; /*= "Melfas MMSxxx Touchscreen";*/ input_dev->phys = info->phys; input_dev->id.bustype = BUS_I2C; input_dev->dev.parent = &client->dev; __set_bit(EV_ABS, input_dev->evbit); __set_bit(INPUT_PROP_DIRECT, input_dev->propbit); input_mt_init_slots(input_dev, MAX_FINGERS); input_set_abs_params(input_dev, ABS_MT_WIDTH_MAJOR, 0, MAX_WIDTH, 0, 0); input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, (info->max_x)-1, 0, 0); input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, (info->max_y)-1, 0, 0); input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, MAX_PRESSURE, 0, 0); input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0, MAX_PRESSURE, 0, 0); input_set_abs_params(input_dev, ABS_MT_ANGLE, MIN_ANGLE, MAX_ANGLE, 0, 0); input_set_abs_params(input_dev, ABS_MT_PALM, 0, 1, 0, 0); input_set_drvdata(input_dev, info); ret = input_register_device(input_dev); if (ret) { dev_err(&client->dev, "failed to register input dev (%d)\n", ret); goto err_reg_input_dev; } #if TOUCH_BOOSTER mutex_init(&info->dvfs_lock); INIT_DELAYED_WORK(&info->work_dvfs_off, set_dvfs_off); INIT_DELAYED_WORK(&info->work_dvfs_chg, change_dvfs_lock); bus_dev = dev_get("exynos-busfreq"); info->cpufreq_level = -1; info->dvfs_lock_status = false; #endif i2c_set_clientdata(client, info); info->pdata->power(true); msleep(100); ret = i2c_master_recv(client, buf, 1); if (ret < 0) { /* tsp connect check */ pr_err("%s: i2c fail...tsp driver unload [%d], Add[%d]\n", __func__, ret, info->client->addr); goto err_config; } ret = mms_ts_fw_load(info); /* ret = mms_ts_fw_info(info); */ if (ret) { dev_err(&client->dev, "failed to initialize (%d)\n", ret); goto err_config; } info->enabled = true; info->callbacks.inform_charger = melfas_ta_cb; if (info->register_cb) info->register_cb(&info->callbacks); #ifdef CONFIG_HAS_EARLYSUSPEND info->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 1; info->early_suspend.suspend = mms_ts_early_suspend; info->early_suspend.resume = mms_ts_late_resume; register_early_suspend(&info->early_suspend); #endif sec_touchscreen = device_create(sec_class, NULL, 0, info, "sec_touchscreen"); if (IS_ERR(sec_touchscreen)) { dev_err(&client->dev, "Failed to create device for the sysfs1\n"); ret = -ENODEV; } #ifdef SEC_TSP_FACTORY_TEST INIT_LIST_HEAD(&info->cmd_list_head); for (i = 0; i < ARRAY_SIZE(tsp_cmds); i++) list_add_tail(&tsp_cmds[i].list, &info->cmd_list_head); mutex_init(&info->cmd_lock); info->cmd_is_running = false; fac_dev_ts = device_create(sec_class, NULL, 0, info, "tsp"); if (IS_ERR(fac_dev_ts)) dev_err(&client->dev, "Failed to create device for the sysfs\n"); ret = sysfs_create_group(&fac_dev_ts->kobj, &sec_touch_factory_attr_group); if (ret) dev_err(&client->dev, "Failed to create sysfs group\n"); #endif return 0; err_config: input_unregister_device(input_dev); err_reg_input_dev: input_free_device(input_dev); err_input_alloc: input_dev = NULL; kfree(info); err_alloc: return ret; } static int __devexit mms_ts_remove(struct i2c_client *client) { struct mms_ts_info *info = i2c_get_clientdata(client); unregister_early_suspend(&info->early_suspend); if (info->irq >= 0) free_irq(info->irq, info); input_unregister_device(info->input_dev); kfree(info); return 0; } #if defined(CONFIG_PM) || defined(CONFIG_HAS_EARLYSUSPEND) static int mms_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct mms_ts_info *info = i2c_get_clientdata(client); if (!info->enabled) return 0; dev_notice(&info->client->dev, "%s: users=%d\n", __func__, info->input_dev->users); disable_irq(info->irq); info->enabled = false; touch_is_pressed = 0; release_all_fingers(info); info->pdata->power(false); /* This delay needs to prevent unstable POR by rapid frequently pressing of PWR key. */ msleep(50); return 0; } static int mms_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct mms_ts_info *info = i2c_get_clientdata(client); int ret = 0; if (info->enabled) return 0; dev_notice(&info->client->dev, "%s: users=%d\n", __func__, info->input_dev->users); info->pdata->power(true); msleep(120); if (info->ta_status) { dev_notice(&client->dev, "TA connect!!!\n"); i2c_smbus_write_byte_data(info->client, 0x33, 0x1); } else { dev_notice(&client->dev, "TA disconnect!!!\n"); i2c_smbus_write_byte_data(info->client, 0x33, 0x2); } /* Because irq_type by EXT_INTxCON register is changed to low_level * after wakeup, irq_type set to falling edge interrupt again. */ enable_irq(info->irq); info->enabled = true; mms_set_noise_mode(info); return 0; } #endif #ifdef CONFIG_HAS_EARLYSUSPEND static void mms_ts_early_suspend(struct early_suspend *h) { struct mms_ts_info *info; info = container_of(h, struct mms_ts_info, early_suspend); mms_ts_suspend(&info->client->dev); } static void mms_ts_late_resume(struct early_suspend *h) { struct mms_ts_info *info; info = container_of(h, struct mms_ts_info, early_suspend); mms_ts_resume(&info->client->dev); } #endif #if defined(CONFIG_PM) && !defined(CONFIG_HAS_EARLYSUSPEND) static const struct dev_pm_ops mms_ts_pm_ops = { .suspend = mms_ts_suspend, .resume = mms_ts_resume, #ifdef CONFIG_HIBERNATION .freeze = mms_ts_suspend, .thaw = mms_ts_resume, .restore = mms_ts_resume, #endif }; #endif static const struct i2c_device_id mms_ts_id[] = { {MELFAS_TS_NAME, 0}, {} }; MODULE_DEVICE_TABLE(i2c, mms_ts_id); static struct i2c_driver mms_ts_driver = { .probe = mms_ts_probe, .remove = __devexit_p(mms_ts_remove), .driver = { .name = MELFAS_TS_NAME, #if defined(CONFIG_PM) && !defined(CONFIG_HAS_EARLYSUSPEND) .pm = &mms_ts_pm_ops, #endif }, .id_table = mms_ts_id, }; static int __init mms_ts_init(void) { return i2c_add_driver(&mms_ts_driver); } static void __exit mms_ts_exit(void) { i2c_del_driver(&mms_ts_driver); } module_init(mms_ts_init); module_exit(mms_ts_exit); /* Module information */ MODULE_DESCRIPTION("Touchscreen driver for Melfas MMS-series controllers"); MODULE_LICENSE("GPL");
kunato/s3-u6
drivers/input/touchscreen/mms_ts.c
C
gpl-2.0
78,817
23.424233
80
0.629813
false
<html lang="en"> <head> <title>Expressions - Using as</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Using as"> <meta name="generator" content="makeinfo 4.8"> <link title="Top" rel="start" href="index.html#Top"> <link rel="prev" href="Symbols.html#Symbols" title="Symbols"> <link rel="next" href="Pseudo-Ops.html#Pseudo-Ops" title="Pseudo Ops"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- This file documents the GNU Assembler "as". Copyright (C) 1991-2018 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <p> <a name="Expressions"></a> Next:&nbsp;<a rel="next" accesskey="n" href="Pseudo-Ops.html#Pseudo-Ops">Pseudo Ops</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="Symbols.html#Symbols">Symbols</a>, Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a> <hr> </div> <h2 class="chapter">6 Expressions</h2> <p><a name="index-expressions-243"></a><a name="index-addresses-244"></a><a name="index-numeric-values-245"></a>An <dfn>expression</dfn> specifies an address or numeric value. Whitespace may precede and/or follow an expression. <p>The result of an expression must be an absolute number, or else an offset into a particular section. If an expression is not absolute, and there is not enough information when <samp><span class="command">as</span></samp> sees the expression to know its section, a second pass over the source program might be necessary to interpret the expression&mdash;but the second pass is currently not implemented. <samp><span class="command">as</span></samp> aborts with an error message in this situation. <ul class="menu"> <li><a accesskey="1" href="Empty-Exprs.html#Empty-Exprs">Empty Exprs</a>: Empty Expressions <li><a accesskey="2" href="Integer-Exprs.html#Integer-Exprs">Integer Exprs</a>: Integer Expressions </ul> </body></html>
jocelynmass/nrf51
toolchain/arm_cm0/share/doc/gcc-arm-none-eabi/html/as.html/Expressions.html
HTML
gpl-2.0
2,889
43.446154
176
0.720318
false
#userIcon.hear { -fx-image: url(../img/eye.png); } #userIcon.me { -fx-image: url(../img/eye.png); -fx-opacity: 0.1; } #userIcon.me:hover { -fx-image: url(../img/eye.png); -fx-opacity: 0.3; } #userIcon.master { -fx-image: url(../img/crown.png); } #userItem { -fx-background-color: #E4F6F9; -fx-background-radius: 10; } Label { -fx-text-fill: #8EBDC4; }
bdh92123/share_all
src/main/resources/css/userCell.css
CSS
gpl-2.0
364
13.6
34
0.612637
false
#!/bin/sh # Copyright (C) 2012 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2. # # 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 . lib/inittest test -e LOCAL_LVMETAD || skip aux prepare_devs 2 pvcreate --metadatatype 1 "$dev1" should vgscan --cache pvs | should grep "$dev1" vgcreate --metadatatype 1 $vg1 "$dev1" should vgscan --cache vgs | should grep $vg1 pvs | should grep "$dev1" # check for RHBZ 1080189 -- SEGV in lvremove/vgremove pvcreate -ff -y --metadatatype 1 "$dev1" "$dev2" vgcreate --metadatatype 1 $vg1 "$dev1" "$dev2" lvcreate -l1 $vg1 pvremove -ff -y "$dev2" vgchange -an $vg1 not lvremove $vg1 not vgremove -ff -y $vg1
twitter/bittern
lvm2/test/shell/lvmetad-lvm1.sh
Shell
gpl-2.0
972
30.354839
73
0.725309
false
/* $Id$ */ /* Copyright (C) 2003 - 2013 by David White <dave@whitevine.net> Part of the Battle for Wesnoth Project http://www.wesnoth.org/ 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. See the COPYING file for more details. */ #ifndef VIDEO_HPP_INCLUDED #define VIDEO_HPP_INCLUDED #include "events.hpp" #include "exceptions.hpp" #include "lua_jailbreak_exception.hpp" #include <boost/utility.hpp> struct surface; //possible flags when setting video modes #define FULL_SCREEN SDL_FULLSCREEN surface display_format_alpha(surface surf); surface get_video_surface(); SDL_Rect screen_area(); bool non_interactive(); //which areas of the screen will be updated when the buffer is flipped? void update_rect(size_t x, size_t y, size_t w, size_t h); void update_rect(const SDL_Rect& rect); void update_whole_screen(); class CVideo : private boost::noncopyable { public: enum FAKE_TYPES { NO_FAKE, FAKE, FAKE_TEST }; CVideo(FAKE_TYPES type = NO_FAKE); ~CVideo(); int bppForMode( int x, int y, int flags); int modePossible( int x, int y, int bits_per_pixel, int flags, bool current_screen_optimal=false); int setMode( int x, int y, int bits_per_pixel, int flags ); //did the mode change, since the last call to the modeChanged() method? bool modeChanged(); //functions to get the dimensions of the current video-mode int getx() const; int gety() const; //blits a surface with black as alpha void blit_surface(int x, int y, surface surf, SDL_Rect* srcrect=NULL, SDL_Rect* clip_rect=NULL); void flip(); surface& getSurface(); bool isFullScreen() const; struct error : public game::error { error() : game::error("Video initialization failed") {} }; class quit : public tlua_jailbreak_exception { public: quit() : tlua_jailbreak_exception() { } private: IMPLEMENT_LUA_JAILBREAK_EXCEPTION(quit) }; //functions to allow changing video modes when 16BPP is emulated void setBpp( int bpp ); int getBpp(); void make_fake(); /** * Creates a fake frame buffer for the unit tests. * * @param width The width of the buffer. * @param height The height of the buffer. * @param bpp The bpp of the buffer. */ void make_test_fake(const unsigned width = 1024, const unsigned height = 768, const unsigned bpp = 32); bool faked() const { return fake_screen_; } //functions to set and clear 'help strings'. A 'help string' is like a tooltip, but it appears //at the bottom of the screen, so as to not be intrusive. Setting a help string sets what //is currently displayed there. int set_help_string(const std::string& str); void clear_help_string(int handle); void clear_all_help_strings(); //function to stop the screen being redrawn. Anything that happens while //the update is locked will be hidden from the user's view. //note that this function is re-entrant, meaning that if lock_updates(true) //is called twice, lock_updates(false) must be called twice to unlock //updates. void lock_updates(bool value); bool update_locked() const; private: void initSDL(); bool mode_changed_; int bpp_; // Store real bits per pixel //if there is no display at all, but we 'fake' it for clients bool fake_screen_; //variables for help strings int help_string_; int updatesLocked_; }; //an object which will lock the display for the duration of its lifetime. struct update_locker { update_locker(CVideo& v, bool lock=true) : video(v), unlock(lock) { if(lock) { video.lock_updates(true); } } ~update_locker() { unlock_update(); } void unlock_update() { if(unlock) { video.lock_updates(false); unlock = false; } } private: CVideo& video; bool unlock; }; class resize_monitor : public events::pump_monitor { void process(events::pump_info &info); }; //an object which prevents resizing of the screen occurring during //its lifetime. struct resize_lock { resize_lock(); ~resize_lock(); }; #endif
battle-for-wesnoth/svn
src/video.hpp
C++
gpl-2.0
4,277
23.44
99
0.698854
false
/* * Fast Userspace Mutexes (which I call "Futexes!"). * (C) Rusty Russell, IBM 2002 * * Generalized futexes, futex requeueing, misc fixes by Ingo Molnar * (C) Copyright 2003 Red Hat Inc, All Rights Reserved * * Removed page pinning, fix privately mapped COW pages and other cleanups * (C) Copyright 2003, 2004 Jamie Lokier * * Robust futex support started by Ingo Molnar * (C) Copyright 2006 Red Hat Inc, All Rights Reserved * Thanks to Thomas Gleixner for suggestions, analysis and fixes. * * PI-futex support started by Ingo Molnar and Thomas Gleixner * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> * Copyright (C) 2006 Timesys Corp., Thomas Gleixner <tglx@timesys.com> * * PRIVATE futexes by Eric Dumazet * Copyright (C) 2007 Eric Dumazet <dada1@cosmosbay.com> * * Requeue-PI support by Darren Hart <dvhltc@us.ibm.com> * Copyright (C) IBM Corporation, 2009 * Thanks to Thomas Gleixner for conceptual design and careful reviews. * * Thanks to Ben LaHaise for yelling "hashed waitqueues" loudly * enough at me, Linus for the original (flawed) idea, Matthew * Kirkwood for proof-of-concept implementation. * * "The futexes are also cursed." * "But they come in a choice of three flavours!" * * 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 */ #include <linux/slab.h> #include <linux/poll.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/jhash.h> #include <linux/init.h> #include <linux/futex.h> #include <linux/mount.h> #include <linux/pagemap.h> #include <linux/syscalls.h> #include <linux/signal.h> #include <linux/export.h> #include <linux/magic.h> #include <linux/pid.h> #include <linux/nsproxy.h> #include <linux/ptrace.h> #include <linux/sched/rt.h> #include <linux/freezer.h> #include <linux/hugetlb.h> #include <asm/futex.h> #include "rtmutex_common.h" #ifndef CONFIG_HAVE_FUTEX_CMPXCHG int __read_mostly futex_cmpxchg_enabled; #endif #define FUTEX_HASHBITS (CONFIG_BASE_SMALL ? 4 : 8) /* * Futex flags used to encode options to functions and preserve them across * restarts. */ #define FLAGS_SHARED 0x01 #define FLAGS_CLOCKRT 0x02 #define FLAGS_HAS_TIMEOUT 0x04 /* * Priority Inheritance state: */ struct futex_pi_state { /* * list of 'owned' pi_state instances - these have to be * cleaned up in do_exit() if the task exits prematurely: */ struct list_head list; /* * The PI object: */ struct rt_mutex pi_mutex; struct task_struct *owner; atomic_t refcount; union futex_key key; }; /** * struct futex_q - The hashed futex queue entry, one per waiting task * @list: priority-sorted list of tasks waiting on this futex * @task: the task waiting on the futex * @lock_ptr: the hash bucket lock * @key: the key the futex is hashed on * @pi_state: optional priority inheritance state * @rt_waiter: rt_waiter storage for use with requeue_pi * @requeue_pi_key: the requeue_pi target futex key * @bitset: bitset for the optional bitmasked wakeup * * We use this hashed waitqueue, instead of a normal wait_queue_t, so * we can wake only the relevant ones (hashed queues may be shared). * * A futex_q has a woken state, just like tasks have TASK_RUNNING. * It is considered woken when plist_node_empty(&q->list) || q->lock_ptr == 0. * The order of wakeup is always to make the first condition true, then * the second. * * PI futexes are typically woken before they are removed from the hash list via * the rt_mutex code. See unqueue_me_pi(). */ struct futex_q { struct plist_node list; struct task_struct *task; spinlock_t *lock_ptr; union futex_key key; struct futex_pi_state *pi_state; struct rt_mutex_waiter *rt_waiter; union futex_key *requeue_pi_key; u32 bitset; }; static const struct futex_q futex_q_init = { /* list gets initialized in queue_me()*/ .key = FUTEX_KEY_INIT, .bitset = FUTEX_BITSET_MATCH_ANY }; /* * Hash buckets are shared by all the futex_keys that hash to the same * location. Each key may have multiple futex_q structures, one for each task * waiting on a futex. */ struct futex_hash_bucket { spinlock_t lock; struct plist_head chain; }; static struct futex_hash_bucket futex_queues[1<<FUTEX_HASHBITS]; /* * We hash on the keys returned from get_futex_key (see below). */ static struct futex_hash_bucket *hash_futex(union futex_key *key) { u32 hash = jhash2((u32*)&key->both.word, (sizeof(key->both.word)+sizeof(key->both.ptr))/4, key->both.offset); return &futex_queues[hash & ((1 << FUTEX_HASHBITS)-1)]; } /* * Return 1 if two futex_keys are equal, 0 otherwise. */ static inline int match_futex(union futex_key *key1, union futex_key *key2) { return (key1 && key2 && key1->both.word == key2->both.word && key1->both.ptr == key2->both.ptr && key1->both.offset == key2->both.offset); } /* * Take a reference to the resource addressed by a key. * Can be called while holding spinlocks. * */ static void get_futex_key_refs(union futex_key *key) { if (!key->both.ptr) return; switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) { case FUT_OFF_INODE: ihold(key->shared.inode); break; case FUT_OFF_MMSHARED: atomic_inc(&key->private.mm->mm_count); break; } } /* * Drop a reference to the resource addressed by a key. * The hash bucket spinlock must not be held. */ static void drop_futex_key_refs(union futex_key *key) { if (!key->both.ptr) { /* If we're here then we tried to put a key we failed to get */ WARN_ON_ONCE(1); return; } switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) { case FUT_OFF_INODE: iput(key->shared.inode); break; case FUT_OFF_MMSHARED: mmdrop(key->private.mm); break; } } /** * get_futex_key() - Get parameters which are the keys for a futex * @uaddr: virtual address of the futex * @fshared: 0 for a PROCESS_PRIVATE futex, 1 for PROCESS_SHARED * @key: address where result is stored. * @rw: mapping needs to be read/write (values: VERIFY_READ, * VERIFY_WRITE) * * Return: a negative error code or 0 * * The key words are stored in *key on success. * * For shared mappings, it's (page->index, file_inode(vma->vm_file), * offset_within_page). For private mappings, it's (uaddr, current->mm). * We can usually work out the index without swapping in the page. * * lock_page() might sleep, the caller should not hold a spinlock. */ static int get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw) { unsigned long address = (unsigned long)uaddr; struct mm_struct *mm = current->mm; struct page *page, *page_head; int err, ro = 0; /* * The futex address must be "naturally" aligned. */ key->both.offset = address % PAGE_SIZE; if (unlikely((address % sizeof(u32)) != 0)) return -EINVAL; address -= key->both.offset; /* * PROCESS_PRIVATE futexes are fast. * As the mm cannot disappear under us and the 'key' only needs * virtual address, we dont even have to find the underlying vma. * Note : We do have to check 'uaddr' is a valid user address, * but access_ok() should be faster than find_vma() */ if (!fshared) { if (unlikely(!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))) return -EFAULT; key->private.mm = mm; key->private.address = address; get_futex_key_refs(key); return 0; } again: err = get_user_pages_fast(address, 1, 1, &page); /* * If write access is not required (eg. FUTEX_WAIT), try * and get read-only access. */ if (err == -EFAULT && rw == VERIFY_READ) { err = get_user_pages_fast(address, 1, 0, &page); ro = 1; } if (err < 0) return err; else err = 0; #ifdef CONFIG_TRANSPARENT_HUGEPAGE page_head = page; if (unlikely(PageTail(page))) { put_page(page); /* serialize against __split_huge_page_splitting() */ local_irq_disable(); if (likely(__get_user_pages_fast(address, 1, !ro, &page) == 1)) { page_head = compound_head(page); /* * page_head is valid pointer but we must pin * it before taking the PG_lock and/or * PG_compound_lock. The moment we re-enable * irqs __split_huge_page_splitting() can * return and the head page can be freed from * under us. We can't take the PG_lock and/or * PG_compound_lock on a page that could be * freed from under us. */ if (page != page_head) { get_page(page_head); put_page(page); } local_irq_enable(); } else { local_irq_enable(); goto again; } } #else page_head = compound_head(page); if (page != page_head) { get_page(page_head); put_page(page); } #endif lock_page(page_head); /* * If page_head->mapping is NULL, then it cannot be a PageAnon * page; but it might be the ZERO_PAGE or in the gate area or * in a special mapping (all cases which we are happy to fail); * or it may have been a good file page when get_user_pages_fast * found it, but truncated or holepunched or subjected to * invalidate_complete_page2 before we got the page lock (also * cases which we are happy to fail). And we hold a reference, * so refcount care in invalidate_complete_page's remove_mapping * prevents drop_caches from setting mapping to NULL beneath us. * * The case we do have to guard against is when memory pressure made * shmem_writepage move it from filecache to swapcache beneath us: * an unlikely race, but we do need to retry for page_head->mapping. */ if (!page_head->mapping) { int shmem_swizzled = PageSwapCache(page_head); unlock_page(page_head); put_page(page_head); if (shmem_swizzled) goto again; return -EFAULT; } /* * Private mappings are handled in a simple way. * * NOTE: When userspace waits on a MAP_SHARED mapping, even if * it's a read-only handle, it's expected that futexes attach to * the object not the particular process. */ if (PageAnon(page_head)) { /* * A RO anonymous page will never change and thus doesn't make * sense for futex operations. */ if (ro) { err = -EFAULT; goto out; } key->both.offset |= FUT_OFF_MMSHARED; /* ref taken on mm */ key->private.mm = mm; key->private.address = address; } else { key->both.offset |= FUT_OFF_INODE; /* inode-based key */ key->shared.inode = page_head->mapping->host; key->shared.pgoff = basepage_index(page); } get_futex_key_refs(key); out: unlock_page(page_head); put_page(page_head); return err; } static inline void put_futex_key(union futex_key *key) { drop_futex_key_refs(key); } /** * fault_in_user_writeable() - Fault in user address and verify RW access * @uaddr: pointer to faulting user space address * * Slow path to fixup the fault we just took in the atomic write * access to @uaddr. * * We have no generic implementation of a non-destructive write to the * user address. We know that we faulted in the atomic pagefault * disabled section so we can as well avoid the #PF overhead by * calling get_user_pages() right away. */ static int fault_in_user_writeable(u32 __user *uaddr) { struct mm_struct *mm = current->mm; int ret; down_read(&mm->mmap_sem); ret = fixup_user_fault(current, mm, (unsigned long)uaddr, FAULT_FLAG_WRITE); up_read(&mm->mmap_sem); return ret < 0 ? ret : 0; } /** * futex_top_waiter() - Return the highest priority waiter on a futex * @hb: the hash bucket the futex_q's reside in * @key: the futex key (to distinguish it from other futex futex_q's) * * Must be called with the hb lock held. */ static struct futex_q *futex_top_waiter(struct futex_hash_bucket *hb, union futex_key *key) { struct futex_q *this; plist_for_each_entry(this, &hb->chain, list) { if (match_futex(&this->key, key)) return this; } return NULL; } static int cmpxchg_futex_value_locked(u32 *curval, u32 __user *uaddr, u32 uval, u32 newval) { int ret; pagefault_disable(); ret = futex_atomic_cmpxchg_inatomic(curval, uaddr, uval, newval); pagefault_enable(); return ret; } static int get_futex_value_locked(u32 *dest, u32 __user *from) { int ret; pagefault_disable(); ret = __copy_from_user_inatomic(dest, from, sizeof(u32)); pagefault_enable(); return ret ? -EFAULT : 0; } /* * PI code: */ static int refill_pi_state_cache(void) { struct futex_pi_state *pi_state; if (likely(current->pi_state_cache)) return 0; pi_state = kzalloc(sizeof(*pi_state), GFP_KERNEL); if (!pi_state) return -ENOMEM; INIT_LIST_HEAD(&pi_state->list); /* pi_mutex gets initialized later */ pi_state->owner = NULL; atomic_set(&pi_state->refcount, 1); pi_state->key = FUTEX_KEY_INIT; current->pi_state_cache = pi_state; return 0; } static struct futex_pi_state * alloc_pi_state(void) { struct futex_pi_state *pi_state = current->pi_state_cache; WARN_ON(!pi_state); current->pi_state_cache = NULL; return pi_state; } static void free_pi_state(struct futex_pi_state *pi_state) { if (!atomic_dec_and_test(&pi_state->refcount)) return; /* * If pi_state->owner is NULL, the owner is most probably dying * and has cleaned up the pi_state already */ if (pi_state->owner) { raw_spin_lock_irq(&pi_state->owner->pi_lock); list_del_init(&pi_state->list); raw_spin_unlock_irq(&pi_state->owner->pi_lock); rt_mutex_proxy_unlock(&pi_state->pi_mutex, pi_state->owner); } if (current->pi_state_cache) kfree(pi_state); else { /* * pi_state->list is already empty. * clear pi_state->owner. * refcount is at 0 - put it back to 1. */ pi_state->owner = NULL; atomic_set(&pi_state->refcount, 1); current->pi_state_cache = pi_state; } } /* * Look up the task based on what TID userspace gave us. * We dont trust it. */ static struct task_struct * futex_find_get_task(pid_t pid) { struct task_struct *p; rcu_read_lock(); p = find_task_by_vpid(pid); if (p) get_task_struct(p); rcu_read_unlock(); return p; } /* * This task is holding PI mutexes at exit time => bad. * Kernel cleans up PI-state, but userspace is likely hosed. * (Robust-futex cleanup is separate and might save the day for userspace.) */ void exit_pi_state_list(struct task_struct *curr) { struct list_head *next, *head = &curr->pi_state_list; struct futex_pi_state *pi_state; struct futex_hash_bucket *hb; union futex_key key = FUTEX_KEY_INIT; if (!futex_cmpxchg_enabled) return; /* * We are a ZOMBIE and nobody can enqueue itself on * pi_state_list anymore, but we have to be careful * versus waiters unqueueing themselves: */ raw_spin_lock_irq(&curr->pi_lock); while (!list_empty(head)) { next = head->next; pi_state = list_entry(next, struct futex_pi_state, list); key = pi_state->key; hb = hash_futex(&key); raw_spin_unlock_irq(&curr->pi_lock); spin_lock(&hb->lock); raw_spin_lock_irq(&curr->pi_lock); /* * We dropped the pi-lock, so re-check whether this * task still owns the PI-state: */ if (head->next != next) { spin_unlock(&hb->lock); continue; } WARN_ON(pi_state->owner != curr); WARN_ON(list_empty(&pi_state->list)); list_del_init(&pi_state->list); pi_state->owner = NULL; raw_spin_unlock_irq(&curr->pi_lock); rt_mutex_unlock(&pi_state->pi_mutex); spin_unlock(&hb->lock); raw_spin_lock_irq(&curr->pi_lock); } raw_spin_unlock_irq(&curr->pi_lock); } /* * We need to check the following states: * * Waiter | pi_state | pi->owner | uTID | uODIED | ? * * [1] NULL | --- | --- | 0 | 0/1 | Valid * [2] NULL | --- | --- | >0 | 0/1 | Valid * * [3] Found | NULL | -- | Any | 0/1 | Invalid * * [4] Found | Found | NULL | 0 | 1 | Valid * [5] Found | Found | NULL | >0 | 1 | Invalid * * [6] Found | Found | task | 0 | 1 | Valid * * [7] Found | Found | NULL | Any | 0 | Invalid * * [8] Found | Found | task | ==taskTID | 0/1 | Valid * [9] Found | Found | task | 0 | 0 | Invalid * [10] Found | Found | task | !=taskTID | 0/1 | Invalid * * [1] Indicates that the kernel can acquire the futex atomically. We * came came here due to a stale FUTEX_WAITERS/FUTEX_OWNER_DIED bit. * * [2] Valid, if TID does not belong to a kernel thread. If no matching * thread is found then it indicates that the owner TID has died. * * [3] Invalid. The waiter is queued on a non PI futex * * [4] Valid state after exit_robust_list(), which sets the user space * value to FUTEX_WAITERS | FUTEX_OWNER_DIED. * * [5] The user space value got manipulated between exit_robust_list() * and exit_pi_state_list() * * [6] Valid state after exit_pi_state_list() which sets the new owner in * the pi_state but cannot access the user space value. * * [7] pi_state->owner can only be NULL when the OWNER_DIED bit is set. * * [8] Owner and user space value match * * [9] There is no transient state which sets the user space TID to 0 * except exit_robust_list(), but this is indicated by the * FUTEX_OWNER_DIED bit. See [4] * * [10] There is no transient state which leaves owner and user space * TID out of sync. */ static int lookup_pi_state(u32 uval, struct futex_hash_bucket *hb, union futex_key *key, struct futex_pi_state **ps) { struct futex_pi_state *pi_state = NULL; struct futex_q *this, *next; struct plist_head *head; struct task_struct *p; pid_t pid = uval & FUTEX_TID_MASK; head = &hb->chain; plist_for_each_entry_safe(this, next, head, list) { if (match_futex(&this->key, key)) { /* * Sanity check the waiter before increasing * the refcount and attaching to it. */ pi_state = this->pi_state; /* * Userspace might have messed up non-PI and * PI futexes [3] */ if (unlikely(!pi_state)) return -EINVAL; WARN_ON(!atomic_read(&pi_state->refcount)); /* * Handle the owner died case: */ if (uval & FUTEX_OWNER_DIED) { /* * exit_pi_state_list sets owner to NULL and * wakes the topmost waiter. The task which * acquires the pi_state->rt_mutex will fixup * owner. */ if (!pi_state->owner) { /* * No pi state owner, but the user * space TID is not 0. Inconsistent * state. [5] */ if (pid) return -EINVAL; /* * Take a ref on the state and * return. [4] */ goto out_state; } /* * If TID is 0, then either the dying owner * has not yet executed exit_pi_state_list() * or some waiter acquired the rtmutex in the * pi state, but did not yet fixup the TID in * user space. * * Take a ref on the state and return. [6] */ if (!pid) goto out_state; } else { /* * If the owner died bit is not set, * then the pi_state must have an * owner. [7] */ if (!pi_state->owner) return -EINVAL; } /* * Bail out if user space manipulated the * futex value. If pi state exists then the * owner TID must be the same as the user * space TID. [9/10] */ if (pid != task_pid_vnr(pi_state->owner)) return -EINVAL; out_state: atomic_inc(&pi_state->refcount); *ps = pi_state; return 0; } } /* * We are the first waiter - try to look up the real owner and attach * the new pi_state to it, but bail out when TID = 0 [1] */ if (!pid) return -ESRCH; p = futex_find_get_task(pid); if (!p) return -ESRCH; if (!p->mm) { put_task_struct(p); return -EPERM; } /* * We need to look at the task state flags to figure out, * whether the task is exiting. To protect against the do_exit * change of the task flags, we do this protected by * p->pi_lock: */ raw_spin_lock_irq(&p->pi_lock); if (unlikely(p->flags & PF_EXITING)) { /* * The task is on the way out. When PF_EXITPIDONE is * set, we know that the task has finished the * cleanup: */ int ret = (p->flags & PF_EXITPIDONE) ? -ESRCH : -EAGAIN; raw_spin_unlock_irq(&p->pi_lock); put_task_struct(p); return ret; } /* * No existing pi state. First waiter. [2] */ pi_state = alloc_pi_state(); /* * Initialize the pi_mutex in locked state and make 'p' * the owner of it: */ rt_mutex_init_proxy_locked(&pi_state->pi_mutex, p); /* Store the key for possible exit cleanups: */ pi_state->key = *key; WARN_ON(!list_empty(&pi_state->list)); list_add(&pi_state->list, &p->pi_state_list); pi_state->owner = p; raw_spin_unlock_irq(&p->pi_lock); put_task_struct(p); *ps = pi_state; return 0; } /** * futex_lock_pi_atomic() - Atomic work required to acquire a pi aware futex * @uaddr: the pi futex user address * @hb: the pi futex hash bucket * @key: the futex key associated with uaddr and hb * @ps: the pi_state pointer where we store the result of the * lookup * @task: the task to perform the atomic lock work for. This will * be "current" except in the case of requeue pi. * @set_waiters: force setting the FUTEX_WAITERS bit (1) or not (0) * * Return: * 0 - ready to wait; * 1 - acquired the lock; * <0 - error * * The hb->lock and futex_key refs shall be held by the caller. */ static int futex_lock_pi_atomic(u32 __user *uaddr, struct futex_hash_bucket *hb, union futex_key *key, struct futex_pi_state **ps, struct task_struct *task, int set_waiters) { int lock_taken, ret, force_take = 0; u32 uval, newval, curval, vpid = task_pid_vnr(task); retry: ret = lock_taken = 0; /* * To avoid races, we attempt to take the lock here again * (by doing a 0 -> TID atomic cmpxchg), while holding all * the locks. It will most likely not succeed. */ newval = vpid; if (set_waiters) newval |= FUTEX_WAITERS; if (unlikely(cmpxchg_futex_value_locked(&curval, uaddr, 0, newval))) return -EFAULT; /* * Detect deadlocks. */ if ((unlikely((curval & FUTEX_TID_MASK) == vpid))) return -EDEADLK; /* * Surprise - we got the lock, but we do not trust user space at all. */ if (unlikely(!curval)) { /* * We verify whether there is kernel state for this * futex. If not, we can safely assume, that the 0 -> * TID transition is correct. If state exists, we do * not bother to fixup the user space state as it was * corrupted already. */ return futex_top_waiter(hb, key) ? -EINVAL : 1; } uval = curval; /* * Set the FUTEX_WAITERS flag, so the owner will know it has someone * to wake at the next unlock. */ newval = curval | FUTEX_WAITERS; /* * Should we force take the futex? See below. */ if (unlikely(force_take)) { /* * Keep the OWNER_DIED and the WAITERS bit and set the * new TID value. */ newval = (curval & ~FUTEX_TID_MASK) | vpid; force_take = 0; lock_taken = 1; } if (unlikely(cmpxchg_futex_value_locked(&curval, uaddr, uval, newval))) return -EFAULT; if (unlikely(curval != uval)) goto retry; /* * We took the lock due to forced take over. */ if (unlikely(lock_taken)) return 1; /* * We dont have the lock. Look up the PI state (or create it if * we are the first waiter): */ ret = lookup_pi_state(uval, hb, key, ps); if (unlikely(ret)) { switch (ret) { case -ESRCH: /* * We failed to find an owner for this * futex. So we have no pi_state to block * on. This can happen in two cases: * * 1) The owner died * 2) A stale FUTEX_WAITERS bit * * Re-read the futex value. */ if (get_futex_value_locked(&curval, uaddr)) return -EFAULT; /* * If the owner died or we have a stale * WAITERS bit the owner TID in the user space * futex is 0. */ if (!(curval & FUTEX_TID_MASK)) { force_take = 1; goto retry; } default: break; } } return ret; } /** * __unqueue_futex() - Remove the futex_q from its futex_hash_bucket * @q: The futex_q to unqueue * * The q->lock_ptr must not be NULL and must be held by the caller. */ static void __unqueue_futex(struct futex_q *q) { struct futex_hash_bucket *hb; if (WARN_ON_SMP(!q->lock_ptr || !spin_is_locked(q->lock_ptr)) || WARN_ON(plist_node_empty(&q->list))) return; hb = container_of(q->lock_ptr, struct futex_hash_bucket, lock); plist_del(&q->list, &hb->chain); } /* * The hash bucket lock must be held when this is called. * Afterwards, the futex_q must not be accessed. */ static void wake_futex(struct futex_q *q) { struct task_struct *p = q->task; if (WARN(q->pi_state || q->rt_waiter, "refusing to wake PI futex\n")) return; /* * We set q->lock_ptr = NULL _before_ we wake up the task. If * a non-futex wake up happens on another CPU then the task * might exit and p would dereference a non-existing task * struct. Prevent this by holding a reference on p across the * wake up. */ get_task_struct(p); __unqueue_futex(q); /* * The waiting task can free the futex_q as soon as * q->lock_ptr = NULL is written, without taking any locks. A * memory barrier is required here to prevent the following * store to lock_ptr from getting ahead of the plist_del. */ smp_wmb(); q->lock_ptr = NULL; wake_up_state(p, TASK_NORMAL); put_task_struct(p); } static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this) { struct task_struct *new_owner; struct futex_pi_state *pi_state = this->pi_state; u32 uninitialized_var(curval), newval; int ret = 0; if (!pi_state) return -EINVAL; /* * If current does not own the pi_state then the futex is * inconsistent and user space fiddled with the futex value. */ if (pi_state->owner != current) return -EINVAL; raw_spin_lock(&pi_state->pi_mutex.wait_lock); new_owner = rt_mutex_next_owner(&pi_state->pi_mutex); /* * It is possible that the next waiter (the one that brought * this owner to the kernel) timed out and is no longer * waiting on the lock. */ if (!new_owner) new_owner = this->task; /* * We pass it to the next owner. The WAITERS bit is always * kept enabled while there is PI state around. We cleanup the * owner died bit, because we are the owner. */ newval = FUTEX_WAITERS | task_pid_vnr(new_owner); if (cmpxchg_futex_value_locked(&curval, uaddr, uval, newval)) ret = -EFAULT; else if (curval != uval) ret = -EINVAL; if (ret) { raw_spin_unlock(&pi_state->pi_mutex.wait_lock); return ret; } raw_spin_lock_irq(&pi_state->owner->pi_lock); WARN_ON(list_empty(&pi_state->list)); list_del_init(&pi_state->list); raw_spin_unlock_irq(&pi_state->owner->pi_lock); raw_spin_lock_irq(&new_owner->pi_lock); WARN_ON(!list_empty(&pi_state->list)); list_add(&pi_state->list, &new_owner->pi_state_list); pi_state->owner = new_owner; raw_spin_unlock_irq(&new_owner->pi_lock); raw_spin_unlock(&pi_state->pi_mutex.wait_lock); rt_mutex_unlock(&pi_state->pi_mutex); return 0; } static int unlock_futex_pi(u32 __user *uaddr, u32 uval) { u32 uninitialized_var(oldval); /* * There is no waiter, so we unlock the futex. The owner died * bit has not to be preserved here. We are the owner: */ if (cmpxchg_futex_value_locked(&oldval, uaddr, uval, 0)) return -EFAULT; if (oldval != uval) return -EAGAIN; return 0; } /* * Express the locking dependencies for lockdep: */ static inline void double_lock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2) { if (hb1 <= hb2) { spin_lock(&hb1->lock); if (hb1 < hb2) spin_lock_nested(&hb2->lock, SINGLE_DEPTH_NESTING); } else { /* hb1 > hb2 */ spin_lock(&hb2->lock); spin_lock_nested(&hb1->lock, SINGLE_DEPTH_NESTING); } } static inline void double_unlock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2) { spin_unlock(&hb1->lock); if (hb1 != hb2) spin_unlock(&hb2->lock); } /* * Wake up waiters matching bitset queued on this futex (uaddr). */ static int futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) { struct futex_hash_bucket *hb; struct futex_q *this, *next; struct plist_head *head; union futex_key key = FUTEX_KEY_INIT; int ret; if (!bitset) return -EINVAL; ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &key, VERIFY_READ); if (unlikely(ret != 0)) goto out; hb = hash_futex(&key); spin_lock(&hb->lock); head = &hb->chain; plist_for_each_entry_safe(this, next, head, list) { if (match_futex (&this->key, &key)) { if (this->pi_state || this->rt_waiter) { ret = -EINVAL; break; } /* Check if one of the bits is set in both bitsets */ if (!(this->bitset & bitset)) continue; wake_futex(this); if (++ret >= nr_wake) break; } } spin_unlock(&hb->lock); put_futex_key(&key); out: return ret; } /* * Wake up all waiters hashed on the physical page that is mapped * to this virtual address: */ static int futex_wake_op(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2, int nr_wake, int nr_wake2, int op) { union futex_key key1 = FUTEX_KEY_INIT, key2 = FUTEX_KEY_INIT; struct futex_hash_bucket *hb1, *hb2; struct plist_head *head; struct futex_q *this, *next; int ret, op_ret; retry: ret = get_futex_key(uaddr1, flags & FLAGS_SHARED, &key1, VERIFY_READ); if (unlikely(ret != 0)) goto out; ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, VERIFY_WRITE); if (unlikely(ret != 0)) goto out_put_key1; hb1 = hash_futex(&key1); hb2 = hash_futex(&key2); retry_private: double_lock_hb(hb1, hb2); op_ret = futex_atomic_op_inuser(op, uaddr2); if (unlikely(op_ret < 0)) { double_unlock_hb(hb1, hb2); #ifndef CONFIG_MMU /* * we don't get EFAULT from MMU faults if we don't have an MMU, * but we might get them from range checking */ ret = op_ret; goto out_put_keys; #endif if (unlikely(op_ret != -EFAULT)) { ret = op_ret; goto out_put_keys; } ret = fault_in_user_writeable(uaddr2); if (ret) goto out_put_keys; if (!(flags & FLAGS_SHARED)) goto retry_private; put_futex_key(&key2); put_futex_key(&key1); goto retry; } head = &hb1->chain; plist_for_each_entry_safe(this, next, head, list) { if (match_futex (&this->key, &key1)) { if (this->pi_state || this->rt_waiter) { ret = -EINVAL; goto out_unlock; } wake_futex(this); if (++ret >= nr_wake) break; } } if (op_ret > 0) { head = &hb2->chain; op_ret = 0; plist_for_each_entry_safe(this, next, head, list) { if (match_futex (&this->key, &key2)) { if (this->pi_state || this->rt_waiter) { ret = -EINVAL; goto out_unlock; } wake_futex(this); if (++op_ret >= nr_wake2) break; } } ret += op_ret; } out_unlock: double_unlock_hb(hb1, hb2); out_put_keys: put_futex_key(&key2); out_put_key1: put_futex_key(&key1); out: return ret; } /** * requeue_futex() - Requeue a futex_q from one hb to another * @q: the futex_q to requeue * @hb1: the source hash_bucket * @hb2: the target hash_bucket * @key2: the new key for the requeued futex_q */ static inline void requeue_futex(struct futex_q *q, struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2, union futex_key *key2) { /* * If key1 and key2 hash to the same bucket, no need to * requeue. */ if (likely(&hb1->chain != &hb2->chain)) { plist_del(&q->list, &hb1->chain); plist_add(&q->list, &hb2->chain); q->lock_ptr = &hb2->lock; } get_futex_key_refs(key2); q->key = *key2; } /** * requeue_pi_wake_futex() - Wake a task that acquired the lock during requeue * @q: the futex_q * @key: the key of the requeue target futex * @hb: the hash_bucket of the requeue target futex * * During futex_requeue, with requeue_pi=1, it is possible to acquire the * target futex if it is uncontended or via a lock steal. Set the futex_q key * to the requeue target futex so the waiter can detect the wakeup on the right * futex, but remove it from the hb and NULL the rt_waiter so it can detect * atomic lock acquisition. Set the q->lock_ptr to the requeue target hb->lock * to protect access to the pi_state to fixup the owner later. Must be called * with both q->lock_ptr and hb->lock held. */ static inline void requeue_pi_wake_futex(struct futex_q *q, union futex_key *key, struct futex_hash_bucket *hb) { get_futex_key_refs(key); q->key = *key; __unqueue_futex(q); WARN_ON(!q->rt_waiter); q->rt_waiter = NULL; q->lock_ptr = &hb->lock; wake_up_state(q->task, TASK_NORMAL); } /** * futex_proxy_trylock_atomic() - Attempt an atomic lock for the top waiter * @pifutex: the user address of the to futex * @hb1: the from futex hash bucket, must be locked by the caller * @hb2: the to futex hash bucket, must be locked by the caller * @key1: the from futex key * @key2: the to futex key * @ps: address to store the pi_state pointer * @set_waiters: force setting the FUTEX_WAITERS bit (1) or not (0) * * Try and get the lock on behalf of the top waiter if we can do it atomically. * Wake the top waiter if we succeed. If the caller specified set_waiters, * then direct futex_lock_pi_atomic() to force setting the FUTEX_WAITERS bit. * hb1 and hb2 must be held by the caller. * * Return: * 0 - failed to acquire the lock atomically; * >0 - acquired the lock, return value is vpid of the top_waiter * <0 - error */ static int futex_proxy_trylock_atomic(u32 __user *pifutex, struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2, union futex_key *key1, union futex_key *key2, struct futex_pi_state **ps, int set_waiters) { struct futex_q *top_waiter = NULL; u32 curval; int ret, vpid; if (get_futex_value_locked(&curval, pifutex)) return -EFAULT; /* * Find the top_waiter and determine if there are additional waiters. * If the caller intends to requeue more than 1 waiter to pifutex, * force futex_lock_pi_atomic() to set the FUTEX_WAITERS bit now, * as we have means to handle the possible fault. If not, don't set * the bit unecessarily as it will force the subsequent unlock to enter * the kernel. */ top_waiter = futex_top_waiter(hb1, key1); /* There are no waiters, nothing for us to do. */ if (!top_waiter) return 0; /* Ensure we requeue to the expected futex. */ if (!match_futex(top_waiter->requeue_pi_key, key2)) return -EINVAL; /* * Try to take the lock for top_waiter. Set the FUTEX_WAITERS bit in * the contended case or if set_waiters is 1. The pi_state is returned * in ps in contended cases. */ vpid = task_pid_vnr(top_waiter->task); ret = futex_lock_pi_atomic(pifutex, hb2, key2, ps, top_waiter->task, set_waiters); if (ret == 1) { requeue_pi_wake_futex(top_waiter, key2, hb2); return vpid; } return ret; } /** * futex_requeue() - Requeue waiters from uaddr1 to uaddr2 * @uaddr1: source futex user address * @flags: futex flags (FLAGS_SHARED, etc.) * @uaddr2: target futex user address * @nr_wake: number of waiters to wake (must be 1 for requeue_pi) * @nr_requeue: number of waiters to requeue (0-INT_MAX) * @cmpval: @uaddr1 expected value (or %NULL) * @requeue_pi: if we are attempting to requeue from a non-pi futex to a * pi futex (pi to pi requeue is not supported) * * Requeue waiters on uaddr1 to uaddr2. In the requeue_pi case, try to acquire * uaddr2 atomically on behalf of the top waiter. * * Return: * >=0 - on success, the number of tasks requeued or woken; * <0 - on error */ static int futex_requeue(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { union futex_key key1 = FUTEX_KEY_INIT, key2 = FUTEX_KEY_INIT; int drop_count = 0, task_count = 0, ret; struct futex_pi_state *pi_state = NULL; struct futex_hash_bucket *hb1, *hb2; struct plist_head *head1; struct futex_q *this, *next; u32 curval2; if (requeue_pi) { /* * Requeue PI only works on two distinct uaddrs. This * check is only valid for private futexes. See below. */ if (uaddr1 == uaddr2) return -EINVAL; /* * requeue_pi requires a pi_state, try to allocate it now * without any locks in case it fails. */ if (refill_pi_state_cache()) return -ENOMEM; /* * requeue_pi must wake as many tasks as it can, up to nr_wake * + nr_requeue, since it acquires the rt_mutex prior to * returning to userspace, so as to not leave the rt_mutex with * waiters and no owner. However, second and third wake-ups * cannot be predicted as they involve race conditions with the * first wake and a fault while looking up the pi_state. Both * pthread_cond_signal() and pthread_cond_broadcast() should * use nr_wake=1. */ if (nr_wake != 1) return -EINVAL; } retry: if (pi_state != NULL) { /* * We will have to lookup the pi_state again, so free this one * to keep the accounting correct. */ free_pi_state(pi_state); pi_state = NULL; } ret = get_futex_key(uaddr1, flags & FLAGS_SHARED, &key1, VERIFY_READ); if (unlikely(ret != 0)) goto out; ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, requeue_pi ? VERIFY_WRITE : VERIFY_READ); if (unlikely(ret != 0)) goto out_put_key1; /* * The check above which compares uaddrs is not sufficient for * shared futexes. We need to compare the keys: */ if (requeue_pi && match_futex(&key1, &key2)) { ret = -EINVAL; goto out_put_keys; } /* * The check above which compares uaddrs is not sufficient for * shared futexes. We need to compare the keys: */ if (requeue_pi && match_futex(&key1, &key2)) { ret = -EINVAL; goto out_put_keys; } hb1 = hash_futex(&key1); hb2 = hash_futex(&key2); retry_private: double_lock_hb(hb1, hb2); if (likely(cmpval != NULL)) { u32 curval; ret = get_futex_value_locked(&curval, uaddr1); if (unlikely(ret)) { double_unlock_hb(hb1, hb2); ret = get_user(curval, uaddr1); if (ret) goto out_put_keys; if (!(flags & FLAGS_SHARED)) goto retry_private; put_futex_key(&key2); put_futex_key(&key1); goto retry; } if (curval != *cmpval) { ret = -EAGAIN; goto out_unlock; } } if (requeue_pi && (task_count - nr_wake < nr_requeue)) { /* * Attempt to acquire uaddr2 and wake the top waiter. If we * intend to requeue waiters, force setting the FUTEX_WAITERS * bit. We force this here where we are able to easily handle * faults rather in the requeue loop below. */ ret = futex_proxy_trylock_atomic(uaddr2, hb1, hb2, &key1, &key2, &pi_state, nr_requeue); /* * At this point the top_waiter has either taken uaddr2 or is * waiting on it. If the former, then the pi_state will not * exist yet, look it up one more time to ensure we have a * reference to it. If the lock was taken, ret contains the * vpid of the top waiter task. */ if (ret > 0) { WARN_ON(pi_state); drop_count++; task_count++; /* * If we acquired the lock, then the user * space value of uaddr2 should be vpid. It * cannot be changed by the top waiter as it * is blocked on hb2 lock if it tries to do * so. If something fiddled with it behind our * back the pi state lookup might unearth * it. So we rather use the known value than * rereading and handing potential crap to * lookup_pi_state. */ ret = lookup_pi_state(ret, hb2, &key2, &pi_state); } switch (ret) { case 0: break; case -EFAULT: double_unlock_hb(hb1, hb2); put_futex_key(&key2); put_futex_key(&key1); ret = fault_in_user_writeable(uaddr2); if (!ret) goto retry; goto out; case -EAGAIN: /* The owner was exiting, try again. */ double_unlock_hb(hb1, hb2); put_futex_key(&key2); put_futex_key(&key1); cond_resched(); goto retry; default: goto out_unlock; } } head1 = &hb1->chain; plist_for_each_entry_safe(this, next, head1, list) { if (task_count - nr_wake >= nr_requeue) break; if (!match_futex(&this->key, &key1)) continue; /* * FUTEX_WAIT_REQEUE_PI and FUTEX_CMP_REQUEUE_PI should always * be paired with each other and no other futex ops. * * We should never be requeueing a futex_q with a pi_state, * which is awaiting a futex_unlock_pi(). */ if ((requeue_pi && !this->rt_waiter) || (!requeue_pi && this->rt_waiter) || this->pi_state) { ret = -EINVAL; break; } /* * Wake nr_wake waiters. For requeue_pi, if we acquired the * lock, we already woke the top_waiter. If not, it will be * woken by futex_unlock_pi(). */ if (++task_count <= nr_wake && !requeue_pi) { wake_futex(this); continue; } /* Ensure we requeue to the expected futex for requeue_pi. */ if (requeue_pi && !match_futex(this->requeue_pi_key, &key2)) { ret = -EINVAL; break; } /* * Requeue nr_requeue waiters and possibly one more in the case * of requeue_pi if we couldn't acquire the lock atomically. */ if (requeue_pi) { /* Prepare the waiter to take the rt_mutex. */ atomic_inc(&pi_state->refcount); this->pi_state = pi_state; ret = rt_mutex_start_proxy_lock(&pi_state->pi_mutex, this->rt_waiter, this->task, 1); if (ret == 1) { /* We got the lock. */ requeue_pi_wake_futex(this, &key2, hb2); drop_count++; continue; } else if (ret) { /* -EDEADLK */ this->pi_state = NULL; free_pi_state(pi_state); goto out_unlock; } } requeue_futex(this, hb1, hb2, &key2); drop_count++; } out_unlock: double_unlock_hb(hb1, hb2); /* * drop_futex_key_refs() must be called outside the spinlocks. During * the requeue we moved futex_q's from the hash bucket at key1 to the * one at key2 and updated their key pointer. We no longer need to * hold the references to key1. */ while (--drop_count >= 0) drop_futex_key_refs(&key1); out_put_keys: put_futex_key(&key2); out_put_key1: put_futex_key(&key1); out: if (pi_state != NULL) free_pi_state(pi_state); return ret ? ret : task_count; } /* The key must be already stored in q->key. */ static inline struct futex_hash_bucket *queue_lock(struct futex_q *q) __acquires(&hb->lock) { struct futex_hash_bucket *hb; hb = hash_futex(&q->key); q->lock_ptr = &hb->lock; spin_lock(&hb->lock); return hb; } static inline void queue_unlock(struct futex_q *q, struct futex_hash_bucket *hb) __releases(&hb->lock) { spin_unlock(&hb->lock); } /** * queue_me() - Enqueue the futex_q on the futex_hash_bucket * @q: The futex_q to enqueue * @hb: The destination hash bucket * * The hb->lock must be held by the caller, and is released here. A call to * queue_me() is typically paired with exactly one call to unqueue_me(). The * exceptions involve the PI related operations, which may use unqueue_me_pi() * or nothing if the unqueue is done as part of the wake process and the unqueue * state is implicit in the state of woken task (see futex_wait_requeue_pi() for * an example). */ static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb) __releases(&hb->lock) { int prio; /* * The priority used to register this element is * - either the real thread-priority for the real-time threads * (i.e. threads with a priority lower than MAX_RT_PRIO) * - or MAX_RT_PRIO for non-RT threads. * Thus, all RT-threads are woken first in priority order, and * the others are woken last, in FIFO order. */ prio = min(current->normal_prio, MAX_RT_PRIO); plist_node_init(&q->list, prio); plist_add(&q->list, &hb->chain); q->task = current; spin_unlock(&hb->lock); } /** * unqueue_me() - Remove the futex_q from its futex_hash_bucket * @q: The futex_q to unqueue * * The q->lock_ptr must not be held by the caller. A call to unqueue_me() must * be paired with exactly one earlier call to queue_me(). * * Return: * 1 - if the futex_q was still queued (and we removed unqueued it); * 0 - if the futex_q was already removed by the waking thread */ static int unqueue_me(struct futex_q *q) { spinlock_t *lock_ptr; int ret = 0; /* In the common case we don't take the spinlock, which is nice. */ retry: lock_ptr = q->lock_ptr; barrier(); if (lock_ptr != NULL) { spin_lock(lock_ptr); /* * q->lock_ptr can change between reading it and * spin_lock(), causing us to take the wrong lock. This * corrects the race condition. * * Reasoning goes like this: if we have the wrong lock, * q->lock_ptr must have changed (maybe several times) * between reading it and the spin_lock(). It can * change again after the spin_lock() but only if it was * already changed before the spin_lock(). It cannot, * however, change back to the original value. Therefore * we can detect whether we acquired the correct lock. */ if (unlikely(lock_ptr != q->lock_ptr)) { spin_unlock(lock_ptr); goto retry; } __unqueue_futex(q); BUG_ON(q->pi_state); spin_unlock(lock_ptr); ret = 1; } drop_futex_key_refs(&q->key); return ret; } /* * PI futexes can not be requeued and must remove themself from the * hash bucket. The hash bucket lock (i.e. lock_ptr) is held on entry * and dropped here. */ static void unqueue_me_pi(struct futex_q *q) __releases(q->lock_ptr) { __unqueue_futex(q); BUG_ON(!q->pi_state); free_pi_state(q->pi_state); q->pi_state = NULL; spin_unlock(q->lock_ptr); } /* * Fixup the pi_state owner with the new owner. * * Must be called with hash bucket lock held and mm->sem held for non * private futexes. */ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, struct task_struct *newowner) { u32 newtid = task_pid_vnr(newowner) | FUTEX_WAITERS; struct futex_pi_state *pi_state = q->pi_state; struct task_struct *oldowner = pi_state->owner; u32 uval, uninitialized_var(curval), newval; int ret; /* Owner died? */ if (!pi_state->owner) newtid |= FUTEX_OWNER_DIED; /* * We are here either because we stole the rtmutex from the * previous highest priority waiter or we are the highest priority * waiter but failed to get the rtmutex the first time. * We have to replace the newowner TID in the user space variable. * This must be atomic as we have to preserve the owner died bit here. * * Note: We write the user space value _before_ changing the pi_state * because we can fault here. Imagine swapped out pages or a fork * that marked all the anonymous memory readonly for cow. * * Modifying pi_state _before_ the user space value would * leave the pi_state in an inconsistent state when we fault * here, because we need to drop the hash bucket lock to * handle the fault. This might be observed in the PID check * in lookup_pi_state. */ retry: if (get_futex_value_locked(&uval, uaddr)) goto handle_fault; while (1) { newval = (uval & FUTEX_OWNER_DIED) | newtid; if (cmpxchg_futex_value_locked(&curval, uaddr, uval, newval)) goto handle_fault; if (curval == uval) break; uval = curval; } /* * We fixed up user space. Now we need to fix the pi_state * itself. */ if (pi_state->owner != NULL) { raw_spin_lock_irq(&pi_state->owner->pi_lock); WARN_ON(list_empty(&pi_state->list)); list_del_init(&pi_state->list); raw_spin_unlock_irq(&pi_state->owner->pi_lock); } pi_state->owner = newowner; raw_spin_lock_irq(&newowner->pi_lock); WARN_ON(!list_empty(&pi_state->list)); list_add(&pi_state->list, &newowner->pi_state_list); raw_spin_unlock_irq(&newowner->pi_lock); return 0; /* * To handle the page fault we need to drop the hash bucket * lock here. That gives the other task (either the highest priority * waiter itself or the task which stole the rtmutex) the * chance to try the fixup of the pi_state. So once we are * back from handling the fault we need to check the pi_state * after reacquiring the hash bucket lock and before trying to * do another fixup. When the fixup has been done already we * simply return. */ handle_fault: spin_unlock(q->lock_ptr); ret = fault_in_user_writeable(uaddr); spin_lock(q->lock_ptr); /* * Check if someone else fixed it for us: */ if (pi_state->owner != oldowner) return 0; if (ret) return ret; goto retry; } static long futex_wait_restart(struct restart_block *restart); /** * fixup_owner() - Post lock pi_state and corner case management * @uaddr: user address of the futex * @q: futex_q (contains pi_state and access to the rt_mutex) * @locked: if the attempt to take the rt_mutex succeeded (1) or not (0) * * After attempting to lock an rt_mutex, this function is called to cleanup * the pi_state owner as well as handle race conditions that may allow us to * acquire the lock. Must be called with the hb lock held. * * Return: * 1 - success, lock taken; * 0 - success, lock not taken; * <0 - on error (-EFAULT) */ static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked) { struct task_struct *owner; int ret = 0; if (locked) { /* * Got the lock. We might not be the anticipated owner if we * did a lock-steal - fix up the PI-state in that case: */ if (q->pi_state->owner != current) ret = fixup_pi_state_owner(uaddr, q, current); goto out; } /* * Catch the rare case, where the lock was released when we were on the * way back before we locked the hash bucket. */ if (q->pi_state->owner == current) { /* * Try to get the rt_mutex now. This might fail as some other * task acquired the rt_mutex after we removed ourself from the * rt_mutex waiters list. */ if (rt_mutex_trylock(&q->pi_state->pi_mutex)) { locked = 1; goto out; } /* * pi_state is incorrect, some other task did a lock steal and * we returned due to timeout or signal without taking the * rt_mutex. Too late. */ raw_spin_lock(&q->pi_state->pi_mutex.wait_lock); owner = rt_mutex_owner(&q->pi_state->pi_mutex); if (!owner) owner = rt_mutex_next_owner(&q->pi_state->pi_mutex); raw_spin_unlock(&q->pi_state->pi_mutex.wait_lock); ret = fixup_pi_state_owner(uaddr, q, owner); goto out; } /* * Paranoia check. If we did not take the lock, then we should not be * the owner of the rt_mutex. */ if (rt_mutex_owner(&q->pi_state->pi_mutex) == current) printk(KERN_ERR "fixup_owner: ret = %d pi-mutex: %p " "pi-state %p\n", ret, q->pi_state->pi_mutex.owner, q->pi_state->owner); out: return ret ? ret : locked; } /** * futex_wait_queue_me() - queue_me() and wait for wakeup, timeout, or signal * @hb: the futex hash bucket, must be locked by the caller * @q: the futex_q to queue up on * @timeout: the prepared hrtimer_sleeper, or null for no timeout */ static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, struct hrtimer_sleeper *timeout) { /* * The task state is guaranteed to be set before another task can * wake it. set_current_state() is implemented using set_mb() and * queue_me() calls spin_unlock() upon completion, both serializing * access to the hash list and forcing another memory barrier. */ set_current_state(TASK_INTERRUPTIBLE); queue_me(q, hb); /* Arm the timer */ if (timeout) { hrtimer_start_expires(&timeout->timer, HRTIMER_MODE_ABS); if (!hrtimer_active(&timeout->timer)) timeout->task = NULL; } /* * If we have been removed from the hash list, then another task * has tried to wake us, and we can skip the call to schedule(). */ if (likely(!plist_node_empty(&q->list))) { /* * If the timer has already expired, current will already be * flagged for rescheduling. Only call schedule if there * is no timeout, or if it has yet to expire. */ if (!timeout || timeout->task) freezable_schedule(); } __set_current_state(TASK_RUNNING); } /** * futex_wait_setup() - Prepare to wait on a futex * @uaddr: the futex userspace address * @val: the expected value * @flags: futex flags (FLAGS_SHARED, etc.) * @q: the associated futex_q * @hb: storage for hash_bucket pointer to be returned to caller * * Setup the futex_q and locate the hash_bucket. Get the futex value and * compare it with the expected value. Handle atomic faults internally. * Return with the hb lock held and a q.key reference on success, and unlocked * with no q.key reference on failure. * * Return: * 0 - uaddr contains val and hb has been locked; * <1 - -EFAULT or -EWOULDBLOCK (uaddr does not contain val) and hb is unlocked */ static int futex_wait_setup(u32 __user *uaddr, u32 val, unsigned int flags, struct futex_q *q, struct futex_hash_bucket **hb) { u32 uval; int ret; /* * Access the page AFTER the hash-bucket is locked. * Order is important: * * Userspace waiter: val = var; if (cond(val)) futex_wait(&var, val); * Userspace waker: if (cond(var)) { var = new; futex_wake(&var); } * * The basic logical guarantee of a futex is that it blocks ONLY * if cond(var) is known to be true at the time of blocking, for * any cond. If we locked the hash-bucket after testing *uaddr, that * would open a race condition where we could block indefinitely with * cond(var) false, which would violate the guarantee. * * On the other hand, we insert q and release the hash-bucket only * after testing *uaddr. This guarantees that futex_wait() will NOT * absorb a wakeup if *uaddr does not match the desired values * while the syscall executes. */ retry: ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &q->key, VERIFY_READ); if (unlikely(ret != 0)) return ret; retry_private: *hb = queue_lock(q); ret = get_futex_value_locked(&uval, uaddr); if (ret) { queue_unlock(q, *hb); ret = get_user(uval, uaddr); if (ret) goto out; if (!(flags & FLAGS_SHARED)) goto retry_private; put_futex_key(&q->key); goto retry; } if (uval != val) { queue_unlock(q, *hb); ret = -EWOULDBLOCK; } out: if (ret) put_futex_key(&q->key); return ret; } static int futex_wait(u32 __user *uaddr, unsigned int flags, u32 val, ktime_t *abs_time, u32 bitset) { struct hrtimer_sleeper timeout, *to = NULL; struct restart_block *restart; struct futex_hash_bucket *hb; struct futex_q q = futex_q_init; int ret; if (!bitset) return -EINVAL; q.bitset = bitset; if (abs_time) { to = &timeout; hrtimer_init_on_stack(&to->timer, (flags & FLAGS_CLOCKRT) ? CLOCK_REALTIME : CLOCK_MONOTONIC, HRTIMER_MODE_ABS); hrtimer_init_sleeper(to, current); hrtimer_set_expires_range_ns(&to->timer, *abs_time, current->timer_slack_ns); } retry: /* * Prepare to wait on uaddr. On success, holds hb lock and increments * q.key refs. */ ret = futex_wait_setup(uaddr, val, flags, &q, &hb); if (ret) goto out; /* queue_me and wait for wakeup, timeout, or a signal. */ futex_wait_queue_me(hb, &q, to); /* If we were woken (and unqueued), we succeeded, whatever. */ ret = 0; /* unqueue_me() drops q.key ref */ if (!unqueue_me(&q)) goto out; ret = -ETIMEDOUT; if (to && !to->task) goto out; /* * We expect signal_pending(current), but we might be the * victim of a spurious wakeup as well. */ if (!signal_pending(current)) goto retry; ret = -ERESTARTSYS; if (!abs_time) goto out; restart = &current_thread_info()->restart_block; restart->fn = futex_wait_restart; restart->futex.uaddr = uaddr; restart->futex.val = val; restart->futex.time = abs_time->tv64; restart->futex.bitset = bitset; restart->futex.flags = flags | FLAGS_HAS_TIMEOUT; ret = -ERESTART_RESTARTBLOCK; out: if (to) { hrtimer_cancel(&to->timer); destroy_hrtimer_on_stack(&to->timer); } return ret; } static long futex_wait_restart(struct restart_block *restart) { u32 __user *uaddr = restart->futex.uaddr; ktime_t t, *tp = NULL; if (restart->futex.flags & FLAGS_HAS_TIMEOUT) { t.tv64 = restart->futex.time; tp = &t; } restart->fn = do_no_restart_syscall; return (long)futex_wait(uaddr, restart->futex.flags, restart->futex.val, tp, restart->futex.bitset); } /* * Userspace tried a 0 -> TID atomic transition of the futex value * and failed. The kernel side here does the whole locking operation: * if there are waiters then it will block, it does PI, etc. (Due to * races the kernel might see a 0 value of the futex too.) */ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags, int detect, ktime_t *time, int trylock) { struct hrtimer_sleeper timeout, *to = NULL; struct futex_hash_bucket *hb; struct futex_q q = futex_q_init; int res, ret; if (refill_pi_state_cache()) return -ENOMEM; if (time) { to = &timeout; hrtimer_init_on_stack(&to->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); hrtimer_init_sleeper(to, current); hrtimer_set_expires(&to->timer, *time); } retry: ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &q.key, VERIFY_WRITE); if (unlikely(ret != 0)) goto out; retry_private: hb = queue_lock(&q); ret = futex_lock_pi_atomic(uaddr, hb, &q.key, &q.pi_state, current, 0); if (unlikely(ret)) { switch (ret) { case 1: /* We got the lock. */ ret = 0; goto out_unlock_put_key; case -EFAULT: goto uaddr_faulted; case -EAGAIN: /* * Task is exiting and we just wait for the * exit to complete. */ queue_unlock(&q, hb); put_futex_key(&q.key); cond_resched(); goto retry; default: goto out_unlock_put_key; } } /* * Only actually queue now that the atomic ops are done: */ queue_me(&q, hb); WARN_ON(!q.pi_state); /* * Block on the PI mutex: */ if (!trylock) ret = rt_mutex_timed_lock(&q.pi_state->pi_mutex, to, 1); else { ret = rt_mutex_trylock(&q.pi_state->pi_mutex); /* Fixup the trylock return value: */ ret = ret ? 0 : -EWOULDBLOCK; } spin_lock(q.lock_ptr); /* * Fixup the pi_state owner and possibly acquire the lock if we * haven't already. */ res = fixup_owner(uaddr, &q, !ret); /* * If fixup_owner() returned an error, proprogate that. If it acquired * the lock, clear our -ETIMEDOUT or -EINTR. */ if (res) ret = (res < 0) ? res : 0; /* * If fixup_owner() faulted and was unable to handle the fault, unlock * it and return the fault to userspace. */ if (ret && (rt_mutex_owner(&q.pi_state->pi_mutex) == current)) rt_mutex_unlock(&q.pi_state->pi_mutex); /* Unqueue and drop the lock */ unqueue_me_pi(&q); goto out_put_key; out_unlock_put_key: queue_unlock(&q, hb); out_put_key: put_futex_key(&q.key); out: if (to) destroy_hrtimer_on_stack(&to->timer); return ret != -EINTR ? ret : -ERESTARTNOINTR; uaddr_faulted: queue_unlock(&q, hb); ret = fault_in_user_writeable(uaddr); if (ret) goto out_put_key; if (!(flags & FLAGS_SHARED)) goto retry_private; put_futex_key(&q.key); goto retry; } /* * Userspace attempted a TID -> 0 atomic transition, and failed. * This is the in-kernel slowpath: we look up the PI state (if any), * and do the rt-mutex unlock. */ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) { struct futex_hash_bucket *hb; struct futex_q *this, *next; struct plist_head *head; union futex_key key = FUTEX_KEY_INIT; u32 uval, vpid = task_pid_vnr(current); int ret; retry: if (get_user(uval, uaddr)) return -EFAULT; /* * We release only a lock we actually own: */ if ((uval & FUTEX_TID_MASK) != vpid) return -EPERM; ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &key, VERIFY_WRITE); if (unlikely(ret != 0)) goto out; hb = hash_futex(&key); spin_lock(&hb->lock); /* * To avoid races, try to do the TID -> 0 atomic transition * again. If it succeeds then we can return without waking * anyone else up. We only try this if neither the waiters nor * the owner died bit are set. */ if (!(uval & ~FUTEX_TID_MASK) && cmpxchg_futex_value_locked(&uval, uaddr, vpid, 0)) goto pi_faulted; /* * Rare case: we managed to release the lock atomically, * no need to wake anyone else up: */ if (unlikely(uval == vpid)) goto out_unlock; /* * Ok, other tasks may need to be woken up - check waiters * and do the wakeup if necessary: */ head = &hb->chain; plist_for_each_entry_safe(this, next, head, list) { if (!match_futex (&this->key, &key)) continue; ret = wake_futex_pi(uaddr, uval, this); /* * The atomic access to the futex value * generated a pagefault, so retry the * user-access and the wakeup: */ if (ret == -EFAULT) goto pi_faulted; goto out_unlock; } /* * No waiters - kernel unlocks the futex: */ ret = unlock_futex_pi(uaddr, uval); if (ret == -EFAULT) goto pi_faulted; out_unlock: spin_unlock(&hb->lock); put_futex_key(&key); out: return ret; pi_faulted: spin_unlock(&hb->lock); put_futex_key(&key); ret = fault_in_user_writeable(uaddr); if (!ret) goto retry; return ret; } /** * handle_early_requeue_pi_wakeup() - Detect early wakeup on the initial futex * @hb: the hash_bucket futex_q was original enqueued on * @q: the futex_q woken while waiting to be requeued * @key2: the futex_key of the requeue target futex * @timeout: the timeout associated with the wait (NULL if none) * * Detect if the task was woken on the initial futex as opposed to the requeue * target futex. If so, determine if it was a timeout or a signal that caused * the wakeup and return the appropriate error code to the caller. Must be * called with the hb lock held. * * Return: * 0 = no early wakeup detected; * <0 = -ETIMEDOUT or -ERESTARTNOINTR */ static inline int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb, struct futex_q *q, union futex_key *key2, struct hrtimer_sleeper *timeout) { int ret = 0; /* * With the hb lock held, we avoid races while we process the wakeup. * We only need to hold hb (and not hb2) to ensure atomicity as the * wakeup code can't change q.key from uaddr to uaddr2 if we hold hb. * It can't be requeued from uaddr2 to something else since we don't * support a PI aware source futex for requeue. */ if (!match_futex(&q->key, key2)) { WARN_ON(q->lock_ptr && (&hb->lock != q->lock_ptr)); /* * We were woken prior to requeue by a timeout or a signal. * Unqueue the futex_q and determine which it was. */ plist_del(&q->list, &hb->chain); /* Handle spurious wakeups gracefully */ ret = -EWOULDBLOCK; if (timeout && !timeout->task) ret = -ETIMEDOUT; else if (signal_pending(current)) ret = -ERESTARTNOINTR; } return ret; } /** * futex_wait_requeue_pi() - Wait on uaddr and take uaddr2 * @uaddr: the futex we initially wait on (non-pi) * @flags: futex flags (FLAGS_SHARED, FLAGS_CLOCKRT, etc.), they must be * the same type, no requeueing from private to shared, etc. * @val: the expected value of uaddr * @abs_time: absolute timeout * @bitset: 32 bit wakeup bitset set by userspace, defaults to all * @uaddr2: the pi futex we will take prior to returning to user-space * * The caller will wait on uaddr and will be requeued by futex_requeue() to * uaddr2 which must be PI aware and unique from uaddr. Normal wakeup will wake * on uaddr2 and complete the acquisition of the rt_mutex prior to returning to * userspace. This ensures the rt_mutex maintains an owner when it has waiters; * without one, the pi logic would not know which task to boost/deboost, if * there was a need to. * * We call schedule in futex_wait_queue_me() when we enqueue and return there * via the following-- * 1) wakeup on uaddr2 after an atomic lock acquisition by futex_requeue() * 2) wakeup on uaddr2 after a requeue * 3) signal * 4) timeout * * If 3, cleanup and return -ERESTARTNOINTR. * * If 2, we may then block on trying to take the rt_mutex and return via: * 5) successful lock * 6) signal * 7) timeout * 8) other lock acquisition failure * * If 6, return -EWOULDBLOCK (restarting the syscall would do the same). * * If 4 or 7, we cleanup and return with -ETIMEDOUT. * * Return: * 0 - On success; * <0 - On error */ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, u32 val, ktime_t *abs_time, u32 bitset, u32 __user *uaddr2) { struct hrtimer_sleeper timeout, *to = NULL; struct rt_mutex_waiter rt_waiter; struct rt_mutex *pi_mutex = NULL; struct futex_hash_bucket *hb; union futex_key key2 = FUTEX_KEY_INIT; struct futex_q q = futex_q_init; int res, ret; if (uaddr == uaddr2) return -EINVAL; if (!bitset) return -EINVAL; if (abs_time) { to = &timeout; hrtimer_init_on_stack(&to->timer, (flags & FLAGS_CLOCKRT) ? CLOCK_REALTIME : CLOCK_MONOTONIC, HRTIMER_MODE_ABS); hrtimer_init_sleeper(to, current); hrtimer_set_expires_range_ns(&to->timer, *abs_time, current->timer_slack_ns); } /* * The waiter is allocated on our stack, manipulated by the requeue * code while we sleep on uaddr. */ debug_rt_mutex_init_waiter(&rt_waiter); rt_waiter.task = NULL; ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, VERIFY_WRITE); if (unlikely(ret != 0)) goto out; q.bitset = bitset; q.rt_waiter = &rt_waiter; q.requeue_pi_key = &key2; /* * Prepare to wait on uaddr. On success, increments q.key (key1) ref * count. */ ret = futex_wait_setup(uaddr, val, flags, &q, &hb); if (ret) goto out_key2; /* * The check above which compares uaddrs is not sufficient for * shared futexes. We need to compare the keys: */ if (match_futex(&q.key, &key2)) { ret = -EINVAL; goto out_put_keys; } /* * The check above which compares uaddrs is not sufficient for * shared futexes. We need to compare the keys: */ if (match_futex(&q.key, &key2)) { ret = -EINVAL; goto out_put_keys; } /* Queue the futex_q, drop the hb lock, wait for wakeup. */ futex_wait_queue_me(hb, &q, to); spin_lock(&hb->lock); ret = handle_early_requeue_pi_wakeup(hb, &q, &key2, to); spin_unlock(&hb->lock); if (ret) goto out_put_keys; /* * In order for us to be here, we know our q.key == key2, and since * we took the hb->lock above, we also know that futex_requeue() has * completed and we no longer have to concern ourselves with a wakeup * race with the atomic proxy lock acquisition by the requeue code. The * futex_requeue dropped our key1 reference and incremented our key2 * reference count. */ /* Check if the requeue code acquired the second futex for us. */ if (!q.rt_waiter) { /* * Got the lock. We might not be the anticipated owner if we * did a lock-steal - fix up the PI-state in that case. */ if (q.pi_state && (q.pi_state->owner != current)) { spin_lock(q.lock_ptr); ret = fixup_pi_state_owner(uaddr2, &q, current); spin_unlock(q.lock_ptr); } } else { /* * We have been woken up by futex_unlock_pi(), a timeout, or a * signal. futex_unlock_pi() will not destroy the lock_ptr nor * the pi_state. */ WARN_ON(!q.pi_state); pi_mutex = &q.pi_state->pi_mutex; ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter, 1); debug_rt_mutex_free_waiter(&rt_waiter); spin_lock(q.lock_ptr); /* * Fixup the pi_state owner and possibly acquire the lock if we * haven't already. */ res = fixup_owner(uaddr2, &q, !ret); /* * If fixup_owner() returned an error, proprogate that. If it * acquired the lock, clear -ETIMEDOUT or -EINTR. */ if (res) ret = (res < 0) ? res : 0; /* Unqueue and drop the lock. */ unqueue_me_pi(&q); } /* * If fixup_pi_state_owner() faulted and was unable to handle the * fault, unlock the rt_mutex and return the fault to userspace. */ if (ret == -EFAULT) { if (pi_mutex && rt_mutex_owner(pi_mutex) == current) rt_mutex_unlock(pi_mutex); } else if (ret == -EINTR) { /* * We've already been requeued, but cannot restart by calling * futex_lock_pi() directly. We could restart this syscall, but * it would detect that the user space "val" changed and return * -EWOULDBLOCK. Save the overhead of the restart and return * -EWOULDBLOCK directly. */ ret = -EWOULDBLOCK; } out_put_keys: put_futex_key(&q.key); out_key2: put_futex_key(&key2); out: if (to) { hrtimer_cancel(&to->timer); destroy_hrtimer_on_stack(&to->timer); } return ret; } /* * Support for robust futexes: the kernel cleans up held futexes at * thread exit time. * * Implementation: user-space maintains a per-thread list of locks it * is holding. Upon do_exit(), the kernel carefully walks this list, * and marks all locks that are owned by this thread with the * FUTEX_OWNER_DIED bit, and wakes up a waiter (if any). The list is * always manipulated with the lock held, so the list is private and * per-thread. Userspace also maintains a per-thread 'list_op_pending' * field, to allow the kernel to clean up if the thread dies after * acquiring the lock, but just before it could have added itself to * the list. There can only be one such pending lock. */ /** * sys_set_robust_list() - Set the robust-futex list head of a task * @head: pointer to the list-head * @len: length of the list-head, as userspace expects */ SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head, size_t, len) { if (!futex_cmpxchg_enabled) return -ENOSYS; /* * The kernel knows only one size for now: */ if (unlikely(len != sizeof(*head))) return -EINVAL; current->robust_list = head; return 0; } /** * sys_get_robust_list() - Get the robust-futex list head of a task * @pid: pid of the process [zero for current task] * @head_ptr: pointer to a list-head pointer, the kernel fills it in * @len_ptr: pointer to a length field, the kernel fills in the header size */ SYSCALL_DEFINE3(get_robust_list, int, pid, struct robust_list_head __user * __user *, head_ptr, size_t __user *, len_ptr) { struct robust_list_head __user *head; unsigned long ret; struct task_struct *p; if (!futex_cmpxchg_enabled) return -ENOSYS; rcu_read_lock(); ret = -ESRCH; if (!pid) p = current; else { p = find_task_by_vpid(pid); if (!p) goto err_unlock; } ret = -EPERM; if (!ptrace_may_access(p, PTRACE_MODE_READ)) goto err_unlock; head = p->robust_list; rcu_read_unlock(); if (put_user(sizeof(*head), len_ptr)) return -EFAULT; return put_user(head, head_ptr); err_unlock: rcu_read_unlock(); return ret; } /* * Process a futex-list entry, check whether it's owned by the * dying task, and do notification if so: */ int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi) { u32 uval, uninitialized_var(nval), mval; retry: if (get_user(uval, uaddr)) return -1; if ((uval & FUTEX_TID_MASK) == task_pid_vnr(curr)) { /* * Ok, this dying thread is truly holding a futex * of interest. Set the OWNER_DIED bit atomically * via cmpxchg, and if the value had FUTEX_WAITERS * set, wake up a waiter (if any). (We have to do a * futex_wake() even if OWNER_DIED is already set - * to handle the rare but possible case of recursive * thread-death.) The rest of the cleanup is done in * userspace. */ mval = (uval & FUTEX_WAITERS) | FUTEX_OWNER_DIED; /* * We are not holding a lock here, but we want to have * the pagefault_disable/enable() protection because * we want to handle the fault gracefully. If the * access fails we try to fault in the futex with R/W * verification via get_user_pages. get_user() above * does not guarantee R/W access. If that fails we * give up and leave the futex locked. */ if (cmpxchg_futex_value_locked(&nval, uaddr, uval, mval)) { if (fault_in_user_writeable(uaddr)) return -1; goto retry; } if (nval != uval) goto retry; /* * Wake robust non-PI futexes here. The wakeup of * PI futexes happens in exit_pi_state(): */ if (!pi && (uval & FUTEX_WAITERS)) futex_wake(uaddr, 1, 1, FUTEX_BITSET_MATCH_ANY); } return 0; } /* * Fetch a robust-list pointer. Bit 0 signals PI futexes: */ static inline int fetch_robust_entry(struct robust_list __user **entry, struct robust_list __user * __user *head, unsigned int *pi) { unsigned long uentry; if (get_user(uentry, (unsigned long __user *)head)) return -EFAULT; *entry = (void __user *)(uentry & ~1UL); *pi = uentry & 1; return 0; } /* * Walk curr->robust_list (very carefully, it's a userspace list!) * and mark any locks found there dead, and notify any waiters. * * We silently return on any sign of list-walking problem. */ void exit_robust_list(struct task_struct *curr) { struct robust_list_head __user *head = curr->robust_list; struct robust_list __user *entry, *next_entry, *pending; unsigned int limit = ROBUST_LIST_LIMIT, pi, pip; unsigned int uninitialized_var(next_pi); unsigned long futex_offset; int rc; if (!futex_cmpxchg_enabled) return; /* * Fetch the list head (which was registered earlier, via * sys_set_robust_list()): */ if (fetch_robust_entry(&entry, &head->list.next, &pi)) return; /* * Fetch the relative futex offset: */ if (get_user(futex_offset, &head->futex_offset)) return; /* * Fetch any possibly pending lock-add first, and handle it * if it exists: */ if (fetch_robust_entry(&pending, &head->list_op_pending, &pip)) return; next_entry = NULL; /* avoid warning with gcc */ while (entry != &head->list) { /* * Fetch the next entry in the list before calling * handle_futex_death: */ rc = fetch_robust_entry(&next_entry, &entry->next, &next_pi); /* * A pending lock might already be on the list, so * don't process it twice: */ if (entry != pending) if (handle_futex_death((void __user *)entry + futex_offset, curr, pi)) return; if (rc) return; entry = next_entry; pi = next_pi; /* * Avoid excessively long or circular lists: */ if (!--limit) break; cond_resched(); } if (pending) handle_futex_death((void __user *)pending + futex_offset, curr, pip); } long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, u32 __user *uaddr2, u32 val2, u32 val3) { int cmd = op & FUTEX_CMD_MASK; unsigned int flags = 0; if (!(op & FUTEX_PRIVATE_FLAG)) flags |= FLAGS_SHARED; if (op & FUTEX_CLOCK_REALTIME) { flags |= FLAGS_CLOCKRT; if (cmd != FUTEX_WAIT_BITSET && cmd != FUTEX_WAIT_REQUEUE_PI) return -ENOSYS; } switch (cmd) { case FUTEX_LOCK_PI: case FUTEX_UNLOCK_PI: case FUTEX_TRYLOCK_PI: case FUTEX_WAIT_REQUEUE_PI: case FUTEX_CMP_REQUEUE_PI: if (!futex_cmpxchg_enabled) return -ENOSYS; } switch (cmd) { case FUTEX_WAIT: val3 = FUTEX_BITSET_MATCH_ANY; case FUTEX_WAIT_BITSET: return futex_wait(uaddr, flags, val, timeout, val3); case FUTEX_WAKE: val3 = FUTEX_BITSET_MATCH_ANY; case FUTEX_WAKE_BITSET: return futex_wake(uaddr, flags, val, val3); case FUTEX_REQUEUE: return futex_requeue(uaddr, flags, uaddr2, val, val2, NULL, 0); case FUTEX_CMP_REQUEUE: return futex_requeue(uaddr, flags, uaddr2, val, val2, &val3, 0); case FUTEX_WAKE_OP: return futex_wake_op(uaddr, flags, uaddr2, val, val2, val3); case FUTEX_LOCK_PI: return futex_lock_pi(uaddr, flags, val, timeout, 0); case FUTEX_UNLOCK_PI: return futex_unlock_pi(uaddr, flags); case FUTEX_TRYLOCK_PI: return futex_lock_pi(uaddr, flags, 0, timeout, 1); case FUTEX_WAIT_REQUEUE_PI: val3 = FUTEX_BITSET_MATCH_ANY; return futex_wait_requeue_pi(uaddr, flags, val, timeout, val3, uaddr2); case FUTEX_CMP_REQUEUE_PI: return futex_requeue(uaddr, flags, uaddr2, val, val2, &val3, 1); } return -ENOSYS; } SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val, struct timespec __user *, utime, u32 __user *, uaddr2, u32, val3) { struct timespec ts; ktime_t t, *tp = NULL; u32 val2 = 0; int cmd = op & FUTEX_CMD_MASK; if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI || cmd == FUTEX_WAIT_BITSET || cmd == FUTEX_WAIT_REQUEUE_PI)) { if (copy_from_user(&ts, utime, sizeof(ts)) != 0) return -EFAULT; if (!timespec_valid(&ts)) return -EINVAL; t = timespec_to_ktime(ts); if (cmd == FUTEX_WAIT) t = ktime_add_safe(ktime_get(), t); tp = &t; } /* * requeue parameter in 'utime' if cmd == FUTEX_*_REQUEUE_*. * number of waiters to wake in 'utime' if cmd == FUTEX_WAKE_OP. */ if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE || cmd == FUTEX_CMP_REQUEUE_PI || cmd == FUTEX_WAKE_OP) val2 = (u32) (unsigned long) utime; return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); } static void __init futex_detect_cmpxchg(void) { #ifndef CONFIG_HAVE_FUTEX_CMPXCHG u32 curval; /* * This will fail and we want it. Some arch implementations do * runtime detection of the futex_atomic_cmpxchg_inatomic() * functionality. We want to know that before we call in any * of the complex code paths. Also we want to prevent * registration of robust lists in that case. NULL is * guaranteed to fault and we get -EFAULT on functional * implementation, the non-functional ones will return * -ENOSYS. */ if (cmpxchg_futex_value_locked(&curval, NULL, 0, 0) == -EFAULT) futex_cmpxchg_enabled = 1; #endif } static int __init futex_init(void) { int i; futex_detect_cmpxchg(); for (i = 0; i < ARRAY_SIZE(futex_queues); i++) { plist_head_init(&futex_queues[i].chain); spin_lock_init(&futex_queues[i].lock); } return 0; } __initcall(futex_init);
Psycho666/Simplicity_trlte_kernel
kernel/futex.c
C
gpl-2.0
77,612
25.579452
80
0.655968
false
<?php namespace Bookly\Backend; use Bookly\Backend\Modules; use Bookly\Frontend; use Bookly\Lib; /** * Class Backend * @package Bookly\Backend */ class Backend { public function __construct() { // Backend controllers. $this->apearanceController = Modules\Appearance\Controller::getInstance(); $this->calendarController = Modules\Calendar\Controller::getInstance(); $this->customerController = Modules\Customers\Controller::getInstance(); $this->notificationsController = Modules\Notifications\Controller::getInstance(); $this->paymentController = Modules\Payments\Controller::getInstance(); $this->serviceController = Modules\Services\Controller::getInstance(); $this->smsController = Modules\Sms\Controller::getInstance(); $this->settingsController = Modules\Settings\Controller::getInstance(); $this->staffController = Modules\Staff\Controller::getInstance(); $this->couponsController = Modules\Coupons\Controller::getInstance(); $this->customFieldsController = Modules\CustomFields\Controller::getInstance(); $this->appointmentsController = Modules\Appointments\Controller::getInstance(); $this->debugController = Modules\Debug\Controller::getInstance(); // Frontend controllers that work via admin-ajax.php. $this->bookingController = Frontend\Modules\Booking\Controller::getInstance(); $this->customerProfileController = Frontend\Modules\CustomerProfile\Controller::getInstance(); if ( ! Lib\Config::isPaymentDisabled( Lib\Entities\Payment::TYPE_AUTHORIZENET ) ) { $this->authorizeNetController = Frontend\Modules\AuthorizeNet\Controller::getInstance(); } if ( ! Lib\Config::isPaymentDisabled( Lib\Entities\Payment::TYPE_PAYULATAM ) ) { $this->payulatamController = Frontend\Modules\PayuLatam\Controller::getInstance(); } if ( ! Lib\Config::isPaymentDisabled( Lib\Entities\Payment::TYPE_STRIPE ) ) { $this->stripeController = Frontend\Modules\Stripe\Controller::getInstance(); } $this->wooCommerceController = Frontend\Modules\WooCommerce\Controller::getInstance(); add_action( 'admin_menu', array( $this, 'addAdminMenu' ) ); add_action( 'wp_loaded', array( $this, 'init' ) ); add_action( 'admin_init', array( $this, 'addTinyMCEPlugin' ) ); } public function init() { if ( ! session_id() ) { @session_start(); } } public function addTinyMCEPlugin() { new Modules\TinyMce\Plugin(); } public function addAdminMenu() { /** @var \WP_User $current_user */ global $current_user; // Translated submenu pages. $calendar = __( 'Calendar', 'bookly' ); $appointments = __( 'Appointments', 'bookly' ); $staff_members = __( 'Staff Members', 'bookly' ); $services = __( 'Services', 'bookly' ); $sms = __( 'SMS Notifications', 'bookly' ); $notifications = __( 'Email Notifications', 'bookly' ); $customers = __( 'Customers', 'bookly' ); $payments = __( 'Payments', 'bookly' ); $appearance = __( 'Appearance', 'bookly' ); $settings = __( 'Settings', 'bookly' ); $coupons = __( 'Coupons', 'bookly' ); $custom_fields = __( 'Custom Fields', 'bookly' ); if ( $current_user->has_cap( 'administrator' ) || Lib\Entities\Staff::query()->where( 'wp_user_id', $current_user->ID )->count() ) { if ( function_exists( 'add_options_page' ) ) { $dynamic_position = '80.0000001' . mt_rand( 1, 1000 ); // position always is under `Settings` add_menu_page( 'Bookly', 'Bookly', 'read', 'ab-system', '', plugins_url( 'resources/images/menu.png', __FILE__ ), $dynamic_position ); add_submenu_page( 'ab-system', $calendar, $calendar, 'read', 'ab-calendar', array( $this->calendarController, 'index' ) ); add_submenu_page( 'ab-system', $appointments, $appointments, 'manage_options', 'ab-appointments', array( $this->appointmentsController, 'index' ) ); do_action( 'bookly_render_menu_after_appointments' ); if ( $current_user->has_cap( 'administrator' ) ) { add_submenu_page( 'ab-system', $staff_members, $staff_members, 'manage_options', Modules\Staff\Controller::page_slug, array( $this->staffController, 'index' ) ); } else { if ( get_option( 'ab_settings_allow_staff_members_edit_profile' ) == 1 ) { add_submenu_page( 'ab-system', __( 'Profile', 'bookly' ), __( 'Profile', 'bookly' ), 'read', Modules\Staff\Controller::page_slug, array( $this->staffController, 'index' ) ); } } add_submenu_page( 'ab-system', $services, $services, 'manage_options', Modules\Services\Controller::page_slug, array( $this->serviceController, 'index' ) ); add_submenu_page( 'ab-system', $customers, $customers, 'manage_options', Modules\Customers\Controller::page_slug, array( $this->customerController, 'index' ) ); add_submenu_page( 'ab-system', $notifications, $notifications, 'manage_options', 'ab-notifications', array( $this->notificationsController, 'index' ) ); add_submenu_page( 'ab-system', $sms, $sms, 'manage_options', Modules\Sms\Controller::page_slug, array( $this->smsController, 'index' ) ); add_submenu_page( 'ab-system', $payments, $payments, 'manage_options', 'ab-payments', array( $this->paymentController, 'index' ) ); add_submenu_page( 'ab-system', $appearance, $appearance, 'manage_options', 'ab-appearance', array( $this->apearanceController, 'index' ) ); add_submenu_page( 'ab-system', $custom_fields, $custom_fields, 'manage_options', 'ab-custom-fields', array( $this->customFieldsController, 'index' ) ); add_submenu_page( 'ab-system', $coupons, $coupons, 'manage_options', 'ab-coupons', array( $this->couponsController, 'index' ) ); add_submenu_page( 'ab-system', $settings, $settings, 'manage_options', Modules\Settings\Controller::page_slug, array( $this->settingsController, 'index' ) ); if ( isset ( $_GET['page'] ) && $_GET['page'] == 'ab-debug' ) { add_submenu_page( 'ab-system', 'Debug', 'Debug', 'manage_options', 'ab-debug', array( $this->debugController, 'index' ) ); } global $submenu; do_action( 'bookly_admin_menu', 'ab-system' ); unset ( $submenu['ab-system'][0] ); } } } }
Tjdowdell/Susan_Batchelor_Website
wp-content/plugins/appointment-booking/backend/Backend.php
PHP
gpl-2.0
7,231
54.206107
153
0.56645
false
## See "d_bankfull" in update_flow_depth() ######## (2/21/13) ## See "(5/13/10)" for a temporary fix. #------------------------------------------------------------------------ # Copyright (c) 2001-2014, Scott D. Peckham # # Sep 2014. Wrote new update_diversions(). # New standard names and BMI updates and testing. # Nov 2013. Converted TopoFlow to a Python package. # Feb 2013. Adapted to use EMELI framework. # Jan 2013. Shared scalar doubles are now 0D numpy arrays. # This makes them mutable and allows components with # a reference to them to see them change. # So far: Q_outlet, Q_peak, Q_min... # Jan 2013. Revised handling of input/output names. # Oct 2012. CSDMS Standard Names and BMI. # May 2012. Commented out diversions.update() for now. ####### # May 2012. Shared scalar doubles are now 1-element 1D numpy arrays. # This makes them mutable and allows components with # a reference to them to see them change. # So far: Q_outlet, Q_peak, Q_min... # May 2010. Changes to initialize() and read_cfg_file() # Mar 2010. Changed codes to code, widths to width, # angles to angle, nvals to nval, z0vals to z0val, # slopes to slope (for GUI tools and consistency # across all process components) # Aug 2009. Updates. # Jul 2009. Updates. # May 2009. Updates. # Jan 2009. Converted from IDL. #----------------------------------------------------------------------- # NB! In the CFG file, change MANNING and LAW_OF_WALL flags to # a single string entry like "friction method". ######### #----------------------------------------------------------------------- # Notes: Set self.u in manning and law_of_wall functions ?? # Update friction factor in manning() and law_of_wall() ? # Double check how Rh is used in law_of_the_wall(). # d8_flow has "flow_grids", but this one has "codes". # Make sure values are not stored twice. #----------------------------------------------------------------------- #----------------------------------------------------------------------- # NOTES: This file defines a "base class" for channelized flow # components as well as functions used by most or # all channel flow methods. The methods of this class # (especially "update_velocity") should be over-ridden as # necessary for different methods of modeling channelized # flow. See channels_kinematic_wave.py, # channels_diffusive_wave.py and channels_dynamic_wave.py. #----------------------------------------------------------------------- # NOTES: update_free_surface_slope() is called by the # update_velocity() methods of channels_diffusive_wave.py # and channels_dynamic_wave.py. #----------------------------------------------------------------------- # # class channels_component # # ## get_attribute() # (defined in each channel component) # get_input_var_names() # (5/15/12) # get_output_var_names() # (5/15/12) # get_var_name() # (5/15/12) # get_var_units() # (5/15/12) #----------------------------- # set_constants() # initialize() # update() # finalize() # set_computed_input_vars() # (5/11/10) #---------------------------------- # initialize_d8_vars() ######## # initialize_computed_vars() # initialize_diversion_vars() # (9/22/14) # initialize_outlet_values() # initialize_peak_values() # initialize_min_and_max_values() # (2/3/13) #------------------------------------- # update_R() # update_R_integral() # update_discharge() # update_diversions() # (9/22/14) # update_flow_volume() # update_flow_depth() # update_free_surface_slope() # update_shear_stress() # (9/9/14, depth-slope product) # update_shear_speed() # (9/9/14) # update_trapezoid_Rh() # update_friction_factor() # (9/9/14) #---------------------------------- # update_velocity() # (override as needed) # update_velocity_on_edges() # update_froude_number() # (9/9/14) #---------------------------------- # update_outlet_values() # update_peak_values() # (at the main outlet) # update_Q_out_integral() # (moved here from basins.py) # update_mins_and_maxes() # (don't add into update()) # check_flow_depth() # check_flow_velocity() #---------------------------------- # open_input_files() # read_input_files() # close_input_files() #---------------------------------- # update_outfile_names() # bundle_output_files() # (9/21/14. Not used yet) # open_output_files() # write_output_files() # close_output_files() # save_grids() # save_pixel_values() #---------------------------------- # manning_formula() # law_of_the_wall() # print_status_report() # remove_bad_slopes() # Functions: # (stand-alone versions of these) # Trapezoid_Rh() # Manning_Formula() # Law_of_the_Wall() #----------------------------------------------------------------------- import numpy as np import os, os.path from topoflow.utils import BMI_base # from topoflow.utils import d8_base from topoflow.utils import file_utils ### from topoflow.utils import model_input from topoflow.utils import model_output from topoflow.utils import ncgs_files ### from topoflow.utils import ncts_files ### from topoflow.utils import rtg_files ### from topoflow.utils import text_ts_files ### from topoflow.utils import tf_d8_base as d8_base from topoflow.utils import tf_utils #----------------------------------------------------------------------- class channels_component( BMI_base.BMI_component ): #----------------------------------------------------------- # Note: rainfall_volume_flux *must* be liquid-only precip. #----------------------------------------------------------- _input_var_names = [ 'atmosphere_water__rainfall_volume_flux', # (P_rain) 'glacier_ice__melt_volume_flux', # (MR) ## 'land_surface__elevation', ## 'land_surface__slope', 'land_surface_water__baseflow_volume_flux', # (GW) 'land_surface_water__evaporation_volume_flux', # (ET) 'soil_surface_water__infiltration_volume_flux', # (IN) 'snowpack__melt_volume_flux', # (SM) 'water-liquid__mass-per-volume_density' ] # (rho_H2O) #------------------------------------------------------------------ # 'canals__count', # n_canals # 'canals_entrance__x_coordinate', # canals_in_x # 'canals_entrance__y_coordinate', # canals_in_y # 'canals_entrance_water__volume_fraction', # Q_canals_fraction # 'canals_exit__x_coordinate', # canals_out_x # 'canals_exit__y_coordinate', # canals_out_y # 'canals_exit_water__volume_flow_rate', # Q_canals_out # 'sinks__count', # n_sinks # 'sinks__x_coordinate', # sinks_x # 'sinks__y_coordinate', # sinks_y # 'sinks_water__volume_flow_rate', # Q_sinks # 'sources__count', # n_sources # 'sources__x_coordinate', # sources_x # 'sources__y_coordinate', # sources_y # 'sources_water__volume_flow_rate' ] # Q_sources #---------------------------------- # Maybe add these out_vars later. #---------------------------------- # ['time_sec', 'time_min' ] _output_var_names = [ 'basin_outlet_water_flow__half_of_fanning_friction_factor', # f_outlet 'basin_outlet_water_x-section__mean_depth', # d_outlet 'basin_outlet_water_x-section__peak_time_of_depth', # Td_peak 'basin_outlet_water_x-section__peak_time_of_volume_flow_rate', # T_peak 'basin_outlet_water_x-section__peak_time_of_volume_flux', # Tu_peak 'basin_outlet_water_x-section__time_integral_of_volume_flow_rate', # vol_Q 'basin_outlet_water_x-section__time_max_of_mean_depth', # d_peak 'basin_outlet_water_x-section__time_max_of_volume_flow_rate', # Q_peak 'basin_outlet_water_x-section__time_max_of_volume_flux', # u_peak 'basin_outlet_water_x-section__volume_flow_rate', # Q_outlet 'basin_outlet_water_x-section__volume_flux', # u_outlet #-------------------------------------------------- 'canals_entrance_water__volume_flow_rate', # Q_canals_in #-------------------------------------------------- 'channel_bottom_surface__slope', # S_bed 'channel_bottom_water_flow__domain_max_of_log_law_roughness_length', # z0val_max 'channel_bottom_water_flow__domain_min_of_log_law_roughness_length', # z0val_min 'channel_bottom_water_flow__log_law_roughness_length', # z0val 'channel_bottom_water_flow__magnitude_of_shear_stress', # tau 'channel_bottom_water_flow__shear_speed', # u_star 'channel_centerline__sinuosity', # sinu 'channel_water__volume', # vol 'channel_water_flow__froude_number', # froude 'channel_water_flow__half_of_fanning_friction_factor', # f 'channel_water_flow__domain_max_of_manning_n_parameter', # nval_max 'channel_water_flow__domain_min_of_manning_n_parameter', # nval_min 'channel_water_flow__manning_n_parameter', # nval 'channel_water_surface__slope', # S_free #--------------------------------------------------- # These might only be available at the end of run. #--------------------------------------------------- 'channel_water_x-section__domain_max_of_mean_depth', # d_max 'channel_water_x-section__domain_min_of_mean_depth', # d_min 'channel_water_x-section__domain_max_of_volume_flow_rate', # Q_max 'channel_water_x-section__domain_min_of_volume_flow_rate', # Q_min 'channel_water_x-section__domain_max_of_volume_flux', # u_max 'channel_water_x-section__domain_min_of_volume_flux', # u_min #--------------------------------------------------------------------- 'channel_water_x-section__hydraulic_radius', # Rh 'channel_water_x-section__initial_mean_depth', # d0 'channel_water_x-section__mean_depth', # d 'channel_water_x-section__volume_flow_rate', # Q 'channel_water_x-section__volume_flux', # u 'channel_water_x-section__wetted_area', # A_wet 'channel_water_x-section__wetted_perimeter', # P_wet ## 'channel_water_x-section_top__width', # (not used) 'channel_x-section_trapezoid_bottom__width', # width 'channel_x-section_trapezoid_side__flare_angle', # angle 'land_surface_water__runoff_volume_flux', # R 'land_surface_water__domain_time_integral_of_runoff_volume_flux', # vol_R 'model__time_step', # dt 'model_grid_cell__area' ] # da _var_name_map = { 'atmosphere_water__rainfall_volume_flux': 'P_rain', 'glacier_ice__melt_volume_flux': 'MR', ## 'land_surface__elevation': 'DEM', ## 'land_surface__slope': 'S_bed', 'land_surface_water__baseflow_volume_flux': 'GW', 'land_surface_water__evaporation_volume_flux': 'ET', 'soil_surface_water__infiltration_volume_flux': 'IN', 'snowpack__melt_volume_flux': 'SM', 'water-liquid__mass-per-volume_density': 'rho_H2O', #------------------------------------------------------------------------ 'basin_outlet_water_flow__half_of_fanning_friction_factor':'f_outlet', 'basin_outlet_water_x-section__mean_depth': 'd_outlet', 'basin_outlet_water_x-section__peak_time_of_depth': 'Td_peak', 'basin_outlet_water_x-section__peak_time_of_volume_flow_rate': 'T_peak', 'basin_outlet_water_x-section__peak_time_of_volume_flux': 'Tu_peak', 'basin_outlet_water_x-section__volume_flow_rate': 'Q_outlet', 'basin_outlet_water_x-section__volume_flux': 'u_outlet', 'basin_outlet_water_x-section__time_integral_of_volume_flow_rate': 'vol_Q', 'basin_outlet_water_x-section__time_max_of_mean_depth': 'd_peak', 'basin_outlet_water_x-section__time_max_of_volume_flow_rate':'Q_peak', 'basin_outlet_water_x-section__time_max_of_volume_flux': 'u_peak', #-------------------------------------------------------------------------- 'canals_entrance_water__volume_flow_rate': 'Q_canals_in', #-------------------------------------------------------------------------- 'channel_bottom_surface__slope': 'S_bed', 'channel_bottom_water_flow__domain_max_of_log_law_roughness_length': 'z0val_max', 'channel_bottom_water_flow__domain_min_of_log_law_roughness_length': 'z0val_min', 'channel_bottom_water_flow__log_law_roughness_length': 'z0val', 'channel_bottom_water_flow__magnitude_of_shear_stress': 'tau', 'channel_bottom_water_flow__shear_speed': 'u_star', 'channel_centerline__sinuosity': 'sinu', 'channel_water__volume': 'vol', 'channel_water_flow__domain_max_of_manning_n_parameter': 'nval_max', 'channel_water_flow__domain_min_of_manning_n_parameter': 'nval_min', 'channel_water_flow__froude_number': 'froude', 'channel_water_flow__half_of_fanning_friction_factor': 'f', 'channel_water_flow__manning_n_parameter': 'nval', 'channel_water_surface__slope': 'S_free', #----------------------------------------------------------------------- 'channel_water_x-section__domain_max_of_mean_depth': 'd_max', 'channel_water_x-section__domain_min_of_mean_depth': 'd_min', 'channel_water_x-section__domain_max_of_volume_flow_rate': 'Q_max', 'channel_water_x-section__domain_min_of_volume_flow_rate': 'Q_min', 'channel_water_x-section__domain_max_of_volume_flux': 'u_max', 'channel_water_x-section__domain_min_of_volume_flux': 'u_min', #----------------------------------------------------------------------- 'channel_water_x-section__hydraulic_radius': 'Rh', 'channel_water_x-section__initial_mean_depth': 'd0', 'channel_water_x-section__mean_depth': 'd', 'channel_water_x-section__volume_flow_rate': 'Q', 'channel_water_x-section__volume_flux': 'u', 'channel_water_x-section__wetted_area': 'A_wet', 'channel_water_x-section__wetted_perimeter': 'P_wet', ## 'channel_water_x-section_top__width': # (not used) 'channel_x-section_trapezoid_bottom__width': 'width', #### 'channel_x-section_trapezoid_side__flare_angle': 'angle', #### 'land_surface_water__domain_time_integral_of_runoff_volume_flux': 'vol_R', 'land_surface_water__runoff_volume_flux': 'R', 'model__time_step': 'dt', 'model_grid_cell__area': 'da', #------------------------------------------------------------------ 'canals__count': 'n_canals', 'canals_entrance__x_coordinate': 'canals_in_x', 'canals_entrance__y_coordinate': 'canals_in_y', 'canals_entrance_water__volume_fraction': 'Q_canals_fraction', 'canals_exit__x_coordinate': 'canals_out_x', 'canals_exit__y_coordinate': 'canals_out_y', 'canals_exit_water__volume_flow_rate': 'Q_canals_out', 'sinks__count': 'n_sinks', 'sinks__x_coordinate': 'sinks_x', 'sinks__y_coordinate': 'sinks_y', 'sinks_water__volume_flow_rate': 'Q_sinks', 'sources__count': 'n_sources', 'sources__x_coordinate': 'sources_x', 'sources__y_coordinate': 'sources_y', 'sources_water__volume_flow_rate': 'Q_sources' } #------------------------------------------------ # Create an "inverse var name map" # inv_map = dict(zip(map.values(), map.keys())) #------------------------------------------------ ## _long_name_map = dict( zip(_var_name_map.values(), ## _var_name_map.keys() ) ) _var_units_map = { 'atmosphere_water__rainfall_volume_flux': 'm s-1', 'glacier_ice__melt_volume_flux': 'm s-1', ## 'land_surface__elevation': 'm', ## 'land_surface__slope': '1', 'land_surface_water__baseflow_volume_flux': 'm s-1', 'land_surface_water__evaporation_volume_flux': 'm s-1', 'soil_surface_water__infiltration_volume_flux': 'm s-1', 'snowpack__melt_volume_flux': 'm s-1', 'water-liquid__mass-per-volume_density': 'kg m-3', #--------------------------------------------------------------------------- 'basin_outlet_water_flow__half_of_fanning_friction_factor': '1', 'basin_outlet_water_x-section__mean_depth': 'm', 'basin_outlet_water_x-section__peak_time_of_depth': 'min', 'basin_outlet_water_x-section__peak_time_of_volume_flow_rate': 'min', 'basin_outlet_water_x-section__peak_time_of_volume_flux': 'min', 'basin_outlet_water_x-section__time_integral_of_volume_flow_rate': 'm3', 'basin_outlet_water_x-section__time_max_of_mean_depth': 'm', 'basin_outlet_water_x-section__time_max_of_volume_flow_rate': 'm3 s-1', 'basin_outlet_water_x-section__time_max_of_volume_flux': 'm s-1', 'basin_outlet_water_x-section__volume_flow_rate': 'm3', 'basin_outlet_water_x-section__volume_flux': 'm s-1', #--------------------------------------------------------------------------- 'canals_entrance_water__volume_flow_rate': 'm3 s-1', #--------------------------------------------------------------------------- 'channel_bottom_surface__slope': '1', 'channel_bottom_water_flow__domain_max_of_log_law_roughness_length': 'm', 'channel_bottom_water_flow__domain_min_of_log_law_roughness_length': 'm', 'channel_bottom_water_flow__log_law_roughness_length': 'm', 'channel_bottom_water_flow__magnitude_of_shear_stress': 'kg m-1 s-2', 'channel_bottom_water_flow__shear_speed': 'm s-1', 'channel_centerline__sinuosity': '1', 'channel_water__volume': 'm3', 'channel_water_flow__froude_number': '1', 'channel_water_flow__half_of_fanning_friction_factor': '1', 'channel_water_flow__manning_n_parameter': 'm-1/3 s', 'channel_water_flow__domain_max_of_manning_n_parameter': 'm-1/3 s', 'channel_water_flow__domain_min_of_manning_n_parameter': 'm-1/3 s', 'channel_water_surface__slope': '1', #-------------------------------------------------------------------- 'channel_water_x-section__domain_max_of_mean_depth': 'm', 'channel_water_x-section__domain_min_of_mean_depth': 'm', 'channel_water_x-section__domain_max_of_volume_flow_rate': 'm3 s-1', 'channel_water_x-section__domain_min_of_volume_flow_rate': 'm3 s-1', 'channel_water_x-section__domain_max_of_volume_flux': 'm s-1', 'channel_water_x-section__domain_min_of_volume_flux': 'm s-1', #-------------------------------------------------------------------- 'channel_water_x-section__hydraulic_radius': 'm', 'channel_water_x-section__initial_mean_depth': 'm', 'channel_water_x-section__mean_depth': 'm', 'channel_water_x-section__volume_flow_rate': 'm3 s-1', 'channel_water_x-section__volume_flux': 'm s-1', 'channel_water_x-section__wetted_area': 'm2', 'channel_water_x-section__wetted_perimeter': 'm', 'channel_x-section_trapezoid_bottom__width': 'm', 'channel_x-section_trapezoid_side__flare_angle': 'rad', # CHECKED 'land_surface_water__domain_time_integral_of_runoff_volume_flux': 'm3', 'land_surface_water__runoff_volume_flux': 'm s-1', 'model__time_step': 's', 'model_grid_cell__area': 'm2', #------------------------------------------------------------------ 'canals__count': '1', 'canals_entrance__x_coordinate': 'm', 'canals_entrance__y_coordinate': 'm', 'canals_entrance_water__volume_fraction': '1', 'canals_exit__x_coordinate': 'm', 'canals_exit__y_coordinate': 'm', 'canals_exit_water__volume_flow_rate': 'm3 s-1', 'sinks__count': '1', 'sinks__x_coordinate': 'm', 'sinks__y_coordinate': 'm', 'sinks_water__volume_flow_rate': 'm3 s-1', 'sources__count': '1', 'sources__x_coordinate': 'm', 'sources__y_coordinate': 'm', 'sources_water__volume_flow_rate': 'm3 s-1' } #------------------------------------------------ # Return NumPy string arrays vs. Python lists ? #------------------------------------------------ ## _input_var_names = np.array( _input_var_names ) ## _output_var_names = np.array( _output_var_names ) #------------------------------------------------------------------- def get_input_var_names(self): #-------------------------------------------------------- # Note: These are currently variables needed from other # components vs. those read from files or GUI. #-------------------------------------------------------- return self._input_var_names # get_input_var_names() #------------------------------------------------------------------- def get_output_var_names(self): return self._output_var_names # get_output_var_names() #------------------------------------------------------------------- def get_var_name(self, long_var_name): return self._var_name_map[ long_var_name ] # get_var_name() #------------------------------------------------------------------- def get_var_units(self, long_var_name): return self._var_units_map[ long_var_name ] # get_var_units() #------------------------------------------------------------------- ## def get_var_type(self, long_var_name): ## ## #--------------------------------------- ## # So far, all vars have type "double", ## # but use the one in BMI_base instead. ## #--------------------------------------- ## return 'float64' ## ## # get_var_type() #------------------------------------------------------------------- def set_constants(self): #------------------------ # Define some constants #------------------------ self.g = np.float64(9.81) # (gravitation const.) self.aval = np.float64(0.476) # (integration const.) self.kappa = np.float64(0.408) # (von Karman's const.) self.law_const = np.sqrt(self.g) / self.kappa self.one_third = np.float64(1.0) / 3.0 self.two_thirds = np.float64(2.0) / 3.0 self.deg_to_rad = np.pi / 180.0 # set_constants() #------------------------------------------------------------------- def initialize(self, cfg_file=None, mode="nondriver", SILENT=False): if not(SILENT): print ' ' print 'Channels component: Initializing...' self.status = 'initializing' # (OpenMI 2.0 convention) self.mode = mode self.cfg_file = cfg_file #----------------------------------------------- # Load component parameters from a config file #----------------------------------------------- self.set_constants() # (12/7/09) # print 'CHANNELS calling initialize_config_vars()...' self.initialize_config_vars() # print 'CHANNELS calling read_grid_info()...' self.read_grid_info() #print 'CHANNELS calling initialize_basin_vars()...' self.initialize_basin_vars() # (5/14/10) #----------------------------------------- # This must come before "Disabled" test. #----------------------------------------- # print 'CHANNELS calling initialize_time_vars()...' self.initialize_time_vars() #---------------------------------- # Has component been turned off ? #---------------------------------- if (self.comp_status == 'Disabled'): if not(SILENT): print 'Channels component: Disabled.' self.SAVE_Q_GRIDS = False # (It is True by default.) self.SAVE_Q_PIXELS = False # (It is True by default.) self.DONE = True self.status = 'initialized' # (OpenMI 2.0 convention) return ## print '################################################' ## print 'min(d0), max(d0) =', self.d0.min(), self.d0.max() ## print '################################################' #--------------------------------------------- # Open input files needed to initialize vars #--------------------------------------------- # Can't move read_input_files() to start of # update(), since initial values needed here. #--------------------------------------------- # print 'CHANNELS calling open_input_files()...' self.open_input_files() print 'CHANNELS calling read_input_files()...' self.read_input_files() #----------------------- # Initialize variables #----------------------- print 'CHANNELS calling initialize_d8_vars()...' self.initialize_d8_vars() # (depend on D8 flow grid) print 'CHANNELS calling initialize_computed_vars()...' self.initialize_computed_vars() #-------------------------------------------------- # (5/12/10) I think this is obsolete now. #-------------------------------------------------- # Make sure self.Q_ts_file is not NULL (12/22/05) # This is only output file that is set by default # and is still NULL if user hasn't opened the # output var dialog for the channel process. #-------------------------------------------------- ## if (self.SAVE_Q_PIXELS and (self.Q_ts_file == '')): ## self.Q_ts_file = (self.case_prefix + '_0D-Q.txt') self.open_output_files() self.status = 'initialized' # (OpenMI 2.0 convention) # initialize() #------------------------------------------------------------------- ## def update(self, dt=-1.0, time_seconds=None): def update(self, dt=-1.0): #--------------------------------------------- # Note that u and d from previous time step # must be used on RHS of the equations here. #--------------------------------------------- self.status = 'updating' # (OpenMI 2.0 convention) #------------------------------------------------------- # There may be times where we want to call this method # even if component is not the driver. But note that # the TopoFlow driver also makes this same call. #------------------------------------------------------- if (self.mode == 'driver'): self.print_time_and_value(self.Q_outlet, 'Q_out', '[m^3/s]') ### interval=0.5) # [seconds] # For testing (5/19/12) # self.print_time_and_value(self.Q_outlet, 'Q_out', '[m^3/s] CHANNEL') ## DEBUG = True DEBUG = False #------------------------- # Update computed values #------------------------- if (DEBUG): print '#### Calling update_R()...' self.update_R() if (DEBUG): print '#### Calling update_R_integral()...' self.update_R_integral() if (DEBUG): print '#### Calling update_discharge()...' self.update_discharge() if (DEBUG): print '#### Calling update_diversions()...' self.update_diversions() if (DEBUG): print '#### Calling update_flow_volume()...' self.update_flow_volume() if (DEBUG): print '#### Calling update_flow_depth()...' self.update_flow_depth() #----------------------------------------------------------------- if not(self.DYNAMIC_WAVE): if (DEBUG): print '#### Calling update_trapezoid_Rh()...' self.update_trapezoid_Rh() # print 'Rhmin, Rhmax =', self.Rh.min(), self.Rh.max()a #----------------------------------------------------------------- # (9/9/14) Moved this here from update_velocity() methods. #----------------------------------------------------------------- if not(self.KINEMATIC_WAVE): if (DEBUG): print '#### Calling update_free_surface_slope()...' self.update_free_surface_slope() if (DEBUG): print '#### Calling update_shear_stress()...' self.update_shear_stress() if (DEBUG): print '#### Calling update_shear_speed()...' self.update_shear_speed() #----------------------------------------------------------------- # Must update friction factor before velocity for DYNAMIC_WAVE. #----------------------------------------------------------------- if (DEBUG): print '#### Calling update_friction_factor()...' self.update_friction_factor() #----------------------------------------------------------------- if (DEBUG): print '#### Calling update_velocity()...' self.update_velocity() self.update_velocity_on_edges() # (set to zero) if (DEBUG): print '#### Calling update_froude_number()...' self.update_froude_number() #----------------------------------------------------------------- ## print 'Rmin, Rmax =', self.R.min(), self.R.max() ## print 'Qmin, Qmax =', self.Q.min(), self.Q.max() ## print 'umin, umax =', self.u.min(), self.u.max() ## print 'dmin, dmax =', self.d.min(), self.d.max() ## print 'nmin, nmax =', self.nval.min(), self.nval.max() ## print 'Rhmin, Rhmax =', self.Rh.min(), self.Rh.max() ## print 'Smin, Smax =', self.S_bed.min(), self.S_bed.max() if (DEBUG): print '#### Calling update_outlet_values()...' self.update_outlet_values() if (DEBUG): print '#### Calling update peak values()...' self.update_peak_values() if (DEBUG): print '#### Calling update_Q_out_integral()...' self.update_Q_out_integral() #--------------------------------------------- # This takes extra time and is now done # only at the end, in finalize(). (8/19/13) #--------------------------------------------- # But then "topoflow_driver" doesn't get # correctly updated values for some reason. #--------------------------------------------- ## self.update_mins_and_maxes() #------------------------ # Check computed values #------------------------ D_OK = self.check_flow_depth() U_OK = self.check_flow_velocity() OK = (D_OK and U_OK) #------------------------------------------- # Read from files as needed to update vars #----------------------------------------------------- # NB! This is currently not needed for the "channel # process" because values don't change over time and # read_input_files() is called by initialize(). #----------------------------------------------------- # if (self.time_index > 0): # self.read_input_files() #---------------------------------------------- # Write user-specified data to output files ? #---------------------------------------------- # Components use own self.time_sec by default. #----------------------------------------------- if (DEBUG): print '#### Calling write_output_files()...' self.write_output_files() ## self.write_output_files( time_seconds ) #----------------------------- # Update internal clock # after write_output_files() #----------------------------- if (DEBUG): print '#### Calling update_time()' self.update_time( dt ) if (OK): self.status = 'updated' # (OpenMI 2.0 convention) else: self.status = 'failed' self.DONE = True # update() #------------------------------------------------------------------- def finalize(self): #--------------------------------------------------- # We can compute mins and maxes in the final grids # here, but the framework will not then pass them # to any component (e.g. topoflow_driver) that may # need them. #--------------------------------------------------- REPORT = True self.update_mins_and_maxes( REPORT=REPORT ) ## (2/6/13) self.print_final_report(comp_name='Channels component') self.status = 'finalizing' # (OpenMI) self.close_input_files() # TopoFlow input "data streams" self.close_output_files() self.status = 'finalized' # (OpenMI) #--------------------------- # Release all of the ports #---------------------------------------- # Make this call in "finalize()" method # of the component's CCA Imple file #---------------------------------------- # self.release_cca_ports( d_services ) # finalize() #------------------------------------------------------------------- def set_computed_input_vars(self): #--------------------------------------------------------------- # Note: The initialize() method calls initialize_config_vars() # (in BMI_base.py), which calls this method at the end. #-------------------------------------------------------------- cfg_extension = self.get_attribute( 'cfg_extension' ).lower() # cfg_extension = self.get_cfg_extension().lower() self.KINEMATIC_WAVE = ("kinematic" in cfg_extension) self.DIFFUSIVE_WAVE = ("diffusive" in cfg_extension) self.DYNAMIC_WAVE = ("dynamic" in cfg_extension) ########################################################## # (5/17/12) If MANNING, we need to set z0vals to -1 so # they are always defined for use with new framework. ########################################################## if (self.MANNING): if (self.nval != None): self.nval = np.float64( self.nval ) #### 10/9/10, NEED self.nval_min = self.nval.min() self.nval_max = self.nval.max() #----------------------------------- self.z0val = np.float64(-1) self.z0val_min = np.float64(-1) self.z0val_max = np.float64(-1) if (self.LAW_OF_WALL): if (self.z0val != None): self.z0val = np.float64( self.z0val ) #### (10/9/10) self.z0val_min = self.z0val.min() self.z0val_max = self.z0val.max() #----------------------------------- self.nval = np.float64(-1) self.nval_min = np.float64(-1) self.nval_max = np.float64(-1) #------------------------------------------- # These currently can't be set to anything # else in the GUI, but need to be defined. #------------------------------------------- self.code_type = 'Grid' self.slope_type = 'Grid' #--------------------------------------------------------- # Make sure that all "save_dts" are larger or equal to # the specified process dt. There is no point in saving # results more often than they change. # Issue a message to this effect if any are smaller ?? #--------------------------------------------------------- self.save_grid_dt = np.maximum(self.save_grid_dt, self.dt) self.save_pixels_dt = np.maximum(self.save_pixels_dt, self.dt) #--------------------------------------------------- # This is now done in CSDMS_base.read_config_gui() # for any var_name that starts with "SAVE_". #--------------------------------------------------- # self.SAVE_Q_GRID = (self.SAVE_Q_GRID == 'Yes') # set_computed_input_vars() #------------------------------------------------------------------- def initialize_d8_vars(self): #--------------------------------------------- # Compute and store a variety of (static) D8 # flow grid variables. Embed structure into # the "channel_base" component. #--------------------------------------------- self.d8 = d8_base.d8_component() ############################################### # (5/13/10) Do next line here for now, until # the d8 cfg_file includes static prefix. # Same is done in GW_base.py. ############################################### # tf_d8_base.read_grid_info() also needs # in_directory to be set. (10/27/11) ############################################### #-------------------------------------------------- # D8 component builds its cfg filename from these #-------------------------------------------------- self.d8.site_prefix = self.site_prefix self.d8.in_directory = self.in_directory self.d8.initialize( cfg_file=None, SILENT=self.SILENT, REPORT=self.REPORT ) ## self.code = self.d8.code # Don't need this. #------------------------------------------- # We'll need this once we shift from using # "tf_d8_base.py" to the new "d8_base.py" #------------------------------------------- # self.d8.update(self.time, SILENT=False, REPORT=True) # initialize_d8_vars() #------------------------------------------------------------- def initialize_computed_vars(self): #----------------------------------------------- # Convert bank angles from degrees to radians. #----------------------------------------------- self.angle = self.angle * self.deg_to_rad # [radians] #------------------------------------------------ # 8/29/05. Multiply ds by (unitless) sinuosity # Orig. ds is used by subsurface flow #------------------------------------------------ # NB! We should also divide slopes in S_bed by # the sinuosity, as now done here. #---------------------------------------------------- # NB! This saves a modified version of ds that # is only used within the "channels" component. # The original "ds" is stored within the # topoflow model component and is used for # subsurface flow, etc. #---------------------------------------------------- ### self.d8.ds_chan = (self.sinu * ds) ### self.ds = (self.sinu * self.d8.ds) self.d8.ds = (self.sinu * self.d8.ds) ### USE LESS MEMORY ################################################### ################################################### ### S_bed = (S_bed / self.sinu) #************* self.slope = (self.slope / self.sinu) self.S_bed = self.slope ################################################### ################################################### #--------------------------- # Initialize spatial grids #----------------------------------------------- # NB! It is not a good idea to initialize the # water depth grid to a nonzero scalar value. #----------------------------------------------- print 'Initializing u, f, d grids...' self.u = np.zeros([self.ny, self.nx], dtype='Float64') self.f = np.zeros([self.ny, self.nx], dtype='Float64') self.d = np.zeros([self.ny, self.nx], dtype='Float64') + self.d0 ######################################################### # Add this on (2/3/13) so make the TF driver happy # during its initialize when it gets reference to R. # But in "update_R()", be careful not to break the ref. # "Q" may be subject to the same issue. ######################################################### self.Q = np.zeros([self.ny, self.nx], dtype='Float64') self.R = np.zeros([self.ny, self.nx], dtype='Float64') #--------------------------------------------------- # Initialize new grids. Is this needed? (9/13/14) #--------------------------------------------------- self.tau = np.zeros([self.ny, self.nx], dtype='Float64') self.u_star = np.zeros([self.ny, self.nx], dtype='Float64') self.froude = np.zeros([self.ny, self.nx], dtype='Float64') #--------------------------------------- # These are used to check mass balance #--------------------------------------- self.vol_R = self.initialize_scalar( 0, dtype='float64') self.vol_Q = self.initialize_scalar( 0, dtype='float64') #------------------------------------------- # Make sure all slopes are valid & nonzero # since otherwise flow will accumulate #------------------------------------------- if (self.KINEMATIC_WAVE): self.remove_bad_slopes() #(3/8/07. Only Kin Wave case) #---------------------------------------- # Initial volume of water in each pixel #----------------------------------------------------------- # Note: angles were read as degrees & converted to radians #----------------------------------------------------------- L2 = self.d * np.tan(self.angle) self.A_wet = self.d * (self.width + L2) self.P_wet = self.width + (np.float64(2) * self.d / np.cos(self.angle) ) self.vol = self.A_wet * self.d8.ds # [m3] #------------------------------------------------------- # Note: depth is often zero at the start of a run, and # both width and then P_wet are also zero in places. # Therefore initialize Rh as shown. #------------------------------------------------------- self.Rh = np.zeros([self.ny, self.nx], dtype='Float64') ## self.Rh = self.A_wet / self.P_wet # [m] ## print 'P_wet.min() =', self.P_wet.min() ## print 'width.min() =', self.width.min() ## self.initialize_diversion_vars() # (9/22/14) self.initialize_outlet_values() self.initialize_peak_values() self.initialize_min_and_max_values() ## (2/3/13) ######################################### # Maybe save all refs in a dictionary # called "self_values" here ? (2/19/13) # Use a "reverse" var_name mapping? # inv_map = dict(zip(map.values(), map.keys())) ######################################### ## w = np.where( self.width <= 0 ) ## nw = np.size( w[0] ) # (This is correct for 1D or 2D.) ## if (nw > 0): ## print 'WARNING:' ## print 'Number of locations where width==0 =', nw ## if (nw < 10): ## print 'locations =', w ## print ' ' # initialize_computed_vars() #------------------------------------------------------------- def initialize_diversion_vars(self): #----------------------------------------- # Compute source IDs from xy coordinates #----------------------------------------- source_rows = np.int32( self.sources_y / self.ny ) source_cols = np.int32( self.sources_x / self.nx ) self.source_IDs = (source_rows, source_cols) ## self.source_IDs = (source_rows * self.nx) + source_cols #--------------------------------------- # Compute sink IDs from xy coordinates #--------------------------------------- sink_rows = np.int32( self.sinks_y / self.ny ) sink_cols = np.int32( self.sinks_x / self.nx ) self.sink_IDs = (sink_rows, sink_cols) ## self.sink_IDs = (sink_rows * self.nx) + sink_cols #------------------------------------------------- # Compute canal entrance IDs from xy coordinates #------------------------------------------------- canal_in_rows = np.int32( self.canals_in_y / self.ny ) canal_in_cols = np.int32( self.canals_in_x / self.nx ) self.canal_in_IDs = (canal_in_rows, canal_in_cols) ## self.canal_in_IDs = (canal_in_rows * self.nx) + canal_in_cols #--------------------------------------------- # Compute canal exit IDs from xy coordinates #--------------------------------------------- canal_out_rows = np.int32( self.canals_out_y / self.ny ) canal_out_cols = np.int32( self.canals_out_x / self.nx ) self.canal_out_IDs = (canal_out_rows, canal_out_cols) ## self.canal_out_IDs = (canal_out_rows * self.nx) + canal_out_cols #-------------------------------------------------- # This will be computed from Q_canal_fraction and # self.Q and then passed back to Diversions #-------------------------------------------------- self.Q_canals_in = np.array( self.n_sources, dtype='float64' ) # initialize_diversion_vars() #------------------------------------------------------------------- def initialize_outlet_values(self): #--------------------------------------------------- # Note: These are retrieved and used by TopoFlow # for the stopping condition. TopoFlow # receives a reference to these, but in # order to see the values change they need # to be stored as mutable, 1D numpy arrays. #--------------------------------------------------- # Note: Q_last is internal to TopoFlow. #--------------------------------------------------- # self.Q_outlet = self.Q[ self.outlet_ID ] self.Q_outlet = self.initialize_scalar(0, dtype='float64') self.u_outlet = self.initialize_scalar(0, dtype='float64') self.d_outlet = self.initialize_scalar(0, dtype='float64') self.f_outlet = self.initialize_scalar(0, dtype='float64') # initialize_outlet_values() #------------------------------------------------------------------- def initialize_peak_values(self): #------------------------- # Initialize peak values #------------------------- self.Q_peak = self.initialize_scalar(0, dtype='float64') self.T_peak = self.initialize_scalar(0, dtype='float64') self.u_peak = self.initialize_scalar(0, dtype='float64') self.Tu_peak = self.initialize_scalar(0, dtype='float64') self.d_peak = self.initialize_scalar(0, dtype='float64') self.Td_peak = self.initialize_scalar(0, dtype='float64') # initialize_peak_values() #------------------------------------------------------------------- def initialize_min_and_max_values(self): #------------------------------- # Initialize min & max values # (2/3/13), for new framework. #------------------------------- v = 1e6 self.Q_min = self.initialize_scalar(v, dtype='float64') self.Q_max = self.initialize_scalar(-v, dtype='float64') self.u_min = self.initialize_scalar(v, dtype='float64') self.u_max = self.initialize_scalar(-v, dtype='float64') self.d_min = self.initialize_scalar(v, dtype='float64') self.d_max = self.initialize_scalar(-v, dtype='float64') # initialize_min_and_max_values() #------------------------------------------------------------------- # def update_excess_rainrate(self): def update_R(self): #---------------------------------------- # Compute the "excess rainrate", R. # Each term must have same units: [m/s] # Sum = net gain/loss rate over pixel. #---------------------------------------------------- # R can be positive or negative. If negative, then # water is removed from the surface at rate R until # surface water is consumed. #-------------------------------------------------------------- # P = precip_rate [m/s] (converted by read_input_data()). # SM = snowmelt rate [m/s] # GW = seep rate [m/s] (water_table intersects surface) # ET = evap rate [m/s] # IN = infil rate [m/s] # MR = icemelt rate [m/s] #------------------------------------------------------------ # Use refs to other comp vars from new framework. (5/18/12) #------------------------------------------------------------ P = self.P_rain # (This is now liquid-only precip. 9/14/14) SM = self.SM GW = self.GW ET = self.ET IN = self.IN MR = self.MR ## if (self.DEBUG): ## print 'At time:', self.time_min, ', P =', P, '[m/s]' #-------------- # For testing #-------------- ## print '(Pmin, Pmax) =', P.min(), P.max() ## print '(SMmin, SMmax) =', SM.min(), SM.max() ## print '(GWmin, GWmax) =', GW.min(), GW.max() ## print '(ETmin, ETmax) =', ET.min(), ET.max() ## print '(INmin, INmax) =', IN.min(), IN.max() ## print '(MRmin, MRmax) =', MR.min(), MR.max() ## # print '(Hmin, Hmax) =', H.min(), H.max() ## print ' ' self.R = (P + SM + GW + MR) - (ET + IN) # update_R() #------------------------------------------------------------------- def update_R_integral(self): #----------------------------------------------- # Update mass total for R, sum over all pixels #----------------------------------------------- volume = np.double(self.R * self.da * self.dt) # [m^3] if (np.size(volume) == 1): self.vol_R += (volume * self.rti.n_pixels) else: self.vol_R += np.sum(volume) # update_R_integral() #------------------------------------------------------------------- def update_discharge(self): #--------------------------------------------------------- # The discharge grid, Q, gives the flux of water _out_ # of each grid cell. This entire amount then flows # into one of the 8 neighbor grid cells, as indicated # by the D8 flow code. The update_flow_volume() function # is called right after this one in update() and uses # the Q grid. #--------------------------------------------------------- # 7/15/05. The cross-sectional area of a trapezoid is # given by: Ac = d * (w + (d * tan(theta))), # where w is the bottom width. If we were to # use: Ac = w * d, then we'd have Ac=0 when w=0. # We also need angle units to be radians. #--------------------------------------------------------- #----------------------------- # Compute the discharge grid #------------------------------------------------------ # A_wet is initialized in initialize_computed_vars(). # A_wet is updated in update_trapezoid_Rh(). #------------------------------------------------------ ### self.Q = np.float64(self.u * A_wet) self.Q[:] = self.u * self.A_wet ## (2/19/13, in place) #-------------- # For testing #-------------- ## print '(umin, umax) =', self.u.min(), self.u.max() ## print '(d0min, d0max) =', self.d0.min(), self.d0.max() ## print '(dmin, dmax) =', self.d.min(), self.d.max() ## print '(amin, amax) =', self.angle.min(), self.angle.max() ## print '(wmin, wmax) =', self.width.min(), self.width.max() ## print '(Qmin, Qmax) =', self.Q.min(), self.Q.max() ## print '(L2min, L2max) =', L2.min(), L2.max() ## print '(Qmin, Qmax) =', self.Q.min(), self.Q.max() #-------------- # For testing #-------------- # print 'dmin, dmax =', self.d.min(), self.d.max() # print 'umin, umax =', self.u.min(), self.u.max() # print 'Qmin, Qmax =', self.Q.min(), self.Q.max() # print ' ' # print 'u(outlet) =', self.u[self.outlet_ID] # print 'Q(outlet) =', self.Q[self.outlet_ID] ######## #---------------------------------------------------- # Wherever depth is less than z0, assume that water # is not flowing and set u and Q to zero. # However, we also need (d gt 0) to avoid a divide # by zero problem, even when numerators are zero. #---------------------------------------------------- # FLOWING = (d > (z0/aval)) #*** FLOWING[self.d8.noflow_IDs] = False ;****** # u = (u * FLOWING) # Q = (Q * FLOWING) # d = np.maximum(d, 0.0) ;(allow depths lt z0, if gt 0.) # update_discharge() #------------------------------------------------------------------- def update_diversions(self): #-------------------------------------------------------------- # Note: The Channel component requests the following input # vars from the Diversions component by including # them in its "get_input_vars()": # (1) Q_sources, Q_sources_x, Q_sources_y # (2) Q_sinks, Q_sinks_x, Q_sinks_y # (3) Q_canals_out, Q_canals_out_x, Q_canals_out_y # (4) Q_canals_fraction, Q_canals_in_x, Q_canals_in_y. # source_IDs are computed from (x,y) coordinates during # initialize(). # # Diversions component needs to get Q_canals_in from the # Channel component. #-------------------------------------------------------------- # Note: This *must* be called after update_discharge() and # before update_flow_volume(). #-------------------------------------------------------------- # Note: The Q grid stores the volume flow rate *leaving* each # grid cell in the domain. For sources, an extra amount # is leaving the cell which can flow into its D8 parent # cell. For sinks, a lesser amount is leaving the cell # toward the D8 parent. #-------------------------------------------------------------- # Note: It is not enough to just update Q and then call the # update_flow_volume() method. This is because it # won't update the volume in the channels in the grid # cells that the extra discharge is leaving from. #-------------------------------------------------------------- # If a grid cell contains a "source", then an additional Q # will flow *into* that grid cell and increase flow volume. #-------------------------------------------------------------- #------------------------------------------------------------- # This is not fully tested but runs. However, the Diversion # vars are still computed even when Diversions component is # disabled. So it slows things down somewhat. #------------------------------------------------------------- return ######################## ######################## #---------------------------------------- # Update Q and vol due to point sources #---------------------------------------- ## if (hasattr(self, 'source_IDs')): if (self.n_sources > 0): self.Q[ self.source_IDs ] += self.Q_sources self.vol[ self.source_IDs ] += (self.Q_sources * self.dt) #-------------------------------------- # Update Q and vol due to point sinks #-------------------------------------- ## if (hasattr(self, 'sink_IDs')): if (self.n_sinks > 0): self.Q[ self.sink_IDs ] -= self.Q_sinks self.vol[ self.sink_IDs ] -= (self.Q_sinks * self.dt) #--------------------------------------- # Update Q and vol due to point canals #--------------------------------------- ## if (hasattr(self, 'canal_in_IDs')): if (self.n_canals > 0): #----------------------------------------------------------------- # Q grid was just modified. Apply the canal diversion fractions # to compute the volume flow rate into upstream ends of canals. #----------------------------------------------------------------- Q_canals_in = self.Q_canals_fraction * self.Q[ self.canal_in_IDs ] self.Q_canals_in = Q_canals_in #---------------------------------------------------- # Update Q and vol due to losses at canal entrances #---------------------------------------------------- self.Q[ self.canal_in_IDs ] -= Q_canals_in self.vol[ self.canal_in_IDs ] -= (Q_canals_in * self.dt) #------------------------------------------------- # Update Q and vol due to gains at canal exits. # Diversions component accounts for travel time. #------------------------------------------------- self.Q[ self.canal_out_IDs ] += self.Q_canals_out self.vol[ self.canal_out_IDs ] += (self.Q_canals_out * self.dt) # update_diversions() #------------------------------------------------------------------- def update_flow_volume(self): #----------------------------------------------------------- # Notes: This function must be called after # update_discharge() and update_diversions(). #----------------------------------------------------------- # Notes: Q = surface discharge [m^3/s] # R = excess precip. rate [m/s] # da = pixel area [m^2] # dt = channel flow timestep [s] # vol = total volume of water in pixel [m^3] # v2 = temp version of vol # w1 = IDs of pixels that... # p1 = IDs of parent pixels that... #----------------------------------------------------------- dt = self.dt # [seconds] #---------------------------------------------------- # Add contribution (or loss ?) from excess rainrate #---------------------------------------------------- # Contributions over entire grid cell from rainfall, # snowmelt, icemelt and baseflow (minus losses from # evaporation and infiltration) are assumed to flow # into the channel within the grid cell. # Note that R is allowed to be negative. #---------------------------------------------------- self.vol += (self.R * self.da) * dt # (in place) #----------------------------------------- # Add contributions from neighbor pixels #------------------------------------------------------------- # Each grid cell passes flow to *one* downstream neighbor. # Note that multiple grid cells can flow toward a given grid # cell, so a grid cell ID may occur in d8.p1 and d8.p2, etc. #------------------------------------------------------------- # (2/16/10) RETEST THIS. Before, a copy called "v2" was # used but this doesn't seem to be necessary. #------------------------------------------------------------- if (self.d8.p1_OK): self.vol[ self.d8.p1 ] += (dt * self.Q[self.d8.w1]) if (self.d8.p2_OK): self.vol[ self.d8.p2 ] += (dt * self.Q[self.d8.w2]) if (self.d8.p3_OK): self.vol[ self.d8.p3 ] += (dt * self.Q[self.d8.w3]) if (self.d8.p4_OK): self.vol[ self.d8.p4 ] += (dt * self.Q[self.d8.w4]) if (self.d8.p5_OK): self.vol[ self.d8.p5 ] += (dt * self.Q[self.d8.w5]) if (self.d8.p6_OK): self.vol[ self.d8.p6 ] += (dt * self.Q[self.d8.w6]) if (self.d8.p7_OK): self.vol[ self.d8.p7 ] += (dt * self.Q[self.d8.w7]) if (self.d8.p8_OK): self.vol[ self.d8.p8 ] += (dt * self.Q[self.d8.w8]) #---------------------------------------------------- # Subtract the amount that flows out to D8 neighbor #---------------------------------------------------- self.vol -= (self.Q * dt) # (in place) #-------------------------------------------------------- # While R can be positive or negative, the surface flow # volume must always be nonnegative. This also ensures # that the flow depth is nonnegative. (7/13/06) #-------------------------------------------------------- ## self.vol = np.maximum(self.vol, 0.0) ## self.vol[:] = np.maximum(self.vol, 0.0) # (2/19/13) np.maximum( self.vol, 0.0, self.vol ) # (in place) # update_flow_volume #------------------------------------------------------------------- def update_flow_depth(self): #----------------------------------------------------------- # Notes: 7/18/05. Modified to use the equation for volume # of a trapezoidal channel: vol = Ac * ds, where # Ac=d*[w + d*tan(t)], and to solve the resulting # quadratic (discarding neg. root) for new depth, d. # 8/29/05. Now original ds is used for subsurface # flow and there is a ds_chan which can include a # sinuosity greater than 1. This may be especially # important for larger pixel sizes. # Removed (ds > 1) here which was only meant to # avoid a "divide by zero" error at pixels where # (ds eq 0). This isn't necessary since the # Flow_Lengths function in utils_TF.pro never # returns a value of zero. #---------------------------------------------------------- # Modified to avoid double where calls, which # reduced cProfile run time for this method from # 1.391 to 0.644. (9/23/14) #---------------------------------------------------------- # Commented this out on (2/18/10) because it doesn't # seem to be used anywhere now. Checked all # of the Channels components. #---------------------------------------------------------- # self.d_last = self.d.copy() #----------------------------------- # Make some local aliases and vars #----------------------------------------------------------- # Note: angles were read as degrees & converted to radians #----------------------------------------------------------- d = self.d width = self.width ### angle = self.angle SCALAR_ANGLES = (np.size(angle) == 1) #------------------------------------------------------ # (2/18/10) New code to deal with case where the flow # depth exceeds a bankfull depth. # For now, d_bankfull is hard-coded. # # CHANGE Manning's n here, too? #------------------------------------------------------ d_bankfull = 4.0 # [meters] ################################ wb = (self.d > d_bankfull) # (array of True or False) self.width[ wb ] = self.d8.dw[ wb ] if not(SCALAR_ANGLES): self.angle[ wb ] = 0.0 # w_overbank = np.where( d > d_bankfull ) # n_overbank = np.size( w_overbank[0] ) # if (n_overbank != 0): # width[ w_overbank ] = self.d8.dw[ w_overbank ] # if not(SCALAR_ANGLES): angle[w_overbank] = 0.0 #------------------------------------------------------ # (2/18/10) New code to deal with case where the top # width exceeds the grid cell width, dw. #------------------------------------------------------ top_width = width + (2.0 * d * np.sin(self.angle)) wb = (top_width > self.d8.dw) # (array of True or False) self.width[ wb ] = self.d8.dw[ wb ] if not(SCALAR_ANGLES): self.angle[ wb ] = 0.0 # wb = np.where(top_width > self.d8.dw) # nb = np.size(w_bad[0]) # if (nb != 0): # width[ wb ] = self.d8.dw[ wb ] # if not(SCALAR_ANGLES): angle[ wb ] = 0.0 #---------------------------------- # Is "angle" a scalar or a grid ? #---------------------------------- if (SCALAR_ANGLES): if (angle == 0.0): d = self.vol / (width * self.d8.ds) else: denom = 2.0 * np.tan(angle) arg = 2.0 * denom * self.vol / self.d8.ds arg += width**(2.0) d = (np.sqrt(arg) - width) / denom else: #----------------------------------------------------- # Pixels where angle is 0 must be handled separately #----------------------------------------------------- w1 = ( angle == 0 ) # (arrays of True or False) w2 = np.invert( w1 ) #----------------------------------- A_top = width[w1] * self.d8.ds[w1] d[w1] = self.vol[w1] / A_top #----------------------------------- denom = 2.0 * np.tan(angle[w2]) arg = 2.0 * denom * self.vol[w2] / self.d8.ds[w2] arg += width[w2]**(2.0) d[w2] = (np.sqrt(arg) - width[w2]) / denom #----------------------------------------------------- # Pixels where angle is 0 must be handled separately #----------------------------------------------------- # wz = np.where( angle == 0 ) # nwz = np.size( wz[0] ) # wzc = np.where( angle != 0 ) # nwzc = np.size( wzc[0] ) # # if (nwz != 0): # A_top = width[wz] * self.d8.ds[wz] # ## A_top = self.width[wz] * self.d8.ds_chan[wz] # d[wz] = self.vol[wz] / A_top # # if (nwzc != 0): # term1 = 2.0 * np.tan(angle[wzc]) # arg = 2.0 * term1 * self.vol[wzc] / self.d8.ds[wzc] # arg += width[wzc]**(2.0) # d[wzc] = (np.sqrt(arg) - width[wzc]) / term1 #------------------------------------------ # Set depth values on edges to zero since # they become spikes (no outflow) 7/15/06 #------------------------------------------ d[ self.d8.noflow_IDs ] = 0.0 #------------------------------------------------ # 4/19/06. Force flow depth to be positive ? #------------------------------------------------ # This seems to be needed with the non-Richards # infiltration routines when starting with zero # depth everywhere, since all water infiltrates # for some period of time. It also seems to be # needed more for short rainfall records to # avoid a negative flow depth error. #------------------------------------------------ # 7/13/06. Still needed for Richards method #------------------------------------------------ ## self.d = np.maximum(d, 0.0) np.maximum(d, 0.0, self.d) # (2/19/13, in place) #------------------------------------------------- # Find where d <= 0 and save for later (9/23/14) #------------------------------------------------- self.d_is_pos = (self.d > 0) self.d_is_neg = np.invert( self.d_is_pos ) # update_flow_depth #------------------------------------------------------------------- def update_free_surface_slope(self): #----------------------------------------------------------- # Notes: It is assumed that the flow directions don't # change even though the free surface is changing. #----------------------------------------------------------- delta_d = (self.d - self.d[self.d8.parent_IDs]) self.S_free[:] = self.S_bed + (delta_d / self.d8.ds) #-------------------------------------------- # Don't do this; negative slopes are needed # to decelerate flow in dynamic wave case # and for backwater effects. #-------------------------------------------- # Set negative slopes to zero #------------------------------ ### self.S_free = np.maximum(self.S_free, 0) # update_free_surface_slope() #------------------------------------------------------------------- def update_shear_stress(self): #-------------------------------------------------------- # Notes: 9/9/14. Added so shear stress could be shared. # This uses the depth-slope product. #-------------------------------------------------------- if (self.KINEMATIC_WAVE): slope = self.S_bed else: slope = self.S_free self.tau[:] = self.rho_H2O * self.g * self.d * slope # update_shear_stress() #------------------------------------------------------------------- def update_shear_speed(self): #-------------------------------------------------------- # Notes: 9/9/14. Added so shear speed could be shared. #-------------------------------------------------------- self.u_star[:] = np.sqrt( self.tau / self.rho_H2O ) # update_shear_speed() #------------------------------------------------------------------- def update_trapezoid_Rh(self): #------------------------------------------------------------- # Notes: Compute the hydraulic radius of a trapezoid that: # (1) has a bed width of wb >= 0 (0 for triangular) # (2) has a bank angle of theta (0 for rectangular) # (3) is filled with water to a depth of d. # The units of wb and d are meters. The units of # theta are assumed to be degrees and are converted. #------------------------------------------------------------- # NB! wb should never be zero, so P_wet can never be 0, # which would produce a NaN (divide by zero). #------------------------------------------------------------- # See Notes for TF_Tan function in utils_TF.pro # AW = d * (wb + (d * TF_Tan(theta_rad)) ) #------------------------------------------------------------- # 9/9/14. Bug fix. Angles were already in radians but # were converted to radians again. #-------------------------------------------------------------- #--------------------------------------------------------- # Compute hydraulic radius grid for trapezoidal channels #----------------------------------------------------------- # Note: angles were read as degrees & converted to radians #----------------------------------------------------------- d = self.d # (local synonyms) wb = self.width # (trapezoid bottom width) L2 = d * np.tan( self.angle ) A_wet = d * (wb + L2) P_wet = wb + (np.float64(2) * d / np.cos(self.angle) ) #--------------------------------------------------- # At noflow_IDs (e.g. edges) P_wet may be zero # so do this to avoid "divide by zero". (10/29/11) #--------------------------------------------------- P_wet[ self.d8.noflow_IDs ] = np.float64(1) Rh = (A_wet / P_wet) #-------------------------------- # w = np.where(P_wet == 0) # print 'In update_trapezoid_Rh():' # print ' P_wet= 0 at', w[0].size, 'cells' #------------------------------------ # Force edge pixels to have Rh = 0. # This will make u = 0 there also. #------------------------------------ Rh[ self.d8.noflow_IDs ] = np.float64(0) ## w = np.where(wb <= 0) ## nw = np.size(w[0]) ## if (nw > 0): Rh[w] = np.float64(0) self.Rh[:] = Rh self.A_wet[:] = A_wet ## (Now shared: 9/9/14) self.P_wet[:] = P_wet ## (Now shared: 9/9/14) #--------------- # For testing #-------------- ## print 'dmin, dmax =', d.min(), d.max() ## print 'wmin, wmax =', wb.min(), wb.max() ## print 'amin, amax =', self.angle.min(), self.angle.max() # update_trapezoid_Rh() #------------------------------------------------------------------- def update_friction_factor(self): #---------------------------------------- # Note: Added on 9/9/14 to streamline. #---------------------------------------------------------- # Note: f = half of the Fanning friction factor # d = flow depth [m] # z0 = roughness length # S = bed slope (assumed equal to friction slope) # g = 9.81 = gravitation constant [m/s^2] #--------------------------------------------------------- # For law of the wall: # kappa = 0.41 = von Karman's constant # aval = 0.48 = integration constant # law_const = sqrt(g)/kappa = 7.6393d # smoothness = (aval / z0) * d # f = (kappa / alog(smoothness))^2d # tau_bed = rho_w * f * u^2 = rho_w * g * d * S # d, S, and z0 can be arrays. # To make default z0 correspond to default # Manning's n, can use this approximation: # z0 = a * (2.34 * sqrt(9.81) * n / kappa)^6d # For n=0.03, this gives: z0 = 0.011417 ######################################################### # However, for n=0.3, it gives: z0 = 11417.413 # which is 11.4 km! So the approximation only # holds within some range of values. #-------------------------------------------------------- ############################################################### # cProfile: This method took: 0.369 secs for topoflow_test() ############################################################### #-------------------------------------- # Find where (d <= 0). g=good, b=bad #-------------------------------------- wg = self.d_is_pos wb = self.d_is_neg # wg = ( self.d > 0 ) # wb = np.invert( wg ) #----------------------------- # Compute f for Manning case #----------------------------------------- # This makes f=0 and du=0 where (d <= 0) #----------------------------------------- if (self.MANNING): n2 = self.nval ** np.float64(2) self.f[ wg ] = self.g * (n2[wg] / (self.d[wg] ** self.one_third)) self.f[ wb ] = np.float64(0) #--------------------------------- # Compute f for Law of Wall case #--------------------------------- if (self.LAW_OF_WALL): #------------------------------------------------ # Make sure (smoothness > 1) before taking log. # Should issue a warning if this is used. #------------------------------------------------ smoothness = (self.aval / self.z0val) * self.d np.maximum(smoothness, np.float64(1.1), smoothness) # (in place) self.f[wg] = (self.kappa / np.log(smoothness[wg])) ** np.float64(2) self.f[wb] = np.float64(0) ############################################################## # cProfile: This method took: 0.93 secs for topoflow_test() ############################################################## # #-------------------------------------- # # Find where (d <= 0). g=good, b=bad # #-------------------------------------- # wg = np.where( self.d > 0 ) # ng = np.size( wg[0]) # wb = np.where( self.d <= 0 ) # nb = np.size( wb[0] ) # # #----------------------------- # # Compute f for Manning case # #----------------------------------------- # # This makes f=0 and du=0 where (d <= 0) # #----------------------------------------- # if (self.MANNING): # n2 = self.nval ** np.float64(2) # if (ng != 0): # self.f[wg] = self.g * (n2[wg] / (self.d[wg] ** self.one_third)) # if (nb != 0): # self.f[wb] = np.float64(0) # # #--------------------------------- # # Compute f for Law of Wall case # #--------------------------------- # if (self.LAW_OF_WALL): # #------------------------------------------------ # # Make sure (smoothness > 1) before taking log. # # Should issue a warning if this is used. # #------------------------------------------------ # smoothness = (self.aval / self.z0val) * self.d # np.maximum(smoothness, np.float64(1.1), smoothness) # (in place) # ## smoothness = np.maximum(smoothness, np.float64(1.1)) # if (ng != 0): # self.f[wg] = (self.kappa / np.log(smoothness[wg])) ** np.float64(2) # if (nb != 0): # self.f[wb] = np.float64(0) #--------------------------------------------- # We could share the Fanning friction factor #--------------------------------------------- ### self.fanning = (np.float64(2) * self.f) # update_friction_factor() #------------------------------------------------------------------- def update_velocity(self): #--------------------------------------------------------- # Note: Do nothing now unless this method is overridden # by a particular method of computing velocity. #--------------------------------------------------------- print "Warning: update_velocity() method is inactive." # print 'KINEMATIC WAVE =', self.KINEMATIC_WAVE # print 'DIFFUSIVE WAVE =', self.DIFFUSIVE_WAVE # print 'DYNAMIC WAVE =', self.DYNAMIC_WAVE # update_velocity() #------------------------------------------------------------------- def update_velocity_on_edges(self): #--------------------------------- # Force edge pixels to have u=0. #---------------------------------------- # Large slope around 1 flows into small # slope & leads to a negative velocity. #---------------------------------------- self.u[ self.d8.noflow_IDs ] = np.float64(0) # update_velocity_on_edges() #------------------------------------------------------------------- def update_froude_number(self): #---------------------------------------------------------- # Notes: 9/9/14. Added so Froude number could be shared. # This use of wg & wb reduced cProfile time from: # 0.644 sec to: 0.121. (9/23/14) #---------------------------------------------------------- # g = good, b = bad #-------------------- wg = self.d_is_pos wb = self.d_is_neg self.froude[ wg ] = self.u[wg] / np.sqrt( self.g * self.d[wg] ) self.froude[ wb ] = np.float64(0) # update_froude_number() #------------------------------------------------------------- def update_outlet_values(self): #------------------------------------------------- # Save computed values at outlet, which are used # by the TopoFlow driver. #----------------------------------------------------- # Note that Q_outlet, etc. are defined as 0D numpy # arrays to make them "mutable scalars" (i.e. # this allows changes to be seen by other components # who have a reference. To preserver the reference, # however, we must use fill() to assign a new value. #----------------------------------------------------- Q_outlet = self.Q[ self.outlet_ID ] u_outlet = self.u[ self.outlet_ID ] d_outlet = self.d[ self.outlet_ID ] f_outlet = self.f[ self.outlet_ID ] self.Q_outlet.fill( Q_outlet ) self.u_outlet.fill( u_outlet ) self.d_outlet.fill( d_outlet ) self.f_outlet.fill( f_outlet ) ## self.Q_outlet.fill( self.Q[ self.outlet_ID ] ) ## self.u_outlet.fill( self.u[ self.outlet_ID ] ) ## self.d_outlet.fill( self.d[ self.outlet_ID ] ) ## self.f_outlet.fill( self.f[ self.outlet_ID ] ) ## self.Q_outlet = self.Q[ self.outlet_ID ] ## self.u_outlet = self.u[ self.outlet_ID ] ## self.d_outlet = self.d[ self.outlet_ID ] ## self.f_outlet = self.f[ self.outlet_ID ] ## self.Q_outlet = self.Q.flat[self.outlet_ID] ## self.u_outlet = self.u.flat[self.outlet_ID] ## self.d_outlet = self.d.flat[self.outlet_ID] ## self.f_outlet = self.f.flat[self.outlet_ID] # update_outlet_values() #------------------------------------------------------------- def update_peak_values(self): if (self.Q_outlet > self.Q_peak): self.Q_peak.fill( self.Q_outlet ) self.T_peak.fill( self.time_min ) # (time to peak) #--------------------------------------- if (self.u_outlet > self.u_peak): self.u_peak.fill( self.u_outlet ) self.Tu_peak.fill( self.time_min ) #--------------------------------------- if (self.d_outlet > self.d_peak): self.d_peak.fill( self.d_outlet ) self.Td_peak.fill( self.time_min ) ## if (self.Q_outlet > self.Q_peak): ## self.Q_peak = self.Q_outlet ## self.T_peak = self.time_min # (time to peak) ## #----------------------------------- ## if (self.u_outlet > self.u_peak): ## self.u_peak = self.u_outlet ## self.Tu_peak = self.time_min ## #----------------------------------- ## if (self.d_outlet > self.d_peak): ## self.d_peak = self.d_outlet ## self.Td_peak = self.time_min # update_peak_values() #------------------------------------------------------------- def update_Q_out_integral(self): #-------------------------------------------------------- # Note: Renamed "volume_out" to "vol_Q" for consistency # with vol_P, vol_SM, vol_IN, vol_ET, etc. (5/18/12) #-------------------------------------------------------- self.vol_Q += (self.Q_outlet * self.dt) ## Experiment: 5/19/12. ## self.vol_Q += (self.Q[self.outlet_ID] * self.dt) # update_Q_out_integral() #------------------------------------------------------------- def update_mins_and_maxes(self, REPORT=False): #-------------------------------------- # Get mins and max over entire domain #-------------------------------------- ## Q_min = self.Q.min() ## Q_max = self.Q.max() ## #--------------------- ## u_min = self.u.min() ## u_max = self.u.max() ## #--------------------- ## d_min = self.d.min() ## d_max = self.d.max() #-------------------------------------------- # Exclude edges where mins are always zero. #-------------------------------------------- nx = self.nx ny = self.ny Q_min = self.Q[1:(ny - 2)+1,1:(nx - 2)+1].min() Q_max = self.Q[1:(ny - 2)+1,1:(nx - 2)+1].max() #------------------------------------------------- u_min = self.u[1:(ny - 2)+1,1:(nx - 2)+1].min() u_max = self.u[1:(ny - 2)+1,1:(nx - 2)+1].max() #------------------------------------------------- d_min = self.d[1:(ny - 2)+1,1:(nx - 2)+1].min() d_max = self.d[1:(ny - 2)+1,1:(nx - 2)+1].max() #------------------------------------------------- # (2/6/13) This preserves "mutable scalars" that # can be accessed as refs by other components. #------------------------------------------------- if (Q_min < self.Q_min): self.Q_min.fill( Q_min ) if (Q_max > self.Q_max): self.Q_max.fill( Q_max ) #------------------------------ if (u_min < self.u_min): self.u_min.fill( u_min ) if (u_max > self.u_max): self.u_max.fill( u_max ) #------------------------------ if (d_min < self.d_min): self.d_min.fill( d_min ) if (d_max > self.d_max): self.d_max.fill( d_max ) #------------------------------------------------- # (2/6/13) This preserves "mutable scalars" that # can be accessed as refs by other components. #------------------------------------------------- ## self.Q_min.fill( np.minimum( self.Q_min, Q_min ) ) ## self.Q_max.fill( np.maximum( self.Q_max, Q_max ) ) ## #--------------------------------------------------- ## self.u_min.fill( np.minimum( self.u_min, u_min ) ) ## self.u_max.fill( np.maximum( self.u_max, u_max ) ) ## #--------------------------------------------------- ## self.d_min.fill( np.minimum( self.d_min, d_min ) ) ## self.d_max.fill( np.maximum( self.d_max, d_max ) ) #------------------------------------------------- # (2/6/13) This preserves "mutable scalars" that # can be accessed as refs by other components. #------------------------------------------------- ## self.Q_min.fill( min( self.Q_min, Q_min ) ) ## self.Q_max.fill( max( self.Q_max, Q_max ) ) ## #--------------------------------------------------- ## self.u_min.fill( min( self.u_min, u_min ) ) ## self.u_max.fill( max( self.u_max, u_max ) ) ## #--------------------------------------------------- ## self.d_min.fill( min( self.d_min, d_min ) ) ## self.d_max.fill( max( self.d_max, d_max ) ) #---------------------------------------------- # (2/6/13) This produces "immutable scalars". #---------------------------------------------- ## self.Q_min = self.Q.min() ## self.Q_max = self.Q.max() ## self.u_min = self.u.min() ## self.u_max = self.u.max() ## self.d_min = self.d.min() ## self.d_max = self.d.max() if (REPORT): print 'In channels_base.update_mins_and_maxes():' print '(dmin, dmax) =', self.d_min, self.d_max print '(umin, umax) =', self.u_min, self.u_max print '(Qmin, Qmax) =', self.Q_min, self.Q_max print ' ' # update_mins_and_maxes() #------------------------------------------------------------------- def check_flow_depth(self): OK = True d = self.d dt = self.dt nx = self.nx ################# #--------------------------------- # All all flow depths positive ? #--------------------------------- wbad = np.where( np.logical_or( d < 0.0, np.logical_not(np.isfinite(d)) )) nbad = np.size( wbad[0] ) if (nbad == 0): return OK OK = False dmin = d[wbad].min() star_line = '*******************************************' msg = [ star_line, \ 'ERROR: Simulation aborted.', ' ', \ 'Negative depth found: ' + str(dmin), \ 'Time step may be too large.', \ 'Time step: ' + str(dt) + ' [s]', ' '] for k in xrange(len(msg)): print msg[k] #------------------------------------------- # If not too many, print actual velocities #------------------------------------------- if (nbad < 30): brow = wbad[0][0] bcol = wbad[1][0] ## badi = wbad[0] ## bcol = (badi % nx) ## brow = (badi / nx) crstr = str(bcol) + ', ' + str(brow) msg = ['(Column, Row): ' + crstr, \ 'Flow depth: ' + str(d[brow, bcol])] for k in xrange(len(msg)): print msg[k] print star_line print ' ' return OK # check_flow_depth #------------------------------------------------------------------- def check_flow_velocity(self): OK = True u = self.u dt = self.dt nx = self.nx #-------------------------------- # Are all velocities positive ? #-------------------------------- wbad = np.where( np.logical_or( u < 0.0, np.logical_not(np.isfinite(u)) )) nbad = np.size( wbad[0] ) if (nbad == 0): return OK OK = False umin = u[wbad].min() star_line = '*******************************************' msg = [ star_line, \ 'ERROR: Simulation aborted.', ' ', \ 'Negative or NaN velocity found: ' + str(umin), \ 'Time step may be too large.', \ 'Time step: ' + str(dt) + ' [s]', ' '] for k in xrange(len(msg)): print msg[k] #------------------------------------------- # If not too many, print actual velocities #------------------------------------------- if (nbad < 30): brow = wbad[0][0] bcol = wbad[1][0] ## badi = wbad[0] ## bcol = (badi % nx) ## brow = (badi / nx) crstr = str(bcol) + ', ' + str(brow) msg = ['(Column, Row): ' + crstr, \ 'Velocity: ' + str(u[brow, bcol])] for k in xrange(len(msg)): print msg[k] print star_line print ' ' return OK ## umin = u[wbad].min() ## badi = wbad[0] ## bcol = (badi % nx) ## brow = (badi / nx) ## crstr = str(bcol) + ', ' + str(brow) ## msg = np.array([' ', \ ## '*******************************************', \ ## 'ERROR: Simulation aborted.', ' ', \ ## 'Negative velocity found: ' + str(umin), \ ## 'Time step may be too large.', ' ', \ ## '(Column, Row): ' + crstr, \ ## 'Velocity: ' + str(u[badi]), \ ## 'Time step: ' + str(dt) + ' [s]', \ ## '*******************************************', ' ']) ## for k in xrange( np.size(msg) ): ## print msg[k] ## return OK # check_flow_velocity #------------------------------------------------------------------- def open_input_files(self): # This doesn't work, because file_unit doesn't get full path. (10/28/11) # start_dir = os.getcwd() # os.chdir( self.in_directory ) # print '### start_dir =', start_dir # print '### in_directory =', self.in_directory in_files = ['slope_file', 'nval_file', 'z0val_file', 'width_file', 'angle_file', 'sinu_file', 'd0_file'] self.prepend_directory( in_files, INPUT=True ) # self.slope_file = self.in_directory + self.slope_file # self.nval_file = self.in_directory + self.nval_file # self.z0val_file = self.in_directory + self.z0val_file # self.width_file = self.in_directory + self.width_file # self.angle_file = self.in_directory + self.angle_file # self.sinu_file = self.in_directory + self.sinu_file # self.d0_file = self.in_directory + self.d0_file #self.code_unit = model_input.open_file(self.code_type, self.code_file) self.slope_unit = model_input.open_file(self.slope_type, self.slope_file) if (self.MANNING): self.nval_unit = model_input.open_file(self.nval_type, self.nval_file) if (self.LAW_OF_WALL): self.z0val_unit = model_input.open_file(self.z0val_type, self.z0val_file) self.width_unit = model_input.open_file(self.width_type, self.width_file) self.angle_unit = model_input.open_file(self.angle_type, self.angle_file) self.sinu_unit = model_input.open_file(self.sinu_type, self.sinu_file) self.d0_unit = model_input.open_file(self.d0_type, self.d0_file) # os.chdir( start_dir ) # open_input_files() #------------------------------------------------------------------- def read_input_files(self): #--------------------------------------------------- # The flow codes are always a grid, size of DEM. #--------------------------------------------------- # NB! model_input.py also has a read_grid() function. #--------------------------------------------------- rti = self.rti ## print 'Reading D8 flow grid (in CHANNELS)...' ## self.code = rtg_files.read_grid(self.code_file, rti, ## RTG_type='BYTE') ## print ' ' #------------------------------------------------------- # All grids are assumed to have a data type of Float32. #------------------------------------------------------- slope = model_input.read_next(self.slope_unit, self.slope_type, rti) if (slope != None): self.slope = slope # If EOF was reached, hopefully numpy's "fromfile" # returns None, so that the stored value will be # the last value that was read. if (self.MANNING): nval = model_input.read_next(self.nval_unit, self.nval_type, rti) if (nval != None): self.nval = nval self.nval_min = nval.min() self.nval_max = nval.max() if (self.LAW_OF_WALL): z0val = model_input.read_next(self.z0val_unit, self.z0val_type, rti) if (z0val != None): self.z0val = z0val self.z0val_min = z0val.min() self.z0val_max = z0val.max() width = model_input.read_next(self.width_unit, self.width_type, rti) if (width != None): self.width = width angle = model_input.read_next(self.angle_unit, self.angle_type, rti) if (angle != None): #----------------------------------------------- # Convert bank angles from degrees to radians. #----------------------------------------------- self.angle = angle * self.deg_to_rad # [radians] ### self.angle = angle # (before 9/9/14) sinu = model_input.read_next(self.sinu_unit, self.sinu_type, rti) if (sinu != None): self.sinu = sinu d0 = model_input.read_next(self.d0_unit, self.d0_type, rti) if (d0 != None): self.d0 = d0 ## code = model_input.read_grid(self.code_unit, \ ## self.code_type, rti, dtype='UInt8') ## if (code != None): self.code = code # read_input_files() #------------------------------------------------------------------- def close_input_files(self): # if not(self.slope_unit.closed): # if (self.slope_unit != None): #------------------------------------------------- # NB! self.code_unit was never defined as read. #------------------------------------------------- # if (self.code_type != 'scalar'): self.code_unit.close() if (self.slope_type != 'Scalar'): self.slope_unit.close() if (self.MANNING): if (self.nval_type != 'Scalar'): self.nval_unit.close() if (self.LAW_OF_WALL): if (self.z0val_type != 'Scalar'): self.z0val_unit.close() if (self.width_type != 'Scalar'): self.width_unit.close() if (self.angle_type != 'Scalar'): self.angle_unit.close() if (self.sinu_type != 'Scalar'): self.sinu_unit.close() if (self.d0_type != 'Scalar'): self.d0_unit.close() ## if (self.slope_file != ''): self.slope_unit.close() ## if (self.MANNING): ## if (self.nval_file != ''): self.nval_unit.close() ## if (self.LAW_OF_WALL): ## if (self.z0val_file != ''): self.z0val_unit.close() ## if (self.width_file != ''): self.width_unit.close() ## if (self.angle_file != ''): self.angle_unit.close() ## if (self.sinu_file != ''): self.sinu_unit.close() ## if (self.d0_file != ''): self.d0_unit.close() # close_input_files() #------------------------------------------------------------------- def update_outfile_names(self): #------------------------------------------------- # Notes: Append out_directory to outfile names. #------------------------------------------------- self.Q_gs_file = (self.out_directory + self.Q_gs_file) self.u_gs_file = (self.out_directory + self.u_gs_file) self.d_gs_file = (self.out_directory + self.d_gs_file) self.f_gs_file = (self.out_directory + self.f_gs_file) #-------------------------------------------------------- self.Q_ts_file = (self.out_directory + self.Q_ts_file) self.u_ts_file = (self.out_directory + self.u_ts_file) self.d_ts_file = (self.out_directory + self.d_ts_file) self.f_ts_file = (self.out_directory + self.f_ts_file) # update_outfile_names() #------------------------------------------------------------------- def bundle_output_files(self): ################################################### # NOT READY YET. Need "get_long_name()" and a new # version of "get_var_units". (9/21/14) ################################################### #------------------------------------------------------------- # Bundle the output file info into an array for convenience. # Then we just need one open_output_files(), in BMI_base.py, # and one close_output_files(). Less to maintain. (9/21/14) #------------------------------------------------------------- # gs = grid stack, ts = time series, ps = profile series. #------------------------------------------------------------- self.out_files = [ {var_name:'Q', save_gs:self.SAVE_Q_GRIDS, gs_file:self.Q_gs_file, save_ts:self.SAVE_Q_PIXELS, ts_file:self.Q_ts_file, long_name:get_long_name('Q'), units_name:get_var_units('Q')}, #----------------------------------------------------------------- {var_name:'u', save_gs:self.SAVE_U_GRIDS, gs_file:self.u_gs_file, save_ts:self.SAVE_U_PIXELS, ts_file:self.u_ts_file, long_name:get_long_name('u'), units_name:get_var_units('u')}, #----------------------------------------------------------------- {var_name:'d', save_gs:self.SAVE_D_GRIDS, gs_file:self.d_gs_file, save_ts:self.SAVE_D_PIXELS, ts_file:self.d_ts_file, long_name:get_long_name('d'), units_name:get_var_units('d')}, #----------------------------------------------------------------- {var_name:'f', save_gs:self.SAVE_F_GRIDS, gs_file:self.f_gs_file, save_ts:self.SAVE_F_PIXELS, ts_file:self.f_ts_file, long_name:get_long_name('f'), units_name:get_var_units('f')} ] # bundle_output_files #------------------------------------------------------------------- def open_output_files(self): model_output.check_netcdf() self.update_outfile_names() ## self.bundle_output_files() ## print 'self.SAVE_Q_GRIDS =', self.SAVE_Q_GRIDS ## print 'self.SAVE_U_GRIDS =', self.SAVE_U_GRIDS ## print 'self.SAVE_D_GRIDS =', self.SAVE_D_GRIDS ## print 'self.SAVE_F_GRIDS =', self.SAVE_F_GRIDS ## #--------------------------------------------------- ## print 'self.SAVE_Q_PIXELS =', self.SAVE_Q_PIXELS ## print 'self.SAVE_U_PIXELS =', self.SAVE_U_PIXELS ## print 'self.SAVE_D_PIXELS =', self.SAVE_D_PIXELS ## print 'self.SAVE_F_PIXELS =', self.SAVE_F_PIXELS # IDs = self.outlet_IDs # for k in xrange( len(self.out_files) ): # #-------------------------------------- # # Open new files to write grid stacks # #-------------------------------------- # if (self.out_files[k].save_gs): # model_output.open_new_gs_file( self, self.out_files[k], self.rti ) # #-------------------------------------- # # Open new files to write time series # #-------------------------------------- # if (self.out_files[k].save_ts): # model_output.open_new_ts_file( self, self.out_files[k], IDs ) #-------------------------------------- # Open new files to write grid stacks #-------------------------------------- if (self.SAVE_Q_GRIDS): model_output.open_new_gs_file( self, self.Q_gs_file, self.rti, var_name='Q', long_name='volumetric_discharge', units_name='m^3/s') if (self.SAVE_U_GRIDS): model_output.open_new_gs_file( self, self.u_gs_file, self.rti, var_name='u', long_name='mean_channel_flow_velocity', units_name='m/s') if (self.SAVE_D_GRIDS): model_output.open_new_gs_file( self, self.d_gs_file, self.rti, var_name='d', long_name='max_channel_flow_depth', units_name='m') if (self.SAVE_F_GRIDS): model_output.open_new_gs_file( self, self.f_gs_file, self.rti, var_name='f', long_name='friction_factor', units_name='none') #-------------------------------------- # Open new files to write time series #-------------------------------------- IDs = self.outlet_IDs if (self.SAVE_Q_PIXELS): model_output.open_new_ts_file( self, self.Q_ts_file, IDs, var_name='Q', long_name='volumetric_discharge', units_name='m^3/s') if (self.SAVE_U_PIXELS): model_output.open_new_ts_file( self, self.u_ts_file, IDs, var_name='u', long_name='mean_channel_flow_velocity', units_name='m/s') if (self.SAVE_D_PIXELS): model_output.open_new_ts_file( self, self.d_ts_file, IDs, var_name='d', long_name='max_channel_flow_depth', units_name='m') if (self.SAVE_F_PIXELS): model_output.open_new_ts_file( self, self.f_ts_file, IDs, var_name='f', long_name='friction_factor', units_name='none') # open_output_files() #------------------------------------------------------------------- def write_output_files(self, time_seconds=None): #--------------------------------------------------------- # Notes: This function was written to use only model # time (maybe from a caller) in seconds, and # the save_grid_dt and save_pixels_dt parameters # read by read_cfg_file(). # # read_cfg_file() makes sure that all of # the "save_dts" are larger than or equal to the # process dt. #--------------------------------------------------------- #----------------------------------------- # Allows time to be passed from a caller #----------------------------------------- if (time_seconds is None): time_seconds = self.time_sec model_time = int(time_seconds) #---------------------------------------- # Save computed values at sampled times #---------------------------------------- if (model_time % int(self.save_grid_dt) == 0): self.save_grids() if (model_time % int(self.save_pixels_dt) == 0): self.save_pixel_values() #---------------------------------------- # Save computed values at sampled times #---------------------------------------- ## if ((self.time_index % self.grid_save_step) == 0): ## self.save_grids() ## if ((self.time_index % self.pixel_save_step) == 0): ## self.save_pixel_values() # write_output_files() #------------------------------------------------------------------- def close_output_files(self): if (self.SAVE_Q_GRIDS): model_output.close_gs_file( self, 'Q') if (self.SAVE_U_GRIDS): model_output.close_gs_file( self, 'u') if (self.SAVE_D_GRIDS): model_output.close_gs_file( self, 'd') if (self.SAVE_F_GRIDS): model_output.close_gs_file( self, 'f') #--------------------------------------------------------------- if (self.SAVE_Q_PIXELS): model_output.close_ts_file( self, 'Q') if (self.SAVE_U_PIXELS): model_output.close_ts_file( self, 'u') if (self.SAVE_D_PIXELS): model_output.close_ts_file( self, 'd') if (self.SAVE_F_PIXELS): model_output.close_ts_file( self, 'f') # close_output_files() #------------------------------------------------------------------- def save_grids(self): #----------------------------------- # Save grid stack to a netCDF file #--------------------------------------------- # Note that add_grid() methods will convert # var from scalar to grid now, if necessary. #--------------------------------------------- if (self.SAVE_Q_GRIDS): model_output.add_grid( self, self.Q, 'Q', self.time_min ) if (self.SAVE_U_GRIDS): model_output.add_grid( self, self.u, 'u', self.time_min ) if (self.SAVE_D_GRIDS): model_output.add_grid( self, self.d, 'd', self.time_min ) if (self.SAVE_F_GRIDS): model_output.add_grid( self, self.f, 'f', self.time_min ) # save_grids() #------------------------------------------------------------------- def save_pixel_values(self): ##### save_time_series_data(self) ####### IDs = self.outlet_IDs time = self.time_min ##### #------------- # New method #------------- if (self.SAVE_Q_PIXELS): model_output.add_values_at_IDs( self, time, self.Q, 'Q', IDs ) if (self.SAVE_U_PIXELS): model_output.add_values_at_IDs( self, time, self.u, 'u', IDs ) if (self.SAVE_D_PIXELS): model_output.add_values_at_IDs( self, time, self.d, 'd', IDs ) if (self.SAVE_F_PIXELS): model_output.add_values_at_IDs( self, time, self.f, 'f', IDs ) # save_pixel_values() #------------------------------------------------------------------- def manning_formula(self): #--------------------------------------------------------- # Notes: R = (A/P) = hydraulic radius [m] # N = Manning's roughness coefficient # (usually in the range 0.012 to 0.035) # S = bed slope or free slope # R,S, and N may be 2D arrays. # If length units are all *feet*, then an extra # factor of 1.49 must be applied. If units are # meters, no such factor is needed. # Note that Q = Ac * u, where Ac is cross-section # area. For a trapezoid, Ac does not equal w*d. #--------------------------------------------------------- if (self.KINEMATIC_WAVE): S = self.S_bed else: S = self.S_free u = (self.Rh ** self.two_thirds) * np.sqrt(S) / self.nval #-------------------------------------------------------- # Add a hydraulic jump option for when u gets too big ? #-------------------------------------------------------- return u # manning_formula() #------------------------------------------------------------------- def law_of_the_wall(self): #--------------------------------------------------------- # Notes: u = flow velocity [m/s] # d = flow depth [m] # z0 = roughness length # S = bed slope or free slope # g = 9.81 = gravitation constant [m/s^2] # kappa = 0.41 = von Karman's constant # aval = 0.48 = integration constant # law_const = sqrt(g)/kappa = 7.6393d # smoothness = (aval / z0) * d # f = (kappa / alog(smoothness))^2d # tau_bed = rho_w * f * u^2 = rho_w * g * d * S # d, S, and z0 can be arrays. # To make default z0 correspond to default # Manning's n, can use this approximation: # z0 = a * (2.34 * sqrt(9.81) * n / kappa)^6d # For n=0.03, this gives: z0 = 0.011417 ######################################################### # However, for n=0.3, it gives: z0 = 11417.413 # which is 11.4 km! So the approximation only # holds within some range of values. #-------------------------------------------------------- if (self.KINEMATIC_WAVE): S = self.S_bed else: S = self.S_free smoothness = (self.aval / self.z0val) * self.d #------------------------------------------------ # Make sure (smoothness > 1) before taking log. # Should issue a warning if this is used. #------------------------------------------------ smoothness = np.maximum(smoothness, np.float64(1.1)) u = self.law_const * np.sqrt(self.Rh * S) * np.log(smoothness) #-------------------------------------------------------- # Add a hydraulic jump option for when u gets too big ? #-------------------------------------------------------- return u # law_of_the_wall() #------------------------------------------------------------------- def print_status_report(self): #---------------------------------------------------- # Wherever depth is less than z0, assume that water # is not flowing and set u and Q to zero. # However, we also need (d gt 0) to avoid a divide # by zero problem, even when numerators are zero. #---------------------------------------------------- # FLOWING = (d > (z0/aval)) #*** FLOWING[noflow_IDs] = False ;****** wflow = np.where( FLOWING != 0 ) n_flow = np.size( wflow[0] ) n_pixels = self.rti.n_pixels percent = np.float64(100.0) * (np.float64(n_flow) / n_pixels) fstr = ('%5.1f' % percent) + '%' # fstr = idl_func.string(percent, format='(F5.1)').strip() + '%' print ' Percentage of pixels with flow = ' + fstr print ' ' self.update_mins_and_maxes(REPORT=True) wmax = np.where(self.Q == self.Q_max) nwmax = np.size(wmax[0]) print ' Max(Q) occurs at: ' + str( wmax[0] ) #print,' Max attained at ', nwmax, ' pixels.' print ' ' print '-------------------------------------------------' # print_status_report() #------------------------------------------------------------------- def remove_bad_slopes(self, FLOAT=False): #------------------------------------------------------------ # Notes: The main purpose of this routine is to find # pixels that have nonpositive slopes and replace # then with the smallest value that occurs anywhere # in the input slope grid. For example, pixels on # the edges of the DEM will have a slope of zero. # With the Kinematic Wave option, flow cannot leave # a pixel that has a slope of zero and the depth # increases in an unrealistic manner to create a # spike in the depth grid. # It would be better, of course, if there were # no zero-slope pixels in the DEM. We could use # an "Imposed gradient DEM" to get slopes or some # method of "profile smoothing". # It is possible for the flow code to be nonzero # at a pixel that has NaN for its slope. For these # pixels, we also set the slope to our min value. # 7/18/05. Broke this out into separate procedure. #------------------------------------------------------------ #----------------------------------- # Are there any "bad" pixels ? # If not, return with no messages. #----------------------------------- wb = np.where(np.logical_or((self.slope <= 0.0), \ np.logical_not(np.isfinite(self.slope)))) nbad = np.size(wb[0]) print 'size(slope) =', np.size(self.slope) print 'size(wb) =', nbad wg = np.where(np.invert(np.logical_or((self.slope <= 0.0), \ np.logical_not(np.isfinite(self.slope))))) ngood = np.size(wg[0]) if (nbad == 0) or (ngood == 0): return #--------------------------------------------- # Find smallest positive value in slope grid # and replace the "bad" values with smin. #--------------------------------------------- print '-------------------------------------------------' print 'WARNING: Zero or negative slopes found.' print ' Replacing them with smallest slope.' print ' Use "Profile smoothing tool" instead.' S_min = self.slope[wg].min() S_max = self.slope[wg].max() print ' min(S) = ' + str(S_min) print ' max(S) = ' + str(S_max) print '-------------------------------------------------' print ' ' self.slope[wb] = S_min #-------------------------------- # Convert data type to double ? #-------------------------------- if (FLOAT): self.slope = np.float32(self.slope) else: self.slope = np.float64(self.slope) # remove_bad_slopes #------------------------------------------------------------------- #------------------------------------------------------------------- def Trapezoid_Rh(d, wb, theta): #------------------------------------------------------------- # Notes: Compute the hydraulic radius of a trapezoid that: # (1) has a bed width of wb >= 0 (0 for triangular) # (2) has a bank angle of theta (0 for rectangular) # (3) is filled with water to a depth of d. # The units of wb and d are meters. The units of # theta are assumed to be degrees and are converted. #------------------------------------------------------------- # NB! wb should never be zero, so PW can never be 0, # which would produce a NaN (divide by zero). #------------------------------------------------------------- # See Notes for TF_Tan function in utils_TF.pro # AW = d * (wb + (d * TF_Tan(theta_rad)) ) #------------------------------------------------------------- theta_rad = (theta * np.pi / 180.0) AW = d * (wb + (d * np.tan(theta_rad)) ) PW = wb + (np.float64(2) * d / np.cos(theta_rad) ) Rh = (AW / PW) w = np.where(wb <= 0) nw = np.size(w[0]) return Rh # Trapezoid_Rh() #------------------------------------------------------------------- def Manning_Formula(Rh, S, nval): #--------------------------------------------------------- # Notes: R = (A/P) = hydraulic radius [m] # N = Manning's roughness coefficient # (usually in the range 0.012 to 0.035) # S = bed slope (assumed equal to friction slope) # R,S, and N may be 2D arrays. # If length units are all *feet*, then an extra # factor of 1.49 must be applied. If units are # meters, no such factor is needed. # Note that Q = Ac * u, where Ac is cross-section # area. For a trapezoid, Ac does not equal w*d. #--------------------------------------------------------- ## if (N == None): N = np.float64(0.03) two_thirds = np.float64(2) / 3.0 u = (Rh ** two_thirds) * np.sqrt(S) / nval #------------------------------ # Add a hydraulic jump option # for when u gets too big ?? #------------------------------ return u # Manning_Formula() #------------------------------------------------------------------- def Law_of_the_Wall(d, Rh, S, z0val): #--------------------------------------------------------- # Notes: u = flow velocity [m/s] # d = flow depth [m] # z0 = roughness height # S = bed slope (assumed equal to friction slope) # g = 9.81 = gravitation constant [m/s^2] # kappa = 0.41 = von Karman's constant # aval = 0.48 = integration constant # sqrt(g)/kappa = 7.6393d # smoothness = (aval / z0) * d # f = (kappa / alog(smoothness))^2d # tau_bed = rho_w * f * u^2 = rho_w * g * d * S # d, S, and z0 can be arrays. # To make default z0 correspond to default # Manning's n, can use this approximation: # z0 = a * (2.34 * sqrt(9.81) * n / kappa)^6d # For n=0.03, this gives: z0 = 0.011417 # However, for n=0.3, it gives: z0 = 11417.413 # which is 11.4 km! So the approximation only # holds within some range of values. #-------------------------------------------------------- ## if (self.z0val == None): ## self.z0val = np.float64(0.011417) # (about 1 cm) #------------------------ # Define some constants #------------------------ g = np.float64(9.81) # (gravitation const.) aval = np.float64(0.476) # (integration const.) kappa = np.float64(0.408) # (von Karman's const.) law_const = np.sqrt(g) / kappa smoothness = (aval / z0val) * d #----------------------------- # Make sure (smoothness > 1) #----------------------------- smoothness = np.maximum(smoothness, np.float64(1.1)) u = law_const * np.sqrt(Rh * S) * np.log(smoothness) #------------------------------ # Add a hydraulic jump option # for when u gets too big ?? #------------------------------ return u
mperignon/component_creator
topoflow_creator/topoflow/channels_base.py
Python
gpl-2.0
124,876
46.337756
89
0.399452
false
#include <QDebug> #include <net/if.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include "monitor.h" Monitor::Monitor() { running = 0; } void Monitor::start() { int rc; int s; fd_set rdfs; int nbytes; struct sockaddr_can addr; struct canfd_frame frame; struct iovec iov; char ctrlmsg[CMSG_SPACE(sizeof(struct timeval)) + CMSG_SPACE(sizeof(__u32))]; struct msghdr msg; struct ifreq ifr; char* ifname = "can0"; running = 1; s = socket(PF_CAN, SOCK_RAW, CAN_RAW); if (s < 0) { qDebug() << "Error opening socket: " << s; stop(); return; } strcpy(ifr.ifr_name, ifname); ioctl(s, SIOCGIFINDEX, &ifr); addr.can_family = AF_CAN; addr.can_ifindex = ifr.ifr_ifindex; rc = bind(s, (struct sockaddr*)&addr, sizeof(addr)); if (rc < 0) { qDebug() << "Error binding to interface: " << rc; stop(); return; } iov.iov_base = &frame; msg.msg_name = &addr; msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_control = &ctrlmsg; while (running) { FD_ZERO(&rdfs); FD_SET(s, &rdfs); rc = select(s, &rdfs, NULL, NULL, NULL); if (rc < 0) { qDebug() << "Error calling select" << rc; stop(); continue; } if (FD_ISSET(s, &rdfs)) { int maxdlen; // These can apparently get changed, so set before each read iov.iov_len = sizeof(frame); msg.msg_namelen = sizeof(addr); msg.msg_controllen = sizeof(ctrlmsg); msg.msg_flags = 0; nbytes = recvmsg(s, &msg, 0); if (nbytes < 0) { qDebug() << "Error calling recvmsg : " << nbytes; stop(); continue; } if ((size_t)nbytes == CAN_MTU) maxdlen = CAN_MAX_DLEN; else if ((size_t)nbytes == CANFD_MTU) maxdlen = CANFD_MAX_DLEN; else { qDebug() << "Warning: read incomplete CAN frame : " << nbytes; continue; } // TODO get timestamp from message sendMsg(&frame, maxdlen); } } } void Monitor::stop() { running = 0; } void Monitor::sendMsg(struct canfd_frame *frame, int maxdlen) { canMessage msg; char buf[200]; int pBuf = 0; int i; int len = (frame->len > maxdlen) ? maxdlen : frame->len; msg.interface = 1; // TODO set in constructor at some point msg.identifier = QString("%1:%03X") .arg(msg.interface) .arg(frame->can_id & CAN_SFF_MASK); msg.time = QTime::currentTime(); pBuf += sprintf(buf + pBuf, "[%d]", frame->len); if (frame->can_id & CAN_RTR_FLAG) { pBuf += sprintf(buf + pBuf, " remote request"); emit messageInBuffer(&msg); return; } for (i = 0; i < len; i++) { pBuf += sprintf(buf + pBuf, " [%02X]", frame->data[i]); } msg.content = QString("%1").arg(buf); emit messageInBuffer(&msg); }
timrule/qt-projects
canmon/monitor.cpp
C++
gpl-2.0
2,638
17.978417
78
0.605383
false
/* Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 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. * */ #include <linux/platform_device.h> #include <linux/cdev.h> #include <linux/list.h> #include <linux/module.h> #include <linux/fs.h> #include <linux/interrupt.h> #include <linux/sched.h> #include <linux/uaccess.h> #include <linux/clk.h> #include <linux/android_pmem.h> #include <linux/msm_rotator.h> #include <linux/io.h> #include <mach/msm_rotator_imem.h> #include <linux/ktime.h> #include <linux/workqueue.h> #include <linux/file.h> #include <linux/major.h> #include <linux/regulator/consumer.h> #include <linux/msm_ion.h> #include <linux/sync.h> #include <linux/sw_sync.h> #ifdef CONFIG_MSM_BUS_SCALING #include <mach/msm_bus.h> #include <mach/msm_bus_board.h> #endif #include <mach/msm_subsystem_map.h> #include <mach/iommu_domains.h> #define DRIVER_NAME "msm_rotator" #define MSM_ROTATOR_BASE (msm_rotator_dev->io_base) #define MSM_ROTATOR_INTR_ENABLE (MSM_ROTATOR_BASE+0x0020) #define MSM_ROTATOR_INTR_STATUS (MSM_ROTATOR_BASE+0x0024) #define MSM_ROTATOR_INTR_CLEAR (MSM_ROTATOR_BASE+0x0028) #define MSM_ROTATOR_START (MSM_ROTATOR_BASE+0x0030) #define MSM_ROTATOR_MAX_BURST_SIZE (MSM_ROTATOR_BASE+0x0050) #define MSM_ROTATOR_HW_VERSION (MSM_ROTATOR_BASE+0x0070) #define MSM_ROTATOR_SW_RESET (MSM_ROTATOR_BASE+0x0074) #define MSM_ROTATOR_SRC_SIZE (MSM_ROTATOR_BASE+0x1108) #define MSM_ROTATOR_SRCP0_ADDR (MSM_ROTATOR_BASE+0x110c) #define MSM_ROTATOR_SRCP1_ADDR (MSM_ROTATOR_BASE+0x1110) #define MSM_ROTATOR_SRCP2_ADDR (MSM_ROTATOR_BASE+0x1114) #define MSM_ROTATOR_SRC_YSTRIDE1 (MSM_ROTATOR_BASE+0x111c) #define MSM_ROTATOR_SRC_YSTRIDE2 (MSM_ROTATOR_BASE+0x1120) #define MSM_ROTATOR_SRC_FORMAT (MSM_ROTATOR_BASE+0x1124) #define MSM_ROTATOR_SRC_UNPACK_PATTERN1 (MSM_ROTATOR_BASE+0x1128) #define MSM_ROTATOR_SUB_BLOCK_CFG (MSM_ROTATOR_BASE+0x1138) #define MSM_ROTATOR_OUT_PACK_PATTERN1 (MSM_ROTATOR_BASE+0x1154) #define MSM_ROTATOR_OUTP0_ADDR (MSM_ROTATOR_BASE+0x1168) #define MSM_ROTATOR_OUTP1_ADDR (MSM_ROTATOR_BASE+0x116c) #define MSM_ROTATOR_OUTP2_ADDR (MSM_ROTATOR_BASE+0x1170) #define MSM_ROTATOR_OUT_YSTRIDE1 (MSM_ROTATOR_BASE+0x1178) #define MSM_ROTATOR_OUT_YSTRIDE2 (MSM_ROTATOR_BASE+0x117c) #define MSM_ROTATOR_SRC_XY (MSM_ROTATOR_BASE+0x1200) #define MSM_ROTATOR_SRC_IMAGE_SIZE (MSM_ROTATOR_BASE+0x1208) #define MSM_ROTATOR_MAX_ROT 0x07 #define MSM_ROTATOR_MAX_H 0x1fff #define MSM_ROTATOR_MAX_W 0x1fff /* from lsb to msb */ #define GET_PACK_PATTERN(a, x, y, z, bit) \ (((a)<<((bit)*3))|((x)<<((bit)*2))|((y)<<(bit))|(z)) #define CLR_G 0x0 #define CLR_B 0x1 #define CLR_R 0x2 #define CLR_ALPHA 0x3 #define CLR_Y CLR_G #define CLR_CB CLR_B #define CLR_CR CLR_R #define ROTATIONS_TO_BITMASK(r) ((((r) & MDP_ROT_90) ? 1 : 0) | \ (((r) & MDP_FLIP_LR) ? 2 : 0) | \ (((r) & MDP_FLIP_UD) ? 4 : 0)) #define IMEM_NO_OWNER -1; #define MAX_SESSIONS 16 #define INVALID_SESSION -1 #define VERSION_KEY_MASK 0xFFFFFF00 #define MAX_DOWNSCALE_RATIO 3 #define MAX_COMMIT_QUEUE 4 #define WAIT_ROT_TIMEOUT 1000 #define MAX_TIMELINE_NAME_LEN 16 #define WAIT_FENCE_FIRST_TIMEOUT MSEC_PER_SEC #define WAIT_FENCE_FINAL_TIMEOUT (10 * MSEC_PER_SEC) #define ROTATOR_REVISION_V0 0 #define ROTATOR_REVISION_V1 1 #define ROTATOR_REVISION_V2 2 #define ROTATOR_REVISION_NONE 0xffffffff #define BASE_ADDR(height, y_stride) ((height % 64) * y_stride) #define HW_BASE_ADDR(height, y_stride) (((dstp0_ystride >> 5) << 11) - \ ((dst_height & 0x3f) * dstp0_ystride)) uint32_t rotator_hw_revision; static char rot_iommu_split_domain; /* * rotator_hw_revision: * 0 == 7x30 * 1 == 8x60 * 2 == 8960 * */ struct tile_parm { unsigned int width; /* tile's width */ unsigned int height; /* tile's height */ unsigned int row_tile_w; /* tiles per row's width */ unsigned int row_tile_h; /* tiles per row's height */ }; struct msm_rotator_mem_planes { unsigned int num_planes; unsigned int plane_size[4]; unsigned int total_size; }; #define checkoffset(offset, size, max_size) \ ((size) > (max_size) || (offset) > ((max_size) - (size))) struct msm_rotator_fd_info { int pid; int ref_cnt; struct list_head list; }; struct rot_sync_info { u32 initialized; struct sync_fence *acq_fen; struct sync_fence *rel_fen; int rel_fen_fd; struct sw_sync_timeline *timeline; int timeline_value; struct mutex sync_mutex; atomic_t queue_buf_cnt; }; struct msm_rotator_session { struct msm_rotator_img_info img_info; struct msm_rotator_fd_info fd_info; int fast_yuv_enable; int enable_2pass; u32 mem_hid; }; struct msm_rotator_commit_info { struct msm_rotator_data_info data_info; struct msm_rotator_img_info img_info; unsigned int format; unsigned int in_paddr; unsigned int out_paddr; unsigned int in_chroma_paddr; unsigned int out_chroma_paddr; unsigned int in_chroma2_paddr; unsigned int out_chroma2_paddr; struct file *srcp0_file; struct file *srcp1_file; struct file *dstp0_file; struct file *dstp1_file; struct ion_handle *srcp0_ihdl; struct ion_handle *srcp1_ihdl; struct ion_handle *dstp0_ihdl; struct ion_handle *dstp1_ihdl; int ps0_need; int session_index; struct sync_fence *acq_fen; int fast_yuv_en; int enable_2pass; }; struct msm_rotator_dev { void __iomem *io_base; int irq; struct clk *core_clk; struct msm_rotator_session *rot_session[MAX_SESSIONS]; struct list_head fd_list; struct clk *pclk; int rot_clk_state; struct regulator *regulator; struct delayed_work rot_clk_work; struct clk *imem_clk; int imem_clk_state; struct delayed_work imem_clk_work; struct platform_device *pdev; struct cdev cdev; struct device *device; struct class *class; dev_t dev_num; int processing; int last_session_idx; struct mutex rotator_lock; struct mutex imem_lock; int imem_owner; wait_queue_head_t wq; struct ion_client *client; #ifdef CONFIG_MSM_BUS_SCALING uint32_t bus_client_handle; #endif u32 sec_mapped; u32 mmu_clk_on; struct rot_sync_info sync_info[MAX_SESSIONS]; /* non blocking */ struct mutex commit_mutex; struct mutex commit_wq_mutex; struct completion commit_comp; u32 commit_running; struct work_struct commit_work; struct msm_rotator_commit_info commit_info[MAX_COMMIT_QUEUE]; atomic_t commit_q_r; atomic_t commit_q_w; atomic_t commit_q_cnt; struct rot_buf_type *y_rot_buf; struct rot_buf_type *chroma_rot_buf; struct rot_buf_type *chroma2_rot_buf; }; #define COMPONENT_5BITS 1 #define COMPONENT_6BITS 2 #define COMPONENT_8BITS 3 static struct msm_rotator_dev *msm_rotator_dev; #define mrd msm_rotator_dev static void rot_wait_for_commit_queue(u32 is_all); enum { CLK_EN, CLK_DIS, CLK_SUSPEND, }; struct res_mmu_clk { char *mmu_clk_name; struct clk *mmu_clk; }; static struct res_mmu_clk rot_mmu_clks[] = { {"mdp_iommu_clk"}, {"rot_iommu_clk"}, {"vcodec_iommu0_clk"}, {"vcodec_iommu1_clk"}, {"smmu_iface_clk"} }; u32 rotator_allocate_2pass_buf(struct rot_buf_type *rot_buf, int s_ndx) { ion_phys_addr_t addr, read_addr = 0; size_t buffer_size; unsigned long len; if (!rot_buf) { pr_err("Rot_buf NULL pointer %s %i", __func__, __LINE__); return 0; } if (rot_buf->write_addr || !IS_ERR_OR_NULL(rot_buf->ihdl)) return 0; buffer_size = roundup(1920 * 1088, SZ_4K); if (!IS_ERR_OR_NULL(mrd->client)) { pr_info("%s:%d ion based allocation\n", __func__, __LINE__); rot_buf->ihdl = ion_alloc(mrd->client, buffer_size, SZ_4K, mrd->rot_session[s_ndx]->mem_hid, mrd->rot_session[s_ndx]->mem_hid & ION_SECURE); if (!IS_ERR_OR_NULL(rot_buf->ihdl)) { if (rot_iommu_split_domain) { if (ion_map_iommu(mrd->client, rot_buf->ihdl, ROTATOR_SRC_DOMAIN, GEN_POOL, SZ_4K, 0, &read_addr, &len, 0, 0)) { pr_err("ion_map_iommu() read failed\n"); return -ENOMEM; } if (mrd->rot_session[s_ndx]->mem_hid & ION_SECURE) { if (ion_phys(mrd->client, rot_buf->ihdl, &addr, (size_t *)&len)) { pr_err( "%s:%d: ion_phys map failed\n", __func__, __LINE__); return -ENOMEM; } } else { if (ion_map_iommu(mrd->client, rot_buf->ihdl, ROTATOR_DST_DOMAIN, GEN_POOL, SZ_4K, 0, &addr, &len, 0, 0)) { pr_err("ion_map_iommu() failed\n"); return -ENOMEM; } } } else { if (ion_map_iommu(mrd->client, rot_buf->ihdl, ROTATOR_SRC_DOMAIN, GEN_POOL, SZ_4K, 0, &addr, &len, 0, 0)) { pr_err("ion_map_iommu() write failed\n"); return -ENOMEM; } } } else { pr_err("%s:%d: ion_alloc failed\n", __func__, __LINE__); return -ENOMEM; } } else { addr = allocate_contiguous_memory_nomap(buffer_size, mrd->rot_session[s_ndx]->mem_hid, 4); } if (addr) { pr_info("allocating %d bytes at write=%x, read=%x for 2-pass\n", buffer_size, (u32) addr, (u32) read_addr); rot_buf->write_addr = addr; if (read_addr) rot_buf->read_addr = read_addr; else rot_buf->read_addr = rot_buf->write_addr; return 0; } else { pr_err("%s cannot allocate memory for rotator 2-pass!\n", __func__); return -ENOMEM; } } void rotator_free_2pass_buf(struct rot_buf_type *rot_buf, int s_ndx) { if (!rot_buf) { pr_err("Rot_buf NULL pointer %s %i", __func__, __LINE__); return; } if (!rot_buf->write_addr) return; if (!IS_ERR_OR_NULL(mrd->client)) { if (!IS_ERR_OR_NULL(rot_buf->ihdl)) { if (rot_iommu_split_domain) { if (!(mrd->rot_session[s_ndx]->mem_hid & ION_SECURE)) ion_unmap_iommu(mrd->client, rot_buf->ihdl, ROTATOR_DST_DOMAIN, GEN_POOL); ion_unmap_iommu(mrd->client, rot_buf->ihdl, ROTATOR_SRC_DOMAIN, GEN_POOL); } else { ion_unmap_iommu(mrd->client, rot_buf->ihdl, ROTATOR_SRC_DOMAIN, GEN_POOL); } ion_free(mrd->client, rot_buf->ihdl); rot_buf->ihdl = NULL; pr_info("%s:%d Free rotator 2pass memory", __func__, __LINE__); } } else { if (rot_buf->write_addr) { free_contiguous_memory_by_paddr(rot_buf->write_addr); pr_debug("%s:%d Free rotator 2pass pmem\n", __func__, __LINE__); } } rot_buf->write_addr = 0; rot_buf->read_addr = 0; } int msm_rotator_iommu_map_buf(int mem_id, int domain, unsigned long *start, unsigned long *len, struct ion_handle **pihdl, unsigned int secure) { if (!msm_rotator_dev->client) return -EINVAL; *pihdl = ion_import_dma_buf(msm_rotator_dev->client, mem_id); if (IS_ERR_OR_NULL(*pihdl)) { pr_err("ion_import_dma_buf() failed\n"); return PTR_ERR(*pihdl); } pr_debug("%s(): ion_hdl %p, ion_fd %d\n", __func__, *pihdl, mem_id); if (rot_iommu_split_domain) { if (secure) { if (ion_phys(msm_rotator_dev->client, *pihdl, start, (unsigned *)len)) { pr_err("%s:%d: ion_phys map failed\n", __func__, __LINE__); return -ENOMEM; } } else { if (ion_map_iommu(msm_rotator_dev->client, *pihdl, domain, GEN_POOL, SZ_4K, 0, start, len, 0, ION_IOMMU_UNMAP_DELAYED)) { pr_err("ion_map_iommu() failed\n"); return -EINVAL; } } } else { if (ion_map_iommu(msm_rotator_dev->client, *pihdl, ROTATOR_SRC_DOMAIN, GEN_POOL, SZ_4K, 0, start, len, 0, ION_IOMMU_UNMAP_DELAYED)) { pr_err("ion_map_iommu() failed\n"); return -EINVAL; } } pr_debug("%s(): mem_id %d, start 0x%lx, len 0x%lx\n", __func__, mem_id, *start, *len); return 0; } int msm_rotator_imem_allocate(int requestor) { int rc = 0; #ifdef CONFIG_MSM_ROTATOR_USE_IMEM switch (requestor) { case ROTATOR_REQUEST: if (mutex_trylock(&msm_rotator_dev->imem_lock)) { msm_rotator_dev->imem_owner = ROTATOR_REQUEST; rc = 1; } else rc = 0; break; case JPEG_REQUEST: mutex_lock(&msm_rotator_dev->imem_lock); msm_rotator_dev->imem_owner = JPEG_REQUEST; rc = 1; break; default: rc = 0; } #else if (requestor == JPEG_REQUEST) rc = 1; #endif if (rc == 1) { cancel_delayed_work_sync(&msm_rotator_dev->imem_clk_work); if (msm_rotator_dev->imem_clk_state != CLK_EN && msm_rotator_dev->imem_clk) { clk_prepare_enable(msm_rotator_dev->imem_clk); msm_rotator_dev->imem_clk_state = CLK_EN; } } return rc; } EXPORT_SYMBOL(msm_rotator_imem_allocate); void msm_rotator_imem_free(int requestor) { #ifdef CONFIG_MSM_ROTATOR_USE_IMEM if (msm_rotator_dev->imem_owner == requestor) { schedule_delayed_work(&msm_rotator_dev->imem_clk_work, HZ); mutex_unlock(&msm_rotator_dev->imem_lock); } #else if (requestor == JPEG_REQUEST) schedule_delayed_work(&msm_rotator_dev->imem_clk_work, HZ); #endif } EXPORT_SYMBOL(msm_rotator_imem_free); static void msm_rotator_imem_clk_work_f(struct work_struct *work) { #ifdef CONFIG_MSM_ROTATOR_USE_IMEM if (mutex_trylock(&msm_rotator_dev->imem_lock)) { if (msm_rotator_dev->imem_clk_state == CLK_EN && msm_rotator_dev->imem_clk) { clk_disable_unprepare(msm_rotator_dev->imem_clk); msm_rotator_dev->imem_clk_state = CLK_DIS; } else if (msm_rotator_dev->imem_clk_state == CLK_SUSPEND) msm_rotator_dev->imem_clk_state = CLK_DIS; mutex_unlock(&msm_rotator_dev->imem_lock); } #endif } /* enable clocks needed by rotator block */ static void enable_rot_clks(void) { if (msm_rotator_dev->regulator) regulator_enable(msm_rotator_dev->regulator); if (msm_rotator_dev->core_clk != NULL) clk_prepare_enable(msm_rotator_dev->core_clk); if (msm_rotator_dev->pclk != NULL) clk_prepare_enable(msm_rotator_dev->pclk); } /* disable clocks needed by rotator block */ static void disable_rot_clks(void) { if (msm_rotator_dev->core_clk != NULL) clk_disable_unprepare(msm_rotator_dev->core_clk); if (msm_rotator_dev->pclk != NULL) clk_disable_unprepare(msm_rotator_dev->pclk); if (msm_rotator_dev->regulator) regulator_disable(msm_rotator_dev->regulator); } static void msm_rotator_rot_clk_work_f(struct work_struct *work) { if (mutex_trylock(&msm_rotator_dev->rotator_lock)) { if (msm_rotator_dev->rot_clk_state == CLK_EN) { disable_rot_clks(); msm_rotator_dev->rot_clk_state = CLK_DIS; } else if (msm_rotator_dev->rot_clk_state == CLK_SUSPEND) msm_rotator_dev->rot_clk_state = CLK_DIS; mutex_unlock(&msm_rotator_dev->rotator_lock); } } static irqreturn_t msm_rotator_isr(int irq, void *dev_id) { if (msm_rotator_dev->processing) { msm_rotator_dev->processing = 0; wake_up(&msm_rotator_dev->wq); } else printk(KERN_WARNING "%s: unexpected interrupt\n", DRIVER_NAME); return IRQ_HANDLED; } static void msm_rotator_signal_timeline(u32 session_index) { struct rot_sync_info *sync_info; sync_info = &msm_rotator_dev->sync_info[session_index]; if ((!sync_info->timeline) || (!sync_info->initialized)) return; mutex_lock(&sync_info->sync_mutex); sw_sync_timeline_inc(sync_info->timeline, 1); sync_info->timeline_value++; mutex_unlock(&sync_info->sync_mutex); } static void msm_rotator_signal_timeline_done(u32 session_index) { struct rot_sync_info *sync_info; sync_info = &msm_rotator_dev->sync_info[session_index]; if ((sync_info->timeline == NULL) || (sync_info->initialized == false)) return; mutex_lock(&sync_info->sync_mutex); sw_sync_timeline_inc(sync_info->timeline, 1); sync_info->timeline_value++; if (atomic_read(&sync_info->queue_buf_cnt) <= 0) pr_err("%s queue_buf_cnt=%d", __func__, atomic_read(&sync_info->queue_buf_cnt)); else atomic_dec(&sync_info->queue_buf_cnt); mutex_unlock(&sync_info->sync_mutex); } static void msm_rotator_release_acq_fence(u32 session_index) { struct rot_sync_info *sync_info; sync_info = &msm_rotator_dev->sync_info[session_index]; if ((!sync_info->timeline) || (!sync_info->initialized)) return; mutex_lock(&sync_info->sync_mutex); sync_info->acq_fen = NULL; mutex_unlock(&sync_info->sync_mutex); } static void msm_rotator_release_all_timeline(void) { int i; struct rot_sync_info *sync_info; for (i = 0; i < MAX_SESSIONS; i++) { sync_info = &msm_rotator_dev->sync_info[i]; if (sync_info->initialized) { msm_rotator_signal_timeline(i); msm_rotator_release_acq_fence(i); } } } static void msm_rotator_wait_for_fence(struct sync_fence *acq_fen) { int ret; if (acq_fen) { ret = sync_fence_wait(acq_fen, WAIT_FENCE_FIRST_TIMEOUT); if (ret == -ETIME) { pr_warn("%s: timeout, wait %ld more ms\n", __func__, WAIT_FENCE_FINAL_TIMEOUT); ret = sync_fence_wait(acq_fen, WAIT_FENCE_FINAL_TIMEOUT); } if (ret < 0) { pr_err("%s: sync_fence_wait failed! ret = %x\n", __func__, ret); } sync_fence_put(acq_fen); } } static int msm_rotator_buf_sync(unsigned long arg) { struct msm_rotator_buf_sync buf_sync; int ret = 0; struct sync_fence *fence = NULL; struct rot_sync_info *sync_info; struct sync_pt *rel_sync_pt; struct sync_fence *rel_fence; int rel_fen_fd; u32 s; if (copy_from_user(&buf_sync, (void __user *)arg, sizeof(buf_sync))) return -EFAULT; rot_wait_for_commit_queue(false); for (s = 0; s < MAX_SESSIONS; s++) if ((msm_rotator_dev->rot_session[s] != NULL) && (buf_sync.session_id == (unsigned int)msm_rotator_dev->rot_session[s] )) break; if (s == MAX_SESSIONS) { pr_err("%s invalid session id %d", __func__, buf_sync.session_id); return -EINVAL; } sync_info = &msm_rotator_dev->sync_info[s]; if (sync_info->acq_fen) pr_err("%s previous acq_fen will be overwritten", __func__); if ((sync_info->timeline == NULL) || (sync_info->initialized == false)) return -EINVAL; mutex_lock(&sync_info->sync_mutex); if (buf_sync.acq_fen_fd >= 0) fence = sync_fence_fdget(buf_sync.acq_fen_fd); sync_info->acq_fen = fence; if (sync_info->acq_fen && (buf_sync.flags & MDP_BUF_SYNC_FLAG_WAIT)) { msm_rotator_wait_for_fence(sync_info->acq_fen); sync_info->acq_fen = NULL; } rel_sync_pt = sw_sync_pt_create(sync_info->timeline, sync_info->timeline_value + atomic_read(&sync_info->queue_buf_cnt) + 1); if (rel_sync_pt == NULL) { pr_err("%s: cannot create sync point", __func__); ret = -ENOMEM; goto buf_sync_err_1; } /* create fence */ rel_fence = sync_fence_create("msm_rotator-fence", rel_sync_pt); if (rel_fence == NULL) { sync_pt_free(rel_sync_pt); pr_err("%s: cannot create fence", __func__); ret = -ENOMEM; goto buf_sync_err_1; } /* create fd */ rel_fen_fd = get_unused_fd_flags(0); if (rel_fen_fd < 0) { pr_err("%s: get_unused_fd_flags failed", __func__); ret = -EIO; goto buf_sync_err_2; } sync_fence_install(rel_fence, rel_fen_fd); buf_sync.rel_fen_fd = rel_fen_fd; sync_info->rel_fen = rel_fence; sync_info->rel_fen_fd = rel_fen_fd; ret = copy_to_user((void __user *)arg, &buf_sync, sizeof(buf_sync)); mutex_unlock(&sync_info->sync_mutex); return ret; buf_sync_err_2: sync_fence_put(rel_fence); buf_sync_err_1: if (sync_info->acq_fen) sync_fence_put(sync_info->acq_fen); sync_info->acq_fen = NULL; mutex_unlock(&sync_info->sync_mutex); return ret; } static unsigned int tile_size(unsigned int src_width, unsigned int src_height, const struct tile_parm *tp) { unsigned int tile_w, tile_h; unsigned int row_num_w, row_num_h; tile_w = tp->width * tp->row_tile_w; tile_h = tp->height * tp->row_tile_h; row_num_w = (src_width + tile_w - 1) / tile_w; row_num_h = (src_height + tile_h - 1) / tile_h; return ((row_num_w * row_num_h * tile_w * tile_h) + 8191) & ~8191; } static int get_bpp(int format) { switch (format) { case MDP_RGB_565: case MDP_BGR_565: return 2; case MDP_XRGB_8888: case MDP_ARGB_8888: case MDP_RGBA_8888: case MDP_BGRA_8888: case MDP_RGBX_8888: return 4; case MDP_Y_CBCR_H2V2: case MDP_Y_CRCB_H2V2: case MDP_Y_CB_CR_H2V2: case MDP_Y_CR_CB_H2V2: case MDP_Y_CR_CB_GH2V2: case MDP_Y_CRCB_H2V2_TILE: case MDP_Y_CBCR_H2V2_TILE: return 1; case MDP_RGB_888: case MDP_YCBCR_H1V1: case MDP_YCRCB_H1V1: return 3; case MDP_YCRYCB_H2V1: return 2;/* YCrYCb interleave */ case MDP_Y_CRCB_H2V1: case MDP_Y_CBCR_H2V1: return 1; default: return -1; } } static int msm_rotator_get_plane_sizes(uint32_t format, uint32_t w, uint32_t h, struct msm_rotator_mem_planes *p) { /* * each row of samsung tile consists of two tiles in height * and two tiles in width which means width should align to * 64 x 2 bytes and height should align to 32 x 2 bytes. * video decoder generate two tiles in width and one tile * in height which ends up height align to 32 X 1 bytes. */ const struct tile_parm tile = {64, 32, 2, 1}; int i; if (p == NULL) return -EINVAL; if ((w > MSM_ROTATOR_MAX_W) || (h > MSM_ROTATOR_MAX_H)) return -ERANGE; memset(p, 0, sizeof(*p)); switch (format) { case MDP_XRGB_8888: case MDP_ARGB_8888: case MDP_RGBA_8888: case MDP_BGRA_8888: case MDP_RGBX_8888: case MDP_RGB_888: case MDP_RGB_565: case MDP_BGR_565: case MDP_YCRYCB_H2V1: case MDP_YCBCR_H1V1: case MDP_YCRCB_H1V1: p->num_planes = 1; p->plane_size[0] = w * h * get_bpp(format); break; case MDP_Y_CRCB_H2V1: case MDP_Y_CBCR_H2V1: case MDP_Y_CRCB_H1V2: case MDP_Y_CBCR_H1V2: p->num_planes = 2; p->plane_size[0] = w * h; p->plane_size[1] = w * h; break; case MDP_Y_CBCR_H2V2: case MDP_Y_CRCB_H2V2: p->num_planes = 2; p->plane_size[0] = w * h; p->plane_size[1] = w * h / 2; break; case MDP_Y_CRCB_H2V2_TILE: case MDP_Y_CBCR_H2V2_TILE: p->num_planes = 2; p->plane_size[0] = tile_size(w, h, &tile); p->plane_size[1] = tile_size(w, h/2, &tile); break; case MDP_Y_CB_CR_H2V2: case MDP_Y_CR_CB_H2V2: p->num_planes = 3; p->plane_size[0] = w * h; p->plane_size[1] = (w / 2) * (h / 2); p->plane_size[2] = (w / 2) * (h / 2); break; case MDP_Y_CR_CB_GH2V2: p->num_planes = 3; p->plane_size[0] = ALIGN(w, 16) * h; p->plane_size[1] = ALIGN(w / 2, 16) * (h / 2); p->plane_size[2] = ALIGN(w / 2, 16) * (h / 2); break; default: return -EINVAL; } for (i = 0; i < p->num_planes; i++) p->total_size += p->plane_size[i]; return 0; } /* Checking invalid destination image size on FAST YUV for YUV420PP(NV12) with * HW issue for rotation 90 + U/D filp + with/without flip operation * (rotation 90 + U/D + L/R flip is rotation 270 degree option) and pix_rot * block issue with tile line size is 4. * * Rotator structure is: * if Fetch input image: W x H, * Downscale: W` x H` = W/ScaleHor(2, 4 or 8) x H/ScaleVert(2, 4 or 8) * Rotated output : W`` x H`` = (W` x H`) or (H` x W`) depends on "Rotation 90 * degree option" * * Pack: W`` x H`` * * Rotator source ROI image width restriction is applied to W x H (case a, * image resolution before downscaling) * * Packer source Image width/ height restriction are applied to W`` x H`` * (case c, image resolution after rotation) * * Supertile (64 x 8) and YUV (2 x 2) alignment restriction should be * applied to the W x H (case a). Input image should be at least (2 x 2). * * "Support If packer source image height <= 256, multiple of 8", this * restriction should be applied to the rotated image (W`` x H``) */ uint32_t fast_yuv_invalid_size_checker(unsigned char rot_mode, uint32_t src_width, uint32_t dst_width, uint32_t src_height, uint32_t dst_height, uint32_t dstp0_ystride, uint32_t is_planar420) { uint32_t hw_limit; hw_limit = is_planar420 ? 512 : 256; /* checking image constaints for missing EOT event from pix_rot block */ if ((src_width > hw_limit) && ((src_width % (hw_limit / 2)) == 8)) return -EINVAL; if (rot_mode & MDP_ROT_90) { if ((src_height % 128) == 8) return -EINVAL; /* if rotation 90 degree on fast yuv * rotator image input width has to be multiple of 8 * rotator image input height has to be multiple of 8 */ if (((dst_width % 8) != 0) || ((dst_height % 8) != 0)) return -EINVAL; if ((rot_mode & MDP_FLIP_UD) || (rot_mode & (MDP_FLIP_UD | MDP_FLIP_LR))) { /* image constraint checking for wrong address * generation HW issue for Y plane checking */ if (((dst_height % 64) != 0) && ((dst_height / 64) >= 4)) { /* compare golden logic for second * tile base address generation in row * with actual HW implementation */ if (BASE_ADDR(dst_height, dstp0_ystride) != HW_BASE_ADDR(dst_height, dstp0_ystride)) return -EINVAL; } if (is_planar420) { dst_width = dst_width / 2; dstp0_ystride = dstp0_ystride / 2; } dst_height = dst_height / 2; /* image constraint checking for wrong * address generation HW issue. for * U/V (P) or UV (PP) plane checking */ if (((dst_height % 64) != 0) && ((dst_height / 64) >= (hw_limit / 128))) { /* compare golden logic for * second tile base address * generation in row with * actual HW implementation */ if (BASE_ADDR(dst_height, dstp0_ystride) != HW_BASE_ADDR(dst_height, dstp0_ystride)) return -EINVAL; } } } else { /* if NOT applying rotation 90 degree on fast yuv, * rotator image input width has to be multiple of 8 * rotator image input height has to be multiple of 8 */ if (((dst_width % 8) != 0) || ((dst_height % 8) != 0)) return -EINVAL; } return 0; } static int msm_rotator_ycxcx_h2v1(struct msm_rotator_img_info *info, unsigned int in_paddr, unsigned int out_paddr, unsigned int use_imem, int new_session, unsigned int in_chroma_paddr, unsigned int out_chroma_paddr) { int bpp; uint32_t dst_format; switch (info->src.format) { case MDP_Y_CRCB_H2V1: if (info->rotations & MDP_ROT_90) dst_format = MDP_Y_CRCB_H1V2; else dst_format = info->src.format; break; case MDP_Y_CBCR_H2V1: if (info->rotations & MDP_ROT_90) dst_format = MDP_Y_CBCR_H1V2; else dst_format = info->src.format; break; default: return -EINVAL; } if (info->dst.format != dst_format) return -EINVAL; bpp = get_bpp(info->src.format); if (bpp < 0) return -ENOTTY; iowrite32(in_paddr, MSM_ROTATOR_SRCP0_ADDR); iowrite32(in_chroma_paddr, MSM_ROTATOR_SRCP1_ADDR); iowrite32(out_paddr + ((info->dst_y * info->dst.width) + info->dst_x), MSM_ROTATOR_OUTP0_ADDR); iowrite32(out_chroma_paddr + ((info->dst_y * info->dst.width) + info->dst_x), MSM_ROTATOR_OUTP1_ADDR); if (new_session) { iowrite32(info->src.width | info->src.width << 16, MSM_ROTATOR_SRC_YSTRIDE1); if (info->rotations & MDP_ROT_90) iowrite32(info->dst.width | info->dst.width*2 << 16, MSM_ROTATOR_OUT_YSTRIDE1); else iowrite32(info->dst.width | info->dst.width << 16, MSM_ROTATOR_OUT_YSTRIDE1); if (info->src.format == MDP_Y_CBCR_H2V1) { iowrite32(GET_PACK_PATTERN(0, 0, CLR_CB, CLR_CR, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, 0, CLR_CB, CLR_CR, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); } else { iowrite32(GET_PACK_PATTERN(0, 0, CLR_CR, CLR_CB, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, 0, CLR_CR, CLR_CB, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); } iowrite32((1 << 18) | /* chroma sampling 1=H2V1 */ (ROTATIONS_TO_BITMASK(info->rotations) << 9) | 1 << 8 | /* ROT_EN */ info->downscale_ratio << 2 | /* downscale v ratio */ info->downscale_ratio, /* downscale h ratio */ MSM_ROTATOR_SUB_BLOCK_CFG); iowrite32(0 << 29 | /* frame format 0 = linear */ (use_imem ? 0 : 1) << 22 | /* tile size */ 2 << 19 | /* fetch planes 2 = pseudo */ 0 << 18 | /* unpack align */ 1 << 17 | /* unpack tight */ 1 << 13 | /* unpack count 0=1 component */ (bpp-1) << 9 | /* src Bpp 0=1 byte ... */ 0 << 8 | /* has alpha */ 0 << 6 | /* alpha bits 3=8bits */ 3 << 4 | /* R/Cr bits 1=5 2=6 3=8 */ 3 << 2 | /* B/Cb bits 1=5 2=6 3=8 */ 3 << 0, /* G/Y bits 1=5 2=6 3=8 */ MSM_ROTATOR_SRC_FORMAT); } return 0; } static int msm_rotator_ycxcx_h2v2(struct msm_rotator_img_info *info, unsigned int in_paddr, unsigned int out_paddr, unsigned int use_imem, int new_session, unsigned int in_chroma_paddr, unsigned int out_chroma_paddr, unsigned int in_chroma2_paddr, unsigned int out_chroma2_paddr, int fast_yuv_en) { uint32_t dst_format; int is_tile = 0; switch (info->src.format) { case MDP_Y_CRCB_H2V2_TILE: is_tile = 1; dst_format = MDP_Y_CRCB_H2V2; break; case MDP_Y_CR_CB_H2V2: case MDP_Y_CR_CB_GH2V2: if (fast_yuv_en) { dst_format = info->src.format; break; } case MDP_Y_CRCB_H2V2: dst_format = MDP_Y_CRCB_H2V2; break; case MDP_Y_CB_CR_H2V2: if (fast_yuv_en) { dst_format = info->src.format; break; } dst_format = MDP_Y_CBCR_H2V2; break; case MDP_Y_CBCR_H2V2_TILE: is_tile = 1; case MDP_Y_CBCR_H2V2: dst_format = MDP_Y_CBCR_H2V2; break; default: return -EINVAL; } if (info->dst.format != dst_format) return -EINVAL; /* rotator expects YCbCr for planar input format */ if ((info->src.format == MDP_Y_CR_CB_H2V2 || info->src.format == MDP_Y_CR_CB_GH2V2) && rotator_hw_revision < ROTATOR_REVISION_V2) swap(in_chroma_paddr, in_chroma2_paddr); iowrite32(in_paddr, MSM_ROTATOR_SRCP0_ADDR); iowrite32(in_chroma_paddr, MSM_ROTATOR_SRCP1_ADDR); iowrite32(in_chroma2_paddr, MSM_ROTATOR_SRCP2_ADDR); iowrite32(out_paddr + ((info->dst_y * info->dst.width) + info->dst_x), MSM_ROTATOR_OUTP0_ADDR); iowrite32(out_chroma_paddr + (((info->dst_y * info->dst.width)/2) + info->dst_x), MSM_ROTATOR_OUTP1_ADDR); if (out_chroma2_paddr) iowrite32(out_chroma2_paddr + (((info->dst_y * info->dst.width)/2) + info->dst_x), MSM_ROTATOR_OUTP2_ADDR); if (new_session) { if (in_chroma2_paddr) { if (info->src.format == MDP_Y_CR_CB_GH2V2) { iowrite32(ALIGN(info->src.width, 16) | ALIGN((info->src.width / 2), 16) << 16, MSM_ROTATOR_SRC_YSTRIDE1); iowrite32(ALIGN((info->src.width / 2), 16), MSM_ROTATOR_SRC_YSTRIDE2); } else { iowrite32(info->src.width | (info->src.width / 2) << 16, MSM_ROTATOR_SRC_YSTRIDE1); iowrite32((info->src.width / 2), MSM_ROTATOR_SRC_YSTRIDE2); } } else { iowrite32(info->src.width | info->src.width << 16, MSM_ROTATOR_SRC_YSTRIDE1); } if (out_chroma2_paddr) { if (info->dst.format == MDP_Y_CR_CB_GH2V2) { iowrite32(ALIGN(info->dst.width, 16) | ALIGN((info->dst.width / 2), 16) << 16, MSM_ROTATOR_OUT_YSTRIDE1); iowrite32(ALIGN((info->dst.width / 2), 16), MSM_ROTATOR_OUT_YSTRIDE2); } else { iowrite32(info->dst.width | info->dst.width/2 << 16, MSM_ROTATOR_OUT_YSTRIDE1); iowrite32(info->dst.width/2, MSM_ROTATOR_OUT_YSTRIDE2); } } else { iowrite32(info->dst.width | info->dst.width << 16, MSM_ROTATOR_OUT_YSTRIDE1); } if (dst_format == MDP_Y_CBCR_H2V2 || dst_format == MDP_Y_CB_CR_H2V2) { iowrite32(GET_PACK_PATTERN(0, 0, CLR_CB, CLR_CR, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, 0, CLR_CB, CLR_CR, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); } else { iowrite32(GET_PACK_PATTERN(0, 0, CLR_CR, CLR_CB, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, 0, CLR_CR, CLR_CB, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); } iowrite32((3 << 18) | /* chroma sampling 3=4:2:0 */ (ROTATIONS_TO_BITMASK(info->rotations) << 9) | 1 << 8 | /* ROT_EN */ fast_yuv_en << 4 | /*fast YUV*/ info->downscale_ratio << 2 | /* downscale v ratio */ info->downscale_ratio, /* downscale h ratio */ MSM_ROTATOR_SUB_BLOCK_CFG); iowrite32((is_tile ? 2 : 0) << 29 | /* frame format */ (use_imem ? 0 : 1) << 22 | /* tile size */ (in_chroma2_paddr ? 1 : 2) << 19 | /* fetch planes */ 0 << 18 | /* unpack align */ 1 << 17 | /* unpack tight */ 1 << 13 | /* unpack count 0=1 component */ 0 << 9 | /* src Bpp 0=1 byte ... */ 0 << 8 | /* has alpha */ 0 << 6 | /* alpha bits 3=8bits */ 3 << 4 | /* R/Cr bits 1=5 2=6 3=8 */ 3 << 2 | /* B/Cb bits 1=5 2=6 3=8 */ 3 << 0, /* G/Y bits 1=5 2=6 3=8 */ MSM_ROTATOR_SRC_FORMAT); } return 0; } static int msm_rotator_ycxcx_h2v2_2pass(struct msm_rotator_img_info *info, unsigned int in_paddr, unsigned int out_paddr, unsigned int use_imem, int new_session, unsigned int in_chroma_paddr, unsigned int out_chroma_paddr, unsigned int in_chroma2_paddr, unsigned int out_chroma2_paddr, int fast_yuv_en, int enable_2pass, int session_index) { uint32_t pass2_src_format, pass1_dst_format, dst_format; int is_tile = 0, post_pass1_buf_is_planar = 0; unsigned int status; int post_pass1_ystride = info->src_rect.w >> info->downscale_ratio; int post_pass1_height = info->src_rect.h >> info->downscale_ratio; /* DST format = SRC format for non-tiled SRC formats * when fast YUV is enabled. For TILED formats, * DST format of MDP_Y_CRCB_H2V2_TILE = MDP_Y_CRCB_H2V2 * DST format of MDP_Y_CBCR_H2V2_TILE = MDP_Y_CBCR_H2V2 */ switch (info->src.format) { case MDP_Y_CRCB_H2V2_TILE: is_tile = 1; dst_format = MDP_Y_CRCB_H2V2; pass1_dst_format = MDP_Y_CRCB_H2V2; pass2_src_format = pass1_dst_format; break; case MDP_Y_CR_CB_H2V2: case MDP_Y_CR_CB_GH2V2: case MDP_Y_CB_CR_H2V2: post_pass1_buf_is_planar = 1; case MDP_Y_CRCB_H2V2: case MDP_Y_CBCR_H2V2: dst_format = info->src.format; pass1_dst_format = info->src.format; pass2_src_format = pass1_dst_format; break; case MDP_Y_CBCR_H2V2_TILE: is_tile = 1; dst_format = MDP_Y_CBCR_H2V2; pass1_dst_format = info->src.format; pass2_src_format = pass1_dst_format; break; default: return -EINVAL; } if (info->dst.format != dst_format) return -EINVAL; /* Beginning of Pass-1 */ /* rotator expects YCbCr for planar input format */ if ((info->src.format == MDP_Y_CR_CB_H2V2 || info->src.format == MDP_Y_CR_CB_GH2V2) && rotator_hw_revision < ROTATOR_REVISION_V2) swap(in_chroma_paddr, in_chroma2_paddr); iowrite32(in_paddr, MSM_ROTATOR_SRCP0_ADDR); iowrite32(in_chroma_paddr, MSM_ROTATOR_SRCP1_ADDR); iowrite32(in_chroma2_paddr, MSM_ROTATOR_SRCP2_ADDR); if (new_session) { if (in_chroma2_paddr) { if (info->src.format == MDP_Y_CR_CB_GH2V2) { iowrite32(ALIGN(info->src.width, 16) | ALIGN((info->src.width / 2), 16) << 16, MSM_ROTATOR_SRC_YSTRIDE1); iowrite32(ALIGN((info->src.width / 2), 16), MSM_ROTATOR_SRC_YSTRIDE2); } else { iowrite32(info->src.width | (info->src.width / 2) << 16, MSM_ROTATOR_SRC_YSTRIDE1); iowrite32((info->src.width / 2), MSM_ROTATOR_SRC_YSTRIDE2); } } else { iowrite32(info->src.width | info->src.width << 16, MSM_ROTATOR_SRC_YSTRIDE1); } } pr_debug("src_rect.w=%i src_rect.h=%i src_rect.x=%i src_rect.y=%i", info->src_rect.w, info->src_rect.h, info->src_rect.x, info->src_rect.y); pr_debug("src.width=%i src.height=%i src_format=%i", info->src.width, info->src.height, info->src.format); pr_debug("dst_width=%i dst_height=%i dst.x=%i dst.y=%i", info->dst.width, info->dst.height, info->dst_x, info->dst_y); pr_debug("post_pass1_ystride=%i post_pass1_height=%i downscale=%i", post_pass1_ystride, post_pass1_height, info->downscale_ratio); rotator_allocate_2pass_buf(mrd->y_rot_buf, session_index); rotator_allocate_2pass_buf(mrd->chroma_rot_buf, session_index); if (post_pass1_buf_is_planar) rotator_allocate_2pass_buf(mrd->chroma2_rot_buf, session_index); iowrite32(mrd->y_rot_buf->write_addr, MSM_ROTATOR_OUTP0_ADDR); iowrite32(mrd->chroma_rot_buf->write_addr, MSM_ROTATOR_OUTP1_ADDR); if (post_pass1_buf_is_planar) iowrite32(mrd->chroma2_rot_buf->write_addr, MSM_ROTATOR_OUTP2_ADDR); if (post_pass1_buf_is_planar) { if (pass1_dst_format == MDP_Y_CR_CB_GH2V2) { iowrite32(ALIGN(post_pass1_ystride, 16) | ALIGN((post_pass1_ystride / 2), 16) << 16, MSM_ROTATOR_OUT_YSTRIDE1); iowrite32(ALIGN((post_pass1_ystride / 2), 16), MSM_ROTATOR_OUT_YSTRIDE2); } else { iowrite32(post_pass1_ystride | post_pass1_ystride / 2 << 16, MSM_ROTATOR_OUT_YSTRIDE1); iowrite32(post_pass1_ystride / 2, MSM_ROTATOR_OUT_YSTRIDE2); } } else { iowrite32(post_pass1_ystride | post_pass1_ystride << 16, MSM_ROTATOR_OUT_YSTRIDE1); } if (pass1_dst_format == MDP_Y_CBCR_H2V2 || pass1_dst_format == MDP_Y_CB_CR_H2V2) { iowrite32(GET_PACK_PATTERN(0, 0, CLR_CB, CLR_CR, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, 0, CLR_CB, CLR_CR, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); } else { iowrite32(GET_PACK_PATTERN(0, 0, CLR_CR, CLR_CB, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, 0, CLR_CR, CLR_CB, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); } iowrite32((3 << 18) | /* chroma sampling 3=4:2:0 */ 0 << 9 | /* Pass-1 No Rotation */ 1 << 8 | /* ROT_EN */ fast_yuv_en << 4 | /*fast YUV*/ info->downscale_ratio << 2 | /* downscale v ratio */ info->downscale_ratio, /* downscale h ratio */ MSM_ROTATOR_SUB_BLOCK_CFG); iowrite32((is_tile ? 2 : 0) << 29 | /* frame format */ (use_imem ? 0 : 1) << 22 | /* tile size */ (in_chroma2_paddr ? 1 : 2) << 19 | /* fetch planes */ 0 << 18 | /* unpack align */ 1 << 17 | /* unpack tight */ 1 << 13 | /* unpack count 0=1 component */ 0 << 9 | /* src Bpp 0=1 byte ... */ 0 << 8 | /* has alpha */ 0 << 6 | /* alpha bits 3=8bits */ 3 << 4 | /* R/Cr bits 1=5 2=6 3=8 */ 3 << 2 | /* B/Cb bits 1=5 2=6 3=8 */ 3 << 0, /* G/Y bits 1=5 2=6 3=8 */ MSM_ROTATOR_SRC_FORMAT); iowrite32(3, MSM_ROTATOR_INTR_ENABLE); msm_rotator_dev->processing = 1; iowrite32(0x1, MSM_ROTATOR_START); /* End of Pass-1 */ wait_event(msm_rotator_dev->wq, (msm_rotator_dev->processing == 0)); /* Beginning of Pass-2 */ status = (unsigned char)ioread32(MSM_ROTATOR_INTR_STATUS); if ((status & 0x03) != 0x01) { pr_err("%s(): AXI Bus Error, issuing SW_RESET\n", __func__); iowrite32(0x1, MSM_ROTATOR_SW_RESET); } iowrite32(0, MSM_ROTATOR_INTR_ENABLE); iowrite32(3, MSM_ROTATOR_INTR_CLEAR); if (use_imem) iowrite32(0x42, MSM_ROTATOR_MAX_BURST_SIZE); iowrite32(((post_pass1_height & 0x1fff) << 16) | (post_pass1_ystride & 0x1fff), MSM_ROTATOR_SRC_SIZE); iowrite32(0 << 16 | 0, MSM_ROTATOR_SRC_XY); iowrite32(((post_pass1_height & 0x1fff) << 16) | (post_pass1_ystride & 0x1fff), MSM_ROTATOR_SRC_IMAGE_SIZE); /* rotator expects YCbCr for planar input format */ if ((pass2_src_format == MDP_Y_CR_CB_H2V2 || pass2_src_format == MDP_Y_CR_CB_GH2V2) && rotator_hw_revision < ROTATOR_REVISION_V2) swap(mrd->chroma_rot_buf->read_addr, mrd->chroma2_rot_buf->read_addr); iowrite32(mrd->y_rot_buf->read_addr, MSM_ROTATOR_SRCP0_ADDR); iowrite32(mrd->chroma_rot_buf->read_addr, MSM_ROTATOR_SRCP1_ADDR); if (mrd->chroma2_rot_buf->read_addr) iowrite32(mrd->chroma2_rot_buf->read_addr, MSM_ROTATOR_SRCP2_ADDR); if (post_pass1_buf_is_planar) { if (pass2_src_format == MDP_Y_CR_CB_GH2V2) { iowrite32(ALIGN(post_pass1_ystride, 16) | ALIGN((post_pass1_ystride / 2), 16) << 16, MSM_ROTATOR_SRC_YSTRIDE1); iowrite32(ALIGN((post_pass1_ystride / 2), 16), MSM_ROTATOR_SRC_YSTRIDE2); } else { iowrite32(post_pass1_ystride | (post_pass1_ystride / 2) << 16, MSM_ROTATOR_SRC_YSTRIDE1); iowrite32((post_pass1_ystride / 2), MSM_ROTATOR_SRC_YSTRIDE2); } } else { iowrite32(post_pass1_ystride | post_pass1_ystride << 16, MSM_ROTATOR_SRC_YSTRIDE1); } iowrite32(out_paddr + ((info->dst_y * info->dst.width) + info->dst_x), MSM_ROTATOR_OUTP0_ADDR); iowrite32(out_chroma_paddr + (((info->dst_y * info->dst.width)/2) + info->dst_x), MSM_ROTATOR_OUTP1_ADDR); if (out_chroma2_paddr) iowrite32(out_chroma2_paddr + (((info->dst_y * info->dst.width)/2) + info->dst_x), MSM_ROTATOR_OUTP2_ADDR); if (new_session) { if (out_chroma2_paddr) { if (info->dst.format == MDP_Y_CR_CB_GH2V2) { iowrite32(ALIGN(info->dst.width, 16) | ALIGN((info->dst.width / 2), 16) << 16, MSM_ROTATOR_OUT_YSTRIDE1); iowrite32(ALIGN((info->dst.width / 2), 16), MSM_ROTATOR_OUT_YSTRIDE2); } else { iowrite32(info->dst.width | info->dst.width/2 << 16, MSM_ROTATOR_OUT_YSTRIDE1); iowrite32(info->dst.width/2, MSM_ROTATOR_OUT_YSTRIDE2); } } else { iowrite32(info->dst.width | info->dst.width << 16, MSM_ROTATOR_OUT_YSTRIDE1); } if (dst_format == MDP_Y_CBCR_H2V2 || dst_format == MDP_Y_CB_CR_H2V2) { iowrite32(GET_PACK_PATTERN(0, 0, CLR_CB, CLR_CR, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, 0, CLR_CB, CLR_CR, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); } else { iowrite32(GET_PACK_PATTERN(0, 0, CLR_CR, CLR_CB, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, 0, CLR_CR, CLR_CB, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); } iowrite32((3 << 18) | /* chroma sampling 3=4:2:0 */ (ROTATIONS_TO_BITMASK(info->rotations) << 9) | 1 << 8 | /* ROT_EN */ fast_yuv_en << 4 | /*fast YUV*/ 0 << 2 | /* No downscale in Pass-2 */ 0, /* No downscale in Pass-2 */ MSM_ROTATOR_SUB_BLOCK_CFG); iowrite32(0 << 29 | /* Output of Pass-1 will always be non-tiled */ (use_imem ? 0 : 1) << 22 | /* tile size */ (in_chroma2_paddr ? 1 : 2) << 19 | /* fetch planes */ 0 << 18 | /* unpack align */ 1 << 17 | /* unpack tight */ 1 << 13 | /* unpack count 0=1 component */ 0 << 9 | /* src Bpp 0=1 byte ... */ 0 << 8 | /* has alpha */ 0 << 6 | /* alpha bits 3=8bits */ 3 << 4 | /* R/Cr bits 1=5 2=6 3=8 */ 3 << 2 | /* B/Cb bits 1=5 2=6 3=8 */ 3 << 0, /* G/Y bits 1=5 2=6 3=8 */ MSM_ROTATOR_SRC_FORMAT); } return 0; } static int msm_rotator_ycrycb(struct msm_rotator_img_info *info, unsigned int in_paddr, unsigned int out_paddr, unsigned int use_imem, int new_session, unsigned int out_chroma_paddr) { int bpp; uint32_t dst_format; if (info->src.format == MDP_YCRYCB_H2V1) { if (info->rotations & MDP_ROT_90) dst_format = MDP_Y_CRCB_H1V2; else dst_format = MDP_Y_CRCB_H2V1; } else return -EINVAL; if (info->dst.format != dst_format) return -EINVAL; bpp = get_bpp(info->src.format); if (bpp < 0) return -ENOTTY; iowrite32(in_paddr, MSM_ROTATOR_SRCP0_ADDR); iowrite32(out_paddr + ((info->dst_y * info->dst.width) + info->dst_x), MSM_ROTATOR_OUTP0_ADDR); iowrite32(out_chroma_paddr + ((info->dst_y * info->dst.width)/2 + info->dst_x), MSM_ROTATOR_OUTP1_ADDR); if (new_session) { iowrite32(info->src.width * bpp, MSM_ROTATOR_SRC_YSTRIDE1); if (info->rotations & MDP_ROT_90) iowrite32(info->dst.width | (info->dst.width*2) << 16, MSM_ROTATOR_OUT_YSTRIDE1); else iowrite32(info->dst.width | (info->dst.width) << 16, MSM_ROTATOR_OUT_YSTRIDE1); iowrite32(GET_PACK_PATTERN(CLR_Y, CLR_CR, CLR_Y, CLR_CB, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, 0, CLR_CR, CLR_CB, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); iowrite32((1 << 18) | /* chroma sampling 1=H2V1 */ (ROTATIONS_TO_BITMASK(info->rotations) << 9) | 1 << 8 | /* ROT_EN */ info->downscale_ratio << 2 | /* downscale v ratio */ info->downscale_ratio, /* downscale h ratio */ MSM_ROTATOR_SUB_BLOCK_CFG); iowrite32(0 << 29 | /* frame format 0 = linear */ (use_imem ? 0 : 1) << 22 | /* tile size */ 0 << 19 | /* fetch planes 0=interleaved */ 0 << 18 | /* unpack align */ 1 << 17 | /* unpack tight */ 3 << 13 | /* unpack count 0=1 component */ (bpp-1) << 9 | /* src Bpp 0=1 byte ... */ 0 << 8 | /* has alpha */ 0 << 6 | /* alpha bits 3=8bits */ 3 << 4 | /* R/Cr bits 1=5 2=6 3=8 */ 3 << 2 | /* B/Cb bits 1=5 2=6 3=8 */ 3 << 0, /* G/Y bits 1=5 2=6 3=8 */ MSM_ROTATOR_SRC_FORMAT); } return 0; } static int msm_rotator_rgb_types(struct msm_rotator_img_info *info, unsigned int in_paddr, unsigned int out_paddr, unsigned int use_imem, int new_session) { int bpp, abits, rbits, gbits, bbits; if (info->src.format != info->dst.format) return -EINVAL; bpp = get_bpp(info->src.format); if (bpp < 0) return -ENOTTY; iowrite32(in_paddr, MSM_ROTATOR_SRCP0_ADDR); iowrite32(out_paddr + ((info->dst_y * info->dst.width) + info->dst_x) * bpp, MSM_ROTATOR_OUTP0_ADDR); if (new_session) { iowrite32(info->src.width * bpp, MSM_ROTATOR_SRC_YSTRIDE1); iowrite32(info->dst.width * bpp, MSM_ROTATOR_OUT_YSTRIDE1); iowrite32((0 << 18) | /* chroma sampling 0=rgb */ (ROTATIONS_TO_BITMASK(info->rotations) << 9) | 1 << 8 | /* ROT_EN */ info->downscale_ratio << 2 | /* downscale v ratio */ info->downscale_ratio, /* downscale h ratio */ MSM_ROTATOR_SUB_BLOCK_CFG); switch (info->src.format) { case MDP_RGB_565: iowrite32(GET_PACK_PATTERN(0, CLR_R, CLR_G, CLR_B, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, CLR_R, CLR_G, CLR_B, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); abits = 0; rbits = COMPONENT_5BITS; gbits = COMPONENT_6BITS; bbits = COMPONENT_5BITS; break; case MDP_BGR_565: iowrite32(GET_PACK_PATTERN(0, CLR_B, CLR_G, CLR_R, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, CLR_B, CLR_G, CLR_R, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); abits = 0; rbits = COMPONENT_5BITS; gbits = COMPONENT_6BITS; bbits = COMPONENT_5BITS; break; case MDP_RGB_888: case MDP_YCBCR_H1V1: case MDP_YCRCB_H1V1: iowrite32(GET_PACK_PATTERN(0, CLR_R, CLR_G, CLR_B, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(0, CLR_R, CLR_G, CLR_B, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); abits = 0; rbits = COMPONENT_8BITS; gbits = COMPONENT_8BITS; bbits = COMPONENT_8BITS; break; case MDP_ARGB_8888: case MDP_RGBA_8888: case MDP_XRGB_8888: case MDP_RGBX_8888: iowrite32(GET_PACK_PATTERN(CLR_ALPHA, CLR_R, CLR_G, CLR_B, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(CLR_ALPHA, CLR_R, CLR_G, CLR_B, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); abits = COMPONENT_8BITS; rbits = COMPONENT_8BITS; gbits = COMPONENT_8BITS; bbits = COMPONENT_8BITS; break; case MDP_BGRA_8888: iowrite32(GET_PACK_PATTERN(CLR_ALPHA, CLR_B, CLR_G, CLR_R, 8), MSM_ROTATOR_SRC_UNPACK_PATTERN1); iowrite32(GET_PACK_PATTERN(CLR_ALPHA, CLR_B, CLR_G, CLR_R, 8), MSM_ROTATOR_OUT_PACK_PATTERN1); abits = COMPONENT_8BITS; rbits = COMPONENT_8BITS; gbits = COMPONENT_8BITS; bbits = COMPONENT_8BITS; break; default: return -EINVAL; } iowrite32(0 << 29 | /* frame format 0 = linear */ (use_imem ? 0 : 1) << 22 | /* tile size */ 0 << 19 | /* fetch planes 0=interleaved */ 0 << 18 | /* unpack align */ 1 << 17 | /* unpack tight */ (abits ? 3 : 2) << 13 | /* unpack count 0=1 comp */ (bpp-1) << 9 | /* src Bpp 0=1 byte ... */ (abits ? 1 : 0) << 8 | /* has alpha */ abits << 6 | /* alpha bits 3=8bits */ rbits << 4 | /* R/Cr bits 1=5 2=6 3=8 */ bbits << 2 | /* B/Cb bits 1=5 2=6 3=8 */ gbits << 0, /* G/Y bits 1=5 2=6 3=8 */ MSM_ROTATOR_SRC_FORMAT); } return 0; } static int get_img(struct msmfb_data *fbd, int domain, unsigned long *start, unsigned long *len, struct file **p_file, int *p_need, struct ion_handle **p_ihdl, unsigned int secure) { int ret = 0; #ifdef CONFIG_FB struct file *file = NULL; int put_needed, fb_num; #endif #ifdef CONFIG_ANDROID_PMEM unsigned long vstart; #endif *p_need = 0; #ifdef CONFIG_FB if (fbd->flags & MDP_MEMORY_ID_TYPE_FB) { file = fget_light(fbd->memory_id, &put_needed); if (file == NULL) { pr_err("fget_light returned NULL\n"); return -EINVAL; } if (MAJOR(file->f_dentry->d_inode->i_rdev) == FB_MAJOR) { fb_num = MINOR(file->f_dentry->d_inode->i_rdev); if (get_fb_phys_info(start, len, fb_num, ROTATOR_SUBSYSTEM_ID)) { pr_err("get_fb_phys_info() failed\n"); ret = -1; } else { *p_file = file; *p_need = put_needed; } } else { pr_err("invalid FB_MAJOR failed\n"); ret = -1; } if (ret) fput_light(file, put_needed); return ret; } #endif #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION return msm_rotator_iommu_map_buf(fbd->memory_id, domain, start, len, p_ihdl, secure); #endif #ifdef CONFIG_ANDROID_PMEM if (!get_pmem_file(fbd->memory_id, start, &vstart, len, p_file)) return 0; else return -ENOMEM; #endif } static void put_img(struct file *p_file, struct ion_handle *p_ihdl, int domain, unsigned int secure) { #ifdef CONFIG_ANDROID_PMEM if (p_file != NULL) put_pmem_file(p_file); #endif #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION if (!IS_ERR_OR_NULL(p_ihdl)) { pr_debug("%s(): p_ihdl %p\n", __func__, p_ihdl); if (rot_iommu_split_domain) { if (!secure) ion_unmap_iommu(msm_rotator_dev->client, p_ihdl, domain, GEN_POOL); } else { ion_unmap_iommu(msm_rotator_dev->client, p_ihdl, ROTATOR_SRC_DOMAIN, GEN_POOL); } ion_free(msm_rotator_dev->client, p_ihdl); } #endif } static int msm_rotator_rotate_prepare( struct msm_rotator_data_info *data_info, struct msm_rotator_commit_info *commit_info) { unsigned int format; struct msm_rotator_data_info info; unsigned int in_paddr, out_paddr; unsigned long src_len, dst_len; int rc = 0, s; struct file *srcp0_file = NULL, *dstp0_file = NULL; struct file *srcp1_file = NULL, *dstp1_file = NULL; struct ion_handle *srcp0_ihdl = NULL, *dstp0_ihdl = NULL; struct ion_handle *srcp1_ihdl = NULL, *dstp1_ihdl = NULL; int ps0_need, p_need; unsigned int in_chroma_paddr = 0, out_chroma_paddr = 0; unsigned int in_chroma2_paddr = 0, out_chroma2_paddr = 0; struct msm_rotator_img_info *img_info; struct msm_rotator_mem_planes src_planes, dst_planes; mutex_lock(&msm_rotator_dev->rotator_lock); info = *data_info; for (s = 0; s < MAX_SESSIONS; s++) if ((msm_rotator_dev->rot_session[s] != NULL) && (info.session_id == (unsigned int)msm_rotator_dev->rot_session[s] )) break; if (s == MAX_SESSIONS) { pr_err("%s() : Attempt to use invalid session_id %d\n", __func__, s); rc = -EINVAL; mutex_unlock(&msm_rotator_dev->rotator_lock); return rc; } img_info = &(msm_rotator_dev->rot_session[s]->img_info); if (img_info->enable == 0) { dev_dbg(msm_rotator_dev->device, "%s() : Session_id %d not enabled\n", __func__, s); rc = -EINVAL; mutex_unlock(&msm_rotator_dev->rotator_lock); return rc; } if (msm_rotator_get_plane_sizes(img_info->src.format, img_info->src.width, img_info->src.height, &src_planes)) { pr_err("%s: invalid src format\n", __func__); rc = -EINVAL; mutex_unlock(&msm_rotator_dev->rotator_lock); return rc; } if (msm_rotator_get_plane_sizes(img_info->dst.format, img_info->dst.width, img_info->dst.height, &dst_planes)) { pr_err("%s: invalid dst format\n", __func__); rc = -EINVAL; mutex_unlock(&msm_rotator_dev->rotator_lock); return rc; } rc = get_img(&info.src, ROTATOR_SRC_DOMAIN, (unsigned long *)&in_paddr, (unsigned long *)&src_len, &srcp0_file, &ps0_need, &srcp0_ihdl, 0); if (rc) { pr_err("%s: in get_img() failed id=0x%08x\n", DRIVER_NAME, info.src.memory_id); goto rotate_prepare_error; } rc = get_img(&info.dst, ROTATOR_DST_DOMAIN, (unsigned long *)&out_paddr, (unsigned long *)&dst_len, &dstp0_file, &p_need, &dstp0_ihdl, img_info->secure); if (rc) { pr_err("%s: out get_img() failed id=0x%08x\n", DRIVER_NAME, info.dst.memory_id); goto rotate_prepare_error; } format = img_info->src.format; if (((info.version_key & VERSION_KEY_MASK) == 0xA5B4C300) && ((info.version_key & ~VERSION_KEY_MASK) > 0) && (src_planes.num_planes == 2)) { if (checkoffset(info.src.offset, src_planes.plane_size[0], src_len)) { pr_err("%s: invalid src buffer (len=%lu offset=%x)\n", __func__, src_len, info.src.offset); rc = -ERANGE; goto rotate_prepare_error; } if (checkoffset(info.dst.offset, dst_planes.plane_size[0], dst_len)) { pr_err("%s: invalid dst buffer (len=%lu offset=%x)\n", __func__, dst_len, info.dst.offset); rc = -ERANGE; goto rotate_prepare_error; } rc = get_img(&info.src_chroma, ROTATOR_SRC_DOMAIN, (unsigned long *)&in_chroma_paddr, (unsigned long *)&src_len, &srcp1_file, &p_need, &srcp1_ihdl, 0); if (rc) { pr_err("%s: in chroma get_img() failed id=0x%08x\n", DRIVER_NAME, info.src_chroma.memory_id); goto rotate_prepare_error; } rc = get_img(&info.dst_chroma, ROTATOR_DST_DOMAIN, (unsigned long *)&out_chroma_paddr, (unsigned long *)&dst_len, &dstp1_file, &p_need, &dstp1_ihdl, img_info->secure); if (rc) { pr_err("%s: out chroma get_img() failed id=0x%08x\n", DRIVER_NAME, info.dst_chroma.memory_id); goto rotate_prepare_error; } if (checkoffset(info.src_chroma.offset, src_planes.plane_size[1], src_len)) { pr_err("%s: invalid chr src buf len=%lu offset=%x\n", __func__, src_len, info.src_chroma.offset); rc = -ERANGE; goto rotate_prepare_error; } if (checkoffset(info.dst_chroma.offset, src_planes.plane_size[1], dst_len)) { pr_err("%s: invalid chr dst buf len=%lu offset=%x\n", __func__, dst_len, info.dst_chroma.offset); rc = -ERANGE; goto rotate_prepare_error; } in_chroma_paddr += info.src_chroma.offset; out_chroma_paddr += info.dst_chroma.offset; } else { if (checkoffset(info.src.offset, src_planes.total_size, src_len)) { pr_err("%s: invalid src buffer (len=%lu offset=%x)\n", __func__, src_len, info.src.offset); rc = -ERANGE; goto rotate_prepare_error; } if (checkoffset(info.dst.offset, dst_planes.total_size, dst_len)) { pr_err("%s: invalid dst buffer (len=%lu offset=%x)\n", __func__, dst_len, info.dst.offset); rc = -ERANGE; goto rotate_prepare_error; } } in_paddr += info.src.offset; out_paddr += info.dst.offset; if (!in_chroma_paddr && src_planes.num_planes >= 2) in_chroma_paddr = in_paddr + src_planes.plane_size[0]; if (!out_chroma_paddr && dst_planes.num_planes >= 2) out_chroma_paddr = out_paddr + dst_planes.plane_size[0]; if (src_planes.num_planes >= 3) in_chroma2_paddr = in_chroma_paddr + src_planes.plane_size[1]; if (dst_planes.num_planes >= 3) out_chroma2_paddr = out_chroma_paddr + dst_planes.plane_size[1]; commit_info->data_info = info; commit_info->img_info = *img_info; commit_info->format = format; commit_info->in_paddr = in_paddr; commit_info->out_paddr = out_paddr; commit_info->in_chroma_paddr = in_chroma_paddr; commit_info->out_chroma_paddr = out_chroma_paddr; commit_info->in_chroma2_paddr = in_chroma2_paddr; commit_info->out_chroma2_paddr = out_chroma2_paddr; commit_info->srcp0_file = srcp0_file; commit_info->srcp1_file = srcp1_file; commit_info->srcp0_ihdl = srcp0_ihdl; commit_info->srcp1_ihdl = srcp1_ihdl; commit_info->dstp0_file = dstp0_file; commit_info->dstp0_ihdl = dstp0_ihdl; commit_info->dstp1_file = dstp1_file; commit_info->dstp1_ihdl = dstp1_ihdl; commit_info->ps0_need = ps0_need; commit_info->session_index = s; commit_info->acq_fen = msm_rotator_dev->sync_info[s].acq_fen; commit_info->fast_yuv_en = mrd->rot_session[s]->fast_yuv_enable; commit_info->enable_2pass = mrd->rot_session[s]->enable_2pass; mutex_unlock(&msm_rotator_dev->rotator_lock); return 0; rotate_prepare_error: put_img(dstp1_file, dstp1_ihdl, ROTATOR_DST_DOMAIN, msm_rotator_dev->rot_session[s]->img_info.secure); put_img(srcp1_file, srcp1_ihdl, ROTATOR_SRC_DOMAIN, 0); put_img(dstp0_file, dstp0_ihdl, ROTATOR_DST_DOMAIN, msm_rotator_dev->rot_session[s]->img_info.secure); /* only source may use frame buffer */ if (info.src.flags & MDP_MEMORY_ID_TYPE_FB) fput_light(srcp0_file, ps0_need); else put_img(srcp0_file, srcp0_ihdl, ROTATOR_SRC_DOMAIN, 0); dev_dbg(msm_rotator_dev->device, "%s() returning rc = %d\n", __func__, rc); mutex_unlock(&msm_rotator_dev->rotator_lock); return rc; } static int msm_rotator_do_rotate_sub( struct msm_rotator_commit_info *commit_info) { unsigned int status, format; struct msm_rotator_data_info info; unsigned int in_paddr, out_paddr; int use_imem = 0, rc = 0; struct file *srcp0_file, *dstp0_file; struct file *srcp1_file, *dstp1_file; struct ion_handle *srcp0_ihdl, *dstp0_ihdl; struct ion_handle *srcp1_ihdl, *dstp1_ihdl; int s, ps0_need; unsigned int in_chroma_paddr, out_chroma_paddr; unsigned int in_chroma2_paddr, out_chroma2_paddr; struct msm_rotator_img_info *img_info; mutex_lock(&msm_rotator_dev->rotator_lock); info = commit_info->data_info; img_info = &commit_info->img_info; format = commit_info->format; in_paddr = commit_info->in_paddr; out_paddr = commit_info->out_paddr; in_chroma_paddr = commit_info->in_chroma_paddr; out_chroma_paddr = commit_info->out_chroma_paddr; in_chroma2_paddr = commit_info->in_chroma2_paddr; out_chroma2_paddr = commit_info->out_chroma2_paddr; srcp0_file = commit_info->srcp0_file; srcp1_file = commit_info->srcp1_file; srcp0_ihdl = commit_info->srcp0_ihdl; srcp1_ihdl = commit_info->srcp1_ihdl; dstp0_file = commit_info->dstp0_file; dstp0_ihdl = commit_info->dstp0_ihdl; dstp1_file = commit_info->dstp1_file; dstp1_ihdl = commit_info->dstp1_ihdl; ps0_need = commit_info->ps0_need; s = commit_info->session_index; msm_rotator_wait_for_fence(commit_info->acq_fen); commit_info->acq_fen = NULL; cancel_delayed_work_sync(&msm_rotator_dev->rot_clk_work); if (msm_rotator_dev->rot_clk_state != CLK_EN) { enable_rot_clks(); msm_rotator_dev->rot_clk_state = CLK_EN; } enable_irq(msm_rotator_dev->irq); #ifdef CONFIG_MSM_ROTATOR_USE_IMEM use_imem = msm_rotator_imem_allocate(ROTATOR_REQUEST); #else use_imem = 0; #endif /* * workaround for a hardware bug. rotator hardware hangs when we * use write burst beat size 16 on 128X128 tile fetch mode. As a * temporary fix use 0x42 for BURST_SIZE when imem used. */ if (use_imem) iowrite32(0x42, MSM_ROTATOR_MAX_BURST_SIZE); iowrite32(((img_info->src_rect.h & 0x1fff) << 16) | (img_info->src_rect.w & 0x1fff), MSM_ROTATOR_SRC_SIZE); iowrite32(((img_info->src_rect.y & 0x1fff) << 16) | (img_info->src_rect.x & 0x1fff), MSM_ROTATOR_SRC_XY); iowrite32(((img_info->src.height & 0x1fff) << 16) | (img_info->src.width & 0x1fff), MSM_ROTATOR_SRC_IMAGE_SIZE); switch (format) { case MDP_RGB_565: case MDP_BGR_565: case MDP_RGB_888: case MDP_ARGB_8888: case MDP_RGBA_8888: case MDP_XRGB_8888: case MDP_BGRA_8888: case MDP_RGBX_8888: case MDP_YCBCR_H1V1: case MDP_YCRCB_H1V1: rc = msm_rotator_rgb_types(img_info, in_paddr, out_paddr, use_imem, msm_rotator_dev->last_session_idx != s); break; case MDP_Y_CBCR_H2V2: case MDP_Y_CRCB_H2V2: case MDP_Y_CB_CR_H2V2: case MDP_Y_CR_CB_H2V2: case MDP_Y_CR_CB_GH2V2: case MDP_Y_CRCB_H2V2_TILE: case MDP_Y_CBCR_H2V2_TILE: if (!commit_info->enable_2pass) rc = msm_rotator_ycxcx_h2v2(img_info, in_paddr, out_paddr, use_imem, msm_rotator_dev->last_session_idx != s, in_chroma_paddr, out_chroma_paddr, in_chroma2_paddr, out_chroma2_paddr, commit_info->fast_yuv_en); else rc = msm_rotator_ycxcx_h2v2_2pass(img_info, in_paddr, out_paddr, use_imem, msm_rotator_dev->last_session_idx != s, in_chroma_paddr, out_chroma_paddr, in_chroma2_paddr, out_chroma2_paddr, commit_info->fast_yuv_en, commit_info->enable_2pass, s); break; case MDP_Y_CBCR_H2V1: case MDP_Y_CRCB_H2V1: rc = msm_rotator_ycxcx_h2v1(img_info, in_paddr, out_paddr, use_imem, msm_rotator_dev->last_session_idx != s, in_chroma_paddr, out_chroma_paddr); break; case MDP_YCRYCB_H2V1: rc = msm_rotator_ycrycb(img_info, in_paddr, out_paddr, use_imem, msm_rotator_dev->last_session_idx != s, out_chroma_paddr); break; default: rc = -EINVAL; pr_err("%s(): Unsupported format %u\n", __func__, format); goto do_rotate_exit; } if (rc != 0) { msm_rotator_dev->last_session_idx = INVALID_SESSION; pr_err("%s(): Invalid session error\n", __func__); goto do_rotate_exit; } iowrite32(3, MSM_ROTATOR_INTR_ENABLE); msm_rotator_dev->processing = 1; iowrite32(0x1, MSM_ROTATOR_START); wait_event(msm_rotator_dev->wq, (msm_rotator_dev->processing == 0)); status = (unsigned char)ioread32(MSM_ROTATOR_INTR_STATUS); if ((status & 0x03) != 0x01) { pr_err("%s(): AXI Bus Error, issuing SW_RESET\n", __func__); iowrite32(0x1, MSM_ROTATOR_SW_RESET); rc = -EFAULT; } iowrite32(0, MSM_ROTATOR_INTR_ENABLE); iowrite32(3, MSM_ROTATOR_INTR_CLEAR); do_rotate_exit: disable_irq(msm_rotator_dev->irq); #ifdef CONFIG_MSM_ROTATOR_USE_IMEM msm_rotator_imem_free(ROTATOR_REQUEST); #endif schedule_delayed_work(&msm_rotator_dev->rot_clk_work, HZ); put_img(dstp1_file, dstp1_ihdl, ROTATOR_DST_DOMAIN, img_info->secure); put_img(srcp1_file, srcp1_ihdl, ROTATOR_SRC_DOMAIN, 0); put_img(dstp0_file, dstp0_ihdl, ROTATOR_DST_DOMAIN, img_info->secure); /* only source may use frame buffer */ if (info.src.flags & MDP_MEMORY_ID_TYPE_FB) fput_light(srcp0_file, ps0_need); else put_img(srcp0_file, srcp0_ihdl, ROTATOR_SRC_DOMAIN, 0); msm_rotator_signal_timeline_done(s); mutex_unlock(&msm_rotator_dev->rotator_lock); dev_dbg(msm_rotator_dev->device, "%s() returning rc = %d\n", __func__, rc); return rc; } static void rot_wait_for_commit_queue(u32 is_all) { int ret = 0; u32 loop_cnt = 0; while (1) { mutex_lock(&mrd->commit_mutex); if (is_all && (atomic_read(&mrd->commit_q_cnt) == 0)) break; if ((!is_all) && (atomic_read(&mrd->commit_q_cnt) < MAX_COMMIT_QUEUE)) break; INIT_COMPLETION(mrd->commit_comp); mutex_unlock(&mrd->commit_mutex); ret = wait_for_completion_interruptible_timeout( &mrd->commit_comp, msecs_to_jiffies(WAIT_ROT_TIMEOUT)); if ((ret <= 0) || (atomic_read(&mrd->commit_q_cnt) >= MAX_COMMIT_QUEUE) || (loop_cnt > MAX_COMMIT_QUEUE)) { pr_err("%s wait for commit queue failed ret=%d pointers:%d %d", __func__, ret, atomic_read(&mrd->commit_q_r), atomic_read(&mrd->commit_q_w)); mutex_lock(&mrd->commit_mutex); ret = -ETIME; break; } else { ret = 0; } loop_cnt++; }; if (is_all || ret) { atomic_set(&mrd->commit_q_r, 0); atomic_set(&mrd->commit_q_cnt, 0); atomic_set(&mrd->commit_q_w, 0); } mutex_unlock(&mrd->commit_mutex); } static int msm_rotator_do_rotate(unsigned long arg) { struct msm_rotator_data_info info; struct rot_sync_info *sync_info; int session_index, ret; int commit_q_w; if (copy_from_user(&info, (void __user *)arg, sizeof(info))) return -EFAULT; rot_wait_for_commit_queue(false); mutex_lock(&mrd->commit_mutex); commit_q_w = atomic_read(&mrd->commit_q_w); ret = msm_rotator_rotate_prepare(&info, &mrd->commit_info[commit_q_w]); if (ret) { mutex_unlock(&mrd->commit_mutex); return ret; } session_index = mrd->commit_info[commit_q_w].session_index; sync_info = &msm_rotator_dev->sync_info[session_index]; mutex_lock(&sync_info->sync_mutex); atomic_inc(&sync_info->queue_buf_cnt); sync_info->acq_fen = NULL; mutex_unlock(&sync_info->sync_mutex); if (atomic_inc_return(&mrd->commit_q_w) >= MAX_COMMIT_QUEUE) atomic_set(&mrd->commit_q_w, 0); atomic_inc(&mrd->commit_q_cnt); schedule_work(&mrd->commit_work); mutex_unlock(&mrd->commit_mutex); if (info.wait_for_finish) rot_wait_for_commit_queue(true); return 0; } static void rot_commit_wq_handler(struct work_struct *work) { mutex_lock(&mrd->commit_wq_mutex); mutex_lock(&mrd->commit_mutex); while (atomic_read(&mrd->commit_q_cnt) > 0) { mrd->commit_running = true; mutex_unlock(&mrd->commit_mutex); msm_rotator_do_rotate_sub( &mrd->commit_info[atomic_read(&mrd->commit_q_r)]); mutex_lock(&mrd->commit_mutex); if (atomic_read(&mrd->commit_q_cnt) > 0) { atomic_dec(&mrd->commit_q_cnt); if (atomic_inc_return(&mrd->commit_q_r) >= MAX_COMMIT_QUEUE) atomic_set(&mrd->commit_q_r, 0); } complete_all(&mrd->commit_comp); } mrd->commit_running = false; if (atomic_read(&mrd->commit_q_r) != atomic_read(&mrd->commit_q_w)) pr_err("%s invalid state: r=%d w=%d cnt=%d", __func__, atomic_read(&mrd->commit_q_r), atomic_read(&mrd->commit_q_w), atomic_read(&mrd->commit_q_cnt)); mutex_unlock(&mrd->commit_mutex); mutex_unlock(&mrd->commit_wq_mutex); } static void msm_rotator_set_perf_level(u32 wh, u32 is_rgb) { u32 perf_level; if (is_rgb) perf_level = 1; else if (wh <= (640 * 480)) perf_level = 2; else if (wh <= (736 * 1280)) perf_level = 3; else perf_level = 4; #ifdef CONFIG_MSM_BUS_SCALING msm_bus_scale_client_update_request(msm_rotator_dev->bus_client_handle, perf_level); #endif } static int rot_enable_iommu_clocks(struct msm_rotator_dev *rot_dev) { int ret = 0, i; if (rot_dev->mmu_clk_on) return 0; for (i = 0; i < ARRAY_SIZE(rot_mmu_clks); i++) { rot_mmu_clks[i].mmu_clk = clk_get(&msm_rotator_dev->pdev->dev, rot_mmu_clks[i].mmu_clk_name); if (IS_ERR(rot_mmu_clks[i].mmu_clk)) { pr_err(" %s: Get failed for clk %s", __func__, rot_mmu_clks[i].mmu_clk_name); ret = PTR_ERR(rot_mmu_clks[i].mmu_clk); break; } ret = clk_prepare_enable(rot_mmu_clks[i].mmu_clk); if (ret) { clk_put(rot_mmu_clks[i].mmu_clk); rot_mmu_clks[i].mmu_clk = NULL; } } if (ret) { for (i--; i >= 0; i--) { clk_disable_unprepare(rot_mmu_clks[i].mmu_clk); clk_put(rot_mmu_clks[i].mmu_clk); rot_mmu_clks[i].mmu_clk = NULL; } } else { rot_dev->mmu_clk_on = 1; } return ret; } static int rot_disable_iommu_clocks(struct msm_rotator_dev *rot_dev) { int i; if (!rot_dev->mmu_clk_on) return 0; for (i = 0; i < ARRAY_SIZE(rot_mmu_clks); i++) { clk_disable_unprepare(rot_mmu_clks[i].mmu_clk); clk_put(rot_mmu_clks[i].mmu_clk); rot_mmu_clks[i].mmu_clk = NULL; } rot_dev->mmu_clk_on = 0; return 0; } static int map_sec_resource(struct msm_rotator_dev *rot_dev) { int ret = 0; if (rot_dev->sec_mapped) return 0; ret = rot_enable_iommu_clocks(rot_dev); if (ret) { pr_err("IOMMU clock enabled failed while open"); return ret; } ret = msm_ion_secure_heap(ION_HEAP(ION_CP_MM_HEAP_ID)); if (ret) pr_err("ION heap secure failed heap id %d ret %d\n", ION_CP_MM_HEAP_ID, ret); else rot_dev->sec_mapped = 1; rot_disable_iommu_clocks(rot_dev); return ret; } static int unmap_sec_resource(struct msm_rotator_dev *rot_dev) { int ret = 0; ret = rot_enable_iommu_clocks(rot_dev); if (ret) { pr_err("IOMMU clock enabled failed while close\n"); return ret; } msm_ion_unsecure_heap(ION_HEAP(ION_CP_MM_HEAP_ID)); rot_dev->sec_mapped = 0; rot_disable_iommu_clocks(rot_dev); return ret; } static int msm_rotator_start(unsigned long arg, struct msm_rotator_fd_info *fd_info) { struct msm_rotator_img_info info; struct msm_rotator_session *rot_session = NULL; int rc = 0; int s, is_rgb = 0; int first_free_idx = INVALID_SESSION; unsigned int dst_w, dst_h; unsigned int is_planar420 = 0; int fast_yuv_en = 0, enable_2pass = 0; struct rot_sync_info *sync_info; if (copy_from_user(&info, (void __user *)arg, sizeof(info))) return -EFAULT; if ((info.rotations > MSM_ROTATOR_MAX_ROT) || (info.src.height > MSM_ROTATOR_MAX_H) || (info.src.width > MSM_ROTATOR_MAX_W) || (info.dst.height > MSM_ROTATOR_MAX_H) || (info.dst.width > MSM_ROTATOR_MAX_W) || (info.downscale_ratio > MAX_DOWNSCALE_RATIO)) { pr_err("%s: Invalid parameters\n", __func__); return -EINVAL; } if (info.rotations & MDP_ROT_90) { dst_w = info.src_rect.h >> info.downscale_ratio; dst_h = info.src_rect.w >> info.downscale_ratio; } else { dst_w = info.src_rect.w >> info.downscale_ratio; dst_h = info.src_rect.h >> info.downscale_ratio; } if (checkoffset(info.src_rect.x, info.src_rect.w, info.src.width) || checkoffset(info.src_rect.y, info.src_rect.h, info.src.height) || checkoffset(info.dst_x, dst_w, info.dst.width) || checkoffset(info.dst_y, dst_h, info.dst.height)) { pr_err("%s: Invalid src or dst rect\n", __func__); return -ERANGE; } switch (info.src.format) { case MDP_Y_CB_CR_H2V2: case MDP_Y_CR_CB_H2V2: case MDP_Y_CR_CB_GH2V2: is_planar420 = 1; case MDP_Y_CBCR_H2V2: case MDP_Y_CRCB_H2V2: case MDP_Y_CRCB_H2V2_TILE: case MDP_Y_CBCR_H2V2_TILE: if (rotator_hw_revision >= ROTATOR_REVISION_V2) { if (info.downscale_ratio && (info.rotations & MDP_ROT_90)) { fast_yuv_en = !fast_yuv_invalid_size_checker( 0, info.src.width, info.src_rect.w >> info.downscale_ratio, info.src.height, info.src_rect.h >> info.downscale_ratio, info.src_rect.w >> info.downscale_ratio, is_planar420); fast_yuv_en = fast_yuv_en && !fast_yuv_invalid_size_checker( info.rotations, info.src_rect.w >> info.downscale_ratio, dst_w, info.src_rect.h >> info.downscale_ratio, dst_h, dst_w, is_planar420); } else { fast_yuv_en = !fast_yuv_invalid_size_checker( info.rotations, info.src.width, dst_w, info.src.height, dst_h, dst_w, is_planar420); } if (fast_yuv_en && info.downscale_ratio && (info.rotations & MDP_ROT_90)) enable_2pass = 1; } break; default: fast_yuv_en = 0; } switch (info.src.format) { case MDP_RGB_565: case MDP_BGR_565: case MDP_RGB_888: case MDP_ARGB_8888: case MDP_RGBA_8888: case MDP_XRGB_8888: case MDP_RGBX_8888: case MDP_BGRA_8888: is_rgb = 1; info.dst.format = info.src.format; break; case MDP_Y_CBCR_H2V1: if (info.rotations & MDP_ROT_90) { info.dst.format = MDP_Y_CBCR_H1V2; break; } case MDP_Y_CRCB_H2V1: if (info.rotations & MDP_ROT_90) { info.dst.format = MDP_Y_CRCB_H1V2; break; } case MDP_Y_CBCR_H2V2: case MDP_Y_CRCB_H2V2: case MDP_YCBCR_H1V1: case MDP_YCRCB_H1V1: info.dst.format = info.src.format; break; case MDP_YCRYCB_H2V1: if (info.rotations & MDP_ROT_90) info.dst.format = MDP_Y_CRCB_H1V2; else info.dst.format = MDP_Y_CRCB_H2V1; break; case MDP_Y_CB_CR_H2V2: if (fast_yuv_en) { info.dst.format = info.src.format; break; } case MDP_Y_CBCR_H2V2_TILE: info.dst.format = MDP_Y_CBCR_H2V2; break; case MDP_Y_CR_CB_H2V2: case MDP_Y_CR_CB_GH2V2: if (fast_yuv_en) { info.dst.format = info.src.format; break; } case MDP_Y_CRCB_H2V2_TILE: info.dst.format = MDP_Y_CRCB_H2V2; break; default: return -EINVAL; } mutex_lock(&msm_rotator_dev->rotator_lock); msm_rotator_set_perf_level((info.src.width*info.src.height), is_rgb); for (s = 0; s < MAX_SESSIONS; s++) { if ((msm_rotator_dev->rot_session[s] != NULL) && (info.session_id == (unsigned int)msm_rotator_dev->rot_session[s] )) { rot_session = msm_rotator_dev->rot_session[s]; rot_session->img_info = info; rot_session->fd_info = *fd_info; rot_session->fast_yuv_enable = fast_yuv_en; rot_session->enable_2pass = enable_2pass; if (msm_rotator_dev->last_session_idx == s) msm_rotator_dev->last_session_idx = INVALID_SESSION; break; } if ((msm_rotator_dev->rot_session[s] == NULL) && (first_free_idx == INVALID_SESSION)) first_free_idx = s; } if ((s == MAX_SESSIONS) && (first_free_idx != INVALID_SESSION)) { /* allocate a session id */ msm_rotator_dev->rot_session[first_free_idx] = kzalloc(sizeof(struct msm_rotator_session), GFP_KERNEL); if (!msm_rotator_dev->rot_session[first_free_idx]) { printk(KERN_ERR "%s : unable to alloc mem\n", __func__); rc = -ENOMEM; goto rotator_start_exit; } info.session_id = (unsigned int) msm_rotator_dev->rot_session[first_free_idx]; rot_session = msm_rotator_dev->rot_session[first_free_idx]; rot_session->img_info = info; rot_session->fd_info = *fd_info; rot_session->fast_yuv_enable = fast_yuv_en; rot_session->enable_2pass = enable_2pass; if (!IS_ERR_OR_NULL(mrd->client)) { if (rot_session->img_info.secure) { rot_session->mem_hid &= ~BIT(ION_IOMMU_HEAP_ID); rot_session->mem_hid |= BIT(ION_CP_MM_HEAP_ID); rot_session->mem_hid |= ION_SECURE; } else { rot_session->mem_hid &= ~BIT(ION_CP_MM_HEAP_ID); rot_session->mem_hid &= ~ION_SECURE; rot_session->mem_hid |= BIT(ION_IOMMU_HEAP_ID); } } s = first_free_idx; } else if (s == MAX_SESSIONS) { dev_dbg(msm_rotator_dev->device, "%s: all sessions in use\n", __func__); rc = -EBUSY; } if (rc == 0 && copy_to_user((void __user *)arg, &info, sizeof(info))) rc = -EFAULT; if ((rc == 0) && (info.secure)) map_sec_resource(msm_rotator_dev); sync_info = &msm_rotator_dev->sync_info[s]; if ((rc == 0) && (sync_info->initialized == false)) { char timeline_name[MAX_TIMELINE_NAME_LEN]; if (sync_info->timeline == NULL) { snprintf(timeline_name, sizeof(timeline_name), "msm_rot_%d", first_free_idx); sync_info->timeline = sw_sync_timeline_create(timeline_name); if (sync_info->timeline == NULL) pr_err("%s: cannot create %s time line", __func__, timeline_name); sync_info->timeline_value = 0; } mutex_init(&sync_info->sync_mutex); sync_info->initialized = true; } sync_info->acq_fen = NULL; atomic_set(&sync_info->queue_buf_cnt, 0); rotator_start_exit: mutex_unlock(&msm_rotator_dev->rotator_lock); return rc; } static int msm_rotator_finish(unsigned long arg) { int rc = 0; int s; unsigned int session_id; if (copy_from_user(&session_id, (void __user *)arg, sizeof(s))) return -EFAULT; rot_wait_for_commit_queue(true); mutex_lock(&msm_rotator_dev->rotator_lock); for (s = 0; s < MAX_SESSIONS; s++) { if ((msm_rotator_dev->rot_session[s] != NULL) && (session_id == (unsigned int)msm_rotator_dev->rot_session[s])) { if (msm_rotator_dev->last_session_idx == s) msm_rotator_dev->last_session_idx = INVALID_SESSION; msm_rotator_signal_timeline(s); msm_rotator_release_acq_fence(s); if (msm_rotator_dev->rot_session[s]->enable_2pass) { rotator_free_2pass_buf(mrd->y_rot_buf, s); rotator_free_2pass_buf(mrd->chroma_rot_buf, s); rotator_free_2pass_buf(mrd->chroma2_rot_buf, s); } kfree(msm_rotator_dev->rot_session[s]); msm_rotator_dev->rot_session[s] = NULL; break; } } if (s == MAX_SESSIONS) rc = -EINVAL; #ifdef CONFIG_MSM_BUS_SCALING msm_bus_scale_client_update_request(msm_rotator_dev->bus_client_handle, 0); #endif if (msm_rotator_dev->sec_mapped) unmap_sec_resource(msm_rotator_dev); mutex_unlock(&msm_rotator_dev->rotator_lock); return rc; } static int msm_rotator_open(struct inode *inode, struct file *filp) { struct msm_rotator_fd_info *tmp, *fd_info = NULL; int i; if (filp->private_data) return -EBUSY; mutex_lock(&msm_rotator_dev->rotator_lock); for (i = 0; i < MAX_SESSIONS; i++) { if (msm_rotator_dev->rot_session[i] == NULL) break; } if (i == MAX_SESSIONS) { mutex_unlock(&msm_rotator_dev->rotator_lock); return -EBUSY; } list_for_each_entry(tmp, &msm_rotator_dev->fd_list, list) { if (tmp->pid == current->pid) { fd_info = tmp; break; } } if (!fd_info) { fd_info = kzalloc(sizeof(*fd_info), GFP_KERNEL); if (!fd_info) { mutex_unlock(&msm_rotator_dev->rotator_lock); pr_err("%s: insufficient memory to alloc resources\n", __func__); return -ENOMEM; } list_add(&fd_info->list, &msm_rotator_dev->fd_list); fd_info->pid = current->pid; } fd_info->ref_cnt++; mutex_unlock(&msm_rotator_dev->rotator_lock); filp->private_data = fd_info; return 0; } static int msm_rotator_close(struct inode *inode, struct file *filp) { struct msm_rotator_fd_info *fd_info; int s; fd_info = (struct msm_rotator_fd_info *)filp->private_data; mutex_lock(&msm_rotator_dev->rotator_lock); if (--fd_info->ref_cnt > 0) { mutex_unlock(&msm_rotator_dev->rotator_lock); return 0; } for (s = 0; s < MAX_SESSIONS; s++) { if (msm_rotator_dev->rot_session[s] != NULL && &(msm_rotator_dev->rot_session[s]->fd_info) == fd_info) { pr_debug("%s: freeing rotator session %p (pid %d)\n", __func__, msm_rotator_dev->rot_session[s], fd_info->pid); rot_wait_for_commit_queue(true); msm_rotator_signal_timeline(s); kfree(msm_rotator_dev->rot_session[s]); msm_rotator_dev->rot_session[s] = NULL; if (msm_rotator_dev->last_session_idx == s) msm_rotator_dev->last_session_idx = INVALID_SESSION; } } list_del(&fd_info->list); kfree(fd_info); mutex_unlock(&msm_rotator_dev->rotator_lock); return 0; } static long msm_rotator_ioctl(struct file *file, unsigned cmd, unsigned long arg) { struct msm_rotator_fd_info *fd_info; if (_IOC_TYPE(cmd) != MSM_ROTATOR_IOCTL_MAGIC) return -ENOTTY; fd_info = (struct msm_rotator_fd_info *)file->private_data; switch (cmd) { case MSM_ROTATOR_IOCTL_START: return msm_rotator_start(arg, fd_info); case MSM_ROTATOR_IOCTL_ROTATE: return msm_rotator_do_rotate(arg); case MSM_ROTATOR_IOCTL_FINISH: return msm_rotator_finish(arg); case MSM_ROTATOR_IOCTL_BUFFER_SYNC: return msm_rotator_buf_sync(arg); default: dev_dbg(msm_rotator_dev->device, "unexpected IOCTL %d\n", cmd); return -ENOTTY; } } static const struct file_operations msm_rotator_fops = { .owner = THIS_MODULE, .open = msm_rotator_open, .release = msm_rotator_close, .unlocked_ioctl = msm_rotator_ioctl, }; static int __devinit msm_rotator_probe(struct platform_device *pdev) { int rc = 0; struct resource *res; struct msm_rotator_platform_data *pdata = NULL; int i, number_of_clks; uint32_t ver; msm_rotator_dev = kzalloc(sizeof(struct msm_rotator_dev), GFP_KERNEL); if (!msm_rotator_dev) { printk(KERN_ERR "%s Unable to allocate memory for struct\n", __func__); return -ENOMEM; } for (i = 0; i < MAX_SESSIONS; i++) msm_rotator_dev->rot_session[i] = NULL; msm_rotator_dev->last_session_idx = INVALID_SESSION; pdata = pdev->dev.platform_data; number_of_clks = pdata->number_of_clocks; rot_iommu_split_domain = pdata->rot_iommu_split_domain; msm_rotator_dev->imem_owner = IMEM_NO_OWNER; mutex_init(&msm_rotator_dev->imem_lock); INIT_LIST_HEAD(&msm_rotator_dev->fd_list); msm_rotator_dev->imem_clk_state = CLK_DIS; INIT_DELAYED_WORK(&msm_rotator_dev->imem_clk_work, msm_rotator_imem_clk_work_f); msm_rotator_dev->imem_clk = NULL; msm_rotator_dev->pdev = pdev; msm_rotator_dev->core_clk = NULL; msm_rotator_dev->pclk = NULL; mrd->y_rot_buf = kmalloc(sizeof(struct rot_buf_type), GFP_KERNEL); mrd->chroma_rot_buf = kmalloc(sizeof(struct rot_buf_type), GFP_KERNEL); mrd->chroma2_rot_buf = kmalloc(sizeof(struct rot_buf_type), GFP_KERNEL); memset((void *)mrd->y_rot_buf, 0, sizeof(struct rot_buf_type)); memset((void *)mrd->chroma_rot_buf, 0, sizeof(struct rot_buf_type)); memset((void *)mrd->chroma2_rot_buf, 0, sizeof(struct rot_buf_type)); #ifdef CONFIG_MSM_BUS_SCALING if (!msm_rotator_dev->bus_client_handle && pdata && pdata->bus_scale_table) { msm_rotator_dev->bus_client_handle = msm_bus_scale_register_client( pdata->bus_scale_table); if (!msm_rotator_dev->bus_client_handle) { pr_err("%s not able to get bus scale handle\n", __func__); } } #endif for (i = 0; i < number_of_clks; i++) { if (pdata->rotator_clks[i].clk_type == ROTATOR_IMEM_CLK) { msm_rotator_dev->imem_clk = clk_get(&msm_rotator_dev->pdev->dev, pdata->rotator_clks[i].clk_name); if (IS_ERR(msm_rotator_dev->imem_clk)) { rc = PTR_ERR(msm_rotator_dev->imem_clk); msm_rotator_dev->imem_clk = NULL; printk(KERN_ERR "%s: cannot get imem_clk " "rc=%d\n", DRIVER_NAME, rc); goto error_imem_clk; } if (pdata->rotator_clks[i].clk_rate) clk_set_rate(msm_rotator_dev->imem_clk, pdata->rotator_clks[i].clk_rate); } if (pdata->rotator_clks[i].clk_type == ROTATOR_PCLK) { msm_rotator_dev->pclk = clk_get(&msm_rotator_dev->pdev->dev, pdata->rotator_clks[i].clk_name); if (IS_ERR(msm_rotator_dev->pclk)) { rc = PTR_ERR(msm_rotator_dev->pclk); msm_rotator_dev->pclk = NULL; printk(KERN_ERR "%s: cannot get pclk rc=%d\n", DRIVER_NAME, rc); goto error_pclk; } if (pdata->rotator_clks[i].clk_rate) clk_set_rate(msm_rotator_dev->pclk, pdata->rotator_clks[i].clk_rate); } if (pdata->rotator_clks[i].clk_type == ROTATOR_CORE_CLK) { msm_rotator_dev->core_clk = clk_get(&msm_rotator_dev->pdev->dev, pdata->rotator_clks[i].clk_name); if (IS_ERR(msm_rotator_dev->core_clk)) { rc = PTR_ERR(msm_rotator_dev->core_clk); msm_rotator_dev->core_clk = NULL; printk(KERN_ERR "%s: cannot get core clk " "rc=%d\n", DRIVER_NAME, rc); goto error_core_clk; } if (pdata->rotator_clks[i].clk_rate) clk_set_rate(msm_rotator_dev->core_clk, pdata->rotator_clks[i].clk_rate); } } msm_rotator_dev->regulator = regulator_get(&msm_rotator_dev->pdev->dev, "vdd"); if (IS_ERR(msm_rotator_dev->regulator)) msm_rotator_dev->regulator = NULL; msm_rotator_dev->rot_clk_state = CLK_DIS; INIT_DELAYED_WORK(&msm_rotator_dev->rot_clk_work, msm_rotator_rot_clk_work_f); mutex_init(&msm_rotator_dev->rotator_lock); #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION msm_rotator_dev->client = msm_ion_client_create(-1, pdev->name); #endif platform_set_drvdata(pdev, msm_rotator_dev); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { printk(KERN_ALERT "%s: could not get IORESOURCE_MEM\n", DRIVER_NAME); rc = -ENODEV; goto error_get_resource; } msm_rotator_dev->io_base = ioremap(res->start, resource_size(res)); #ifdef CONFIG_MSM_ROTATOR_USE_IMEM if (msm_rotator_dev->imem_clk) clk_prepare_enable(msm_rotator_dev->imem_clk); #endif enable_rot_clks(); ver = ioread32(MSM_ROTATOR_HW_VERSION); disable_rot_clks(); #ifdef CONFIG_MSM_ROTATOR_USE_IMEM if (msm_rotator_dev->imem_clk) clk_disable_unprepare(msm_rotator_dev->imem_clk); #endif if (ver != pdata->hardware_version_number) pr_debug("%s: invalid HW version ver 0x%x\n", DRIVER_NAME, ver); rotator_hw_revision = ver; rotator_hw_revision >>= 16; /* bit 31:16 */ rotator_hw_revision &= 0xff; pr_info("%s: rotator_hw_revision=%x\n", __func__, rotator_hw_revision); msm_rotator_dev->irq = platform_get_irq(pdev, 0); if (msm_rotator_dev->irq < 0) { printk(KERN_ALERT "%s: could not get IORESOURCE_IRQ\n", DRIVER_NAME); rc = -ENODEV; goto error_get_irq; } rc = request_irq(msm_rotator_dev->irq, msm_rotator_isr, IRQF_TRIGGER_RISING, DRIVER_NAME, NULL); if (rc) { printk(KERN_ERR "%s: request_irq() failed\n", DRIVER_NAME); goto error_get_irq; } /* we enable the IRQ when we need it in the ioctl */ disable_irq(msm_rotator_dev->irq); rc = alloc_chrdev_region(&msm_rotator_dev->dev_num, 0, 1, DRIVER_NAME); if (rc < 0) { printk(KERN_ERR "%s: alloc_chrdev_region Failed rc = %d\n", __func__, rc); goto error_get_irq; } msm_rotator_dev->class = class_create(THIS_MODULE, DRIVER_NAME); if (IS_ERR(msm_rotator_dev->class)) { rc = PTR_ERR(msm_rotator_dev->class); printk(KERN_ERR "%s: couldn't create class rc = %d\n", DRIVER_NAME, rc); goto error_class_create; } msm_rotator_dev->device = device_create(msm_rotator_dev->class, NULL, msm_rotator_dev->dev_num, NULL, DRIVER_NAME); if (IS_ERR(msm_rotator_dev->device)) { rc = PTR_ERR(msm_rotator_dev->device); printk(KERN_ERR "%s: device_create failed %d\n", DRIVER_NAME, rc); goto error_class_device_create; } cdev_init(&msm_rotator_dev->cdev, &msm_rotator_fops); rc = cdev_add(&msm_rotator_dev->cdev, MKDEV(MAJOR(msm_rotator_dev->dev_num), 0), 1); if (rc < 0) { printk(KERN_ERR "%s: cdev_add failed %d\n", __func__, rc); goto error_cdev_add; } init_waitqueue_head(&msm_rotator_dev->wq); INIT_WORK(&msm_rotator_dev->commit_work, rot_commit_wq_handler); init_completion(&msm_rotator_dev->commit_comp); mutex_init(&msm_rotator_dev->commit_mutex); mutex_init(&msm_rotator_dev->commit_wq_mutex); atomic_set(&msm_rotator_dev->commit_q_w, 0); atomic_set(&msm_rotator_dev->commit_q_r, 0); atomic_set(&msm_rotator_dev->commit_q_cnt, 0); dev_dbg(msm_rotator_dev->device, "probe successful\n"); return rc; error_cdev_add: device_destroy(msm_rotator_dev->class, msm_rotator_dev->dev_num); error_class_device_create: class_destroy(msm_rotator_dev->class); error_class_create: unregister_chrdev_region(msm_rotator_dev->dev_num, 1); error_get_irq: iounmap(msm_rotator_dev->io_base); error_get_resource: mutex_destroy(&msm_rotator_dev->rotator_lock); if (msm_rotator_dev->regulator) regulator_put(msm_rotator_dev->regulator); clk_put(msm_rotator_dev->core_clk); error_core_clk: clk_put(msm_rotator_dev->pclk); error_pclk: if (msm_rotator_dev->imem_clk) clk_put(msm_rotator_dev->imem_clk); error_imem_clk: mutex_destroy(&msm_rotator_dev->imem_lock); kfree(msm_rotator_dev); return rc; } static int __devexit msm_rotator_remove(struct platform_device *plat_dev) { int i; rot_wait_for_commit_queue(true); #ifdef CONFIG_MSM_BUS_SCALING if (msm_rotator_dev->bus_client_handle) { msm_bus_scale_unregister_client (msm_rotator_dev->bus_client_handle); msm_rotator_dev->bus_client_handle = 0; } #endif free_irq(msm_rotator_dev->irq, NULL); mutex_destroy(&msm_rotator_dev->rotator_lock); cdev_del(&msm_rotator_dev->cdev); device_destroy(msm_rotator_dev->class, msm_rotator_dev->dev_num); class_destroy(msm_rotator_dev->class); unregister_chrdev_region(msm_rotator_dev->dev_num, 1); iounmap(msm_rotator_dev->io_base); if (msm_rotator_dev->imem_clk) { if (msm_rotator_dev->imem_clk_state == CLK_EN) clk_disable_unprepare(msm_rotator_dev->imem_clk); clk_put(msm_rotator_dev->imem_clk); msm_rotator_dev->imem_clk = NULL; } if (msm_rotator_dev->rot_clk_state == CLK_EN) disable_rot_clks(); clk_put(msm_rotator_dev->core_clk); clk_put(msm_rotator_dev->pclk); if (msm_rotator_dev->regulator) regulator_put(msm_rotator_dev->regulator); msm_rotator_dev->core_clk = NULL; msm_rotator_dev->pclk = NULL; mutex_destroy(&msm_rotator_dev->imem_lock); for (i = 0; i < MAX_SESSIONS; i++) if (msm_rotator_dev->rot_session[i] != NULL) kfree(msm_rotator_dev->rot_session[i]); kfree(msm_rotator_dev); return 0; } #ifdef CONFIG_PM static int msm_rotator_suspend(struct platform_device *dev, pm_message_t state) { rot_wait_for_commit_queue(true); mutex_lock(&msm_rotator_dev->imem_lock); if (msm_rotator_dev->imem_clk_state == CLK_EN && msm_rotator_dev->imem_clk) { clk_disable_unprepare(msm_rotator_dev->imem_clk); msm_rotator_dev->imem_clk_state = CLK_SUSPEND; } mutex_unlock(&msm_rotator_dev->imem_lock); mutex_lock(&msm_rotator_dev->rotator_lock); if (msm_rotator_dev->rot_clk_state == CLK_EN) { disable_rot_clks(); msm_rotator_dev->rot_clk_state = CLK_SUSPEND; } msm_rotator_release_all_timeline(); mutex_unlock(&msm_rotator_dev->rotator_lock); return 0; } static int msm_rotator_resume(struct platform_device *dev) { mutex_lock(&msm_rotator_dev->imem_lock); if (msm_rotator_dev->imem_clk_state == CLK_SUSPEND && msm_rotator_dev->imem_clk) { clk_prepare_enable(msm_rotator_dev->imem_clk); msm_rotator_dev->imem_clk_state = CLK_EN; } mutex_unlock(&msm_rotator_dev->imem_lock); mutex_lock(&msm_rotator_dev->rotator_lock); if (msm_rotator_dev->rot_clk_state == CLK_SUSPEND) { enable_rot_clks(); msm_rotator_dev->rot_clk_state = CLK_EN; } mutex_unlock(&msm_rotator_dev->rotator_lock); return 0; } #endif static struct platform_driver msm_rotator_platform_driver = { .probe = msm_rotator_probe, .remove = __devexit_p(msm_rotator_remove), #ifdef CONFIG_PM .suspend = msm_rotator_suspend, .resume = msm_rotator_resume, #endif .driver = { .owner = THIS_MODULE, .name = DRIVER_NAME } }; static int __init msm_rotator_init(void) { return platform_driver_register(&msm_rotator_platform_driver); } static void __exit msm_rotator_exit(void) { return platform_driver_unregister(&msm_rotator_platform_driver); } module_init(msm_rotator_init); module_exit(msm_rotator_exit); MODULE_DESCRIPTION("MSM Offline Image Rotator driver"); MODULE_VERSION("1.0"); MODULE_LICENSE("GPL v2");
AdrianoMartins/android_kernel_lge_v500
drivers/char/msm_rotator.c
C
gpl-2.0
88,858
27.489259
79
0.640393
false
using System; using Server; using Server.Gumps; using Server.Network; namespace Server.Items { public class PowerScroll : Item { private SkillName m_Skill; private double m_Value; private static SkillName[] m_Skills = new SkillName[] { SkillName.Blacksmith, SkillName.Tailoring, SkillName.Swords, SkillName.Fencing, SkillName.Macing, SkillName.Archery, SkillName.Wrestling, SkillName.Parry, SkillName.Tactics, SkillName.Anatomy, SkillName.Healing, SkillName.Magery, SkillName.Meditation, SkillName.EvalInt, SkillName.MagicResist, SkillName.AnimalTaming, SkillName.AnimalLore, SkillName.Veterinary, SkillName.Musicianship, SkillName.Provocation, SkillName.Discordance, SkillName.Peacemaking }; private static SkillName[] m_AOSSkills = new SkillName[] { SkillName.Blacksmith, SkillName.Tailoring, SkillName.Swords, SkillName.Fencing, SkillName.Macing, SkillName.Archery, SkillName.Wrestling, SkillName.Parry, SkillName.Tactics, SkillName.Anatomy, SkillName.Healing, SkillName.Magery, SkillName.Meditation, SkillName.EvalInt, SkillName.MagicResist, SkillName.AnimalTaming, SkillName.AnimalLore, SkillName.Veterinary, SkillName.Musicianship, SkillName.Provocation, SkillName.Discordance, SkillName.Peacemaking, SkillName.Chivalry, SkillName.Focus, SkillName.Necromancy, SkillName.Stealing, SkillName.Stealth, SkillName.SpiritSpeak }; private static SkillName[] m_SESkills = new SkillName[] { SkillName.Blacksmith, SkillName.Tailoring, SkillName.Swords, SkillName.Fencing, SkillName.Macing, SkillName.Archery, SkillName.Wrestling, SkillName.Parry, SkillName.Tactics, SkillName.Anatomy, SkillName.Healing, SkillName.Magery, SkillName.Meditation, SkillName.EvalInt, SkillName.MagicResist, SkillName.AnimalTaming, SkillName.AnimalLore, SkillName.Veterinary, SkillName.Musicianship, SkillName.Provocation, SkillName.Discordance, SkillName.Peacemaking, SkillName.Chivalry, SkillName.Focus, SkillName.Necromancy, SkillName.Stealing, SkillName.Stealth, SkillName.SpiritSpeak, SkillName.Ninjitsu, SkillName.Bushido }; private static SkillName[] m_MLSkills = new SkillName[] { SkillName.Blacksmith, SkillName.Tailoring, SkillName.Swords, SkillName.Fencing, SkillName.Macing, SkillName.Archery, SkillName.Wrestling, SkillName.Parry, SkillName.Tactics, SkillName.Anatomy, SkillName.Healing, SkillName.Magery, SkillName.Meditation, SkillName.EvalInt, SkillName.MagicResist, SkillName.AnimalTaming, SkillName.AnimalLore, SkillName.Veterinary, SkillName.Musicianship, SkillName.Provocation, SkillName.Discordance, SkillName.Peacemaking, SkillName.Chivalry, SkillName.Focus, SkillName.Necromancy, SkillName.Stealing, SkillName.Stealth, SkillName.SpiritSpeak, SkillName.Ninjitsu, SkillName.Bushido, SkillName.Spellweaving }; public static SkillName[] Skills{ get{ return ( Core.ML ? m_MLSkills : Core.SE ? m_SESkills : Core.AOS ? m_AOSSkills : m_Skills ); } } public static PowerScroll CreateRandom( int min, int max ) { min /= 5; max /= 5; SkillName[] skills = PowerScroll.Skills; return new PowerScroll( skills[Utility.Random( skills.Length )], 100 + (Utility.RandomMinMax( min, max ) * 5)); } public static PowerScroll CreateRandomNoCraft( int min, int max ) { min /= 5; max /= 5; SkillName[] skills = PowerScroll.Skills; SkillName skillName; do { skillName = skills[Utility.Random( skills.Length )]; } while ( skillName == SkillName.Blacksmith || skillName == SkillName.Tailoring ); return new PowerScroll( skillName, 100 + (Utility.RandomMinMax( min, max ) * 5)); } [Constructable] public PowerScroll( SkillName skill, double value ) : base( 0x14F0 ) { base.Hue = 0x481; base.Weight = 1.0; m_Skill = skill; m_Value = value; if ( m_Value > 105.0 ) LootType = LootType.Cursed; } public PowerScroll( Serial serial ) : base( serial ) { } [CommandProperty( AccessLevel.GameMaster )] public SkillName Skill { get { return m_Skill; } set { m_Skill = value; } } [CommandProperty( AccessLevel.GameMaster )] public double Value { get { return m_Value; } set { m_Value = value; } } private string GetNameLocalized() { return String.Concat( "#", (1044060 + (int)m_Skill).ToString() ); } private string GetName() { int index = (int)m_Skill; SkillInfo[] table = SkillInfo.Table; if ( index >= 0 && index < table.Length ) return table[index].Name.ToLower(); else return "???"; } public override void AddNameProperty(ObjectPropertyList list) { if ( m_Value == 105.0 ) list.Add( 1049639, GetNameLocalized() ); // a wonderous scroll of ~1_type~ (105 Skill) else if ( m_Value == 110.0 ) list.Add( 1049640, GetNameLocalized() ); // an exalted scroll of ~1_type~ (110 Skill) else if ( m_Value == 115.0 ) list.Add( 1049641, GetNameLocalized() ); // a mythical scroll of ~1_type~ (115 Skill) else if ( m_Value == 120.0 ) list.Add( 1049642, GetNameLocalized() ); // a legendary scroll of ~1_type~ (120 Skill) else list.Add( "a power scroll of {0} ({1} Skill)", GetName(), m_Value ); } public override void OnSingleClick( Mobile from ) { if ( m_Value == 105.0 ) base.LabelTo( from, 1049639, GetNameLocalized() ); // a wonderous scroll of ~1_type~ (105 Skill) else if ( m_Value == 110.0 ) base.LabelTo( from, 1049640, GetNameLocalized() ); // an exalted scroll of ~1_type~ (110 Skill) else if ( m_Value == 115.0 ) base.LabelTo( from, 1049641, GetNameLocalized() ); // a mythical scroll of ~1_type~ (115 Skill) else if ( m_Value == 120.0 ) base.LabelTo( from, 1049642, GetNameLocalized() ); // a legendary scroll of ~1_type~ (120 Skill) else base.LabelTo( from, "a power scroll of {0} ({1} Skill)", GetName(), m_Value ); } public void Use( Mobile from, bool firstStage ) { if ( Deleted ) return; if ( IsChildOf( from.Backpack ) ) { Skill skill = from.Skills[m_Skill]; if ( skill != null ) { if ( skill.Cap >= m_Value ) { from.SendLocalizedMessage( 1049511, GetNameLocalized() ); // Your ~1_type~ is too high for this power scroll. } else { if ( firstStage ) { from.CloseGump( typeof( StatCapScroll.InternalGump ) ); from.CloseGump( typeof( PowerScroll.InternalGump ) ); from.SendGump( new InternalGump( from, this ) ); } else { from.SendLocalizedMessage( 1049513, GetNameLocalized() ); // You feel a surge of magic as the scroll enhances your ~1_type~! skill.Cap = m_Value; Effects.SendLocationParticles( EffectItem.Create( from.Location, from.Map, EffectItem.DefaultDuration ), 0, 0, 0, 0, 0, 5060, 0 ); Effects.PlaySound( from.Location, from.Map, 0x243 ); Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( from.X - 6, from.Y - 6, from.Z + 15 ), from.Map ), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 ); Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( from.X - 4, from.Y - 6, from.Z + 15 ), from.Map ), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 ); Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( from.X - 6, from.Y - 4, from.Z + 15 ), from.Map ), from, 0x36D4, 7, 0, false, true, 0x497, 0, 9502, 1, 0, (EffectLayer)255, 0x100 ); Effects.SendTargetParticles( from, 0x375A, 35, 90, 0x00, 0x00, 9502, (EffectLayer)255, 0x100 ); Delete(); } } } } else { from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } } public override void OnDoubleClick( Mobile from ) { Use( from, true ); } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); // version writer.Write( (int) m_Skill ); writer.Write( (double) m_Value ); } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); switch ( version ) { case 0: { m_Skill = (SkillName)reader.ReadInt(); m_Value = reader.ReadDouble(); break; } } if ( m_Value == 105.0 ) { LootType = LootType.Regular; } else { LootType = LootType.Cursed; if ( Insured ) Insured = false; } } public class InternalGump : Gump { private Mobile m_Mobile; private PowerScroll m_Scroll; public InternalGump( Mobile mobile, PowerScroll scroll ) : base( 25, 50 ) { m_Mobile = mobile; m_Scroll = scroll; AddPage( 0 ); AddBackground( 25, 10, 420, 200, 5054 ); AddImageTiled( 33, 20, 401, 181, 2624 ); AddAlphaRegion( 33, 20, 401, 181 ); AddHtmlLocalized( 40, 48, 387, 100, 1049469, true, true ); /* Using a scroll increases the maximum amount of a specific skill or your maximum statistics. * When used, the effect is not immediately seen without a gain of points with that skill or statistics. * You can view your maximum skill values in your skills window. * You can view your maximum statistic value in your statistics window. */ AddHtmlLocalized( 125, 148, 200, 20, 1049478, 0xFFFFFF, false, false ); // Do you wish to use this scroll? AddButton( 100, 172, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 135, 172, 120, 20, 1046362, 0xFFFFFF, false, false ); // Yes AddButton( 275, 172, 4005, 4007, 0, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 310, 172, 120, 20, 1046363, 0xFFFFFF, false, false ); // No double value = scroll.m_Value; if ( value == 105.0 ) AddHtmlLocalized( 40, 20, 260, 20, 1049635, 0xFFFFFF, false, false ); // Wonderous Scroll (105 Skill): else if ( value == 110.0 ) AddHtmlLocalized( 40, 20, 260, 20, 1049636, 0xFFFFFF, false, false ); // Exalted Scroll (110 Skill): else if ( value == 115.0 ) AddHtmlLocalized( 40, 20, 260, 20, 1049637, 0xFFFFFF, false, false ); // Mythical Scroll (115 Skill): else if ( value == 120.0 ) AddHtmlLocalized( 40, 20, 260, 20, 1049638, 0xFFFFFF, false, false ); // Legendary Scroll (120 Skill): else AddHtml( 40, 20, 260, 20, String.Format( "<basefont color=#FFFFFF>Power Scroll ({0} Skill):</basefont>", value ), false, false ); AddHtmlLocalized( 310, 20, 120, 20, 1044060 + (int)scroll.m_Skill, 0xFFFFFF, false, false ); } public override void OnResponse( NetState state, RelayInfo info ) { if ( info.ButtonID == 1 ) m_Scroll.Use( m_Mobile, false ); } } } }
alucardxlx/kaltar
Scripts/Items/Special/Special Scrolls/PowerScroll.cs
C#
gpl-2.0
11,516
26.651741
206
0.623394
false
/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 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. */ /* [SENSOR] Sensor Model: Camera Module: Lens Model: Driver IC: = OV2655 PV Size = 640 x 480 Cap Size = 2048 x 1536 Output Format = YUYV MCLK Speed = 24M PV DVP_PCLK = Cap DVP_PCLK = PV Frame Rate = 30fps Cap Frame Rate = 7.5fps I2C Slave ID = I2C Mode = 16Addr, 16Data */ #ifndef CAMSENSOR_OV2655 #define CAMSENSOR_OV2655 #define OV2655_WriteSettingTbl(pTbl) OV2655_WriteRegsTbl(pTbl,sizeof(pTbl)/sizeof(pTbl[0])) enum ov2655_test_mode_t { TEST_OFF, TEST_1, TEST_2, TEST_3 }; enum ov2655_resolution_t { QTR_SIZE, FULL_SIZE, HFR_60FPS, HFR_90FPS, HFR_120FPS, INVALID_SIZE }; /****************************************************************************** OV2655_WREG, *POV2655_WREG Definition ******************************************************************************/ typedef struct { unsigned int addr; /*Reg Addr :16Bit*/ unsigned int data; /*Reg Data :16Bit or 8Bit*/ unsigned int data_format; /*Reg Data Format:16Bit = 0,8Bit = 1*/ unsigned int delay_mask; } OV2655_WREG, *POV2655_WREG; /****************************************************************************** Initial Setting Table ******************************************************************************/ OV2655_WREG ov2655_init_tbl[] = { {0x308c,0x80,1,0}, {0x308d,0x0e,1,0}, {0x360b,0x00,1,0}, {0x30b0,0xff,1,0}, {0x30b1,0xff,1,0}, {0x30b2,0x04,1,0}, {0x300e,0x34,1,0}, {0x300f,0xa6,1,0}, {0x3010,0x81,1,0}, {0x3082,0x01,1,0}, {0x30f4,0x01,1,0}, {0x3090,0x43,1,0}, {0x3091,0xc0,1,0}, {0x30ac,0x42,1,0}, {0x30d1,0x08,1,0}, {0x30a8,0x54,1,0}, {0x3015,0x02,1,0}, {0x3093,0x00,1,0}, {0x307e,0xe5,1,0}, {0x3079,0x00,1,0}, {0x30aa,0x52,1,0}, {0x3017,0x40,1,0}, {0x30f3,0x83,1,0}, {0x306a,0x0c,1,0}, {0x306d,0x00,1,0}, {0x336a,0x3c,1,0}, {0x3076,0x6a,1,0}, {0x30d9,0x95,1,0}, {0x3016,0x52,1,0}, {0x3601,0x30,1,0}, {0x304e,0x88,1,0}, {0x30f1,0x82,1,0}, {0x306f,0x14,1,0}, {0x302a,0x02,1,0}, {0x302b,0x84,1,0}, {0x3012,0x10,1,0}, {0x3011,0x01,1,0},//15fps //;AEC/AGC {0x3013,0xf7,1,0}, {0x301c,0x13,1,0}, {0x301d,0x17,1,0}, {0x3070,0x5c,1,0}, {0x3072,0x4d,1,0}, //;D5060 {0x30af,0x00,1,0}, {0x3048,0x1f,1,0}, {0x3049,0x4e,1,0}, {0x304a,0x20,1,0}, {0x304f,0x20,1,0}, {0x304b,0x02,1,0}, {0x304c,0x00,1,0}, {0x304d,0x02,1,0}, {0x304f,0x20,1,0}, {0x30a3,0x10,1,0}, {0x3013,0xf7,1,0}, {0x3014,0xa4,1,0}, {0x3071,0x00,1,0}, {0x3070,0xb9,1,0}, {0x3073,0x00,1,0}, {0x3072,0x4d,1,0}, {0x301c,0x03,1,0}, {0x301d,0x06,1,0}, {0x304d,0x42,1,0}, {0x304a,0x40,1,0}, {0x304f,0x40,1,0}, {0x3095,0x07,1,0}, {0x3096,0x16,1,0}, {0x3097,0x1d,1,0}, //;Window Setup {0x3020,0x01,1,0}, {0x3021,0x18,1,0}, {0x3022,0x00,1,0}, {0x3023,0x06,1,0}, {0x3024,0x06,1,0}, {0x3025,0x58,1,0}, {0x3026,0x02,1,0}, {0x3027,0x61,1,0}, {0x3088,0x02,1,0}, {0x3089,0x80,1,0}, {0x308a,0x01,1,0}, {0x308b,0xe0,1,0}, {0x3316,0x64,1,0}, {0x3317,0x25,1,0}, {0x3318,0x80,1,0}, {0x3319,0x08,1,0}, {0x331a,0x28,1,0}, {0x331b,0x1e,1,0}, {0x331c,0x00,1,0}, {0x331d,0x38,1,0}, {0x3100,0x00,1,0}, //awb {0x3320,0xfa,1,0}, {0x3321,0x11,1,0}, {0x3322,0x92,1,0}, {0x3323,0x01,1,0}, {0x3324,0x97,1,0}, {0x3325,0x02,1,0}, {0x3326,0xff,1,0}, {0x3327,0x10,1,0}, {0x3328,0x11,1,0}, {0x3329,0x0f,1,0}, {0x332a,0x58,1,0}, {0x332b,0x55,1,0}, {0x332c,0x90,1,0}, {0x332d,0xc0,1,0}, {0x332e,0x46,1,0}, {0x332f,0x2f,1,0}, {0x3330,0x2f,1,0}, {0x3331,0x44,1,0}, {0x3332,0xff,1,0}, {0x3333,0x00,1,0}, {0x3334,0xf0,1,0}, {0x3335,0xf0,1,0}, {0x3336,0xf0,1,0}, {0x3337,0x40,1,0}, {0x3338,0x40,1,0}, {0x3339,0x40,1,0}, {0x333a,0x00,1,0}, {0x333b,0x00,1,0}, //cmx {0x3380,0x06,1,0}, {0x3381,0x90,1,0}, {0x3382,0x18,1,0}, {0x3383,0x31,1,0}, {0x3384,0x84,1,0}, {0x3385,0xb5,1,0}, {0x3386,0xba,1,0}, {0x3387,0xd2,1,0}, {0x3388,0x17,1,0}, {0x3389,0x9c,1,0}, {0x338a,0x00,1,0}, //gamma {0x334f,0x20,1,0}, {0x3340,0x06,1,0}, {0x3341,0x14,1,0}, {0x3342,0x2b,1,0}, {0x3343,0x42,1,0}, {0x3344,0x55,1,0}, {0x3345,0x65,1,0}, {0x3346,0x70,1,0}, {0x3347,0x7c,1,0}, {0x3348,0x86,1,0}, {0x3349,0x96,1,0}, {0x334a,0xa3,1,0}, {0x334b,0xaf,1,0}, {0x334c,0xc4,1,0}, {0x334d,0xd7,1,0}, {0x334e,0xe8,1,0}, //;Lens correction //R {0x3350,0x35,1,0}, {0x3351,0x29,1,0}, {0x3352,0x08,1,0}, {0x3353,0x24,1,0}, {0x3354,0x00,1,0}, {0x3355,0x85,1,0}, //G {0x3356,0x34,1,0}, {0x3357,0x29,1,0}, {0x3358,0x0f,1,0}, {0x3359,0x1d,1,0}, {0x335a,0x00,1,0}, {0x335b,0x85,1,0}, //B {0x335c,0x36,1,0}, {0x335d,0x2b,1,0}, {0x335e,0x08,1,0}, {0x335f,0x1b,1,0}, {0x3360,0x00,1,0}, {0x3361,0x85,1,0}, //lenc gain {0x3363,0x03,1,0}, {0x3364,0x01,1,0}, {0x3365,0x02,1,0}, {0x3366,0x00,1,0}, {0x3362,0x90,1,0},//lenc for binning //uv adjust {0x338b,0x08,1,0}, {0x338c,0x10,1,0}, {0x338d,0x5f,1,0}, //Sharpness/De-noise {0x3370,0xd0,1,0}, {0x3371,0x00,1,0}, {0x3372,0x00,1,0}, {0x3373,0x30,1,0}, {0x3374,0x10,1,0}, {0x3375,0x10,1,0}, {0x3376,0x08,1,0}, {0x3377,0x02,1,0}, {0x3378,0x04,1,0}, {0x3379,0x40,1,0}, //aec {0x3018,0x70,1,0}, {0x3019,0x60,1,0}, {0x301a,0x85,1,0}, //;BLC {0x3069,0x86,1,0}, {0x307c,0x13,1,0}, {0x3087,0x02,1,0}, //;blacksun //;Avdd 2.55~3.0V {0x3090,0x3b,1,0}, {0x30a8,0x54,1,0}, {0x30aa,0x82,1,0}, {0x30a3,0x91,1,0}, {0x30a1,0x41,1,0}, //;Other functions {0x3300,0xfc,1,0}, {0x3302,0x11,1,0}, {0x3400,0x00,1,0}, {0x3606,0x20,1,0}, {0x3601,0x30,1,0}, {0x300e,0x34,1,0}, {0x30f3,0x83,1,0}, {0x304e,0x88,1,0}, }; /****************************************************************************** Preview Setting Table 30Fps ******************************************************************************/ OV2655_WREG ov2655_preview_tbl_30fps[] = { //pclk=18M //framerate:15fps //YUVVGA(640x480) {0x300e,0x3a,1,0}, {0x3010,0x81,1,0}, {0x3012,0x10,1,0}, {0x3014,0xac,1,0}, {0x3015,0x11,1,0}, {0x3016,0x82,1,0}, {0x3023,0x06,1,0}, {0x3026,0x02,1,0}, {0x3027,0x5e,1,0}, {0x302a,0x02,1,0}, {0x302b,0xe4,1,0}, {0x330c,0x00,1,0}, {0x3301,0xff,1,0}, {0x3069,0x80,1,0}, {0x306f,0x14,1,0}, {0x3088,0x03,1,0}, {0x3089,0x20,1,0}, {0x308a,0x02,1,0}, {0x308b,0x58,1,0}, {0x308e,0x00,1,0}, {0x30a1,0x41,1,0}, {0x30a3,0x80,1,0}, {0x30d9,0x95,1,0}, {0x3302,0x11,1,0}, {0x3317,0x25,1,0}, {0x3318,0x80,1,0}, {0x3319,0x08,1,0}, {0x331d,0x38,1,0}, {0x3373,0x40,1,0}, {0x3376,0x05,1,0}, {0x3362,0x90,1,0}, //svga->vga {0x3302,0x11,1,0}, {0x3088,0x02,1,0}, {0x3089,0x80,1,0}, {0x308a,0x01,1,0}, {0x308b,0xe0,1,0}, {0x331a,0x28,1,0}, {0x331b,0x1e,1,0}, {0x331c,0x00,1,0}, {0x3302,0x11,1,0}, //mipi {0x363b,0x01,1,0}, {0x309e,0x08,1,0}, {0x3606,0x00,1,0}, {0x3630,0x35,1,0}, {0x3086,0x0f,1,0}, {0x3086,0x00,1,0}, {0x304e,0x04,1,0}, {0x363b,0x01,1,0}, {0x309e,0x08,1,0}, {0x3606,0x00,1,0}, {0x3084,0x01,1,0}, {0x3010,0x81,1,0}, {0x3011,0x00,1,0}, {0x3634,0x26,1,0}, {0x3086,0x0f,1,0}, {0x3086,0x00,1,0}, //avoid black screen slash {0x3000,0x15,1,0}, {0x3002,0x02,1,0}, {0x3003,0x6a,1,0}, }; /****************************************************************************** Preview Setting Table 60Fps ******************************************************************************/ OV2655_WREG ov2655_preview_tbl_60fps[] = { }; /****************************************************************************** Preview Setting Table 90Fps ******************************************************************************/ OV2655_WREG ov2655_preview_tbl_90fps[] = { }; /****************************************************************************** Capture Setting Table ******************************************************************************/ OV2655_WREG ov2655_capture_tbl[]= { //pclk=24M //framerate:7.5ps {0x300e,0x34,1,0}, {0x3011,0x01,1,0}, {0x3010,0x81,1,0}, {0x3012,0x00,1,0}, {0x3015,0x02,1,0}, {0x3016,0xc2,1,0}, {0x3023,0x0c,1,0}, {0x3026,0x04,1,0}, {0x3027,0xbc,1,0}, {0x302a,0x04,1,0}, {0x302b,0xd4,1,0}, {0x3069,0x80,1,0}, {0x306f,0x54,1,0}, {0x3088,0x06,1,0}, {0x3089,0x40,1,0}, {0x308a,0x04,1,0}, {0x308b,0xb0,1,0}, {0x308e,0x64,1,0}, {0x30a1,0x41,1,0}, {0x30a3,0x80,1,0}, {0x30d9,0x95,1,0}, {0x3302,0x01,1,0}, {0x3317,0x4b,1,0}, {0x3318,0x00,1,0}, {0x3319,0x4c,1,0}, {0x331d,0x6c,1,0}, {0x3362,0x80,1,0}, {0x3373,0x40,1,0}, {0x3376,0x03,1,0}, }; /****************************************************************************** Contrast Setting ******************************************************************************/ OV2655_WREG ov2655_contrast_lv0_tbl[] = { //Contrast -4 {0x3391,0x04,1,0x04}, {0x3390,0x45,1,0x04}, {0x3398,0x14,1,0}, {0x3399,0x14,1,0}, }; OV2655_WREG ov2655_contrast_lv1_tbl[] = { //Contrast -3 {0x3391,0x04,1,0x04}, {0x3390,0x45,1,0x04}, {0x3398,0x14,1,0}, {0x3399,0x14,1,0}, }; OV2655_WREG ov2655_contrast_lv2_tbl[] = { //Contrast -2 {0x3391,0x04,1,0x04}, {0x3390,0x45,1,0x04}, {0x3398,0x18,1,0}, {0x3399,0x18,1,0}, }; OV2655_WREG ov2655_contrast_lv3_tbl[] = { //Contrast -1 {0x3391,0x04,1,0x04}, {0x3390,0x45,1,0x04}, {0x3398,0x1c,1,0}, {0x3399,0x1c,1,0}, }; OV2655_WREG ov2655_contrast_default_lv4_tbl[] = { //Contrast (Default) {0x3391,0x04,1,0x04}, {0x3390,0x41,1,0x04}, {0x3398,0x20,1,0}, {0x3399,0x20,1,0}, }; OV2655_WREG ov2655_contrast_lv5_tbl[] = { //Contrast +1 {0x3391,0x04,1,0x04}, {0x3390,0x45,1,0x04}, {0x3398,0x24,1,0}, {0x3399,0x24,1,0}, }; OV2655_WREG ov2655_contrast_lv6_tbl[] = { //Contrast +2 {0x3391,0x04,1,0x04}, {0x3390,0x45,1,0x04}, {0x3398,0x28,1,0}, {0x3399,0x28,1,0}, }; OV2655_WREG ov2655_contrast_lv7_tbl[] = { //Contrast +3 {0x3391,0x04,1,0x04}, {0x3390,0x45,1,0x04}, {0x3398,0x2c,1,0}, {0x3399,0x2c,1,0}, }; OV2655_WREG ov2655_contrast_lv8_tbl[] = { //Contrast +4 {0x3391,0x04,1,0x04}, {0x3390,0x45,1,0x04}, {0x3398,0x30,1,0}, {0x3399,0x30,1,0}, }; /****************************************************************************** Sharpness Setting ******************************************************************************/ OV2655_WREG ov2655_sharpness_lv0_tbl[] = { //Sharpness 0 {0x3306,0x00,1,0x08}, {0x3376,0x01,1,0}, {0x3377,0x00,1,0}, {0x3378,0x10,1,0}, {0x3379,0x80,1,0}, }; OV2655_WREG ov2655_sharpness_lv1_tbl[] = { //Sharpness 1 {0x3306,0x00,1,0x08}, {0x3376,0x02,1,0}, {0x3377,0x00,1,0}, {0x3378,0x08,1,0}, {0x3379,0x80,1,0}, }; OV2655_WREG ov2655_sharpness_default_lv2_tbl[] = { //Sharpness_Auto (Default) {0x3306,0x00,1,0x08}, {0x3376,0x05,1,0},//0x04 {0x3377,0x00,1,0}, {0x3378,0x04,1,0}, {0x3379,0x80,1,0}, }; OV2655_WREG ov2655_sharpness_lv3_tbl[] = { //Sharpness 3 {0x3306,0x00,1,0x08}, {0x3376,0x06,1,0}, {0x3377,0x00,1,0}, {0x3378,0x04,1,0}, {0x3379,0x80,1,0}, }; OV2655_WREG ov2655_sharpness_lv4_tbl[] = { //Sharpness 4 {0x3306,0x00,1,0x08}, {0x3376,0x08,1,0}, {0x3377,0x00,1,0}, {0x3378,0x04,1,0}, {0x3379,0x80,1,0}, }; OV2655_WREG ov2655_sharpness_lv5_tbl[] = { //Sharpness 5 {0x3306,0x00,1,0x08}, {0x3376,0x0a,1,0}, {0x3377,0x00,1,0}, {0x3378,0x04,1,0}, {0x3379,0x80,1,0}, }; OV2655_WREG ov2655_sharpness_lv6_tbl[] = { //Sharpness 5 {0x3306,0x00,1,0x08}, {0x3376,0x0c,1,0}, {0x3377,0x00,1,0}, {0x3378,0x04,1,0}, {0x3379,0x80,1,0}, }; OV2655_WREG ov2655_sharpness_lv7_tbl[] = { //Sharpness 7 {0x3306,0x00,1,0x08}, {0x3376,0x0e,1,0}, {0x3377,0x00,1,0}, {0x3378,0x04,1,0}, {0x3379,0x80,1,0}, }; OV2655_WREG ov2655_sharpness_lv8_tbl[] = { //Sharpness 8 {0x3306,0x00,1,0x08}, {0x3376,0x10,1,0}, {0x3377,0x00,1,0}, {0x3378,0x04,1,0}, {0x3379,0x80,1,0}, }; /****************************************************************************** Saturation Setting ******************************************************************************/ OV2655_WREG ov2655_saturation_lv0_tbl[] = { //Saturation x0.25 {0x3301,0x80,1,0x80}, {0x3391,0x02,1,0x02}, {0x3394,0x10,1,0}, {0x3395,0x10,1,0}, }; OV2655_WREG ov2655_saturation_lv1_tbl[] = { //Saturation x0.5 {0x3301,0x80,1,0x80}, {0x3391,0x02,1,0x02}, {0x3394,0x18,1,0}, {0x3395,0x18,1,0}, }; OV2655_WREG ov2655_saturation_lv2_tbl[] = { //Saturation x0.75 {0x3301,0x80,1,0x80}, {0x3391,0x02,1,0x02}, {0x3394,0x20,1,0}, {0x3395,0x20,1,0}, }; OV2655_WREG ov2655_saturation_lv3_tbl[] = { //Saturation x0.75 {0x3301,0x80,1,0x80}, {0x3391,0x02,1,0x02}, {0x3394,0x30,1,0}, {0x3395,0x30,1,0}, }; OV2655_WREG ov2655_saturation_default_lv4_tbl[] = { //Saturation x1 (Default) {0x3301,0x80,1,0x80}, {0x3391,0x02,1,0x02}, {0x3394,0x40,1,0}, {0x3395,0x40,1,0}, }; OV2655_WREG ov2655_saturation_lv5_tbl[] = { //Saturation x1.25 {0x3301,0x80,1,0x80}, {0x3391,0x02,1,0x02}, {0x3394,0x50,1,0}, {0x3395,0x50,1,0}, }; OV2655_WREG ov2655_saturation_lv6_tbl[] = { //Saturation x1.5 {0x3301,0x80,1,0x80}, {0x3391,0x02,1,0x02}, {0x3394,0x58,1,0}, {0x3395,0x58,1,0}, }; OV2655_WREG ov2655_saturation_lv7_tbl[] = { //Saturation x1.25 {0x3301,0x80,1,0x80}, {0x3391,0x02,1,0x02}, {0x3394,0x60,1,0}, {0x3395,0x60,1,0}, }; OV2655_WREG ov2655_saturation_lv8_tbl[] = { //Saturation x1.5 {0x3301,0x80,1,0x80}, {0x3391,0x02,1,0x02}, {0x3394,0x68,1,0}, {0x3395,0x68,1,0}, }; /****************************************************************************** Brightness Setting ******************************************************************************/ OV2655_WREG ov2655_brightness_lv0_tbl[] = { //Brightness -4 {0x3391,0x04,1,0x04}, {0x3390,0x49,1,0x08}, {0x339a,0x28,1,0}, }; OV2655_WREG ov2655_brightness_lv1_tbl[] = { //Brightness -3 {0x3391,0x04,1,0x04}, {0x3390,0x49,1,0x08}, {0x339a,0x20,1,0}, }; OV2655_WREG ov2655_brightness_lv2_tbl[] = { //Brightness -2 {0x3391,0x04,1,0x04}, {0x3390,0x49,1,0x08}, {0x339a,0x18,1,0}, }; OV2655_WREG ov2655_brightness_lv3_tbl[] = { //Brightness -1 {0x3391,0x04,1,0x04}, {0x3390,0x49,1,0x08}, {0x339a,0x10,1,0}, }; OV2655_WREG ov2655_brightness_default_lv4_tbl[] = { //Brightness 0 (Default) {0x3391,0x04,1,0x04}, {0x3390,0x41,1,0x08}, {0x339a,0x00,1,0}, }; OV2655_WREG ov2655_brightness_lv5_tbl[] = { //Brightness +1 {0x3391,0x04,1,0x04}, {0x3390,0x41,1,0x08}, {0x339a,0x10,1,0}, }; OV2655_WREG ov2655_brightness_lv6_tbl[] = { //Brightness +2 {0x3391,0x04,1,0x04}, {0x3390,0x41,1,0x08}, {0x339a,0x20,1,0}, }; OV2655_WREG ov2655_brightness_lv7_tbl[] = { //Brightness +3 {0x3391,0x04,1,0x04}, {0x3390,0x41,1,0x08}, {0x339a,0x28,1,0}, }; OV2655_WREG ov2655_brightness_lv8_tbl[] = { //Brightness +4 {0x3391,0x04,1,0x04}, {0x3390,0x41,1,0x08}, {0x339a,0x30,1,0}, }; /****************************************************************************** Exposure Compensation Setting ******************************************************************************/ OV2655_WREG ov2655_exposure_compensation_lv0_tbl[]= { //Exposure Compensation +1.7EV {0x3018,0x98,1,0}, {0x3019,0x88,1,0}, {0x301a,0xd4,1,0}, }; OV2655_WREG ov2655_exposure_compensation_lv1_tbl[]= { //Exposure Compensation +1.0EV {0x3018,0x88,1,0}, {0x3019,0x78,1,0}, {0x301a,0xd4,1,0}, }; OV2655_WREG ov2655_exposure_compensation_lv2_default_tbl[]= { //Exposure Compensation default {0x3018,0x70,1,0},//0x78 {0x3019,0x60,1,0},//0x68 {0x301a,0x85,1,0},//0xa5 }; OV2655_WREG ov2655_exposure_compensation_lv3_tbl[]= { //Exposure Compensation -1.0EV {0x3018,0x6a,1,0}, {0x3019,0x5a,1,0}, {0x301a,0xd4,1,0}, }; OV2655_WREG ov2655_exposure_compensation_lv4_tbl[]= { //Exposure Compensation -1.7EV {0x3018,0x5a,1,0}, {0x3019,0x4a,1,0}, {0x301a,0xc2,1,0}, }; /****************************************************************************** ISO TYPE Setting ******************************************************************************/ OV2655_WREG ov2655_iso_type_auto[]= { //ISO Auto }; OV2655_WREG ov2655_iso_type_100[]= { //ISO 100 }; OV2655_WREG ov2655_iso_type_200[]= { //ISO 200 }; OV2655_WREG ov2655_iso_type_400[]= { //ISO 400 }; OV2655_WREG ov2655_iso_type_800[]= { //ISO 800 }; OV2655_WREG ov2655_iso_type_1600[]= { //ISO 1600 }; /****************************************************************************** Auto Expourse Weight Setting ******************************************************************************/ OV2655_WREG ov2655_ae_average_tbl[] = { //Whole Image Average {0x3030,0x55,1,0}, {0x3031,0x55,1,0}, {0x3032,0x55,1,0}, {0x3033,0x55,1,0}, }; OV2655_WREG ov2655_ae_centerweight_tbl[] = { //Whole Image Center More weight {0x3030,0x00,1,0}, {0x3031,0x3c,1,0}, {0x3032,0x00,1,0}, {0x3033,0x00,1,0}, }; /****************************************************************************** Light Mode Setting ******************************************************************************/ OV2655_WREG ov2655_wb_Auto[]= { //CAMERA_WB_AUTO //1 {0x3306,0x00,1,0x02}, }; OV2655_WREG ov2655_wb_custom[]= { //CAMERA_WB_CUSTOM //2 {0x3306,0x02,1,0x02}, {0x3337,0x44,1,0}, {0x3338,0x40,1,0}, {0x3339,0x70,1,0}, }; OV2655_WREG ov2655_wb_inc[]= { //CAMERA_WB_INCANDESCENT //3 {0x3306,0x02,1,0x02}, {0x3337,0x52,1,0}, {0x3338,0x40,1,0}, {0x3339,0x58,1,0}, }; OV2655_WREG ov2655_wb_fluorescent[]= { //CAMERA_WB_FLUORESCENT //4 {0x3306,0x02,1,0x02}, {0x3337,0x44,1,0}, {0x3338,0x40,1,0}, {0x3339,0x70,1,0}, }; OV2655_WREG ov2655_wb_daylight[]= { //CAMERA_WB_DAYLIGHT //5 {0x3306,0x02,1,0x02}, {0x3337,0x5e,1,0}, {0x3338,0x40,1,0}, {0x3339,0x46,1,0}, }; OV2655_WREG ov2655_wb_cloudy[]= { //CAMERA_WB_CLOUDY_DAYLIGHT //6 // {0x3306,0x02,1,0x02}, // {0x3337,0x68,1,0}, // {0x3338,0x40,1,0}, // {0x3339,0x4e,1,0}, {0x3306,0x02,1,0x02}, {0x3337,0x78,1,0}, {0x3338,0x50,1,0}, {0x3339,0x48,1,0}, }; OV2655_WREG ov2655_wb_twilight[]= { //CAMERA_WB_TWILIGHT //7 }; OV2655_WREG ov2655_wb_shade[]= { //CAMERA_WB_SHADE //8 }; /****************************************************************************** EFFECT Setting ******************************************************************************/ OV2655_WREG ov2655_effect_normal_tbl[] = { //CAMERA_EFFECT_OFF 0 {0x3391,0x00,1,0x78}, }; OV2655_WREG ov2655_effect_mono_tbl[] = { //CAMERA_EFFECT_MONO 1 {0x3391,0x20,1,0x78}, }; OV2655_WREG ov2655_effect_negative_tbl[] = { //CAMERA_EFFECT_NEGATIVE 2 {0x3391,0x40,1,0x78}, }; OV2655_WREG ov2655_effect_solarize_tbl[] = { //CAMERA_EFFECT_SOLARIZE 3 }; OV2655_WREG ov2655_effect_sepia_tbl[] = { //CAMERA_EFFECT_SEPIA 4 {0x3391,0x18,1,0x78}, {0x3396,0x40,1,0}, {0x3397,0xa6,1,0}, }; OV2655_WREG ov2655_effect_posterize_tbl[] = { //CAMERA_EFFECT_POSTERIZE 5 }; OV2655_WREG ov2655_effect_whiteboard_tbl[] = { //CAMERA_EFFECT_WHITEBOARD 6 }; OV2655_WREG ov2655_effect_blackboard_tbl[] = { //CAMERA_EFFECT_BLACKBOARD 7 }; OV2655_WREG ov2655_effect_aqua_tbl[] = { //CAMERA_EFFECT_AQUA 8 }; OV2655_WREG ov2655_effect_bw_tbl[] = { //CAMERA_EFFECT_BW 10 }; OV2655_WREG ov2655_effect_bluish_tbl[] = { //CAMERA_EFFECT_BLUISH 12 {0x3391,0x18,1,0x78}, {0x3396,0xa0,1,0}, {0x3397,0x40,1,0}, }; OV2655_WREG ov2655_effect_reddish_tbl[] = { //CAMERA_EFFECT_REDDISH 13 {0x3391,0x18,1,0x78}, {0x3396,0x80,1,0}, {0x3397,0xc0,1,0}, }; OV2655_WREG ov2655_effect_greenish_tbl[] = { //CAMERA_EFFECT_GREENISH 14 {0x3391,0x18,1,0x78}, {0x3396,0x60,1,0}, {0x3397,0x60,1,0}, }; /****************************************************************************** AntiBanding Setting ******************************************************************************/ OV2655_WREG ov2655_antibanding_auto_tbl[] = { //Auto-XCLK24MHz // {0x3014,0xc0,1,0xc0}, {0x3014,0x80,1,0xc0}, }; OV2655_WREG ov2655_antibanding_50z_tbl[] = { //Band 50Hz {0x3014,0x80,1,0xc0}, }; OV2655_WREG ov2655_antibanding_60z_tbl[] = { //Band 60Hz // {0x3014,0x00,1,0xc0}, {0x3014,0x80,1,0xc0}, }; /****************************************************************************** Lens_shading Setting ******************************************************************************/ OV2655_WREG ov2655_lens_shading_on_tbl[] = { //Lens_shading On {0x3300,0x08,1,0x08}, }; OV2655_WREG ov2655_lens_shading_off_tbl[] = { //Lens_shading Off {0x3300,0x00,1,0x08}, }; /****************************************************************************** Auto Focus Setting ******************************************************************************/ OV2655_WREG ov2655_afinit_tbl[] = { }; #endif /* CAMSENSOR_OV2655 */
rex-xxx/Explay_A350_kernel_source_code
drivers/media/video/msm/ov2655.h
C
gpl-2.0
22,304
20.852459
95
0.512868
false
from django.db import models from django.contrib.auth.models import User class OrganisationType(models.Model): type_desc = models.CharField(max_length=200) def __unicode__(self): return self.type_desc class Address(models.Model): street_address = models.CharField(max_length=100) city = models.CharField(max_length=100) pin = models.CharField(max_length=10) province = models.CharField(max_length=100) nationality = models.CharField(max_length=100) def __unicode__(self): return self.street_address + ',' + self.city class HattiUser(models.Model): user = models.OneToOneField(User) address = models.ForeignKey(Address) telephone = models.CharField(max_length=500) date_joined = models.DateTimeField(auto_now_add=True) fax = models.CharField(max_length=100) avatar = models.CharField(max_length=100, null=True, blank=True) tagline = models.CharField(max_length=140) class Meta: abstract = True class AdminOrganisations(HattiUser): title = models.CharField(max_length=200) organisation_type = models.ForeignKey(OrganisationType) def __unicode__(self): return self.title class Customer(HattiUser): title = models.CharField(max_length=200, blank=True, null=True) is_org = models.BooleanField(); org_type = models.ForeignKey(OrganisationType) company = models.CharField(max_length = 200) def __unicode__(self, arg): return unicode(self.user)
saloni10/librehatti_new
src/authentication/models.py
Python
gpl-2.0
1,479
30.468085
68
0.705206
false
/**************************************************************************************** * Copyright (c) 2010 Maximilian Kossick <maximilian.kossick@googlemail.com> * * * * 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, see <http://www.gnu.org/licenses/>. * ****************************************************************************************/ #include "TestUnionJob.h" #include "core/support/Debug.h" #include "core/collections/CollectionLocation.h" #include "synchronization/UnionJob.h" #include "CollectionTestImpl.h" #include "mocks/MockTrack.h" #include "mocks/MockAlbum.h" #include "mocks/MockArtist.h" #include <KCmdLineArgs> #include <KGlobal> #include <QList> #include <qtest_kde.h> #include <gmock/gmock.h> QTEST_KDEMAIN_CORE( TestUnionJob ) using ::testing::Return; using ::testing::AnyNumber; static QList<int> trackCopyCount; namespace Collections { class MyCollectionLocation : public CollectionLocation { public: Collections::CollectionTestImpl *coll; QString prettyLocation() const { return "foo"; } bool isWritable() const { return true; } bool remove( const Meta::TrackPtr &track ) { coll->mc->acquireWriteLock(); //theoretically we should clean up the other maps as well... TrackMap map = coll->mc->trackMap(); map.remove( track->uidUrl() ); coll->mc->setTrackMap( map ); coll->mc->releaseLock(); return true; } void copyUrlsToCollection(const QMap<Meta::TrackPtr, KUrl> &sources, const Transcoding::Configuration& conf) { Q_UNUSED( conf ) trackCopyCount << sources.count(); foreach( const Meta::TrackPtr &track, sources.keys() ) { coll->mc->addTrack( track ); } } }; class MyCollectionTestImpl : public CollectionTestImpl { public: MyCollectionTestImpl( const QString &id ) : CollectionTestImpl( id ) {} CollectionLocation* location() const { MyCollectionLocation *r = new MyCollectionLocation(); r->coll = const_cast<MyCollectionTestImpl*>( this ); return r; } }; } //namespace Collections void addMockTrack( Collections::CollectionTestImpl *coll, const QString &trackName, const QString &artistName, const QString &albumName ) { Meta::MockTrack *track = new Meta::MockTrack(); ::testing::Mock::AllowLeak( track ); Meta::TrackPtr trackPtr( track ); EXPECT_CALL( *track, name() ).Times( AnyNumber() ).WillRepeatedly( Return( trackName ) ); EXPECT_CALL( *track, uidUrl() ).Times( AnyNumber() ).WillRepeatedly( Return( trackName + "_" + artistName + "_" + albumName ) ); EXPECT_CALL( *track, isPlayable() ).Times( AnyNumber() ).WillRepeatedly( Return( true ) ); EXPECT_CALL( *track, playableUrl() ).Times( AnyNumber() ).WillRepeatedly( Return( KUrl( '/' + track->uidUrl() ) ) ); coll->mc->addTrack( trackPtr ); Meta::AlbumPtr albumPtr = coll->mc->albumMap().value( albumName ); Meta::MockAlbum *album; Meta::TrackList albumTracks; if( albumPtr ) { album = dynamic_cast<Meta::MockAlbum*>( albumPtr.data() ); if( !album ) { QFAIL( "expected a Meta::MockAlbum" ); return; } albumTracks = albumPtr->tracks(); } else { album = new Meta::MockAlbum(); ::testing::Mock::AllowLeak( album ); albumPtr = Meta::AlbumPtr( album ); EXPECT_CALL( *album, name() ).Times( AnyNumber() ).WillRepeatedly( Return( albumName ) ); EXPECT_CALL( *album, hasAlbumArtist() ).Times( AnyNumber() ).WillRepeatedly( Return( false ) ); EXPECT_CALL( *album, albumArtist() ).Times( AnyNumber() ).WillRepeatedly( Return( Meta::ArtistPtr() ) ); coll->mc->addAlbum( albumPtr ); } albumTracks << trackPtr; EXPECT_CALL( *album, tracks() ).Times( AnyNumber() ).WillRepeatedly( Return( albumTracks ) ); EXPECT_CALL( *track, album() ).Times( AnyNumber() ).WillRepeatedly( Return( albumPtr ) ); Meta::ArtistPtr artistPtr = coll->mc->artistMap().value( artistName ); Meta::MockArtist *artist; Meta::TrackList artistTracks; if( artistPtr ) { artist = dynamic_cast<Meta::MockArtist*>( artistPtr.data() ); if( !artist ) { QFAIL( "expected a Meta::MockArtist" ); return; } artistTracks = artistPtr->tracks(); } else { artist = new Meta::MockArtist(); ::testing::Mock::AllowLeak( artist ); artistPtr = Meta::ArtistPtr( artist ); EXPECT_CALL( *artist, name() ).Times( AnyNumber() ).WillRepeatedly( Return( artistName ) ); coll->mc->addArtist( artistPtr ); } artistTracks << trackPtr; EXPECT_CALL( *artist, tracks() ).Times( AnyNumber() ).WillRepeatedly( Return( artistTracks ) ); EXPECT_CALL( *track, artist() ).Times( AnyNumber() ).WillRepeatedly( Return( artistPtr ) ); } TestUnionJob::TestUnionJob() : QObject() { KCmdLineArgs::init( KGlobal::activeComponent().aboutData() ); ::testing::InitGoogleMock( &KCmdLineArgs::qtArgc(), KCmdLineArgs::qtArgv() ); qRegisterMetaType<Meta::TrackList>(); qRegisterMetaType<Meta::AlbumList>(); qRegisterMetaType<Meta::ArtistList>(); } void TestUnionJob::init() { trackCopyCount.clear(); } void TestUnionJob::testEmptyA() { Collections::CollectionTestImpl *collA = new Collections::MyCollectionTestImpl("A"); Collections::CollectionTestImpl *collB = new Collections::MyCollectionTestImpl("B"); addMockTrack( collB, "track1", "artist1", "album1" ); QCOMPARE( collA->mc->trackMap().count(), 0 ); QCOMPARE( collB->mc->trackMap().count(), 1 ); QVERIFY( trackCopyCount.isEmpty() ); UnionJob *job = new UnionJob( collA, collB ); job->synchronize(); QTest::kWaitForSignal( job, SIGNAL(destroyed()), 1000 ); QCOMPARE( trackCopyCount.size(), 1 ); QVERIFY( trackCopyCount.contains( 1 ) ); QCOMPARE( collA->mc->trackMap().count(), 1 ); QCOMPARE( collB->mc->trackMap().count(), 1 ); delete collA; delete collB; } void TestUnionJob::testEmptyB() { Collections::CollectionTestImpl *collA = new Collections::MyCollectionTestImpl("A"); Collections::CollectionTestImpl *collB = new Collections::MyCollectionTestImpl("B"); addMockTrack( collA, "track1", "artist1", "album1" ); QCOMPARE( collA->mc->trackMap().count(), 1 ); QCOMPARE( collB->mc->trackMap().count(), 0 ); QVERIFY( trackCopyCount.isEmpty() ); UnionJob *job = new UnionJob( collA, collB ); job->synchronize(); QTest::kWaitForSignal( job, SIGNAL(destroyed()), 1000 ); QCOMPARE( trackCopyCount.size(), 1 ); QVERIFY( trackCopyCount.contains( 1 ) ); QCOMPARE( collA->mc->trackMap().count(), 1 ); QCOMPARE( collB->mc->trackMap().count(), 1 ); delete collA; delete collB; } void TestUnionJob::testAddTrackToBoth() { Collections::CollectionTestImpl *collA = new Collections::MyCollectionTestImpl("A"); Collections::CollectionTestImpl *collB = new Collections::MyCollectionTestImpl("B"); addMockTrack( collA, "track1", "artist1", "album1" ); addMockTrack( collB, "track2", "artist2", "album2" ); QCOMPARE( collA->mc->trackMap().count(), 1 ); QCOMPARE( collB->mc->trackMap().count(), 1 ); QVERIFY( trackCopyCount.isEmpty() ); UnionJob *job = new UnionJob( collA, collB ); job->synchronize(); QTest::kWaitForSignal( job, SIGNAL(destroyed()), 1000 ); QCOMPARE( trackCopyCount.size(), 2 ); QCOMPARE( trackCopyCount.at( 0 ), 1 ); QCOMPARE( trackCopyCount.at( 1 ), 1 ); QCOMPARE( collA->mc->trackMap().count(), 2 ); QCOMPARE( collB->mc->trackMap().count(), 2 ); delete collA; delete collB; } void TestUnionJob::testTrackAlreadyInBoth() { Collections::CollectionTestImpl *collA = new Collections::MyCollectionTestImpl("A"); Collections::CollectionTestImpl *collB = new Collections::MyCollectionTestImpl("B"); addMockTrack( collA, "track1", "artist1", "album1" ); addMockTrack( collB, "track1", "artist1", "album1" ); addMockTrack( collB, "track2", "artist2", "album2" ); QCOMPARE( collA->mc->trackMap().count(), 1 ); QCOMPARE( collB->mc->trackMap().count(), 2 ); QVERIFY( trackCopyCount.isEmpty() ); UnionJob *job = new UnionJob( collA, collB ); job->synchronize(); QTest::kWaitForSignal( job, SIGNAL(destroyed()), 1000 ); QCOMPARE( trackCopyCount.size(), 1 ); QVERIFY( trackCopyCount.contains( 1 ) ); QCOMPARE( collA->mc->trackMap().count(), 2 ); QCOMPARE( collB->mc->trackMap().count(), 2 ); delete collA; delete collB; }
kkszysiu/amarok
tests/synchronization/TestUnionJob.cpp
C++
gpl-2.0
9,619
35.026217
137
0.61129
false
/* UOL Messenger * Copyright (c) 2005 Universo Online S/A * * Direitos Autorais Reservados * All rights reserved * * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo * sob os termos da Licença Pública Geral GNU conforme publicada pela Free * Software Foundation; tanto a versão 2 da Licença, como (a seu critério) * qualquer versão posterior. * Este programa é distribuído na expectativa de que seja útil, porém, * SEM NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE * OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral * do GNU para mais detalhes. * Você deve ter recebido uma cópia da Licença Pública Geral do GNU junto * com este programa; se não, escreva para a Free Software Foundation, Inc., * no endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. * * 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. * * Universo Online S/A - A/C: UOL Messenger 5o. Andar * Avenida Brigadeiro Faria Lima, 1.384 - Jardim Paulistano * São Paulo SP - CEP 01452-002 - BRASIL */ #include "StdAfx.h" #include <commands/ShowFileTransfersDialogcommand.h> #include "../UIMApplication.h" CShowFileTransfersDialogCommand::CShowFileTransfersDialogCommand() { } CShowFileTransfersDialogCommand::~CShowFileTransfersDialogCommand(void) { } void CShowFileTransfersDialogCommand::Execute() { CUIMApplication::GetApplication()->GetUIManager()->ShowFileTransferDialog(NULL); }
gabrieldelsaint/uol-messenger
src/public/uim/controller/commands/ShowFileTransfersDialogCommand.cpp
C++
gpl-2.0
2,122
39.807692
81
0.762959
false
/* * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * 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, see <http://www.gnu.org/licenses/>. */ #include "AccountMgr.h" #include "ArenaTeam.h" #include "ArenaTeamMgr.h" #include "Battleground.h" #include "CalendarMgr.h" #include "Chat.h" #include "Common.h" #include "DatabaseEnv.h" #include "Group.h" #include "Guild.h" #include "GuildMgr.h" #include "Language.h" #include "Log.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "Opcodes.h" #include "Pet.h" #include "PlayerDump.h" #include "Player.h" #include "ReputationMgr.h" #include "ScriptMgr.h" #include "SharedDefines.h" #include "SocialMgr.h" #include "SystemConfig.h" #include "UpdateMask.h" #include "Util.h" #include "World.h" #include "WorldPacket.h" #include "WorldSession.h" #ifdef ELUNA #include "LuaEngine.h" #endif class LoginQueryHolder : public SQLQueryHolder { private: uint32 m_accountId; ObjectGuid m_guid; public: LoginQueryHolder(uint32 accountId, ObjectGuid guid) : m_accountId(accountId), m_guid(guid) { } ObjectGuid GetGuid() const { return m_guid; } uint32 GetAccountId() const { return m_accountId; } bool Initialize(); }; bool LoginQueryHolder::Initialize() { SetSize(MAX_PLAYER_LOGIN_QUERY); bool res = true; uint32 lowGuid = m_guid.GetCounter(); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_FROM, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GROUP_MEMBER); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GROUP, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_INSTANCE); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_BOUND_INSTANCES, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_AURAS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_AURAS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SPELL); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SPELLS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUS_DAILY); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_DAILY_QUEST_STATUS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUS_WEEKLY); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_WEEKLY_QUEST_STATUS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUS_MONTHLY); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_MONTHLY_QUEST_STATUS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUS_SEASONAL); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SEASONAL_QUEST_STATUS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_REPUTATION); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_REPUTATION, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_INVENTORY); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_INVENTORY, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACTIONS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ACTIONS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MAILCOUNT); stmt->setUInt32(0, lowGuid); stmt->setUInt64(1, uint64(time(NULL))); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_MAIL_COUNT, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_MAILDATE); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_MAIL_DATE, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SOCIALLIST); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SOCIAL_LIST, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_HOMEBIND); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_HOME_BIND, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SPELLCOOLDOWNS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SPELL_COOLDOWNS, stmt); if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED)) { stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DECLINEDNAMES); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_DECLINED_NAMES, stmt); } stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GUILD, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ARENAINFO); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ARENA_INFO, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_ACHIEVEMENTS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ACHIEVEMENTS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_CRITERIAPROGRESS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_CRITERIA_PROGRESS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_EQUIPMENTSETS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_EQUIPMENT_SETS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_BGDATA); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_BG_DATA, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_GLYPHS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_GLYPHS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_TALENTS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_TALENTS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PLAYER_ACCOUNT_DATA); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_SKILLS); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_SKILLS, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_RANDOMBG); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_RANDOM_BG, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_BANNED); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_BANNED, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_QUESTSTATUSREW); stmt->setUInt32(0, lowGuid); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_QUEST_STATUS_REW, stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES); stmt->setUInt32(0, m_accountId); res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOAD_INSTANCE_LOCK_TIMES, stmt); return res; } void WorldSession::HandleCharEnum(PreparedQueryResult result) { WorldPacket data(SMSG_CHAR_ENUM, 100); // we guess size uint8 num = 0; data << num; _legitCharacters.clear(); if (result) { do { ObjectGuid guid(HIGHGUID_PLAYER, (*result)[0].GetUInt32()); TC_LOG_INFO("network", "Loading %s from account %u.", guid.ToString().c_str(), GetAccountId()); if (Player::BuildEnumData(result, &data)) { // Do not allow banned characters to log in if (!(*result)[20].GetUInt32()) _legitCharacters.insert(guid); if (!sWorld->HasCharacterNameData(guid)) // This can happen if characters are inserted into the database manually. Core hasn't loaded name data yet. sWorld->AddCharacterNameData(guid, (*result)[1].GetString(), (*result)[4].GetUInt8(), (*result)[2].GetUInt8(), (*result)[3].GetUInt8(), (*result)[7].GetUInt8()); ++num; } } while (result->NextRow()); } data.put<uint8>(0, num); SendPacket(&data); } void WorldSession::HandleCharEnumOpcode(WorldPacket& /*recvData*/) { // remove expired bans PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_EXPIRED_BANS); CharacterDatabase.Execute(stmt); /// get all the data necessary for loading all characters (along with their pets) on the account if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED)) stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ENUM_DECLINED_NAME); else stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ENUM); stmt->setUInt8(0, PET_SAVE_AS_CURRENT); stmt->setUInt32(1, GetAccountId()); _charEnumCallback = CharacterDatabase.AsyncQuery(stmt); } void WorldSession::HandleCharCreateOpcode(WorldPacket& recvData) { CharacterCreateInfo createInfo; recvData >> createInfo.Name >> createInfo.Race >> createInfo.Class >> createInfo.Gender >> createInfo.Skin >> createInfo.Face >> createInfo.HairStyle >> createInfo.HairColor >> createInfo.FacialHair >> createInfo.OutfitId; if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_TEAMMASK)) { if (uint32 mask = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED)) { bool disabled = false; switch (Player::TeamForRace(createInfo.Race)) { case ALLIANCE: disabled = (mask & (1 << 0)) != 0; break; case HORDE: disabled = (mask & (1 << 1)) != 0; break; } if (disabled) { SendCharCreate(CHAR_CREATE_DISABLED); return; } } } ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(createInfo.Class); if (!classEntry) { TC_LOG_ERROR("network", "Class (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", createInfo.Class, GetAccountId()); SendCharCreate(CHAR_CREATE_FAILED); return; } ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(createInfo.Race); if (!raceEntry) { TC_LOG_ERROR("network", "Race (%u) not found in DBC while creating new char for account (ID: %u): wrong DBC files or cheater?", createInfo.Race, GetAccountId()); SendCharCreate(CHAR_CREATE_FAILED); return; } // prevent character creating Expansion race without Expansion account if (raceEntry->expansion > Expansion()) { TC_LOG_ERROR("network", "Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, createInfo.Race); SendCharCreate(CHAR_CREATE_EXPANSION); return; } // prevent character creating Expansion class without Expansion account if (classEntry->expansion > Expansion()) { TC_LOG_ERROR("network", "Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, createInfo.Class); SendCharCreate(CHAR_CREATE_EXPANSION_CLASS); return; } if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RACEMASK)) { uint32 raceMaskDisabled = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK); if ((1 << (createInfo.Race - 1)) & raceMaskDisabled) { SendCharCreate(CHAR_CREATE_DISABLED); return; } } if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_CLASSMASK)) { uint32 classMaskDisabled = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK); if ((1 << (createInfo.Class - 1)) & classMaskDisabled) { SendCharCreate(CHAR_CREATE_DISABLED); return; } } // prevent character creating with invalid name if (!normalizePlayerName(createInfo.Name)) { TC_LOG_ERROR("network", "Account:[%d] but tried to Create character with empty [name] ", GetAccountId()); SendCharCreate(CHAR_NAME_NO_NAME); return; } // check name limitations ResponseCodes res = ObjectMgr::CheckPlayerName(createInfo.Name, true); if (res != CHAR_NAME_SUCCESS) { SendCharCreate(res); return; } if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME) && sObjectMgr->IsReservedName(createInfo.Name)) { SendCharCreate(CHAR_NAME_RESERVED); return; } if (createInfo.Class == CLASS_DEATH_KNIGHT && !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_HEROIC_CHARACTER)) { // speedup check for heroic class disabled case uint32 heroic_free_slots = sWorld->getIntConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM); if (heroic_free_slots == 0) { SendCharCreate(CHAR_CREATE_UNIQUE_CLASS_LIMIT); return; } // speedup check for heroic class disabled case uint32 req_level_for_heroic = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER); if (req_level_for_heroic > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) { SendCharCreate(CHAR_CREATE_LEVEL_REQUIREMENT); return; } } PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHECK_NAME); stmt->setString(0, createInfo.Name); delete _charCreateCallback.GetParam(); // Delete existing if any, to make the callback chain reset to stage 0 _charCreateCallback.SetParam(new CharacterCreateInfo(std::move(createInfo))); _charCreateCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt)); } void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, CharacterCreateInfo* createInfo) { /** This is a series of callbacks executed consecutively as a result from the database becomes available. This is much more efficient than synchronous requests on packet handler, and much less DoS prone. It also prevents data syncrhonisation errors. */ switch (_charCreateCallback.GetStage()) { case 0: { if (result) { SendCharCreate(CHAR_CREATE_NAME_IN_USE); delete createInfo; _charCreateCallback.Reset(); return; } ASSERT(_charCreateCallback.GetParam() == createInfo); PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_SUM_REALM_CHARACTERS); stmt->setUInt32(0, GetAccountId()); _charCreateCallback.FreeResult(); _charCreateCallback.SetFutureResult(LoginDatabase.AsyncQuery(stmt)); _charCreateCallback.NextStage(); break; } case 1: { uint16 acctCharCount = 0; if (result) { Field* fields = result->Fetch(); // SELECT SUM(x) is MYSQL_TYPE_NEWDECIMAL - needs to be read as string const char* ch = fields[0].GetCString(); if (ch) acctCharCount = atoi(ch); } if (acctCharCount >= sWorld->getIntConfig(CONFIG_CHARACTERS_PER_ACCOUNT)) { SendCharCreate(CHAR_CREATE_ACCOUNT_LIMIT); delete createInfo; _charCreateCallback.Reset(); return; } ASSERT(_charCreateCallback.GetParam() == createInfo); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_SUM_CHARS); stmt->setUInt32(0, GetAccountId()); _charCreateCallback.FreeResult(); _charCreateCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt)); _charCreateCallback.NextStage(); break; } case 2: { if (result) { Field* fields = result->Fetch(); createInfo->CharCount = uint8(fields[0].GetUInt64()); // SQL's COUNT() returns uint64 but it will always be less than uint8.Max if (createInfo->CharCount >= sWorld->getIntConfig(CONFIG_CHARACTERS_PER_REALM)) { SendCharCreate(CHAR_CREATE_SERVER_LIMIT); delete createInfo; _charCreateCallback.Reset(); return; } } bool allowTwoSideAccounts = !sWorld->IsPvPRealm() || HasPermission(rbac::RBAC_PERM_TWO_SIDE_CHARACTER_CREATION); uint32 skipCinematics = sWorld->getIntConfig(CONFIG_SKIP_CINEMATICS); _charCreateCallback.FreeResult(); if (!allowTwoSideAccounts || skipCinematics == 1 || createInfo->Class == CLASS_DEATH_KNIGHT) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_CREATE_INFO); stmt->setUInt32(0, GetAccountId()); stmt->setUInt32(1, (skipCinematics == 1 || createInfo->Class == CLASS_DEATH_KNIGHT) ? 10 : 1); _charCreateCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt)); _charCreateCallback.NextStage(); return; } _charCreateCallback.NextStage(); HandleCharCreateCallback(PreparedQueryResult(NULL), createInfo); // Will jump to case 3 break; } case 3: { bool haveSameRace = false; uint32 heroicReqLevel = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER); bool hasHeroicReqLevel = (heroicReqLevel == 0); bool allowTwoSideAccounts = !sWorld->IsPvPRealm() || HasPermission(rbac::RBAC_PERM_TWO_SIDE_CHARACTER_CREATION); uint32 skipCinematics = sWorld->getIntConfig(CONFIG_SKIP_CINEMATICS); bool checkHeroicReqs = createInfo->Class == CLASS_DEATH_KNIGHT && !HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_HEROIC_CHARACTER); if (result) { uint32 team = Player::TeamForRace(createInfo->Race); uint32 freeHeroicSlots = sWorld->getIntConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM); Field* field = result->Fetch(); uint8 accRace = field[1].GetUInt8(); if (checkHeroicReqs) { uint8 accClass = field[2].GetUInt8(); if (accClass == CLASS_DEATH_KNIGHT) { if (freeHeroicSlots > 0) --freeHeroicSlots; if (freeHeroicSlots == 0) { SendCharCreate(CHAR_CREATE_UNIQUE_CLASS_LIMIT); delete createInfo; _charCreateCallback.Reset(); return; } } if (!hasHeroicReqLevel) { uint8 accLevel = field[0].GetUInt8(); if (accLevel >= heroicReqLevel) hasHeroicReqLevel = true; } } // need to check team only for first character /// @todo what to if account already has characters of both races? if (!allowTwoSideAccounts) { uint32 accTeam = 0; if (accRace > 0) accTeam = Player::TeamForRace(accRace); if (accTeam != team) { SendCharCreate(CHAR_CREATE_PVP_TEAMS_VIOLATION); delete createInfo; _charCreateCallback.Reset(); return; } } // search same race for cinematic or same class if need /// @todo check if cinematic already shown? (already logged in?; cinematic field) while ((skipCinematics == 1 && !haveSameRace) || createInfo->Class == CLASS_DEATH_KNIGHT) { if (!result->NextRow()) break; field = result->Fetch(); accRace = field[1].GetUInt8(); if (!haveSameRace) haveSameRace = createInfo->Race == accRace; if (checkHeroicReqs) { uint8 acc_class = field[2].GetUInt8(); if (acc_class == CLASS_DEATH_KNIGHT) { if (freeHeroicSlots > 0) --freeHeroicSlots; if (freeHeroicSlots == 0) { SendCharCreate(CHAR_CREATE_UNIQUE_CLASS_LIMIT); delete createInfo; _charCreateCallback.Reset(); return; } } if (!hasHeroicReqLevel) { uint8 acc_level = field[0].GetUInt8(); if (acc_level >= heroicReqLevel) hasHeroicReqLevel = true; } } } } if (checkHeroicReqs && !hasHeroicReqLevel) { SendCharCreate(CHAR_CREATE_LEVEL_REQUIREMENT); delete createInfo; _charCreateCallback.Reset(); return; } Player newChar(this); newChar.GetMotionMaster()->Initialize(); if (!newChar.Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PLAYER), createInfo)) { // Player not create (race/class/etc problem?) newChar.CleanupsBeforeDelete(); SendCharCreate(CHAR_CREATE_ERROR); delete createInfo; _charCreateCallback.Reset(); return; } if ((haveSameRace && skipCinematics == 1) || skipCinematics == 2) newChar.setCinematic(1); // not show intro newChar.SetAtLoginFlag(AT_LOGIN_FIRST); // First login // Player created, save it now newChar.SaveToDB(true); createInfo->CharCount += 1; SQLTransaction trans = LoginDatabase.BeginTransaction(); PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_DEL_REALM_CHARACTERS_BY_REALM); stmt->setUInt32(0, GetAccountId()); stmt->setUInt32(1, realmID); trans->Append(stmt); stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_REALM_CHARACTERS); stmt->setUInt32(0, createInfo->CharCount); stmt->setUInt32(1, GetAccountId()); stmt->setUInt32(2, realmID); trans->Append(stmt); LoginDatabase.CommitTransaction(trans); SendCharCreate(CHAR_CREATE_SUCCESS); TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), GetRemoteAddress().c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow()); sScriptMgr->OnPlayerCreate(&newChar); sWorld->AddCharacterNameData(newChar.GetGUID(), newChar.GetName(), newChar.getGender(), newChar.getRace(), newChar.getClass(), newChar.getLevel()); newChar.CleanupsBeforeDelete(); delete createInfo; _charCreateCallback.Reset(); break; } } } void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData) { ObjectGuid guid; recvData >> guid; // Initiating uint32 initAccountId = GetAccountId(); // can't delete loaded character if (ObjectAccessor::FindPlayer(guid)) { sScriptMgr->OnPlayerFailedDelete(guid, initAccountId); return; } uint32 accountId = 0; uint8 level = 0; std::string name; // is guild leader if (sGuildMgr->GetGuildByLeader(guid)) { sScriptMgr->OnPlayerFailedDelete(guid, initAccountId); SendCharDelete(CHAR_DELETE_FAILED_GUILD_LEADER); return; } // is arena team captain if (sArenaTeamMgr->GetArenaTeamByCaptain(guid)) { sScriptMgr->OnPlayerFailedDelete(guid, initAccountId); SendCharDelete(CHAR_DELETE_FAILED_ARENA_CAPTAIN); return; } PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_DATA_BY_GUID); stmt->setUInt32(0, guid.GetCounter()); if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) { Field* fields = result->Fetch(); accountId = fields[0].GetUInt32(); name = fields[1].GetString(); level = fields[2].GetUInt8(); } // prevent deleting other players' characters using cheating tools if (accountId != initAccountId) { sScriptMgr->OnPlayerFailedDelete(guid, initAccountId); return; } TC_LOG_INFO("entities.player.character", "Account: %d, IP: %s deleted character: %s, %s, Level: %u", accountId, GetRemoteAddress().c_str(), name.c_str(), guid.ToString().c_str(), level); // To prevent hook failure, place hook before removing reference from DB sScriptMgr->OnPlayerDelete(guid, initAccountId); // To prevent race conditioning, but as it also makes sense, we hand the accountId over for successful delete. // Shouldn't interfere with character deletion though if (sLog->ShouldLog("entities.player.dump", LOG_LEVEL_INFO)) // optimize GetPlayerDump call { std::string dump; if (PlayerDumpWriter().GetDump(guid.GetCounter(), dump)) sLog->outCharDump(dump.c_str(), accountId, guid.GetRawValue(), name.c_str()); } sCalendarMgr->RemoveAllPlayerEventsAndInvites(guid); Player::DeleteFromDB(guid, accountId); SendCharDelete(CHAR_DELETE_SUCCESS); } void WorldSession::HandlePlayerLoginOpcode(WorldPacket& recvData) { if (PlayerLoading() || GetPlayer() != NULL) { TC_LOG_ERROR("network", "Player tries to login again, AccountId = %d", GetAccountId()); KickPlayer(); return; } m_playerLoading = true; ObjectGuid playerGuid; TC_LOG_DEBUG("network", "WORLD: Recvd Player Logon Message"); recvData >> playerGuid; if (!IsLegitCharacterForAccount(playerGuid)) { TC_LOG_ERROR("network", "Account (%u) can't login with that character (%s).", GetAccountId(), playerGuid.ToString().c_str()); KickPlayer(); return; } LoginQueryHolder *holder = new LoginQueryHolder(GetAccountId(), playerGuid); if (!holder->Initialize()) { delete holder; // delete all unprocessed queries m_playerLoading = false; return; } _charLoginCallback = CharacterDatabase.DelayQueryHolder(holder); } void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder) { ObjectGuid playerGuid = holder->GetGuid(); Player* pCurrChar = new Player(this); // for send server info and strings (config) ChatHandler chH = ChatHandler(pCurrChar->GetSession()); // "GetAccountId() == db stored account id" checked in LoadFromDB (prevent login not own character using cheating tools) if (!pCurrChar->LoadFromDB(playerGuid, holder)) { SetPlayer(NULL); KickPlayer(); // disconnect client, player no set to session and it will not deleted or saved at kick delete pCurrChar; // delete it manually delete holder; // delete all unprocessed queries m_playerLoading = false; return; } pCurrChar->GetMotionMaster()->Initialize(); pCurrChar->SendDungeonDifficulty(false); WorldPacket data(SMSG_LOGIN_VERIFY_WORLD, 20); data << pCurrChar->GetMapId(); data << pCurrChar->GetPositionX(); data << pCurrChar->GetPositionY(); data << pCurrChar->GetPositionZ(); data << pCurrChar->GetOrientation(); SendPacket(&data); // load player specific part before send times LoadAccountData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_ACCOUNT_DATA), PER_CHARACTER_CACHE_MASK); SendAccountDataTimes(PER_CHARACTER_CACHE_MASK); data.Initialize(SMSG_FEATURE_SYSTEM_STATUS, 2); // added in 2.2.0 data << uint8(2); // unknown value data << uint8(0); // enable(1)/disable(0) voice chat interface in client SendPacket(&data); // Send MOTD { data.Initialize(SMSG_MOTD, 50); // new in 2.0.1 data << (uint32)0; uint32 linecount=0; std::string str_motd = sWorld->GetMotd(); std::string::size_type pos, nextpos; pos = 0; while ((nextpos= str_motd.find('@', pos)) != std::string::npos) { if (nextpos != pos) { data << str_motd.substr(pos, nextpos-pos); ++linecount; } pos = nextpos+1; } if (pos<str_motd.length()) { data << str_motd.substr(pos); ++linecount; } data.put(0, linecount); SendPacket(&data); TC_LOG_DEBUG("network", "WORLD: Sent motd (SMSG_MOTD)"); // send server info if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1) chH.PSendSysMessage(_FULLVERSION); TC_LOG_DEBUG("network", "WORLD: Sent server info"); } //QueryResult* result = CharacterDatabase.PQuery("SELECT guildid, rank FROM guild_member WHERE guid = '%u'", pCurrChar->GetGUIDLow()); if (PreparedQueryResult resultGuild = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_GUILD)) { Field* fields = resultGuild->Fetch(); pCurrChar->SetInGuild(fields[0].GetUInt32()); pCurrChar->SetRank(fields[1].GetUInt8()); } else if (pCurrChar->GetGuildId()) // clear guild related fields in case wrong data about non existed membership { pCurrChar->SetInGuild(0); pCurrChar->SetRank(0); } if (pCurrChar->GetGuildId() != 0) { if (Guild* guild = sGuildMgr->GetGuildById(pCurrChar->GetGuildId())) guild->SendLoginInfo(this); else { // remove wrong guild data TC_LOG_ERROR("network", "Player %s (GUID: %u) marked as member of not existing guild (id: %u), removing guild membership for player.", pCurrChar->GetName().c_str(), pCurrChar->GetGUIDLow(), pCurrChar->GetGuildId()); pCurrChar->SetInGuild(0); } } data.Initialize(SMSG_LEARNED_DANCE_MOVES, 4+4); data << uint32(0); data << uint32(0); SendPacket(&data); pCurrChar->SendInitialPacketsBeforeAddToMap(); //Show cinematic at the first time that player login if (!pCurrChar->getCinematic()) { pCurrChar->setCinematic(1); if (ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(pCurrChar->getClass())) { if (cEntry->CinematicSequence) pCurrChar->SendCinematicStart(cEntry->CinematicSequence); else if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace())) pCurrChar->SendCinematicStart(rEntry->CinematicSequence); // send new char string if not empty if (!sWorld->GetNewCharString().empty()) chH.PSendSysMessage("%s", sWorld->GetNewCharString().c_str()); } } if (!pCurrChar->GetMap()->AddPlayerToMap(pCurrChar) || !pCurrChar->CheckInstanceLoginValid()) { AreaTrigger const* at = sObjectMgr->GetGoBackTrigger(pCurrChar->GetMapId()); if (at) pCurrChar->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, pCurrChar->GetOrientation()); else pCurrChar->TeleportTo(pCurrChar->m_homebindMapId, pCurrChar->m_homebindX, pCurrChar->m_homebindY, pCurrChar->m_homebindZ, pCurrChar->GetOrientation()); } sObjectAccessor->AddObject(pCurrChar); //TC_LOG_DEBUG("Player %s added to Map.", pCurrChar->GetName().c_str()); pCurrChar->SendInitialPacketsAfterAddToMap(); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_ONLINE); stmt->setUInt32(0, pCurrChar->GetGUIDLow()); CharacterDatabase.Execute(stmt); stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_ACCOUNT_ONLINE); stmt->setUInt32(0, GetAccountId()); LoginDatabase.Execute(stmt); pCurrChar->SetInGameTime(getMSTime()); // announce group about member online (must be after add to player list to receive announce to self) if (Group* group = pCurrChar->GetGroup()) { //pCurrChar->groupInfo.group->SendInit(this); // useless group->SendUpdate(); group->ResetMaxEnchantingLevel(); } // friend status sSocialMgr->SendFriendStatus(pCurrChar, FRIEND_ONLINE, pCurrChar->GetGUIDLow(), true); // Place character in world (and load zone) before some object loading pCurrChar->LoadCorpse(); // setting Ghost+speed if dead if (pCurrChar->m_deathState != ALIVE) { // not blizz like, we must correctly save and load player instead... if (pCurrChar->getRace() == RACE_NIGHTELF) pCurrChar->CastSpell(pCurrChar, 20584, true, nullptr);// auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form) pCurrChar->CastSpell(pCurrChar, 8326, true, nullptr); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?) pCurrChar->SetMovement(MOVE_WATER_WALK); } pCurrChar->ContinueTaxiFlight(); // reset for all pets before pet loading if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_PET_TALENTS)) Pet::resetTalentsForAllPetsOf(pCurrChar); // Load pet if any (if player not alive and in taxi flight or another then pet will remember as temporary unsummoned) pCurrChar->LoadPet(); // Set FFA PvP for non GM in non-rest mode if (sWorld->IsFFAPvPRealm() && !pCurrChar->IsGameMaster() && !pCurrChar->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING)) pCurrChar->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP); if (pCurrChar->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP)) pCurrChar->SetContestedPvP(); // Apply at_login requests if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_SPELLS)) { pCurrChar->ResetSpells(); SendNotification(LANG_RESET_SPELLS); } if (pCurrChar->HasAtLoginFlag(AT_LOGIN_RESET_TALENTS)) { pCurrChar->ResetTalents(true); pCurrChar->SendTalentsInfoData(false); // original talents send already in to SendInitialPacketsBeforeAddToMap, resend reset state SendNotification(LANG_RESET_TALENTS); } bool firstLogin = pCurrChar->HasAtLoginFlag(AT_LOGIN_FIRST); if (firstLogin) pCurrChar->RemoveAtLoginFlag(AT_LOGIN_FIRST); // show time before shutdown if shutdown planned. if (sWorld->IsShuttingDown()) sWorld->ShutdownMsg(true, pCurrChar); if (sWorld->getBoolConfig(CONFIG_ALL_TAXI_PATHS)) pCurrChar->SetTaxiCheater(true); if (pCurrChar->IsGameMaster()) SendNotification(LANG_GM_ON); std::string IP_str = GetRemoteAddress(); TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Login Character:[%s] (GUID: %u) Level: %d", GetAccountId(), IP_str.c_str(), pCurrChar->GetName().c_str(), pCurrChar->GetGUIDLow(), pCurrChar->getLevel()); if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STATE_STUNNED)) pCurrChar->SetStandState(UNIT_STAND_STATE_STAND); m_playerLoading = false; // Handle Login-Achievements (should be handled after loading) _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_ON_LOGIN, 1); sScriptMgr->OnPlayerLogin(pCurrChar, firstLogin); delete holder; } void WorldSession::HandleSetFactionAtWar(WorldPacket& recvData) { TC_LOG_DEBUG("network", "WORLD: Received CMSG_SET_FACTION_ATWAR"); uint32 repListID; uint8 flag; recvData >> repListID; recvData >> flag; GetPlayer()->GetReputationMgr().SetAtWar(repListID, flag != 0); } //I think this function is never used :/ I dunno, but i guess this opcode not exists void WorldSession::HandleSetFactionCheat(WorldPacket& /*recvData*/) { TC_LOG_ERROR("network", "WORLD SESSION: HandleSetFactionCheat, not expected call, please report."); GetPlayer()->GetReputationMgr().SendStates(); } void WorldSession::HandleTutorialFlag(WorldPacket& recvData) { uint32 data; recvData >> data; uint8 index = uint8(data / 32); if (index >= MAX_ACCOUNT_TUTORIAL_VALUES) return; uint32 value = (data % 32); uint32 flag = GetTutorialInt(index); flag |= (1 << value); SetTutorialInt(index, flag); } void WorldSession::HandleTutorialClear(WorldPacket& /*recvData*/) { for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i) SetTutorialInt(i, 0xFFFFFFFF); } void WorldSession::HandleTutorialReset(WorldPacket& /*recvData*/) { for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i) SetTutorialInt(i, 0x00000000); } void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket& recvData) { TC_LOG_DEBUG("network", "WORLD: Received CMSG_SET_WATCHED_FACTION"); uint32 fact; recvData >> fact; GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact); } void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket& recvData) { TC_LOG_DEBUG("network", "WORLD: Received CMSG_SET_FACTION_INACTIVE"); uint32 replistid; uint8 inactive; recvData >> replistid >> inactive; _player->GetReputationMgr().SetInactive(replistid, inactive != 0); } void WorldSession::HandleShowingHelmOpcode(WorldPacket& recvData) { TC_LOG_DEBUG("network", "CMSG_SHOWING_HELM for %s", _player->GetName().c_str()); recvData.read_skip<uint8>(); // unknown, bool? _player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM); } void WorldSession::HandleShowingCloakOpcode(WorldPacket& recvData) { TC_LOG_DEBUG("network", "CMSG_SHOWING_CLOAK for %s", _player->GetName().c_str()); recvData.read_skip<uint8>(); // unknown, bool? _player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK); } void WorldSession::HandleCharRenameOpcode(WorldPacket& recvData) { CharacterRenameInfo renameInfo; recvData >> renameInfo.Guid >> renameInfo.Name; // prevent character rename to invalid name if (!normalizePlayerName(renameInfo.Name)) { SendCharRename(CHAR_NAME_NO_NAME, renameInfo); return; } ResponseCodes res = ObjectMgr::CheckPlayerName(renameInfo.Name, true); if (res != CHAR_NAME_SUCCESS) { SendCharRename(res, renameInfo); return; } // check name limitations if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME) && sObjectMgr->IsReservedName(renameInfo.Name)) { SendCharRename(CHAR_NAME_RESERVED, renameInfo); return; } // Ensure that the character belongs to the current account, that rename at login is enabled // and that there is no character with the desired new name PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_FREE_NAME); stmt->setUInt32(0, renameInfo.Guid.GetCounter()); stmt->setUInt32(1, GetAccountId()); stmt->setUInt16(2, AT_LOGIN_RENAME); stmt->setUInt16(3, AT_LOGIN_RENAME); stmt->setString(4, renameInfo.Name); delete _charRenameCallback.GetParam(); _charRenameCallback.SetParam(new CharacterRenameInfo(std::move(renameInfo))); _charRenameCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt)); } void WorldSession::HandleChangePlayerNameOpcodeCallBack(PreparedQueryResult result, CharacterRenameInfo const* renameInfo) { if (!result) { SendCharRename(CHAR_CREATE_ERROR, *renameInfo); return; } Field* fields = result->Fetch(); uint32 guidLow = fields[0].GetUInt32(); std::string oldName = fields[1].GetString(); // Update name and at_login flag in the db PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_NAME); stmt->setString(0, renameInfo->Name); stmt->setUInt16(1, AT_LOGIN_RENAME); stmt->setUInt32(2, guidLow); CharacterDatabase.Execute(stmt); // Removed declined name from db stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_DECLINED_NAME); stmt->setUInt32(0, guidLow); CharacterDatabase.Execute(stmt); TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s) Character:[%s] (%s) Changed name to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldName.c_str(), renameInfo->Guid.ToString().c_str(), renameInfo->Name.c_str()); SendCharRename(RESPONSE_SUCCESS, *renameInfo); sWorld->UpdateCharacterNameData(renameInfo->Guid, renameInfo->Name); } void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recvData) { ObjectGuid guid; recvData >> guid; // not accept declined names for unsupported languages std::string name; if (!sObjectMgr->GetPlayerNameByGUID(guid, name)) { SendSetPlayerDeclinedNamesResult(DECLINED_NAMES_RESULT_ERROR, guid); return; } std::wstring wname; if (!Utf8toWStr(name, wname)) { SendSetPlayerDeclinedNamesResult(DECLINED_NAMES_RESULT_ERROR, guid); return; } if (!isCyrillicCharacter(wname[0])) // name already stored as only single alphabet using { SendSetPlayerDeclinedNamesResult(DECLINED_NAMES_RESULT_ERROR, guid); return; } std::string name2; DeclinedName declinedname; recvData >> name2; if (name2 != name) // character have different name { SendSetPlayerDeclinedNamesResult(DECLINED_NAMES_RESULT_ERROR, guid); return; } for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i) { recvData >> declinedname.name[i]; if (!normalizePlayerName(declinedname.name[i])) { SendSetPlayerDeclinedNamesResult(DECLINED_NAMES_RESULT_ERROR, guid); return; } } if (!ObjectMgr::CheckDeclinedNames(wname, declinedname)) { SendSetPlayerDeclinedNamesResult(DECLINED_NAMES_RESULT_ERROR, guid); return; } for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i) CharacterDatabase.EscapeString(declinedname.name[i]); SQLTransaction trans = CharacterDatabase.BeginTransaction(); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_DECLINED_NAME); stmt->setUInt32(0, guid.GetCounter()); trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_DECLINED_NAME); stmt->setUInt32(0, guid.GetCounter()); for (uint8 i = 0; i < 5; i++) stmt->setString(i+1, declinedname.name[i]); trans->Append(stmt); CharacterDatabase.CommitTransaction(trans); SendSetPlayerDeclinedNamesResult(DECLINED_NAMES_RESULT_SUCCESS, guid); } void WorldSession::HandleAlterAppearance(WorldPacket& recvData) { TC_LOG_DEBUG("network", "CMSG_ALTER_APPEARANCE"); uint32 Hair, Color, FacialHair, SkinColor; recvData >> Hair >> Color >> FacialHair >> SkinColor; BarberShopStyleEntry const* bs_hair = sBarberShopStyleStore.LookupEntry(Hair); if (!bs_hair || bs_hair->type != 0 || bs_hair->race != _player->getRace() || bs_hair->gender != _player->getGender()) return; BarberShopStyleEntry const* bs_facialHair = sBarberShopStyleStore.LookupEntry(FacialHair); if (!bs_facialHair || bs_facialHair->type != 2 || bs_facialHair->race != _player->getRace() || bs_facialHair->gender != _player->getGender()) return; BarberShopStyleEntry const* bs_skinColor = sBarberShopStyleStore.LookupEntry(SkinColor); if (bs_skinColor && (bs_skinColor->type != 3 || bs_skinColor->race != _player->getRace() || bs_skinColor->gender != _player->getGender())) return; if (!Player::ValidateAppearance(_player->getRace(), _player->getClass(), _player->getGender(), bs_hair->hair_id, Color, uint8(_player->GetUInt32Value(PLAYER_FLAGS) >> 8), bs_facialHair->hair_id, bs_skinColor ? bs_skinColor->hair_id : 0)) return; GameObject* go = _player->FindNearestGameObjectOfType(GAMEOBJECT_TYPE_BARBER_CHAIR, 5.0f); if (!go) { SendBarberShopResult(BARBER_SHOP_RESULT_NOT_ON_CHAIR); return; } if (_player->getStandState() != UNIT_STAND_STATE_SIT_LOW_CHAIR + go->GetGOInfo()->barberChair.chairheight) { SendBarberShopResult(BARBER_SHOP_RESULT_NOT_ON_CHAIR); return; } uint32 cost = _player->GetBarberShopCost(bs_hair->hair_id, Color, bs_facialHair->hair_id, bs_skinColor); // 0 - ok // 1, 3 - not enough money // 2 - you have to seat on barber chair if (!_player->HasEnoughMoney(cost)) { SendBarberShopResult(BARBER_SHOP_RESULT_NO_MONEY); return; } SendBarberShopResult(BARBER_SHOP_RESULT_SUCCESS); _player->ModifyMoney(-int32(cost)); // it isn't free _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_AT_BARBER, cost); _player->SetByteValue(PLAYER_BYTES, 2, uint8(bs_hair->hair_id)); _player->SetByteValue(PLAYER_BYTES, 3, uint8(Color)); _player->SetByteValue(PLAYER_BYTES_2, 0, uint8(bs_facialHair->hair_id)); if (bs_skinColor) _player->SetByteValue(PLAYER_BYTES, 0, uint8(bs_skinColor->hair_id)); _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_VISIT_BARBER_SHOP, 1); _player->SetStandState(0); // stand up } void WorldSession::HandleRemoveGlyph(WorldPacket& recvData) { uint32 slot; recvData >> slot; if (slot >= MAX_GLYPH_SLOT_INDEX) { TC_LOG_DEBUG("network", "Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot); return; } if (uint32 glyph = _player->GetGlyph(slot)) { if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph)) { _player->RemoveAurasDueToSpell(gp->SpellId); _player->SetGlyph(slot, 0); _player->SendTalentsInfoData(false); } } } void WorldSession::HandleCharCustomize(WorldPacket& recvData) { CharacterCustomizeInfo customizeInfo; recvData >> customizeInfo.Guid; if (!IsLegitCharacterForAccount(customizeInfo.Guid)) { TC_LOG_ERROR("network", "Account %u, IP: %s tried to customise %s, but it does not belong to their account!", GetAccountId(), GetRemoteAddress().c_str(), customizeInfo.Guid.ToString().c_str()); recvData.rfinish(); KickPlayer(); return; } recvData >> customizeInfo.Name >> customizeInfo.Gender >> customizeInfo.Skin >> customizeInfo.HairColor >> customizeInfo.HairStyle >> customizeInfo.FacialHair >> customizeInfo.Face; PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_NAME_DATA); stmt->setUInt32(0, customizeInfo.Guid.GetCounter()); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) { SendCharCustomize(CHAR_CREATE_ERROR, customizeInfo); return; } Field* fields = result->Fetch(); uint8 plrRace = fields[0].GetUInt8(); uint8 plrClass = fields[1].GetUInt8(); uint8 plrGender = fields[2].GetUInt8(); if (!Player::ValidateAppearance(plrRace, plrClass, plrGender, customizeInfo.HairStyle, customizeInfo.HairColor, customizeInfo.Face, customizeInfo.FacialHair, customizeInfo.Skin, true)) { SendCharCustomize(CHAR_CREATE_ERROR, customizeInfo); return; } stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_AT_LOGIN); stmt->setUInt32(0, customizeInfo.Guid.GetCounter()); // TODO: Make async with callback result = CharacterDatabase.Query(stmt); if (!result) { SendCharCustomize(CHAR_CREATE_ERROR, customizeInfo); return; } fields = result->Fetch(); uint32 at_loginFlags = fields[0].GetUInt16(); if (!(at_loginFlags & AT_LOGIN_CUSTOMIZE)) { SendCharCustomize(CHAR_CREATE_ERROR, customizeInfo); return; } // prevent character rename to invalid name if (!normalizePlayerName(customizeInfo.Name)) { SendCharCustomize(CHAR_NAME_NO_NAME, customizeInfo); return; } ResponseCodes res = ObjectMgr::CheckPlayerName(customizeInfo.Name, true); if (res != CHAR_NAME_SUCCESS) { SendCharCustomize(res, customizeInfo); return; } // check name limitations if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME) && sObjectMgr->IsReservedName(customizeInfo.Name)) { SendCharCustomize(CHAR_NAME_RESERVED, customizeInfo); return; } // character with this name already exist if (ObjectGuid newGuid = sObjectMgr->GetPlayerGUIDByName(customizeInfo.Name)) { if (newGuid != customizeInfo.Guid) { SendCharCustomize(CHAR_CREATE_NAME_IN_USE, customizeInfo); return; } } stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_NAME); stmt->setUInt32(0, customizeInfo.Guid.GetCounter()); result = CharacterDatabase.Query(stmt); if (result) { std::string oldname = result->Fetch()[0].GetString(); TC_LOG_INFO("entities.player.character", "Account: %d (IP: %s), Character[%s] (%s) Customized to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), customizeInfo.Guid.ToString().c_str(), customizeInfo.Name.c_str()); } SQLTransaction trans = CharacterDatabase.BeginTransaction(); Player::Customize(&customizeInfo, trans); stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_NAME_AT_LOGIN); stmt->setString(0, customizeInfo.Name); stmt->setUInt16(1, uint16(AT_LOGIN_CUSTOMIZE)); stmt->setUInt32(2, customizeInfo.Guid.GetCounter()); trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_DECLINED_NAME); stmt->setUInt32(0, customizeInfo.Guid.GetCounter()); trans->Append(stmt); CharacterDatabase.CommitTransaction(trans); sWorld->UpdateCharacterNameData(customizeInfo.Guid, customizeInfo.Name, customizeInfo.Gender); SendCharCustomize(RESPONSE_SUCCESS, customizeInfo); } void WorldSession::HandleEquipmentSetSave(WorldPacket& recvData) { TC_LOG_DEBUG("network", "CMSG_EQUIPMENT_SET_SAVE"); uint64 setGuid; recvData.readPackGUID(setGuid); uint32 index; recvData >> index; if (index >= MAX_EQUIPMENT_SET_INDEX) // client set slots amount return; std::string name; recvData >> name; std::string iconName; recvData >> iconName; EquipmentSet eqSet; eqSet.Guid = setGuid; eqSet.Name = name; eqSet.IconName = iconName; eqSet.state = EQUIPMENT_SET_NEW; for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i) { ObjectGuid itemGuid; recvData >> itemGuid.ReadAsPacked(); // equipment manager sends "1" (as raw GUID) for slots set to "ignore" (don't touch slot at equip set) if (itemGuid.GetRawValue() == 1) { // ignored slots saved as bit mask because we have no free special values for Items[i] eqSet.IgnoreMask |= 1 << i; continue; } Item* item = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (!item && itemGuid) // cheating check 1 return; if (item && item->GetGUID() != itemGuid) // cheating check 2 return; eqSet.Items[i] = itemGuid.GetCounter(); } _player->SetEquipmentSet(index, eqSet); } void WorldSession::HandleEquipmentSetDelete(WorldPacket& recvData) { TC_LOG_DEBUG("network", "CMSG_EQUIPMENT_SET_DELETE"); uint64 setGuid; recvData.readPackGUID(setGuid); _player->DeleteEquipmentSet(setGuid); } void WorldSession::HandleEquipmentSetUse(WorldPacket& recvData) { TC_LOG_DEBUG("network", "CMSG_EQUIPMENT_SET_USE"); for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i) { ObjectGuid itemGuid; recvData >> itemGuid.ReadAsPacked(); uint8 srcbag, srcslot; recvData >> srcbag >> srcslot; TC_LOG_DEBUG("entities.player.items", "%s: srcbag %u, srcslot %u", itemGuid.ToString().c_str(), srcbag, srcslot); // check if item slot is set to "ignored" (raw value == 1), must not be unequipped then if (itemGuid.GetRawValue() == 1) continue; // Only equip weapons in combat if (_player->IsInCombat() && i != EQUIPMENT_SLOT_MAINHAND && i != EQUIPMENT_SLOT_OFFHAND && i != EQUIPMENT_SLOT_RANGED) continue; Item* item = _player->GetItemByGuid(itemGuid); uint16 dstpos = i | (INVENTORY_SLOT_BAG_0 << 8); if (!item) { Item* uItem = _player->GetItemByPos(INVENTORY_SLOT_BAG_0, i); if (!uItem) continue; ItemPosCountVec sDest; InventoryResult msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, sDest, uItem, false); if (msg == EQUIP_ERR_OK) { _player->RemoveItem(INVENTORY_SLOT_BAG_0, i, true); _player->StoreItem(sDest, uItem, true); } else _player->SendEquipError(msg, uItem, NULL); continue; } if (item->GetPos() == dstpos) continue; _player->SwapItem(item->GetPos(), dstpos); } WorldPacket data(SMSG_EQUIPMENT_SET_USE_RESULT, 1); data << uint8(0); // 4 - equipment swap failed - inventory is full SendPacket(&data); } void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData) { CharacterFactionChangeInfo factionChangeInfo; recvData >> factionChangeInfo.Guid; if (!IsLegitCharacterForAccount(factionChangeInfo.Guid)) { TC_LOG_ERROR("network", "Account %u, IP: %s tried to factionchange character %s, but it does not belong to their account!", GetAccountId(), GetRemoteAddress().c_str(), factionChangeInfo.Guid.ToString().c_str()); recvData.rfinish(); KickPlayer(); return; } recvData >> factionChangeInfo.Name >> factionChangeInfo.Gender >> factionChangeInfo.Skin >> factionChangeInfo.HairColor >> factionChangeInfo.HairStyle >> factionChangeInfo.FacialHair >> factionChangeInfo.Face >> factionChangeInfo.Race; uint32 lowGuid = factionChangeInfo.Guid.GetCounter(); // get the players old (at this moment current) race CharacterNameData const* nameData = sWorld->GetCharacterNameData(factionChangeInfo.Guid); if (!nameData) { SendCharFactionChange(CHAR_CREATE_ERROR, factionChangeInfo); return; } uint8 oldRace = nameData->m_race; uint8 playerClass = nameData->m_class; uint8 level = nameData->m_level; // TO Do: Make async PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_AT_LOGIN_TITLES); stmt->setUInt32(0, lowGuid); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (!result) { SendCharFactionChange(CHAR_CREATE_ERROR, factionChangeInfo); return; } Field* fields = result->Fetch(); uint32 at_loginFlags = fields[0].GetUInt16(); std::string knownTitlesStr = fields[1].GetString(); uint32 used_loginFlag = ((recvData.GetOpcode() == CMSG_CHAR_RACE_CHANGE) ? AT_LOGIN_CHANGE_RACE : AT_LOGIN_CHANGE_FACTION); if (!sObjectMgr->GetPlayerInfo(factionChangeInfo.Race, playerClass)) { SendCharFactionChange(CHAR_CREATE_ERROR, factionChangeInfo); return; } if (!(at_loginFlags & used_loginFlag)) { SendCharFactionChange(CHAR_CREATE_ERROR, factionChangeInfo); return; } if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RACEMASK)) { uint32 raceMaskDisabled = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK); if ((1 << (factionChangeInfo.Race - 1)) & raceMaskDisabled) { SendCharFactionChange(CHAR_CREATE_ERROR, factionChangeInfo); return; } } // prevent character rename to invalid name if (!normalizePlayerName(factionChangeInfo.Name)) { SendCharFactionChange(CHAR_NAME_NO_NAME, factionChangeInfo); return; } ResponseCodes res = ObjectMgr::CheckPlayerName(factionChangeInfo.Name, true); if (res != CHAR_NAME_SUCCESS) { SendCharFactionChange(res, factionChangeInfo); return; } // check name limitations if (!HasPermission(rbac::RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_RESERVEDNAME) && sObjectMgr->IsReservedName(factionChangeInfo.Name)) { SendCharFactionChange(CHAR_NAME_RESERVED, factionChangeInfo); return; } // character with this name already exist if (ObjectGuid newGuid = sObjectMgr->GetPlayerGUIDByName(factionChangeInfo.Name)) { if (newGuid != factionChangeInfo.Guid) { SendCharFactionChange(CHAR_CREATE_NAME_IN_USE, factionChangeInfo); return; } } // resurrect the character in case he's dead sObjectAccessor->ConvertCorpseForPlayer(factionChangeInfo.Guid); SQLTransaction trans = CharacterDatabase.BeginTransaction(); CharacterDatabase.EscapeString(factionChangeInfo.Name); Player::Customize(&factionChangeInfo, trans); stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_FACTION_OR_RACE); stmt->setString(0, factionChangeInfo.Name); stmt->setUInt8(1, factionChangeInfo.Race); stmt->setUInt16(2, used_loginFlag); stmt->setUInt32(3, lowGuid); trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_DECLINED_NAME); stmt->setUInt32(0, lowGuid); trans->Append(stmt); sWorld->UpdateCharacterNameData(factionChangeInfo.Guid, factionChangeInfo.Name, factionChangeInfo.Gender, factionChangeInfo.Race); if (oldRace != factionChangeInfo.Race) { TeamId team = TEAM_ALLIANCE; // Search each faction is targeted switch (factionChangeInfo.Race) { case RACE_ORC: case RACE_TAUREN: case RACE_UNDEAD_PLAYER: case RACE_TROLL: case RACE_BLOODELF: team = TEAM_HORDE; break; default: break; } // Switch Languages // delete all languages first stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SKILL_LANGUAGES); stmt->setUInt32(0, lowGuid); trans->Append(stmt); // Now add them back stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_SKILL_LANGUAGE); stmt->setUInt32(0, lowGuid); // Faction specific languages if (team == TEAM_HORDE) stmt->setUInt16(1, 109); else stmt->setUInt16(1, 98); trans->Append(stmt); // Race specific languages if (factionChangeInfo.Race != RACE_ORC && factionChangeInfo.Race != RACE_HUMAN) { stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_SKILL_LANGUAGE); stmt->setUInt32(0, lowGuid); switch (factionChangeInfo.Race) { case RACE_DWARF: stmt->setUInt16(1, 111); break; case RACE_DRAENEI: stmt->setUInt16(1, 759); break; case RACE_GNOME: stmt->setUInt16(1, 313); break; case RACE_NIGHTELF: stmt->setUInt16(1, 113); break; case RACE_UNDEAD_PLAYER: stmt->setUInt16(1, 673); break; case RACE_TAUREN: stmt->setUInt16(1, 115); break; case RACE_TROLL: stmt->setUInt16(1, 315); break; case RACE_BLOODELF: stmt->setUInt16(1, 137); break; } trans->Append(stmt); } if (recvData.GetOpcode() == CMSG_CHAR_FACTION_CHANGE) { // Delete all Flypaths stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXI_PATH); stmt->setUInt32(0, lowGuid); trans->Append(stmt); if (level > 7) { // Update Taxi path // this doesn't seem to be 100% blizzlike... but it can't really be helped. std::ostringstream taximaskstream; uint32 numFullTaximasks = level / 7; if (numFullTaximasks > 11) numFullTaximasks = 11; if (team == TEAM_ALLIANCE) { if (playerClass != CLASS_DEATH_KNIGHT) { for (uint8 i = 0; i < numFullTaximasks; ++i) taximaskstream << uint32(sAllianceTaxiNodesMask[i]) << ' '; } else { for (uint8 i = 0; i < numFullTaximasks; ++i) taximaskstream << uint32(sAllianceTaxiNodesMask[i] | sDeathKnightTaxiNodesMask[i]) << ' '; } } else { if (playerClass != CLASS_DEATH_KNIGHT) { for (uint8 i = 0; i < numFullTaximasks; ++i) taximaskstream << uint32(sHordeTaxiNodesMask[i]) << ' '; } else { for (uint8 i = 0; i < numFullTaximasks; ++i) taximaskstream << uint32(sHordeTaxiNodesMask[i] | sDeathKnightTaxiNodesMask[i]) << ' '; } } uint32 numEmptyTaximasks = 11 - numFullTaximasks; for (uint8 i = 0; i < numEmptyTaximasks; ++i) taximaskstream << "0 "; taximaskstream << '0'; std::string taximask = taximaskstream.str(); stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXIMASK); stmt->setString(0, taximask); stmt->setUInt32(1, lowGuid); trans->Append(stmt); } if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD)) { // Reset guild stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUILD_MEMBER); stmt->setUInt32(0, lowGuid); PreparedQueryResult result = CharacterDatabase.Query(stmt); if (result) if (Guild* guild = sGuildMgr->GetGuildById((result->Fetch()[0]).GetUInt32())) guild->DeleteMember(factionChangeInfo.Guid, false, false, true); Player::LeaveAllArenaTeams(factionChangeInfo.Guid); } if (!HasPermission(rbac::RBAC_PERM_TWO_SIDE_ADD_FRIEND)) { // Delete Friend List stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SOCIAL_BY_GUID); stmt->setUInt32(0, lowGuid); trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SOCIAL_BY_FRIEND); stmt->setUInt32(0, lowGuid); trans->Append(stmt); } // Reset homebind and position stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_PLAYER_HOMEBIND); stmt->setUInt32(0, lowGuid); trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PLAYER_HOMEBIND); stmt->setUInt32(0, lowGuid); WorldLocation loc; uint16 zoneId = 0; if (team == TEAM_ALLIANCE) { loc.WorldRelocate(0, -8867.68f, 673.373f, 97.9034f, 0.0f); zoneId = 1519; } else { loc.WorldRelocate(1, 1633.33f, -4439.11f, 15.7588f, 0.0f); zoneId = 1637; } stmt->setUInt16(1, loc.GetMapId()); stmt->setUInt16(2, zoneId); stmt->setFloat(3, loc.GetPositionX()); stmt->setFloat(4, loc.GetPositionY()); stmt->setFloat(5, loc.GetPositionZ()); trans->Append(stmt); Player::SavePositionInDB(loc, zoneId, factionChangeInfo.Guid, trans); // Achievement conversion for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChangeAchievements.begin(); it != sObjectMgr->FactionChangeAchievements.end(); ++it) { uint32 achiev_alliance = it->first; uint32 achiev_horde = it->second; stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_ACHIEVEMENT_BY_ACHIEVEMENT); stmt->setUInt16(0, uint16(team == TEAM_ALLIANCE ? achiev_alliance : achiev_horde)); stmt->setUInt32(1, lowGuid); trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_ACHIEVEMENT); stmt->setUInt16(0, uint16(team == TEAM_ALLIANCE ? achiev_alliance : achiev_horde)); stmt->setUInt16(1, uint16(team == TEAM_ALLIANCE ? achiev_horde : achiev_alliance)); stmt->setUInt32(2, lowGuid); trans->Append(stmt); } // Item conversion for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChangeItems.begin(); it != sObjectMgr->FactionChangeItems.end(); ++it) { uint32 item_alliance = it->first; uint32 item_horde = it->second; stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_INVENTORY_FACTION_CHANGE); stmt->setUInt32(0, (team == TEAM_ALLIANCE ? item_alliance : item_horde)); stmt->setUInt32(1, (team == TEAM_ALLIANCE ? item_horde : item_alliance)); stmt->setUInt32(2, lowGuid); trans->Append(stmt); } // Delete all current quests stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_QUESTSTATUS); stmt->setUInt32(0, lowGuid); trans->Append(stmt); // Quest conversion for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChangeQuests.begin(); it != sObjectMgr->FactionChangeQuests.end(); ++it) { uint32 quest_alliance = it->first; uint32 quest_horde = it->second; stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_QUESTSTATUS_REWARDED_BY_QUEST); stmt->setUInt32(0, lowGuid); stmt->setUInt32(1, (team == TEAM_ALLIANCE ? quest_alliance : quest_horde)); trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_QUESTSTATUS_REWARDED_FACTION_CHANGE); stmt->setUInt32(0, (team == TEAM_ALLIANCE ? quest_alliance : quest_horde)); stmt->setUInt32(1, (team == TEAM_ALLIANCE ? quest_horde : quest_alliance)); stmt->setUInt32(2, lowGuid); trans->Append(stmt); } // Mark all rewarded quests as "active" (will count for completed quests achievements) stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_QUESTSTATUS_REWARDED_ACTIVE); stmt->setUInt32(0, lowGuid); trans->Append(stmt); // Disable all old-faction specific quests { ObjectMgr::QuestMap const& questTemplates = sObjectMgr->GetQuestTemplates(); for (ObjectMgr::QuestMap::const_iterator iter = questTemplates.begin(); iter != questTemplates.end(); ++iter) { Quest const* quest = iter->second; uint32 newRaceMask = (team == TEAM_ALLIANCE) ? RACEMASK_ALLIANCE : RACEMASK_HORDE; if (!(quest->GetRequiredRaces() & newRaceMask)) { stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_QUESTSTATUS_REWARDED_ACTIVE_BY_QUEST); stmt->setUInt32(0, lowGuid); stmt->setUInt32(1, quest->GetQuestId()); trans->Append(stmt); } } } // Spell conversion for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChangeSpells.begin(); it != sObjectMgr->FactionChangeSpells.end(); ++it) { uint32 spell_alliance = it->first; uint32 spell_horde = it->second; stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_SPELL_BY_SPELL); stmt->setUInt32(0, (team == TEAM_ALLIANCE ? spell_alliance : spell_horde)); stmt->setUInt32(1, lowGuid); trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_SPELL_FACTION_CHANGE); stmt->setUInt32(0, (team == TEAM_ALLIANCE ? spell_alliance : spell_horde)); stmt->setUInt32(1, (team == TEAM_ALLIANCE ? spell_horde : spell_alliance)); stmt->setUInt32(2, lowGuid); trans->Append(stmt); } // Reputation conversion for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChangeReputation.begin(); it != sObjectMgr->FactionChangeReputation.end(); ++it) { uint32 reputation_alliance = it->first; uint32 reputation_horde = it->second; uint32 newReputation = (team == TEAM_ALLIANCE) ? reputation_alliance : reputation_horde; uint32 oldReputation = (team == TEAM_ALLIANCE) ? reputation_horde : reputation_alliance; // select old standing set in db stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_REP_BY_FACTION); stmt->setUInt32(0, oldReputation); stmt->setUInt32(1, lowGuid); if (PreparedQueryResult result = CharacterDatabase.Query(stmt)) { Field* fields = result->Fetch(); int32 oldDBRep = fields[0].GetInt32(); FactionEntry const* factionEntry = sFactionStore.LookupEntry(oldReputation); // old base reputation int32 oldBaseRep = sObjectMgr->GetBaseReputationOf(factionEntry, oldRace, playerClass); // new base reputation int32 newBaseRep = sObjectMgr->GetBaseReputationOf(sFactionStore.LookupEntry(newReputation), factionChangeInfo.Race, playerClass); // final reputation shouldnt change int32 FinalRep = oldDBRep + oldBaseRep; int32 newDBRep = FinalRep - newBaseRep; stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_CHAR_REP_BY_FACTION); stmt->setUInt32(0, newReputation); stmt->setUInt32(1, lowGuid); trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_REP_FACTION_CHANGE); stmt->setUInt16(0, uint16(newReputation)); stmt->setInt32(1, newDBRep); stmt->setUInt16(2, uint16(oldReputation)); stmt->setUInt32(3, lowGuid); trans->Append(stmt); } } // Title conversion if (!knownTitlesStr.empty()) { const uint32 ktcount = KNOWN_TITLES_SIZE * 2; uint32 knownTitles[ktcount]; Tokenizer tokens(knownTitlesStr, ' ', ktcount); if (tokens.size() != ktcount) { SendCharFactionChange(CHAR_CREATE_ERROR, factionChangeInfo); return; } for (uint32 index = 0; index < ktcount; ++index) knownTitles[index] = atoul(tokens[index]); for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->FactionChangeTitles.begin(); it != sObjectMgr->FactionChangeTitles.end(); ++it) { uint32 title_alliance = it->first; uint32 title_horde = it->second; CharTitlesEntry const* atitleInfo = sCharTitlesStore.LookupEntry(title_alliance); CharTitlesEntry const* htitleInfo = sCharTitlesStore.LookupEntry(title_horde); // new team if (team == TEAM_ALLIANCE) { uint32 bitIndex = htitleInfo->bit_index; uint32 index = bitIndex / 32; uint32 old_flag = 1 << (bitIndex % 32); uint32 new_flag = 1 << (atitleInfo->bit_index % 32); if (knownTitles[index] & old_flag) { knownTitles[index] &= ~old_flag; // use index of the new title knownTitles[atitleInfo->bit_index / 32] |= new_flag; } } else { uint32 bitIndex = atitleInfo->bit_index; uint32 index = bitIndex / 32; uint32 old_flag = 1 << (bitIndex % 32); uint32 new_flag = 1 << (htitleInfo->bit_index % 32); if (knownTitles[index] & old_flag) { knownTitles[index] &= ~old_flag; // use index of the new title knownTitles[htitleInfo->bit_index / 32] |= new_flag; } } std::ostringstream ss; for (uint32 index = 0; index < ktcount; ++index) ss << knownTitles[index] << ' '; stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TITLES_FACTION_CHANGE); stmt->setString(0, ss.str().c_str()); stmt->setUInt32(1, lowGuid); trans->Append(stmt); // unset any currently chosen title stmt = CharacterDatabase.GetPreparedStatement(CHAR_RES_CHAR_TITLES_FACTION_CHANGE); stmt->setUInt32(0, lowGuid); trans->Append(stmt); } } } } CharacterDatabase.CommitTransaction(trans); TC_LOG_DEBUG("entities.player", "%s (IP: %s) changed race from %u to %u", GetPlayerInfo().c_str(), GetRemoteAddress().c_str(), oldRace, factionChangeInfo.Race); SendCharFactionChange(RESPONSE_SUCCESS, factionChangeInfo); } void WorldSession::SendCharCreate(ResponseCodes result) { WorldPacket data(SMSG_CHAR_CREATE, 1); data << uint8(result); SendPacket(&data); } void WorldSession::SendCharDelete(ResponseCodes result) { WorldPacket data(SMSG_CHAR_DELETE, 1); data << uint8(result); SendPacket(&data); } void WorldSession::SendCharRename(ResponseCodes result, CharacterRenameInfo const& renameInfo) { WorldPacket data(SMSG_CHAR_RENAME, 1 + 8 + renameInfo.Name.size() + 1); data << uint8(result); if (result == RESPONSE_SUCCESS) { data << renameInfo.Guid; data << renameInfo.Name; } SendPacket(&data); } void WorldSession::SendCharCustomize(ResponseCodes result, CharacterCustomizeInfo const& customizeInfo) { WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1 + 8 + customizeInfo.Name.size() + 1 + 6); data << uint8(result); if (result == RESPONSE_SUCCESS) { data << customizeInfo.Guid; data << customizeInfo.Name; data << uint8(customizeInfo.Gender); data << uint8(customizeInfo.Skin); data << uint8(customizeInfo.Face); data << uint8(customizeInfo.HairStyle); data << uint8(customizeInfo.HairColor); data << uint8(customizeInfo.FacialHair); } SendPacket(&data); } void WorldSession::SendCharFactionChange(ResponseCodes result, CharacterFactionChangeInfo const& factionChangeInfo) { WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1 + 8 + factionChangeInfo.Name.size() + 1 + 7); data << uint8(result); if (result == RESPONSE_SUCCESS) { data << factionChangeInfo.Guid; data << factionChangeInfo.Name; data << uint8(factionChangeInfo.Gender); data << uint8(factionChangeInfo.Skin); data << uint8(factionChangeInfo.Face); data << uint8(factionChangeInfo.HairStyle); data << uint8(factionChangeInfo.HairColor); data << uint8(factionChangeInfo.FacialHair); data << uint8(factionChangeInfo.Race); } SendPacket(&data); } void WorldSession::SendSetPlayerDeclinedNamesResult(DeclinedNameResult result, ObjectGuid guid) { WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4 + 8); data << uint32(result); data << guid; SendPacket(&data); } void WorldSession::SendBarberShopResult(BarberShopResult result) { WorldPacket data(SMSG_BARBER_SHOP_RESULT, 4); data << uint32(result); SendPacket(&data); }
Rastrian/ElunaTrinityWotlk
src/server/game/Handlers/CharacterHandler.cpp
C++
gpl-2.0
80,672
36.158913
241
0.610013
false
# time-of-flight
richard-doyle/time-of-flight
README.md
Markdown
gpl-2.0
17
16
16
0.705882
false
#pragma once /* * Copyright (C) 2012 Team XBMC * http://www.xbmc.org * * 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, 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 XBMC; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * http://www.gnu.org/copyleft/gpl.html * */ #include "FileItem.h" #include "PVRChannelGroup.h" #include "threads/CriticalSection.h" namespace PVR { /** A container class for channel groups */ class CPVRChannelGroups { public: /*! * @brief Create a new group container. * @param bRadio True if this is a container for radio channels, false if it is for tv channels. */ CPVRChannelGroups(bool bRadio); virtual ~CPVRChannelGroups(void); /*! * @brief Remove all channels from this group. */ void Clear(void); /*! * @brief Load this container's contents from the database or PVR clients. * @return True if it was loaded successfully, false if not. */ bool Load(void); /*! * @return Amount of groups in this container */ int Size(void) const { CSingleLock lock(m_critSection); return m_groups.size(); } /*! * @brief Update a group or add it if it's not in here yet. * @param group The group to update. * @param bSaveInDb True to save the changes in the db. * @return True if the group was added or update successfully, false otherwise. */ bool Update(const CPVRChannelGroup &group, bool bSaveInDb = false); /*! * @brief Called by the add-on callback to add a new group * @param group The group to add * @return True when updated, false otherwise */ bool UpdateFromClient(const CPVRChannelGroup &group) { return Update(group, false); } /*! * @brief Get a channel given it's path * @param strPath The path to the channel * @return The channel, or an empty fileitem when not found */ CFileItemPtr GetByPath(const CStdString &strPath) const; /*! * @brief Get a pointer to a channel group given it's ID. * @param iGroupId The ID of the group. * @return The group or NULL if it wasn't found. */ CPVRChannelGroupPtr GetById(int iGroupId) const; /*! * @brief Get a group given it's name. * @param strName The name. * @return The group or NULL if it wan't found. */ CPVRChannelGroupPtr GetByName(const CStdString &strName) const; /*! * @brief Get the group that contains all channels. * @return The group that contains all channels. */ CPVRChannelGroupPtr GetGroupAll(void) const; /*! * @brief Get the list of groups. * @param results The file list to store the results in. * @return The amount of items that were added. */ int GetGroupList(CFileItemList* results) const; /*! * @brief Get the previous group in this container. * @param group The current group. * @return The previous group or the group containing all channels if it wasn't found. */ CPVRChannelGroupPtr GetPreviousGroup(const CPVRChannelGroup &group) const; /*! * @brief Get the next group in this container. * @param group The current group. * @return The next group or the group containing all channels if it wasn't found. */ CPVRChannelGroupPtr GetNextGroup(const CPVRChannelGroup &group) const; /*! * @brief Get the group that is currently selected in the UI. * @return The selected group. */ CPVRChannelGroupPtr GetSelectedGroup(void) const; /*! * @brief Change the selected group. * @param group The group to select. */ void SetSelectedGroup(CPVRChannelGroupPtr group); /*! * @brief Add a group to this container. * @param strName The name of the group. * @return True if the group was added, false otherwise. */ bool AddGroup(const CStdString &strName); /*! * @brief Delete a group in this container. * @param group The group to delete. * @return True if it was deleted successfully, false if not. */ bool DeleteGroup(const CPVRChannelGroup &group); /*! * @brief Remove a channel from all non-system groups. * @param channel The channel to remove. */ void RemoveFromAllGroups(const CPVRChannel &channel); /*! * @brief Persist all changes in channel groups. * @return True if everything was persisted, false otherwise. */ bool PersistAll(void); /*! * @return True when this container contains radio groups, false otherwise */ bool IsRadio(void) const { return m_bRadio; } /*! * @brief Call by a guiwindow/dialog to add the groups to a control * @param iWindowId The window to add the groups to. * @param iControlId The control to add the groups to */ void FillGroupsGUI(int iWindowId, int iControlId) const; /*! * @brief Update the contents of the groups in this container. * @param bChannelsOnly Set to true to only update channels, not the groups themselves. * @return True if the update was successful, false otherwise. */ bool Update(bool bChannelsOnly = false); private: bool UpdateGroupsEntries(const CPVRChannelGroups &groups); bool LoadUserDefinedChannelGroups(void); bool GetGroupsFromClients(void); bool m_bRadio; /*!< true if this is a container for radio channels, false if it is for tv channels */ CPVRChannelGroupPtr m_selectedGroup; /*!< the group that's currently selected in the UI */ std::vector<CPVRChannelGroupPtr> m_groups; /*!< the groups in this container */ CCriticalSection m_critSection; }; }
herrnst/xbmc-opdenkamp
xbmc/pvr/channels/PVRChannelGroups.h
C
gpl-2.0
6,251
32.25
141
0.661974
false
/* * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * 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, see <http://www.gnu.org/licenses/>. */ #include "Log.h" #include "ObjectAccessor.h" #include "CreatureAI.h" #include "ObjectMgr.h" #include "TemporarySummon.h" TempSummon::TempSummon(SummonPropertiesEntry const *properties, Unit *owner) : Creature(), m_Properties(properties), m_type(TEMPSUMMON_MANUAL_DESPAWN), m_timer(0), m_lifetime(0) { m_summonerGUID = owner ? owner->GetGUID() : 0; m_unitTypeMask |= UNIT_MASK_SUMMON; } Unit* TempSummon::GetSummoner() const { return m_summonerGUID ? ObjectAccessor::GetUnit(*this, m_summonerGUID) : NULL; } void TempSummon::Update(uint32 diff) { Creature::Update(diff); if (m_deathState == DEAD) { UnSummon(); return; } switch(m_type) { case TEMPSUMMON_MANUAL_DESPAWN: break; case TEMPSUMMON_TIMED_DESPAWN: { if (m_timer <= diff) { UnSummon(); return; } m_timer -= diff; break; } case TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT: { if (!isInCombat()) { if (m_timer <= diff) { UnSummon(); return; } m_timer -= diff; } else if (m_timer != m_lifetime) m_timer = m_lifetime; break; } case TEMPSUMMON_CORPSE_TIMED_DESPAWN: { if (m_deathState == CORPSE) { if (m_timer <= diff) { UnSummon(); return; } m_timer -= diff; } break; } case TEMPSUMMON_CORPSE_DESPAWN: { // if m_deathState is DEAD, CORPSE was skipped if (m_deathState == CORPSE || m_deathState == DEAD) { UnSummon(); return; } break; } case TEMPSUMMON_DEAD_DESPAWN: { if (m_deathState == DEAD) { UnSummon(); return; } break; } case TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN: { // if m_deathState is DEAD, CORPSE was skipped if (m_deathState == CORPSE || m_deathState == DEAD) { UnSummon(); return; } if (!isInCombat()) { if (m_timer <= diff) { UnSummon(); return; } else m_timer -= diff; } else if (m_timer != m_lifetime) m_timer = m_lifetime; break; } case TEMPSUMMON_TIMED_OR_DEAD_DESPAWN: { // if m_deathState is DEAD, CORPSE was skipped if (m_deathState == DEAD) { UnSummon(); return; } if (!isInCombat() && isAlive()) { if (m_timer <= diff) { UnSummon(); return; } else m_timer -= diff; } else if (m_timer != m_lifetime) m_timer = m_lifetime; break; } default: UnSummon(); sLog->outError("Temporary summoned creature (entry: %u) have unknown type %u of ", GetEntry(), m_type); break; } } void TempSummon::InitStats(uint32 duration) { ASSERT(!isPet()); m_timer = duration; m_lifetime = duration; if (m_type == TEMPSUMMON_MANUAL_DESPAWN) m_type = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; Unit *owner = GetSummoner(); if (owner && isTrigger() && m_spells[0]) { setFaction(owner->getFaction()); SetLevel(owner->getLevel()); if (owner->GetTypeId() == TYPEID_PLAYER) m_ControlledByPlayer = true; } if (!m_Properties) return; if (owner) { if (uint32 slot = m_Properties->Slot) { if (owner->m_SummonSlot[slot] && owner->m_SummonSlot[slot] != GetGUID()) { Creature *oldSummon = GetMap()->GetCreature(owner->m_SummonSlot[slot]); if (oldSummon && oldSummon->isSummon()) oldSummon->ToTempSummon()->UnSummon(); } owner->m_SummonSlot[slot] = GetGUID(); } } if (m_Properties->Faction) setFaction(m_Properties->Faction); else if (IsVehicle()) // properties should be vehicle setFaction(owner->getFaction()); } void TempSummon::InitSummon() { Unit* owner = GetSummoner(); if (owner) { if (owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->JustSummoned(this); if (IsAIEnabled) AI()->IsSummonedBy(owner); } } void TempSummon::SetTempSummonType(TempSummonType type) { m_type = type; } void TempSummon::UnSummon(uint32 msTime) { if (msTime) { ForcedUnsummonDelayEvent *pEvent = new ForcedUnsummonDelayEvent(*this); m_Events.AddEvent(pEvent, m_Events.CalculateTime(msTime)); return; } //ASSERT(!isPet()); if (isPet()) { ((Pet*)this)->Remove(PET_SAVE_NOT_IN_SLOT); ASSERT(!IsInWorld()); return; } Unit* owner = GetSummoner(); if (owner && owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->IsAIEnabled) owner->ToCreature()->AI()->SummonedCreatureDespawn(this); if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Player*)owner)->HaveBot() && ((Player*)owner)->GetBot()->GetGUID()==this->GetGUID() && this->isDead()) { // dont unsummon corpse if a bot return; } AddObjectToRemoveList(); } bool ForcedUnsummonDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/) { m_owner.UnSummon(); return true; } void TempSummon::RemoveFromWorld() { if (!IsInWorld()) return; if (m_Properties) if (uint32 slot = m_Properties->Slot) if (Unit* owner = GetSummoner()) if (owner->m_SummonSlot[slot] == GetGUID()) owner->m_SummonSlot[slot] = 0; //if (GetOwnerGUID()) // sLog->outError("Unit %u has owner guid when removed from world", GetEntry()); Creature::RemoveFromWorld(); } Minion::Minion(SummonPropertiesEntry const *properties, Unit *owner) : TempSummon(properties, owner) , m_owner(owner) { ASSERT(m_owner); m_unitTypeMask |= UNIT_MASK_MINION; m_followAngle = PET_FOLLOW_ANGLE; } void Minion::InitStats(uint32 duration) { TempSummon::InitStats(duration); SetReactState(REACT_PASSIVE); SetCreatorGUID(m_owner->GetGUID()); setFaction(m_owner->getFaction()); m_owner->SetMinion(this, true); } void Minion::RemoveFromWorld() { if (!IsInWorld()) return; m_owner->SetMinion(this, false); TempSummon::RemoveFromWorld(); } bool Minion::IsGuardianPet() const { return isPet() || (m_Properties && m_Properties->Category == SUMMON_CATEGORY_PET); } Guardian::Guardian(SummonPropertiesEntry const *properties, Unit *owner) : Minion(properties, owner) , m_bonusSpellDamage(0) { memset(m_statFromOwner, 0, sizeof(float)*MAX_STATS); m_unitTypeMask |= UNIT_MASK_GUARDIAN; if (properties && properties->Type == SUMMON_TYPE_PET) { m_unitTypeMask |= UNIT_MASK_CONTROLABLE_GUARDIAN; InitCharmInfo(); } } void Guardian::InitStats(uint32 duration) { Minion::InitStats(duration); InitStatsForLevel(m_owner->getLevel()); if (m_owner->GetTypeId() == TYPEID_PLAYER && HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN)) m_charmInfo->InitCharmCreateSpells(); SetReactState(REACT_AGGRESSIVE); } void Guardian::InitSummon() { TempSummon::InitSummon(); if (m_owner->GetTypeId() == TYPEID_PLAYER && m_owner->GetMinionGUID() == GetGUID() && !m_owner->GetCharmGUID()) m_owner->ToPlayer()->CharmSpellInitialize(); } Puppet::Puppet(SummonPropertiesEntry const *properties, Unit *owner) : Minion(properties, owner) { ASSERT(owner->GetTypeId() == TYPEID_PLAYER); m_owner = (Player*)owner; m_unitTypeMask |= UNIT_MASK_PUPPET; } void Puppet::InitStats(uint32 duration) { Minion::InitStats(duration); SetLevel(m_owner->getLevel()); SetReactState(REACT_PASSIVE); } void Puppet::InitSummon() { Minion::InitSummon(); if (!SetCharmedBy(m_owner, CHARM_TYPE_POSSESS)) ASSERT(false); } void Puppet::Update(uint32 time) { Minion::Update(time); //check if caster is channelling? if (IsInWorld()) { if (!isAlive()) { UnSummon(); // TODO: why long distance .die does not remove it } } } void Puppet::RemoveFromWorld() { if (!IsInWorld()) return; RemoveCharmedBy(NULL); Minion::RemoveFromWorld(); }
sucofog/chaoscore
src/server/game/Entities/Creature/TemporarySummon.cpp
C++
gpl-2.0
9,947
24.310433
115
0.545994
false
CREATE TABLE `wp_term_taxonomy` ( `term_taxonomy_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `term_id` bigint(20) unsigned NOT NULL DEFAULT '0', `taxonomy` varchar(32) NOT NULL DEFAULT '', `description` longtext NOT NULL, `parent` bigint(20) unsigned NOT NULL DEFAULT '0', `count` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`term_taxonomy_id`), UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`), KEY `taxonomy` (`taxonomy`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
the-wilhelm/chicagostorage
dbv/data/schema/wp_term_taxonomy.sql
SQL
gpl-2.0
489
43.545455
65
0.703476
false