code stringlengths 4 1.01M | language stringclasses 2 values |
|---|---|
public class ValueGenerator {
}
| Java |
package remasterkit;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import javax.swing.border.TitledBorder;
import javax.swing.border.LineBorder;
import java.awt.Color;
import java.awt.Toolkit;
import javax.swing.JButton;
import java.awt.Font;
import javax.swing.JCheckBox;
import com.jtattoo.plaf.graphite.GraphiteLookAndFeel;
import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JTextField;
public class Menu_Utama extends JFrame {
private JPanel contentPane;
private JTextField txtName;
private JTextField txtURL;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
UIManager.setLookAndFeel(new GraphiteLookAndFeel());
Menu_Utama frame = new Menu_Utama();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public Menu_Utama() {
setIconImage(Toolkit.getDefaultToolkit().getImage("/home/newbieilmu/workspace/app.remasterkit/src/icon/logo.png"));
setTitle("RemasterKit(Custom Linuxmu Sesuka Hati)");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 589, 357);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JPanel panelRKit = new JPanel();
panelRKit.setBorder(new TitledBorder(null, "RemasterKit", TitledBorder.LEADING, TitledBorder.TOP, null, null));
panelRKit.setBounds(146, 12, 421, 163);
contentPane.add(panelRKit);
panelRKit.setLayout(null);
JLabel lblPilihDe = new JLabel("1. Pilih DE ");
lblPilihDe.setBounds(12, 27, 105, 18);
panelRKit.add(lblPilihDe);
JComboBox cmbDE = new JComboBox();
cmbDE.setModel(new DefaultComboBoxModel(new String[] {"LXDE", "MATE", "GNOME", "KDE", "Manokwari"}));
cmbDE.setBounds(110, 24, 89, 24);
panelRKit.add(cmbDE);
JLabel lblUbahSourcelist = new JLabel("2. Source.List");
lblUbahSourcelist.setBounds(12, 57, 105, 18);
panelRKit.add(lblUbahSourcelist);
JLabel lblPilihConsole = new JLabel("3. Console ");
lblPilihConsole.setBounds(12, 87, 105, 18);
panelRKit.add(lblPilihConsole);
JLabel lblInstallDeb = new JLabel("4. Install DEB");
lblInstallDeb.setBounds(12, 117, 105, 18);
panelRKit.add(lblInstallDeb);
JLabel lblPaketList = new JLabel("5. Paket List ");
lblPaketList.setBounds(217, 27, 105, 18);
panelRKit.add(lblPaketList);
JLabel lblSynaptic = new JLabel("6. Synaptic ");
lblSynaptic.setBounds(217, 58, 105, 18);
panelRKit.add(lblSynaptic);
JLabel lblDesktop = new JLabel("7. Desktop");
lblDesktop.setBounds(217, 88, 105, 18);
panelRKit.add(lblDesktop);
JLabel lblUbiquity = new JLabel("8. Ubiquity");
lblUbiquity.setBounds(217, 120, 105, 18);
panelRKit.add(lblUbiquity);
JButton btnSource = new JButton("Source.list");
btnSource.setEnabled(false);
btnSource.setBounds(110, 54, 86, 24);
panelRKit.add(btnSource);
JButton btnConsole = new JButton("Console");
btnConsole.setEnabled(false);
btnConsole.setBounds(110, 84, 86, 24);
panelRKit.add(btnConsole);
JButton btnDeb = new JButton("DEB");
btnDeb.setEnabled(false);
btnDeb.setBounds(110, 114, 86, 24);
panelRKit.add(btnDeb);
JButton btnPaketList = new JButton("Paket list");
btnPaketList.setEnabled(false);
btnPaketList.setBounds(309, 24, 86, 24);
panelRKit.add(btnPaketList);
JButton btnSynaptic = new JButton("Synaptic");
btnSynaptic.setEnabled(false);
btnSynaptic.setBounds(309, 55, 86, 24);
panelRKit.add(btnSynaptic);
JButton btnDekstop = new JButton("Dekstop");
btnDekstop.setEnabled(false);
btnDekstop.setBounds(309, 87, 86, 24);
panelRKit.add(btnDekstop);
JButton btnUbiquity = new JButton("Ubiquity");
btnUbiquity.setEnabled(false);
btnUbiquity.setBounds(309, 117, 86, 24);
panelRKit.add(btnUbiquity);
JButton btnAbout = new JButton("Tentang");
btnAbout.setBounds(299, 280, 86, 31);
contentPane.add(btnAbout);
JButton btnCredits = new JButton("Kredits");
btnCredits.setBounds(389, 280, 86, 31);
contentPane.add(btnCredits);
JButton btnLisensi = new JButton("Lisensi");
btnLisensi.setBounds(481, 280, 86, 31);
contentPane.add(btnLisensi);
JLabel lblIcon1 = new JLabel("");
lblIcon1.setIcon(new ImageIcon("/home/newbieilmu/workspace/app.remasterkit/src/icon/1374533657__settings.png"));
lblIcon1.setBounds(12, 12, 55, 67);
contentPane.add(lblIcon1);
JLabel lblicon2 = new JLabel("");
lblicon2.setIcon(new ImageIcon("/home/newbieilmu/workspace/app.remasterkit/src/icon/1374533644_Import.png"));
lblicon2.setBounds(12, 72, 55, 67);
contentPane.add(lblicon2);
JLabel lblicon3 = new JLabel("");
lblicon3.setIcon(new ImageIcon("/home/newbieilmu/workspace/app.remasterkit/src/icon/1374533631_Export.png"));
lblicon3.setBounds(12, 137, 55, 67);
contentPane.add(lblicon3);
JLabel lblicon4 = new JLabel("");
lblicon4.setIcon(new ImageIcon("/home/newbieilmu/workspace/app.remasterkit/src/icon/1374534090_118.png"));
lblicon4.setBounds(12, 202, 55, 67);
contentPane.add(lblicon4);
JLabel lblKonfigurasi = new JLabel("Konfigurasi");
lblKonfigurasi.setFont(new Font("Dialog", Font.BOLD, 13));
lblKonfigurasi.setBounds(67, 35, 86, 18);
contentPane.add(lblKonfigurasi);
JLabel lblImport = new JLabel("Import");
lblImport.setFont(new Font("Dialog", Font.BOLD, 13));
lblImport.setBounds(67, 91, 86, 18);
contentPane.add(lblImport);
JLabel lblEksport = new JLabel("Eksport");
lblEksport.setFont(new Font("Dialog", Font.BOLD, 13));
lblEksport.setBounds(67, 151, 86, 18);
contentPane.add(lblEksport);
JLabel lblBuild = new JLabel("Build");
lblBuild.setFont(new Font("Dialog", Font.BOLD, 13));
lblBuild.setBounds(67, 216, 86, 18);
contentPane.add(lblBuild);
JPanel panelSetting = new JPanel();
panelSetting.setBorder(new TitledBorder(null, "Setting ", TitledBorder.LEADING, TitledBorder.TOP, null, null));
panelSetting.setBounds(146, 181, 421, 88);
contentPane.add(panelSetting);
panelSetting.setLayout(null);
JLabel lblNamaLinuxmu = new JLabel("Nama Linuxmu :");
lblNamaLinuxmu.setBounds(12, 24, 92, 18);
panelSetting.add(lblNamaLinuxmu);
txtName = new JTextField();
txtName.setColumns(10);
txtName.setBounds(122, 22, 179, 22);
panelSetting.add(txtName);
JLabel lblUrl = new JLabel("URL :");
lblUrl.setBounds(12, 54, 92, 18);
panelSetting.add(lblUrl);
txtURL = new JTextField();
txtURL.setColumns(10);
txtURL.setBounds(122, 52, 179, 22);
panelSetting.add(txtURL);
JButton btnDonasi = new JButton("Donasi");
btnDonasi.setBounds(207, 280, 86, 31);
contentPane.add(btnDonasi);
}
}
| Java |
/*
* Copyright (c) 2002-2003, Intel Corporation. All rights reserved.
* Created by: rusty.lynch REMOVE-THIS AT intel DOT com
* This file is licensed under the GPL license. For the full content
* of this license, see the COPYING file at the top level of this
* source tree.
Test case for assertion #4 of the sigaction system call that shows
that attempting to add SIGSTOP to the signal mask of SIGSEGV will
not result in sigaction returning -1
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
#include "posixtest.h"
void handler(int signo)
{
}
int main()
{
struct sigaction act;
act.sa_handler = handler;
act.sa_flags = 0;
sigemptyset(&act.sa_mask);
sigaddset(&act.sa_mask, SIGSTOP);
if (sigaction(SIGSEGV, &act, 0) == -1) {
printf("Test FAILED\n");
return PTS_FAIL;
}
printf("Test PASSED\n");
return PTS_PASS;
}
| Java |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016-2017 University of Dundee & Open Microscopy Environment.
# All Rights Reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
import requests
from Parse_OMERO_Properties import USERNAME, PASSWORD, OMERO_WEB_HOST, \
SERVER_NAME
session = requests.Session()
# Start by getting supported versions from the base url...
api_url = '%s/api/' % OMERO_WEB_HOST
print "Starting at:", api_url
r = session.get(api_url)
# we get a list of versions
versions = r.json()['data']
# use most recent version...
version = versions[-1]
# get the 'base' url
base_url = version['url:base']
r = session.get(base_url)
# which lists a bunch of urls as starting points
urls = r.json()
servers_url = urls['url:servers']
login_url = urls['url:login']
projects_url = urls['url:projects']
save_url = urls['url:save']
schema_url = urls['url:schema']
# To login we need to get CSRF token
token_url = urls['url:token']
token = session.get(token_url).json()['data']
print 'CSRF token', token
# We add this to our session header
# Needed for all POST, PUT, DELETE requests
session.headers.update({'X-CSRFToken': token,
'Referer': login_url})
# List the servers available to connect to
servers = session.get(servers_url).json()['data']
print 'Servers:'
for s in servers:
print '-id:', s['id']
print ' name:', s['server']
print ' host:', s['host']
print ' port:', s['port']
# find one called SERVER_NAME
servers = [s for s in servers if s['server'] == SERVER_NAME]
if len(servers) < 1:
raise Exception("Found no server called '%s'" % SERVER_NAME)
server = servers[0]
# Login with username, password and token
payload = {'username': USERNAME,
'password': PASSWORD,
# 'csrfmiddlewaretoken': token, # Using CSRFToken in header instead
'server': server['id']}
r = session.post(login_url, data=payload)
login_rsp = r.json()
assert r.status_code == 200
assert login_rsp['success']
eventContext = login_rsp['eventContext']
print 'eventContext', eventContext
# Can get our 'default' group
groupId = eventContext['groupId']
# With successful login, request.session will contain
# OMERO session details and reconnect to OMERO on
# each subsequent call...
# List projects:
# Limit number of projects per page
payload = {'limit': 2}
data = session.get(projects_url, params=payload).json()
assert len(data['data']) < 3
print "Projects:"
for p in data['data']:
print ' ', p['@id'], p['Name']
# Create a project:
projType = schema_url + '#Project'
# Need to specify target group
url = save_url + '?group=' + str(groupId)
r = session.post(url, json={'Name': 'API TEST foo', '@type': projType})
assert r.status_code == 201
project = r.json()['data']
project_id = project['@id']
print 'Created Project:', project_id, project['Name']
# Get project by ID
project_url = projects_url + str(project_id) + '/'
r = session.get(project_url)
project = r.json()
print project
# Update a project
project['Name'] = 'API test updated'
r = session.put(save_url, json=project)
# Delete a project:
r = session.delete(project_url)
| Java |
CREATE FUNCTION [dbo].[GetContributionsDetails]
(
@fd DATETIME,
@td DATETIME,
@campusid INT,
@pledges BIT,
@nontaxded BIT,
@includeUnclosed BIT,
@tagid INT,
@fundids VARCHAR(MAX)
)
RETURNS TABLE
AS
RETURN
(
SELECT
p.FamilyId,
p.PeopleId,
c.ContributionDate AS Date,
CASE WHEN fa.HeadOfHouseholdId = sp.PeopleId
AND ISNULL(sp.ContributionOptionsId, CASE WHEN sp.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 2
AND ISNULL(p.ContributionOptionsId, CASE WHEN p.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 2
THEN sp.PeopleId
ELSE c.PeopleId
END AS CreditGiverId,
CASE WHEN ISNULL(sp.ContributionOptionsId, CASE WHEN sp.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 1
OR ISNULL(p.ContributionOptionsId, CASE WHEN p.MaritalStatusId = 20 THEN 2 ELSE 1 END) = 1
THEN NULL
WHEN fa.HeadOfHouseholdId = sp.PeopleId
THEN c.PeopleId
ELSE sp.PeopleId
END AS CreditGiverId2,
CASE WHEN fa.HeadOfHouseholdId = sp.PeopleId
THEN p.PeopleId
ELSE sp.PeopleId
END AS SpouseId,
CASE WHEN fa.HeadOfHouseholdId = sp.PeopleId
THEN sp.Name2
ELSE p.Name2
END AS HeadName,
CASE WHEN fa.HeadOfHouseholdId = sp.PeopleId
THEN p.Name2
ELSE sp.Name2
END AS SpouseName,
CASE WHEN ContributionTypeId <> 8
THEN ContributionAmount
ELSE 0
END AS Amount,
CASE WHEN ContributionTypeId = 8
THEN ContributionAmount
ELSE 0
END AS PledgeAmount,
h.BundleHeaderId,
c.ContributionDesc,
c.CheckNo,
c.FundId,
f.FundName,
CASE WHEN f.FundPledgeFlag = 1 AND f.FundStatusId = 1
THEN 1
ELSE 0
END AS OpenPledgeFund,
bht.Description AS BundleType,
bst.Description AS BundleStatus,
c.ContributionId
from dbo.ContributionSearch(null, null, null, null, @fd, @td, @campusid, null, null, 0,
case when @nontaxded = 1 then 'NonTaxDed' when @nontaxded = 0 then 'TaxDed' else 'Both' end,
null, null, null, @includeUnclosed, null, null, @tagid, @fundids) cs
join dbo.Contribution c on c.ContributionId = cs.ContributionId
JOIN dbo.ContributionFund f ON c.FundId = f.FundId
LEFT JOIN dbo.BundleDetail d ON c.ContributionId = d.ContributionId
LEFT JOIN dbo.BundleHeader h ON d.BundleHeaderId = h.BundleHeaderId
LEFT JOIN lookup.BundleHeaderTypes bht ON h.BundleHeaderTypeId = bht.Id
LEFT JOIN lookup.BundleStatusTypes bst ON h.BundleStatusId = bst.Id
LEFT JOIN dbo.People p ON c.PeopleId = p.PeopleId
LEFT JOIN dbo.Families fa ON p.FamilyId = fa.FamilyId
LEFT JOIN dbo.People sp ON sp.PeopleId = p.SpouseId
WHERE c.ContributionTypeId <> 8 -- NO PLEDGES
)
GO
IF @@ERROR <> 0 SET NOEXEC ON
GO
| Java |
package com.algebraweb.editor.client;
import com.google.gwt.user.client.ui.Button;
/**
* A button for the control panel. Will be styled accordingly.
*
* @author Patrick Brosi
*
*/
public class ControlPanelButton extends Button {
public ControlPanelButton(String desc) {
super();
this.addStyleName("controllpanel-button");
super.getElement().setAttribute("title", desc);
this.setWidth("39px");
this.setHeight("39px");
}
public ControlPanelButton(String desc, String styleClass) {
this(desc);
this.addStyleName("controllbutton-" + styleClass);
}
}
| Java |
<?php
/**
* Intreface DAO
*
* @author: http://phpdao.com
* @date: 2013-11-06 23:13
*/
interface AccesoDAO{
/**
* Get Domain object by primry key
*
* @param String $id primary key
* @Return Acceso
*/
public function load($id);
/**
* Get all records from table
*/
public function queryAll();
/**
* Get all records from table ordered by field
* @Param $orderColumn column name
*/
public function queryAllOrderBy($orderColumn);
/**
* Delete record from table
* @param acceso primary key
*/
public function delete($usuario);
/**
* Insert record to table
*
* @param Acceso acceso
*/
public function insert($acceso);
/**
* Update record in table
*
* @param Acceso acceso
*/
public function update($acceso);
/**
* Delete all rows
*/
public function clean();
public function queryByContrasenia($value);
public function queryByRol($value);
public function deleteByContrasenia($value);
public function deleteByRol($value);
}
?> | Java |
#python imports
import sys
import os
import time
import datetime
import subprocess
import json
import requests
from termcolor import colored
#third-party imports
#No third-party imports
#programmer generated imports
from logger import logger
from fileio import fileio
'''
***BEGIN DESCRIPTION***
Type: Search - Description: Searches for any available data on a target against the Abuse.ch Malware Bazaar database.
***END DESCRIPTION***
'''
def POE(POE):
if (POE.logging == True):
LOG = logger()
newlogentry = ''
reputation_dump = ''
reputation_output_data = ''
malwarebazaar = ''
if (POE.logging == True):
newlogentry = 'Module: malware_bazaar_search'
LOG.WriteStrongLog(POE.logdir, POE.targetfilename, newlogentry)
if (POE.SHA256 == ''):
print (colored('\r\n[x] Unable to execute Malware Bazaar Search - hash value must be SHA256.', 'red', attrs=['bold']))
newlogentry = 'Unable to execute Malware Bazaar Search - hash value must be SHA256'
LOG.WriteStrongSubLog(POE.logdir, POE.targetfilename, newlogentry)
return -1
global json
query_status = ''
first_seen = ''
last_seen = ''
signature = ''
sig_count = 0
output = POE.logdir + 'MalwareBazaarSearch.json'
FI = fileio()
print (colored('\r\n[*] Running abuse.ch Malware Bazaar Search against: ' + POE.target, 'white', attrs=['bold']))
malwarebazaar = "https://mb-api.abuse.ch/api/v1/" #API URL
data = { #Our header params
'query': 'get_info',
'hash': POE.SHA256,
}
response_dump = requests.post(malwarebazaar, data=data, timeout=15) # Give us the results as JSON
if (POE.debug == True):
print (response_dump)
try:
FI.WriteLogFile(output, response_dump.content.decode("utf-8", "ignore"))
print (colored('[*] Malware Bazaar data had been written to file here: ', 'green') + colored(output, 'blue', attrs=['bold']))
if ((POE.logging == True) and (POE.nolinksummary == False)):
newlogentry = 'Malware Bazaar data has been generated to file here: <a href=\"' + output + '\"> Malware Bazaar Host Output </a>'
LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry)
except:
print (colored('[x] Unable to write Malware Bazaar data to file', 'red', attrs=['bold']))
if (POE.logging == True):
newlogentry = 'Unable to write Malware Bazaar data to file'
LOG.WriteStrongSubLog(POE.logdir, POE.targetfilename, newlogentry)
POE.csv_line += 'N/A,'
return -1
try:
#Open the file we just downloaded
print ('[-] Reading Malware Bazaar file: ' + output.strip())
with open(output.strip(), 'rb') as read_file:
data = json.load(read_file, cls=None)
read_file.close()
# Check what kind of results we have
query_status = data["query_status"]
print ('[*] query_status: ' + query_status)
if (query_status == 'ok'):
with open(output.strip(), 'r') as read_file:
for string in read_file:
if (POE.debug == True):
print ('[DEBUG] string: ' + string.strip())
if ('first_seen' in string):
first_seen = string.strip()
if ('last_seen' in string):
last_seen = string.strip()
if (('signature' in string) and (sig_count == 0)):
signature = string.strip()
sig_count += 1
print ('[*] Sample ' + first_seen.replace(',',''))
print ('[*] Sample ' + last_seen.replace(',',''))
print ('[*] Sample ' + signature.replace(',',''))
if (POE.logging == True):
newlogentry = 'Sample ' + first_seen.replace(',','')
LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry)
newlogentry = 'Sample ' + last_seen.replace(',','')
LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry)
newlogentry = 'Sample ' + signature.replace(',','')
LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry)
#Can't find anything on this one...
elif (query_status == 'hash_not_found'):
print (colored('[-] The hash value has not been found...', 'yellow', attrs=['bold']))
if (POE.logging == True):
newlogentry = 'No results available for host...'
LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry)
#Can't find anything on this one...
elif (query_status == 'no_results'):
print (colored('[-] No results available for host...', 'yellow', attrs=['bold']))
if (POE.logging == True):
newlogentry = 'No results available for host...'
LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry)
#Something weird happened...
else:
print (colored('[x] An error has occurred...', 'red', attrs=['bold']))
if (POE.logging == True):
newlogentry = 'An error has occurred...'
LOG.WriteSubLog(POE.logdir, POE.targetfilename, newlogentry)
except Exception as e:
print (colored('[x] Error: ' + str(e) + ' Terminating...', 'red', attrs=['bold']))
read_file.close()
return -1
#Clean up before returning
read_file.close()
return 0
| Java |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>网页定位导航效果</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
font-size: 12px;
line-height: 1.7;
}
li {
list-style: none;
}
#content {
width: 800px;
margin: 0 auto;
padding: 20px;
}
#content h1 {
color: #0088bb;
}
#content .item {
padding: 20px;
margin-bottom: 20px;
border: 1px dotted #0088bb;
}
#content .item h2 {
font-size: 16px;
font-weight: bold;
border-bottom: 2px solid #0088bb;
margin-bottom: 10px;
}
#content .item li {
display: inline;
margin-right: 10px;
}
#content .item li a img {
width: 230px;
height: 230px;
border: none;
}
#menu {
position: fixed;
top: 100px;
left: 50%;
margin-left: 400px;
width: 50px;
}
#menu ul li a {
display: block;
margin: 5px 0;
font-size: 14px;
font-weight: bold;
color: #333;
width: 80px;
height: 50px;
line-height: 50px;
text-decoration: none;
text-align: center;
}
#menu ul li a:hover,
#menu ul li a.current {
color: #fff;
background: #0088bb;
}
</style>
</head>
<body>
<div id="menu">
<ul>
<li><a href="#item1" class="current">1F 男装</a></li>
<li><a href="#item2">2F 女装</a></li>
<li><a href="#item3">3F 美妆</a></li>
<li><a href="#item4">4F 数码</a></li>
<li><a href="#item5">5F 母婴</a></li>
</ul>
</div>
<div id="content">
<h1>地狗购物网</h1>
<div id="item1" class="item">
<h2>1F 男装</h2>
<ul>
<li><a href="#"><img src="1F.jpg" alt=""/></a></li>
<li><a href="#"><img src="1F.jpg" alt=""/></a></li>
<li><a href="#"><img src="1F.jpg" alt=""/></a></li>
<li><a href="#"><img src="1F.jpg" alt=""/></a></li>
<li><a href="#"><img src="1F.jpg" alt=""/></a></li>
<li><a href="#"><img src="1F.jpg" alt=""/></a></li>
<li><a href="#"><img src="1F.jpg" alt=""/></a></li>
<li><a href="#"><img src="1F.jpg" alt=""/></a></li>
<li><a href="#"><img src="1F.jpg" alt=""/></a></li>
</ul>
</div>
<div id="item2" class="item">
<h2>2F 女装</h2>
<ul>
<li><a href="#"><img src="2F.jpg" alt=""/></a></li>
<li><a href="#"><img src="2F.jpg" alt=""/></a></li>
<li><a href="#"><img src="2F.jpg" alt=""/></a></li>
<li><a href="#"><img src="2F.jpg" alt=""/></a></li>
<li><a href="#"><img src="2F.jpg" alt=""/></a></li>
<li><a href="#"><img src="2F.jpg" alt=""/></a></li>
<li><a href="#"><img src="2F.jpg" alt=""/></a></li>
<li><a href="#"><img src="2F.jpg" alt=""/></a></li>
<li><a href="#"><img src="2F.jpg" alt=""/></a></li>
</ul>
</div>
<div id="item3" class="item">
<h2>3F 美妆</h2>
<ul>
<li><a href="#"><img src="3F.jpg" alt=""/></a></li>
<li><a href="#"><img src="3F.jpg" alt=""/></a></li>
<li><a href="#"><img src="3F.jpg" alt=""/></a></li>
<li><a href="#"><img src="3F.jpg" alt=""/></a></li>
<li><a href="#"><img src="3F.jpg" alt=""/></a></li>
<li><a href="#"><img src="3F.jpg" alt=""/></a></li>
<li><a href="#"><img src="3F.jpg" alt=""/></a></li>
<li><a href="#"><img src="3F.jpg" alt=""/></a></li>
<li><a href="#"><img src="3F.jpg" alt=""/></a></li>
</ul>
</div>
<div id="item4" class="item">
<h2>4F 数码</h2>
<ul>
<li><a href="#"><img src="4F.png" alt=""/></a></li>
<li><a href="#"><img src="4F.png" alt=""/></a></li>
<li><a href="#"><img src="4F.png" alt=""/></a></li>
<li><a href="#"><img src="4F.png" alt=""/></a></li>
<li><a href="#"><img src="4F.png" alt=""/></a></li>
<li><a href="#"><img src="4F.png" alt=""/></a></li>
<li><a href="#"><img src="4F.png" alt=""/></a></li>
<li><a href="#"><img src="4F.png" alt=""/></a></li>
<li><a href="#"><img src="4F.png" alt=""/></a></li>
</ul>
</div>
<div id="item5" class="item">
<h2>5F 母婴</h2>
<ul>
<li><a href="#"><img src="5F.jpg" alt=""/></a></li>
<li><a href="#"><img src="5F.jpg" alt=""/></a></li>
<li><a href="#"><img src="5F.jpg" alt=""/></a></li>
<li><a href="#"><img src="5F.jpg" alt=""/></a></li>
<li><a href="#"><img src="5F.jpg" alt=""/></a></li>
<li><a href="#"><img src="5F.jpg" alt=""/></a></li>
<li><a href="#"><img src="5F.jpg" alt=""/></a></li>
<li><a href="#"><img src="5F.jpg" alt=""/></a></li>
<li><a href="#"><img src="5F.jpg" alt=""/></a></li>
</ul>
</div>
</div>
</body>
</html>
| Java |
/*
* linux/kernel/exit.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/capability.h>
#include <linux/completion.h>
#include <linux/personality.h>
#include <linux/tty.h>
#include <linux/iocontext.h>
#include <linux/key.h>
#include <linux/security.h>
#include <linux/cpu.h>
#include <linux/acct.h>
#include <linux/tsacct_kern.h>
#include <linux/file.h>
#include <linux/fdtable.h>
#include <linux/freezer.h>
#include <linux/binfmts.h>
#include <linux/nsproxy.h>
#include <linux/pid_namespace.h>
#include <linux/ptrace.h>
#include <linux/profile.h>
#include <linux/mount.h>
#include <linux/proc_fs.h>
#include <linux/kthread.h>
#include <linux/mempolicy.h>
#include <linux/taskstats_kern.h>
#include <linux/delayacct.h>
#include <linux/cgroup.h>
#include <linux/syscalls.h>
#include <linux/signal.h>
#include <linux/posix-timers.h>
#include <linux/cn_proc.h>
#include <linux/mutex.h>
#include <linux/futex.h>
#include <linux/pipe_fs_i.h>
#include <linux/audit.h> /* for audit_free() */
#include <linux/resource.h>
#include <linux/blkdev.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/tracehook.h>
#include <linux/fs_struct.h>
#include <linux/init_task.h>
#include <linux/perf_event.h>
#include <trace/events/sched.h>
#include <linux/hw_breakpoint.h>
#include <linux/oom.h>
#include <linux/writeback.h>
#include <linux/shm.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
#include <litmus/litmus.h>
extern void exit_od_table(struct task_struct *t);
static void exit_mm(struct task_struct * tsk);
static void __unhash_process(struct task_struct *p, bool group_dead)
{
nr_threads--;
detach_pid(p, PIDTYPE_PID);
if (group_dead) {
detach_pid(p, PIDTYPE_PGID);
detach_pid(p, PIDTYPE_SID);
list_del_rcu(&p->tasks);
list_del_init(&p->sibling);
__this_cpu_dec(process_counts);
}
list_del_rcu(&p->thread_group);
}
/*
* This function expects the tasklist_lock write-locked.
*/
static void __exit_signal(struct task_struct *tsk)
{
struct signal_struct *sig = tsk->signal;
bool group_dead = thread_group_leader(tsk);
struct sighand_struct *sighand;
struct tty_struct *uninitialized_var(tty);
cputime_t utime, stime;
sighand = rcu_dereference_check(tsk->sighand,
lockdep_tasklist_lock_is_held());
spin_lock(&sighand->siglock);
posix_cpu_timers_exit(tsk);
if (group_dead) {
posix_cpu_timers_exit_group(tsk);
tty = sig->tty;
sig->tty = NULL;
} else {
/*
* This can only happen if the caller is de_thread().
* FIXME: this is the temporary hack, we should teach
* posix-cpu-timers to handle this case correctly.
*/
if (unlikely(has_group_leader_pid(tsk)))
posix_cpu_timers_exit_group(tsk);
/*
* If there is any task waiting for the group exit
* then notify it:
*/
if (sig->notify_count > 0 && !--sig->notify_count)
wake_up_process(sig->group_exit_task);
if (tsk == sig->curr_target)
sig->curr_target = next_thread(tsk);
/*
* Accumulate here the counters for all threads but the
* group leader as they die, so they can be added into
* the process-wide totals when those are taken.
* The group leader stays around as a zombie as long
* as there are other threads. When it gets reaped,
* the exit.c code will add its counts into these totals.
* We won't ever get here for the group leader, since it
* will have been the last reference on the signal_struct.
*/
task_cputime(tsk, &utime, &stime);
sig->utime += utime;
sig->stime += stime;
sig->gtime += task_gtime(tsk);
sig->min_flt += tsk->min_flt;
sig->maj_flt += tsk->maj_flt;
sig->nvcsw += tsk->nvcsw;
sig->nivcsw += tsk->nivcsw;
sig->inblock += task_io_get_inblock(tsk);
sig->oublock += task_io_get_oublock(tsk);
task_io_accounting_add(&sig->ioac, &tsk->ioac);
sig->sum_sched_runtime += tsk->se.sum_exec_runtime;
}
sig->nr_threads--;
__unhash_process(tsk, group_dead);
/*
* Do this under ->siglock, we can race with another thread
* doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals.
*/
flush_sigqueue(&tsk->pending);
tsk->sighand = NULL;
spin_unlock(&sighand->siglock);
__cleanup_sighand(sighand);
clear_tsk_thread_flag(tsk,TIF_SIGPENDING);
if (group_dead) {
flush_sigqueue(&sig->shared_pending);
tty_kref_put(tty);
}
}
static void delayed_put_task_struct(struct rcu_head *rhp)
{
struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
perf_event_delayed_put(tsk);
trace_sched_process_free(tsk);
put_task_struct(tsk);
}
void release_task(struct task_struct * p)
{
struct task_struct *leader;
int zap_leader;
repeat:
/* don't need to get the RCU readlock here - the process is dead and
* can't be modifying its own credentials. But shut RCU-lockdep up */
rcu_read_lock();
atomic_dec(&__task_cred(p)->user->processes);
rcu_read_unlock();
proc_flush_task(p);
write_lock_irq(&tasklist_lock);
ptrace_release_task(p);
__exit_signal(p);
/*
* If we are the last non-leader member of the thread
* group, and the leader is zombie, then notify the
* group leader's parent process. (if it wants notification.)
*/
zap_leader = 0;
leader = p->group_leader;
if (leader != p && thread_group_empty(leader) && leader->exit_state == EXIT_ZOMBIE) {
/*
* If we were the last child thread and the leader has
* exited already, and the leader's parent ignores SIGCHLD,
* then we are the one who should release the leader.
*/
zap_leader = do_notify_parent(leader, leader->exit_signal);
if (zap_leader)
leader->exit_state = EXIT_DEAD;
}
write_unlock_irq(&tasklist_lock);
release_thread(p);
call_rcu(&p->rcu, delayed_put_task_struct);
p = leader;
if (unlikely(zap_leader))
goto repeat;
}
/*
* This checks not only the pgrp, but falls back on the pid if no
* satisfactory pgrp is found. I dunno - gdb doesn't work correctly
* without this...
*
* The caller must hold rcu lock or the tasklist lock.
*/
struct pid *session_of_pgrp(struct pid *pgrp)
{
struct task_struct *p;
struct pid *sid = NULL;
p = pid_task(pgrp, PIDTYPE_PGID);
if (p == NULL)
p = pid_task(pgrp, PIDTYPE_PID);
if (p != NULL)
sid = task_session(p);
return sid;
}
/*
* Determine if a process group is "orphaned", according to the POSIX
* definition in 2.2.2.52. Orphaned process groups are not to be affected
* by terminal-generated stop signals. Newly orphaned process groups are
* to receive a SIGHUP and a SIGCONT.
*
* "I ask you, have you ever known what it is to be an orphan?"
*/
static int will_become_orphaned_pgrp(struct pid *pgrp, struct task_struct *ignored_task)
{
struct task_struct *p;
do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
if ((p == ignored_task) ||
(p->exit_state && thread_group_empty(p)) ||
is_global_init(p->real_parent))
continue;
if (task_pgrp(p->real_parent) != pgrp &&
task_session(p->real_parent) == task_session(p))
return 0;
} while_each_pid_task(pgrp, PIDTYPE_PGID, p);
return 1;
}
int is_current_pgrp_orphaned(void)
{
int retval;
read_lock(&tasklist_lock);
retval = will_become_orphaned_pgrp(task_pgrp(current), NULL);
read_unlock(&tasklist_lock);
return retval;
}
static bool has_stopped_jobs(struct pid *pgrp)
{
struct task_struct *p;
do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
if (p->signal->flags & SIGNAL_STOP_STOPPED)
return true;
} while_each_pid_task(pgrp, PIDTYPE_PGID, p);
return false;
}
/*
* Check to see if any process groups have become orphaned as
* a result of our exiting, and if they have any stopped jobs,
* send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
static void
kill_orphaned_pgrp(struct task_struct *tsk, struct task_struct *parent)
{
struct pid *pgrp = task_pgrp(tsk);
struct task_struct *ignored_task = tsk;
if (!parent)
/* exit: our father is in a different pgrp than
* we are and we were the only connection outside.
*/
parent = tsk->real_parent;
else
/* reparent: our child is in a different pgrp than
* we are, and it was the only connection outside.
*/
ignored_task = NULL;
if (task_pgrp(parent) != pgrp &&
task_session(parent) == task_session(tsk) &&
will_become_orphaned_pgrp(pgrp, ignored_task) &&
has_stopped_jobs(pgrp)) {
__kill_pgrp_info(SIGHUP, SEND_SIG_PRIV, pgrp);
__kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
}
}
void __set_special_pids(struct pid *pid)
{
struct task_struct *curr = current->group_leader;
if (task_session(curr) != pid)
change_pid(curr, PIDTYPE_SID, pid);
if (task_pgrp(curr) != pid)
change_pid(curr, PIDTYPE_PGID, pid);
}
/*
* Let kernel threads use this to say that they allow a certain signal.
* Must not be used if kthread was cloned with CLONE_SIGHAND.
*/
int allow_signal(int sig)
{
if (!valid_signal(sig) || sig < 1)
return -EINVAL;
spin_lock_irq(¤t->sighand->siglock);
/* This is only needed for daemonize()'ed kthreads */
sigdelset(¤t->blocked, sig);
/*
* Kernel threads handle their own signals. Let the signal code
* know it'll be handled, so that they don't get converted to
* SIGKILL or just silently dropped.
*/
current->sighand->action[(sig)-1].sa.sa_handler = (void __user *)2;
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
return 0;
}
EXPORT_SYMBOL(allow_signal);
int disallow_signal(int sig)
{
if (!valid_signal(sig) || sig < 1)
return -EINVAL;
spin_lock_irq(¤t->sighand->siglock);
current->sighand->action[(sig)-1].sa.sa_handler = SIG_IGN;
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
return 0;
}
EXPORT_SYMBOL(disallow_signal);
#ifdef CONFIG_MM_OWNER
/*
* A task is exiting. If it owned this mm, find a new owner for the mm.
*/
void mm_update_next_owner(struct mm_struct *mm)
{
struct task_struct *c, *g, *p = current;
retry:
/*
* If the exiting or execing task is not the owner, it's
* someone else's problem.
*/
if (mm->owner != p)
return;
/*
* The current owner is exiting/execing and there are no other
* candidates. Do not leave the mm pointing to a possibly
* freed task structure.
*/
if (atomic_read(&mm->mm_users) <= 1) {
mm->owner = NULL;
return;
}
read_lock(&tasklist_lock);
/*
* Search in the children
*/
list_for_each_entry(c, &p->children, sibling) {
if (c->mm == mm)
goto assign_new_owner;
}
/*
* Search in the siblings
*/
list_for_each_entry(c, &p->real_parent->children, sibling) {
if (c->mm == mm)
goto assign_new_owner;
}
/*
* Search through everything else. We should not get
* here often
*/
do_each_thread(g, c) {
if (c->mm == mm)
goto assign_new_owner;
} while_each_thread(g, c);
read_unlock(&tasklist_lock);
/*
* We found no owner yet mm_users > 1: this implies that we are
* most likely racing with swapoff (try_to_unuse()) or /proc or
* ptrace or page migration (get_task_mm()). Mark owner as NULL.
*/
mm->owner = NULL;
return;
assign_new_owner:
BUG_ON(c == p);
get_task_struct(c);
/*
* The task_lock protects c->mm from changing.
* We always want mm->owner->mm == mm
*/
task_lock(c);
/*
* Delay read_unlock() till we have the task_lock()
* to ensure that c does not slip away underneath us
*/
read_unlock(&tasklist_lock);
if (c->mm != mm) {
task_unlock(c);
put_task_struct(c);
goto retry;
}
mm->owner = c;
task_unlock(c);
put_task_struct(c);
}
#endif /* CONFIG_MM_OWNER */
/*
* Turn us into a lazy TLB process if we
* aren't already..
*/
static void exit_mm(struct task_struct * tsk)
{
struct mm_struct *mm = tsk->mm;
struct core_state *core_state;
mm_release(tsk, mm);
if (!mm)
return;
sync_mm_rss(mm);
/*
* Serialize with any possible pending coredump.
* We must hold mmap_sem around checking core_state
* and clearing tsk->mm. The core-inducing thread
* will increment ->nr_threads for each thread in the
* group with ->mm != NULL.
*/
down_read(&mm->mmap_sem);
core_state = mm->core_state;
if (core_state) {
struct core_thread self;
up_read(&mm->mmap_sem);
self.task = tsk;
self.next = xchg(&core_state->dumper.next, &self);
/*
* Implies mb(), the result of xchg() must be visible
* to core_state->dumper.
*/
if (atomic_dec_and_test(&core_state->nr_threads))
complete(&core_state->startup);
for (;;) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
if (!self.task) /* see coredump_finish() */
break;
freezable_schedule();
}
__set_task_state(tsk, TASK_RUNNING);
down_read(&mm->mmap_sem);
}
atomic_inc(&mm->mm_count);
BUG_ON(mm != tsk->active_mm);
/* more a memory barrier than a real lock */
task_lock(tsk);
tsk->mm = NULL;
up_read(&mm->mmap_sem);
enter_lazy_tlb(mm, current);
task_unlock(tsk);
mm_update_next_owner(mm);
mmput(mm);
}
/*
* When we die, we re-parent all our children, and try to:
* 1. give them to another thread in our thread group, if such a member exists
* 2. give it to the first ancestor process which prctl'd itself as a
* child_subreaper for its children (like a service manager)
* 3. give it to the init process (PID 1) in our pid namespace
*/
static struct task_struct *find_new_reaper(struct task_struct *father)
__releases(&tasklist_lock)
__acquires(&tasklist_lock)
{
struct pid_namespace *pid_ns = task_active_pid_ns(father);
struct task_struct *thread;
thread = father;
while_each_thread(father, thread) {
if (thread->flags & PF_EXITING)
continue;
if (unlikely(pid_ns->child_reaper == father))
pid_ns->child_reaper = thread;
return thread;
}
if (unlikely(pid_ns->child_reaper == father)) {
write_unlock_irq(&tasklist_lock);
if (unlikely(pid_ns == &init_pid_ns)) {
panic("Attempted to kill init! exitcode=0x%08x\n",
father->signal->group_exit_code ?:
father->exit_code);
}
zap_pid_ns_processes(pid_ns);
write_lock_irq(&tasklist_lock);
} else if (father->signal->has_child_subreaper) {
struct task_struct *reaper;
/*
* Find the first ancestor marked as child_subreaper.
* Note that the code below checks same_thread_group(reaper,
* pid_ns->child_reaper). This is what we need to DTRT in a
* PID namespace. However we still need the check above, see
* http://marc.info/?l=linux-kernel&m=131385460420380
*/
for (reaper = father->real_parent;
reaper != &init_task;
reaper = reaper->real_parent) {
if (same_thread_group(reaper, pid_ns->child_reaper))
break;
if (!reaper->signal->is_child_subreaper)
continue;
thread = reaper;
do {
if (!(thread->flags & PF_EXITING))
return reaper;
} while_each_thread(reaper, thread);
}
}
return pid_ns->child_reaper;
}
/*
* Any that need to be release_task'd are put on the @dead list.
*/
static void reparent_leader(struct task_struct *father, struct task_struct *p,
struct list_head *dead)
{
list_move_tail(&p->sibling, &p->real_parent->children);
/*
* If this is a threaded reparent there is no need to
* notify anyone anything has happened.
*/
if (same_thread_group(p->real_parent, father))
return;
/*
* We don't want people slaying init.
*
* Note: we do this even if it is EXIT_DEAD, wait_task_zombie()
* can change ->exit_state to EXIT_ZOMBIE. If this is the final
* state, do_notify_parent() was already called and ->exit_signal
* doesn't matter.
*/
p->exit_signal = SIGCHLD;
if (p->exit_state == EXIT_DEAD)
return;
/* If it has exited notify the new parent about this child's death. */
if (!p->ptrace &&
p->exit_state == EXIT_ZOMBIE && thread_group_empty(p)) {
if (do_notify_parent(p, p->exit_signal)) {
p->exit_state = EXIT_DEAD;
list_move_tail(&p->sibling, dead);
}
}
kill_orphaned_pgrp(p, father);
}
static void forget_original_parent(struct task_struct *father)
{
struct task_struct *p, *n, *reaper;
LIST_HEAD(dead_children);
write_lock_irq(&tasklist_lock);
/*
* Note that exit_ptrace() and find_new_reaper() might
* drop tasklist_lock and reacquire it.
*/
exit_ptrace(father);
reaper = find_new_reaper(father);
list_for_each_entry_safe(p, n, &father->children, sibling) {
struct task_struct *t = p;
do {
t->real_parent = reaper;
if (t->parent == father) {
BUG_ON(t->ptrace);
t->parent = t->real_parent;
}
if (t->pdeath_signal)
group_send_sig_info(t->pdeath_signal,
SEND_SIG_NOINFO, t);
} while_each_thread(p, t);
reparent_leader(father, p, &dead_children);
}
write_unlock_irq(&tasklist_lock);
BUG_ON(!list_empty(&father->children));
list_for_each_entry_safe(p, n, &dead_children, sibling) {
list_del_init(&p->sibling);
release_task(p);
}
}
/*
* Send signals to all our closest relatives so that they know
* to properly mourn us..
*/
static void exit_notify(struct task_struct *tsk, int group_dead)
{
bool autoreap;
/*
* This does two things:
*
* A. Make init inherit all the child processes
* B. Check to see if any process groups have become orphaned
* as a result of our exiting, and if they have any stopped
* jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2)
*/
forget_original_parent(tsk);
write_lock_irq(&tasklist_lock);
if (group_dead)
kill_orphaned_pgrp(tsk->group_leader, NULL);
if (unlikely(tsk->ptrace)) {
int sig = thread_group_leader(tsk) &&
thread_group_empty(tsk) &&
!ptrace_reparented(tsk) ?
tsk->exit_signal : SIGCHLD;
autoreap = do_notify_parent(tsk, sig);
} else if (thread_group_leader(tsk)) {
autoreap = thread_group_empty(tsk) &&
do_notify_parent(tsk, tsk->exit_signal);
} else {
autoreap = true;
}
tsk->exit_state = autoreap ? EXIT_DEAD : EXIT_ZOMBIE;
/* mt-exec, de_thread() is waiting for group leader */
if (unlikely(tsk->signal->notify_count < 0))
wake_up_process(tsk->signal->group_exit_task);
write_unlock_irq(&tasklist_lock);
/* If the process is dead, release it - nobody will wait for it */
if (autoreap)
release_task(tsk);
}
#ifdef CONFIG_DEBUG_STACK_USAGE
static void check_stack_usage(void)
{
static DEFINE_SPINLOCK(low_water_lock);
static int lowest_to_date = THREAD_SIZE;
unsigned long free;
free = stack_not_used(current);
if (free >= lowest_to_date)
return;
spin_lock(&low_water_lock);
if (free < lowest_to_date) {
printk(KERN_WARNING "%s (%d) used greatest stack depth: "
"%lu bytes left\n",
current->comm, task_pid_nr(current), free);
lowest_to_date = free;
}
spin_unlock(&low_water_lock);
}
#else
static inline void check_stack_usage(void) {}
#endif
void do_exit(long code)
{
struct task_struct *tsk = current;
int group_dead;
profile_task_exit(tsk);
WARN_ON(blk_needs_flush_plug(tsk));
if (unlikely(in_interrupt()))
panic("Aiee, killing interrupt handler!");
if (unlikely(!tsk->pid))
panic("Attempted to kill the idle task!");
if (unlikely(is_realtime(tsk))) {
/* We would like the task to be polite
* and transition out of RT mode first.
* Let's give it a little help.
*/
litmus_do_exit(tsk);
BUG_ON(is_realtime(tsk));
}
/*
* If do_exit is called because this processes oopsed, it's possible
* that get_fs() was left as KERNEL_DS, so reset it to USER_DS before
* continuing. Amongst other possible reasons, this is to prevent
* mm_release()->clear_child_tid() from writing to a user-controlled
* kernel address.
*/
set_fs(USER_DS);
ptrace_event(PTRACE_EVENT_EXIT, code);
validate_creds_for_do_exit(tsk);
/*
* We're taking recursive faults here in do_exit. Safest is to just
* leave this task alone and wait for reboot.
*/
if (unlikely(tsk->flags & PF_EXITING)) {
printk(KERN_ALERT
"Fixing recursive fault but reboot is needed!\n");
/*
* We can do this unlocked here. The futex code uses
* this flag just to verify whether the pi state
* cleanup has been done or not. In the worst case it
* loops once more. We pretend that the cleanup was
* done as there is no way to return. Either the
* OWNER_DIED bit is set by now or we push the blocked
* task into the wait for ever nirwana as well.
*/
tsk->flags |= PF_EXITPIDONE;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule();
}
exit_signals(tsk); /* sets PF_EXITING */
/*
* tsk->flags are checked in the futex code to protect against
* an exiting task cleaning up the robust pi futexes.
*/
smp_mb();
raw_spin_unlock_wait(&tsk->pi_lock);
if (unlikely(in_atomic()))
printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
current->comm, task_pid_nr(current),
preempt_count());
acct_update_integrals(tsk);
/* sync mm's RSS info before statistics gathering */
if (tsk->mm)
sync_mm_rss(tsk->mm);
group_dead = atomic_dec_and_test(&tsk->signal->live);
if (group_dead) {
hrtimer_cancel(&tsk->signal->real_timer);
exit_itimers(tsk->signal);
if (tsk->mm)
setmax_mm_hiwater_rss(&tsk->signal->maxrss, tsk->mm);
}
acct_collect(code, group_dead);
if (group_dead)
tty_audit_exit();
audit_free(tsk);
exit_od_table(tsk);
tsk->exit_code = code;
taskstats_exit(tsk, group_dead);
exit_mm(tsk);
if (group_dead)
acct_process();
trace_sched_process_exit(tsk);
exit_sem(tsk);
exit_shm(tsk);
exit_files(tsk);
exit_fs(tsk);
if (group_dead)
disassociate_ctty(1);
exit_task_namespaces(tsk);
exit_task_work(tsk);
check_stack_usage();
exit_thread();
/*
* Flush inherited counters to the parent - before the parent
* gets woken up by child-exit notifications.
*
* because of cgroup mode, must be called before cgroup_exit()
*/
perf_event_exit_task(tsk);
cgroup_exit(tsk, 1);
module_put(task_thread_info(tsk)->exec_domain->module);
proc_exit_connector(tsk);
/*
* FIXME: do that only when needed, using sched_exit tracepoint
*/
ptrace_put_breakpoints(tsk);
exit_notify(tsk, group_dead);
#ifdef CONFIG_NUMA
task_lock(tsk);
mpol_put(tsk->mempolicy);
tsk->mempolicy = NULL;
task_unlock(tsk);
#endif
#ifdef CONFIG_FUTEX
if (unlikely(current->pi_state_cache))
kfree(current->pi_state_cache);
#endif
/*
* Make sure we are holding no locks:
*/
debug_check_no_locks_held(tsk);
/*
* We can do this unlocked here. The futex code uses this flag
* just to verify whether the pi state cleanup has been done
* or not. In the worst case it loops once more.
*/
tsk->flags |= PF_EXITPIDONE;
if (tsk->io_context)
exit_io_context(tsk);
if (tsk->splice_pipe)
free_pipe_info(tsk->splice_pipe);
if (tsk->task_frag.page)
put_page(tsk->task_frag.page);
validate_creds_for_do_exit(tsk);
preempt_disable();
if (tsk->nr_dirtied)
__this_cpu_add(dirty_throttle_leaks, tsk->nr_dirtied);
exit_rcu();
/*
* The setting of TASK_RUNNING by try_to_wake_up() may be delayed
* when the following two conditions become true.
* - There is race condition of mmap_sem (It is acquired by
* exit_mm()), and
* - SMI occurs before setting TASK_RUNINNG.
* (or hypervisor of virtual machine switches to other guest)
* As a result, we may become TASK_RUNNING after becoming TASK_DEAD
*
* To avoid it, we have to wait for releasing tsk->pi_lock which
* is held by try_to_wake_up()
*/
smp_mb();
raw_spin_unlock_wait(&tsk->pi_lock);
/* causes final put_task_struct in finish_task_switch(). */
tsk->state = TASK_DEAD;
tsk->flags |= PF_NOFREEZE; /* tell freezer to ignore us */
schedule();
BUG();
/* Avoid "noreturn function does return". */
for (;;)
cpu_relax(); /* For when BUG is null */
}
EXPORT_SYMBOL_GPL(do_exit);
void complete_and_exit(struct completion *comp, long code)
{
if (comp)
complete(comp);
do_exit(code);
}
EXPORT_SYMBOL(complete_and_exit);
SYSCALL_DEFINE1(exit, int, error_code)
{
do_exit((error_code&0xff)<<8);
}
/*
* Take down every thread in the group. This is called by fatal signals
* as well as by sys_exit_group (below).
*/
void
do_group_exit(int exit_code)
{
struct signal_struct *sig = current->signal;
BUG_ON(exit_code & 0x80); /* core dumps don't get here */
if (signal_group_exit(sig))
exit_code = sig->group_exit_code;
else if (!thread_group_empty(current)) {
struct sighand_struct *const sighand = current->sighand;
spin_lock_irq(&sighand->siglock);
if (signal_group_exit(sig))
/* Another thread got here before we took the lock. */
exit_code = sig->group_exit_code;
else {
sig->group_exit_code = exit_code;
sig->flags = SIGNAL_GROUP_EXIT;
zap_other_threads(current);
}
spin_unlock_irq(&sighand->siglock);
}
do_exit(exit_code);
/* NOTREACHED */
}
/*
* this kills every thread in the thread group. Note that any externally
* wait4()-ing process will get the correct exit code - even if this
* thread is not the thread group leader.
*/
SYSCALL_DEFINE1(exit_group, int, error_code)
{
do_group_exit((error_code & 0xff) << 8);
/* NOTREACHED */
return 0;
}
struct wait_opts {
enum pid_type wo_type;
int wo_flags;
struct pid *wo_pid;
struct siginfo __user *wo_info;
int __user *wo_stat;
struct rusage __user *wo_rusage;
wait_queue_t child_wait;
int notask_error;
};
static inline
struct pid *task_pid_type(struct task_struct *task, enum pid_type type)
{
if (type != PIDTYPE_PID)
task = task->group_leader;
return task->pids[type].pid;
}
static int eligible_pid(struct wait_opts *wo, struct task_struct *p)
{
return wo->wo_type == PIDTYPE_MAX ||
task_pid_type(p, wo->wo_type) == wo->wo_pid;
}
static int eligible_child(struct wait_opts *wo, struct task_struct *p)
{
if (!eligible_pid(wo, p))
return 0;
/* Wait for all children (clone and not) if __WALL is set;
* otherwise, wait for clone children *only* if __WCLONE is
* set; otherwise, wait for non-clone children *only*. (Note:
* A "clone" child here is one that reports to its parent
* using a signal other than SIGCHLD.) */
if (((p->exit_signal != SIGCHLD) ^ !!(wo->wo_flags & __WCLONE))
&& !(wo->wo_flags & __WALL))
return 0;
return 1;
}
static int wait_noreap_copyout(struct wait_opts *wo, struct task_struct *p,
pid_t pid, uid_t uid, int why, int status)
{
struct siginfo __user *infop;
int retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
put_task_struct(p);
infop = wo->wo_info;
if (infop) {
if (!retval)
retval = put_user(SIGCHLD, &infop->si_signo);
if (!retval)
retval = put_user(0, &infop->si_errno);
if (!retval)
retval = put_user((short)why, &infop->si_code);
if (!retval)
retval = put_user(pid, &infop->si_pid);
if (!retval)
retval = put_user(uid, &infop->si_uid);
if (!retval)
retval = put_user(status, &infop->si_status);
}
if (!retval)
retval = pid;
return retval;
}
/*
* Handle sys_wait4 work for one task in state EXIT_ZOMBIE. We hold
* read_lock(&tasklist_lock) on entry. If we return zero, we still hold
* the lock and this task is uninteresting. If we return nonzero, we have
* released the lock and the system call should return.
*/
static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
{
unsigned long state;
int retval, status, traced;
pid_t pid = task_pid_vnr(p);
uid_t uid = from_kuid_munged(current_user_ns(), task_uid(p));
struct siginfo __user *infop;
if (!likely(wo->wo_flags & WEXITED))
return 0;
if (unlikely(wo->wo_flags & WNOWAIT)) {
int exit_code = p->exit_code;
int why;
get_task_struct(p);
read_unlock(&tasklist_lock);
if ((exit_code & 0x7f) == 0) {
why = CLD_EXITED;
status = exit_code >> 8;
} else {
why = (exit_code & 0x80) ? CLD_DUMPED : CLD_KILLED;
status = exit_code & 0x7f;
}
return wait_noreap_copyout(wo, p, pid, uid, why, status);
}
/*
* Try to move the task's state to DEAD
* only one thread is allowed to do this:
*/
state = xchg(&p->exit_state, EXIT_DEAD);
if (state != EXIT_ZOMBIE) {
BUG_ON(state != EXIT_DEAD);
return 0;
}
traced = ptrace_reparented(p);
/*
* It can be ptraced but not reparented, check
* thread_group_leader() to filter out sub-threads.
*/
if (likely(!traced) && thread_group_leader(p)) {
struct signal_struct *psig;
struct signal_struct *sig;
unsigned long maxrss;
cputime_t tgutime, tgstime;
/*
* The resource counters for the group leader are in its
* own task_struct. Those for dead threads in the group
* are in its signal_struct, as are those for the child
* processes it has previously reaped. All these
* accumulate in the parent's signal_struct c* fields.
*
* We don't bother to take a lock here to protect these
* p->signal fields, because they are only touched by
* __exit_signal, which runs with tasklist_lock
* write-locked anyway, and so is excluded here. We do
* need to protect the access to parent->signal fields,
* as other threads in the parent group can be right
* here reaping other children at the same time.
*
* We use thread_group_cputime_adjusted() to get times for the thread
* group, which consolidates times for all threads in the
* group including the group leader.
*/
thread_group_cputime_adjusted(p, &tgutime, &tgstime);
spin_lock_irq(&p->real_parent->sighand->siglock);
psig = p->real_parent->signal;
sig = p->signal;
psig->cutime += tgutime + sig->cutime;
psig->cstime += tgstime + sig->cstime;
psig->cgtime += task_gtime(p) + sig->gtime + sig->cgtime;
psig->cmin_flt +=
p->min_flt + sig->min_flt + sig->cmin_flt;
psig->cmaj_flt +=
p->maj_flt + sig->maj_flt + sig->cmaj_flt;
psig->cnvcsw +=
p->nvcsw + sig->nvcsw + sig->cnvcsw;
psig->cnivcsw +=
p->nivcsw + sig->nivcsw + sig->cnivcsw;
psig->cinblock +=
task_io_get_inblock(p) +
sig->inblock + sig->cinblock;
psig->coublock +=
task_io_get_oublock(p) +
sig->oublock + sig->coublock;
maxrss = max(sig->maxrss, sig->cmaxrss);
if (psig->cmaxrss < maxrss)
psig->cmaxrss = maxrss;
task_io_accounting_add(&psig->ioac, &p->ioac);
task_io_accounting_add(&psig->ioac, &sig->ioac);
spin_unlock_irq(&p->real_parent->sighand->siglock);
}
/*
* Now we are sure this task is interesting, and no other
* thread can reap it because we set its state to EXIT_DEAD.
*/
read_unlock(&tasklist_lock);
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
status = (p->signal->flags & SIGNAL_GROUP_EXIT)
? p->signal->group_exit_code : p->exit_code;
if (!retval && wo->wo_stat)
retval = put_user(status, wo->wo_stat);
infop = wo->wo_info;
if (!retval && infop)
retval = put_user(SIGCHLD, &infop->si_signo);
if (!retval && infop)
retval = put_user(0, &infop->si_errno);
if (!retval && infop) {
int why;
if ((status & 0x7f) == 0) {
why = CLD_EXITED;
status >>= 8;
} else {
why = (status & 0x80) ? CLD_DUMPED : CLD_KILLED;
status &= 0x7f;
}
retval = put_user((short)why, &infop->si_code);
if (!retval)
retval = put_user(status, &infop->si_status);
}
if (!retval && infop)
retval = put_user(pid, &infop->si_pid);
if (!retval && infop)
retval = put_user(uid, &infop->si_uid);
if (!retval)
retval = pid;
if (traced) {
write_lock_irq(&tasklist_lock);
/* We dropped tasklist, ptracer could die and untrace */
ptrace_unlink(p);
/*
* If this is not a sub-thread, notify the parent.
* If parent wants a zombie, don't release it now.
*/
if (thread_group_leader(p) &&
!do_notify_parent(p, p->exit_signal)) {
p->exit_state = EXIT_ZOMBIE;
p = NULL;
}
write_unlock_irq(&tasklist_lock);
}
if (p != NULL)
release_task(p);
return retval;
}
static int *task_stopped_code(struct task_struct *p, bool ptrace)
{
if (ptrace) {
if (task_is_stopped_or_traced(p) &&
!(p->jobctl & JOBCTL_LISTENING))
return &p->exit_code;
} else {
if (p->signal->flags & SIGNAL_STOP_STOPPED)
return &p->signal->group_exit_code;
}
return NULL;
}
/**
* wait_task_stopped - Wait for %TASK_STOPPED or %TASK_TRACED
* @wo: wait options
* @ptrace: is the wait for ptrace
* @p: task to wait for
*
* Handle sys_wait4() work for %p in state %TASK_STOPPED or %TASK_TRACED.
*
* CONTEXT:
* read_lock(&tasklist_lock), which is released if return value is
* non-zero. Also, grabs and releases @p->sighand->siglock.
*
* RETURNS:
* 0 if wait condition didn't exist and search for other wait conditions
* should continue. Non-zero return, -errno on failure and @p's pid on
* success, implies that tasklist_lock is released and wait condition
* search should terminate.
*/
static int wait_task_stopped(struct wait_opts *wo,
int ptrace, struct task_struct *p)
{
struct siginfo __user *infop;
int retval, exit_code, *p_code, why;
uid_t uid = 0; /* unneeded, required by compiler */
pid_t pid;
/*
* Traditionally we see ptrace'd stopped tasks regardless of options.
*/
if (!ptrace && !(wo->wo_flags & WUNTRACED))
return 0;
if (!task_stopped_code(p, ptrace))
return 0;
exit_code = 0;
spin_lock_irq(&p->sighand->siglock);
p_code = task_stopped_code(p, ptrace);
if (unlikely(!p_code))
goto unlock_sig;
exit_code = *p_code;
if (!exit_code)
goto unlock_sig;
if (!unlikely(wo->wo_flags & WNOWAIT))
*p_code = 0;
uid = from_kuid_munged(current_user_ns(), task_uid(p));
unlock_sig:
spin_unlock_irq(&p->sighand->siglock);
if (!exit_code)
return 0;
/*
* Now we are pretty sure this task is interesting.
* Make sure it doesn't get reaped out from under us while we
* give up the lock and then examine it below. We don't want to
* keep holding onto the tasklist_lock while we call getrusage and
* possibly take page faults for user memory.
*/
get_task_struct(p);
pid = task_pid_vnr(p);
why = ptrace ? CLD_TRAPPED : CLD_STOPPED;
read_unlock(&tasklist_lock);
if (unlikely(wo->wo_flags & WNOWAIT))
return wait_noreap_copyout(wo, p, pid, uid, why, exit_code);
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
if (!retval && wo->wo_stat)
retval = put_user((exit_code << 8) | 0x7f, wo->wo_stat);
infop = wo->wo_info;
if (!retval && infop)
retval = put_user(SIGCHLD, &infop->si_signo);
if (!retval && infop)
retval = put_user(0, &infop->si_errno);
if (!retval && infop)
retval = put_user((short)why, &infop->si_code);
if (!retval && infop)
retval = put_user(exit_code, &infop->si_status);
if (!retval && infop)
retval = put_user(pid, &infop->si_pid);
if (!retval && infop)
retval = put_user(uid, &infop->si_uid);
if (!retval)
retval = pid;
put_task_struct(p);
BUG_ON(!retval);
return retval;
}
/*
* Handle do_wait work for one task in a live, non-stopped state.
* read_lock(&tasklist_lock) on entry. If we return zero, we still hold
* the lock and this task is uninteresting. If we return nonzero, we have
* released the lock and the system call should return.
*/
static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
{
int retval;
pid_t pid;
uid_t uid;
if (!unlikely(wo->wo_flags & WCONTINUED))
return 0;
if (!(p->signal->flags & SIGNAL_STOP_CONTINUED))
return 0;
spin_lock_irq(&p->sighand->siglock);
/* Re-check with the lock held. */
if (!(p->signal->flags & SIGNAL_STOP_CONTINUED)) {
spin_unlock_irq(&p->sighand->siglock);
return 0;
}
if (!unlikely(wo->wo_flags & WNOWAIT))
p->signal->flags &= ~SIGNAL_STOP_CONTINUED;
uid = from_kuid_munged(current_user_ns(), task_uid(p));
spin_unlock_irq(&p->sighand->siglock);
pid = task_pid_vnr(p);
get_task_struct(p);
read_unlock(&tasklist_lock);
if (!wo->wo_info) {
retval = wo->wo_rusage
? getrusage(p, RUSAGE_BOTH, wo->wo_rusage) : 0;
put_task_struct(p);
if (!retval && wo->wo_stat)
retval = put_user(0xffff, wo->wo_stat);
if (!retval)
retval = pid;
} else {
retval = wait_noreap_copyout(wo, p, pid, uid,
CLD_CONTINUED, SIGCONT);
BUG_ON(retval == 0);
}
return retval;
}
/*
* Consider @p for a wait by @parent.
*
* -ECHILD should be in ->notask_error before the first call.
* Returns nonzero for a final return, when we have unlocked tasklist_lock.
* Returns zero if the search for a child should continue;
* then ->notask_error is 0 if @p is an eligible child,
* or another error from security_task_wait(), or still -ECHILD.
*/
static int wait_consider_task(struct wait_opts *wo, int ptrace,
struct task_struct *p)
{
int ret = eligible_child(wo, p);
if (!ret)
return ret;
ret = security_task_wait(p);
if (unlikely(ret < 0)) {
/*
* If we have not yet seen any eligible child,
* then let this error code replace -ECHILD.
* A permission error will give the user a clue
* to look for security policy problems, rather
* than for mysterious wait bugs.
*/
if (wo->notask_error)
wo->notask_error = ret;
return 0;
}
/* dead body doesn't have much to contribute */
if (unlikely(p->exit_state == EXIT_DEAD)) {
/*
* But do not ignore this task until the tracer does
* wait_task_zombie()->do_notify_parent().
*/
if (likely(!ptrace) && unlikely(ptrace_reparented(p)))
wo->notask_error = 0;
return 0;
}
/* slay zombie? */
if (p->exit_state == EXIT_ZOMBIE) {
/*
* A zombie ptracee is only visible to its ptracer.
* Notification and reaping will be cascaded to the real
* parent when the ptracer detaches.
*/
if (likely(!ptrace) && unlikely(p->ptrace)) {
/* it will become visible, clear notask_error */
wo->notask_error = 0;
return 0;
}
/* we don't reap group leaders with subthreads */
if (!delay_group_leader(p))
return wait_task_zombie(wo, p);
/*
* Allow access to stopped/continued state via zombie by
* falling through. Clearing of notask_error is complex.
*
* When !@ptrace:
*
* If WEXITED is set, notask_error should naturally be
* cleared. If not, subset of WSTOPPED|WCONTINUED is set,
* so, if there are live subthreads, there are events to
* wait for. If all subthreads are dead, it's still safe
* to clear - this function will be called again in finite
* amount time once all the subthreads are released and
* will then return without clearing.
*
* When @ptrace:
*
* Stopped state is per-task and thus can't change once the
* target task dies. Only continued and exited can happen.
* Clear notask_error if WCONTINUED | WEXITED.
*/
if (likely(!ptrace) || (wo->wo_flags & (WCONTINUED | WEXITED)))
wo->notask_error = 0;
} else {
/*
* If @p is ptraced by a task in its real parent's group,
* hide group stop/continued state when looking at @p as
* the real parent; otherwise, a single stop can be
* reported twice as group and ptrace stops.
*
* If a ptracer wants to distinguish the two events for its
* own children, it should create a separate process which
* takes the role of real parent.
*/
if (likely(!ptrace) && p->ptrace && !ptrace_reparented(p))
return 0;
/*
* @p is alive and it's gonna stop, continue or exit, so
* there always is something to wait for.
*/
wo->notask_error = 0;
}
/*
* Wait for stopped. Depending on @ptrace, different stopped state
* is used and the two don't interact with each other.
*/
ret = wait_task_stopped(wo, ptrace, p);
if (ret)
return ret;
/*
* Wait for continued. There's only one continued state and the
* ptracer can consume it which can confuse the real parent. Don't
* use WCONTINUED from ptracer. You don't need or want it.
*/
return wait_task_continued(wo, p);
}
/*
* Do the work of do_wait() for one thread in the group, @tsk.
*
* -ECHILD should be in ->notask_error before the first call.
* Returns nonzero for a final return, when we have unlocked tasklist_lock.
* Returns zero if the search for a child should continue; then
* ->notask_error is 0 if there were any eligible children,
* or another error from security_task_wait(), or still -ECHILD.
*/
static int do_wait_thread(struct wait_opts *wo, struct task_struct *tsk)
{
struct task_struct *p;
list_for_each_entry(p, &tsk->children, sibling) {
int ret = wait_consider_task(wo, 0, p);
if (ret)
return ret;
}
return 0;
}
static int ptrace_do_wait(struct wait_opts *wo, struct task_struct *tsk)
{
struct task_struct *p;
list_for_each_entry(p, &tsk->ptraced, ptrace_entry) {
int ret = wait_consider_task(wo, 1, p);
if (ret)
return ret;
}
return 0;
}
static int child_wait_callback(wait_queue_t *wait, unsigned mode,
int sync, void *key)
{
struct wait_opts *wo = container_of(wait, struct wait_opts,
child_wait);
struct task_struct *p = key;
if (!eligible_pid(wo, p))
return 0;
if ((wo->wo_flags & __WNOTHREAD) && wait->private != p->parent)
return 0;
return default_wake_function(wait, mode, sync, key);
}
void __wake_up_parent(struct task_struct *p, struct task_struct *parent)
{
__wake_up_sync_key(&parent->signal->wait_chldexit,
TASK_INTERRUPTIBLE, 1, p);
}
static long do_wait(struct wait_opts *wo)
{
struct task_struct *tsk;
int retval;
trace_sched_process_wait(wo->wo_pid);
init_waitqueue_func_entry(&wo->child_wait, child_wait_callback);
wo->child_wait.private = current;
add_wait_queue(¤t->signal->wait_chldexit, &wo->child_wait);
repeat:
/*
* If there is nothing that can match our critiera just get out.
* We will clear ->notask_error to zero if we see any child that
* might later match our criteria, even if we are not able to reap
* it yet.
*/
wo->notask_error = -ECHILD;
if ((wo->wo_type < PIDTYPE_MAX) &&
(!wo->wo_pid || hlist_empty(&wo->wo_pid->tasks[wo->wo_type])))
goto notask;
set_current_state(TASK_INTERRUPTIBLE);
read_lock(&tasklist_lock);
tsk = current;
do {
retval = do_wait_thread(wo, tsk);
if (retval)
goto end;
retval = ptrace_do_wait(wo, tsk);
if (retval)
goto end;
if (wo->wo_flags & __WNOTHREAD)
break;
} while_each_thread(current, tsk);
read_unlock(&tasklist_lock);
notask:
retval = wo->notask_error;
if (!retval && !(wo->wo_flags & WNOHANG)) {
retval = -ERESTARTSYS;
if (!signal_pending(current)) {
schedule();
goto repeat;
}
}
end:
__set_current_state(TASK_RUNNING);
remove_wait_queue(¤t->signal->wait_chldexit, &wo->child_wait);
return retval;
}
SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *,
infop, int, options, struct rusage __user *, ru)
{
struct wait_opts wo;
struct pid *pid = NULL;
enum pid_type type;
long ret;
if (options & ~(WNOHANG|WNOWAIT|WEXITED|WSTOPPED|WCONTINUED))
return -EINVAL;
if (!(options & (WEXITED|WSTOPPED|WCONTINUED)))
return -EINVAL;
switch (which) {
case P_ALL:
type = PIDTYPE_MAX;
break;
case P_PID:
type = PIDTYPE_PID;
if (upid <= 0)
return -EINVAL;
break;
case P_PGID:
type = PIDTYPE_PGID;
if (upid <= 0)
return -EINVAL;
break;
default:
return -EINVAL;
}
if (type < PIDTYPE_MAX)
pid = find_get_pid(upid);
wo.wo_type = type;
wo.wo_pid = pid;
wo.wo_flags = options;
wo.wo_info = infop;
wo.wo_stat = NULL;
wo.wo_rusage = ru;
ret = do_wait(&wo);
if (ret > 0) {
ret = 0;
} else if (infop) {
/*
* For a WNOHANG return, clear out all the fields
* we would set so the user can easily tell the
* difference.
*/
if (!ret)
ret = put_user(0, &infop->si_signo);
if (!ret)
ret = put_user(0, &infop->si_errno);
if (!ret)
ret = put_user(0, &infop->si_code);
if (!ret)
ret = put_user(0, &infop->si_pid);
if (!ret)
ret = put_user(0, &infop->si_uid);
if (!ret)
ret = put_user(0, &infop->si_status);
}
put_pid(pid);
return ret;
}
SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr,
int, options, struct rusage __user *, ru)
{
struct wait_opts wo;
struct pid *pid = NULL;
enum pid_type type;
long ret;
if (options & ~(WNOHANG|WUNTRACED|WCONTINUED|
__WNOTHREAD|__WCLONE|__WALL))
return -EINVAL;
if (upid == -1)
type = PIDTYPE_MAX;
else if (upid < 0) {
type = PIDTYPE_PGID;
pid = find_get_pid(-upid);
} else if (upid == 0) {
type = PIDTYPE_PGID;
pid = get_task_pid(current, PIDTYPE_PGID);
} else /* upid > 0 */ {
type = PIDTYPE_PID;
pid = find_get_pid(upid);
}
wo.wo_type = type;
wo.wo_pid = pid;
wo.wo_flags = options | WEXITED;
wo.wo_info = NULL;
wo.wo_stat = stat_addr;
wo.wo_rusage = ru;
ret = do_wait(&wo);
put_pid(pid);
return ret;
}
#ifdef __ARCH_WANT_SYS_WAITPID
/*
* sys_waitpid() remains for compatibility. waitpid() should be
* implemented by calling sys_wait4() from libc.a.
*/
SYSCALL_DEFINE3(waitpid, pid_t, pid, int __user *, stat_addr, int, options)
{
return sys_wait4(pid, stat_addr, options, NULL);
}
#endif
| Java |
// QueenMaxima, a chess playing program.
// Copyright (C) 1996-2013 Erik van het Hof and Hermen Reitsma
//
// 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.
//
#include <string.h>
#include <stdio.h>
#include "hashcodes.h"
#include "legality.h"
#include "fast.h"
#include "attack.h"
bool _fast_moveokw (TFastNode* node, int move) // returns "move would be generated"
{
int ssq = SOURCESQ (move);
int piece = PIECE (move);
if ((!piece) || node -> matrix [ssq] != piece) {
return false;
}
int tsq = TARGETSQ (move);
if (! (move & _LL(4294934528))) { //a normal noncapture
if (node->matrix[tsq]) {
return false;
}
if (piece==PAWN) {
return !node->matrix [ssq+8];
}
return t.pieceattacks [piece] [ssq] [tsq] && (piece == KNIGHT || piece == KING || nooccs(node,ssq,tsq));
} else if (!SPECIAL(move)) { //a normal capture
if (node->matrix [tsq] != CAPTURED (move) + KING) {
return false;
}
return t.pieceattacks [piece][ssq][tsq] && (piece == PAWN || piece==KNIGHT || piece==KING || nooccs(node,ssq,tsq));
} else switch (SPECIALCASE (move)) {
case _SHORT_CASTLE:
return _SCW (node) && node -> matrix [g1] == 0 && node -> matrix [f1] == 0;
case _LONG_CASTLE:
return _LCW (node) && node -> matrix [b1] == 0 && node -> matrix [c1] == 0 && node -> matrix [d1] == 0;
case _EN_PASSANT:
return _EPSQ (node) == tsq && node -> matrix [ssq] == PAWN;
default: // promotion
if (_CAPTURE (move)) {
return node -> matrix [ssq] == PAWN && node -> matrix [tsq] == CAPTURED (move)+KING;
} else {
return node -> matrix [ssq] == PAWN && node -> matrix [tsq] == 0;
}
}
BOOST_ASSERT (false);
return false;
}
bool _fast_moveokb(TFastNode* node, int move) { // returns "move would be generated"
int ssq = SOURCESQ (move),
piece = PIECE(move);
if (!piece || node -> matrix [ssq] != piece+KING) {
return false;
}
int tsq = TARGETSQ(move);
if (! (move & _LL(4294934528))) { //not a special move or a capture
if (node->matrix[tsq]) {
return false;
}
if (piece==PAWN) {
return !node->matrix[ssq-8];
}
return (t.pieceattacks [piece] [tsq] [ssq] && (piece == KNIGHT || piece == KING || nooccs (node, ssq, tsq)));
} else if (!SPECIAL (move)) { //a normal capture
if (node->matrix [tsq] != CAPTURED (move)) {
return false;
}
return t.pieceattacks [piece][tsq][ssq] && (piece == PAWN || piece==KNIGHT || piece==KING || nooccs (node, ssq, tsq));
} else switch (SPECIALCASE (move)) {
case _SHORT_CASTLE:
return _SCB (node) && (node -> matrix [g8] == 0) && (node -> matrix [f8] == 0);
case _LONG_CASTLE:
return _LCB (node) && (node -> matrix [b8] == 0) && (node -> matrix [c8] == 0) && (node -> matrix [d8] == 0);
case _EN_PASSANT:
return (_EPSQ (node) == tsq) && (node -> matrix [ssq] == BPAWN);
default: // promotion
if (_CAPTURE (move)) {
return (node -> matrix [ssq] == BPAWN) && (node -> matrix [tsq] == CAPTURED (move));
} else {
return (node -> matrix [ssq] == BPAWN) && (node -> matrix [tsq] == 0);
}
}
BOOST_ASSERT (false);
return false;
}
bool inspect_move_legality_b (TFastNode* node, int move)
{
bool result;
int flags = node -> flags,
fifty = node -> fifty;
if (move == ENCODESCB) {
return ! attacked_by_PNBRQK (node, e8) && ! attacked_by_PNBRQK (node, f8) && ! attacked_by_PNBRQK (node, g8);
}
if (move == ENCODELCB) {
return ! attacked_by_PNBRQK (node, e8) && ! attacked_by_PNBRQK (node, d8) && ! attacked_by_PNBRQK (node, c8);
}
_fast_dobmove (node, move);
result = ! attacked_by_PNBRQK (node, node -> bkpos);
_fast_undobmove (node, move, flags, fifty);
return result;
}
bool inspect_move_legality_w (TFastNode* node, int move)
{
bool result;
int flags = node -> flags,
fifty = node -> fifty;
if (move == ENCODESCW) {
return ! attacked_by_pnbrqk (node, e1) && ! attacked_by_pnbrqk (node, f1) && ! attacked_by_pnbrqk (node, g1);
}
if (move == ENCODELCW) {
return ! attacked_by_pnbrqk (node, e1) && ! attacked_by_pnbrqk (node, d1) && ! attacked_by_pnbrqk (node, c1);
}
_fast_dowmove (node, move);
result = ! attacked_by_pnbrqk (node, node -> wkpos);
_fast_undowmove (node, move, flags, fifty);
return result;
}
bool legal_move (TFastNode* node, int move) {
if (node -> flags & _WTM) {
return legal_move_w(node, move);
} else {
return legal_move_b(node, move);
}
}
bool legal_move_w (TFastNode* node, int move) // returns "white move is legal in node"
{
int sq = SOURCESQ (move),
offset_ssq_wk,
offset_ssq_tsq,
piece = PIECE (move);
if (piece < KING) {
// voor promoties, en_passant en normale zetten geldt:
offset_ssq_wk = t.direction [sq] [node->wkpos];
if (! offset_ssq_wk) {
return true; // niet op een lijn met de koning. vaak knalt ie er hier meteen weer uit.
}
offset_ssq_tsq = t.direction [sq] [TARGETSQ (move)];
if (offset_ssq_wk == offset_ssq_tsq || offset_ssq_wk == - offset_ssq_tsq) {
return true; // stuk blijft op dezelfde lijn
}
if (! SPECIAL (move) || SPECIALCASE (move) != _EN_PASSANT || (offset_ssq_wk != 1 && offset_ssq_wk != -1)) {
// uitzonderingen met en_passant komen alleen voor als koning en pion op hor. lijn staan (toch?)
// omdat er bij enpassant slaan twee stukken van de horizontale lijn verdwijnen.
sq += offset_ssq_wk;
while (sq != node -> wkpos) {
if (node -> matrix [sq]) {
return true; // niet gepind want er staat een stuk (w/z) tussen
}
sq += offset_ssq_wk;
}
sq = t.sqonline [node -> wkpos] [SOURCESQ (move)];
while (sq != node -> wkpos) {
BOOST_ASSERT (sq >= 0 && sq <= 63);
piece = node -> matrix [sq];
if (piece) {
return piece < BBISHOP || ! t.pieceattacks [piece - KING] [sq] [node->wkpos];
}
sq = t.sqonline [node -> wkpos] [sq];
}
return true;
}
// en passant en koning, pion en geslagen pion op 1 horizontale lijn
int csq = TARGETSQ (move) - 8;
sq += offset_ssq_wk;
while (sq != node->wkpos) {
if (node -> matrix [sq] && (sq != csq)) {
return true; // niet gepind want er staat een stuk (w/z) tussen
}
sq += offset_ssq_wk;
}
sq = t.sqonline [node -> wkpos] [SOURCESQ (move)];
while (sq != node -> wkpos) {
BOOST_ASSERT (sq >= 0 && sq <= 63);
piece = node -> matrix [sq];
if (piece && (sq != csq)) {
return piece < BROOK || ! t.pieceattacks [piece - KING] [sq] [node -> wkpos];
}
sq = t.sqonline [node -> wkpos] [sq];
}
return true;
}
// de koning zet
if (attacked_by_pnbrqk (node, TARGETSQ (move))) {
return false;
}
if (! SPECIAL (move)) {
return true;
}
if (attacked_by_pnbrqk (node, e1)) {
return false;
}
if (move == ENCODESCW) {
return ! attacked_by_pnbrqk (node, f1);
}
return ! attacked_by_pnbrqk (node, d1);
}
bool legal_move_b (TFastNode* node, int move) // returns "black move is legal in node"
{
int sq = SOURCESQ (move),
offset_ssq_bk,
offset_ssq_tsq,
piece = PIECE (move);
if (piece < KING) {
// voor promoties, en_passant en normale zetten geldt:
offset_ssq_bk = t.direction [sq] [node->bkpos];
if (! offset_ssq_bk) {
return true; // niet op een lijn met de koning. vaak knalt ie er hier meteen weer uit.
}
offset_ssq_tsq = t.direction [sq] [TARGETSQ (move)];
if (offset_ssq_bk == offset_ssq_tsq || offset_ssq_bk == - offset_ssq_tsq) {
return true; // stuk blijft op dezelfde lijn
}
sq += offset_ssq_bk;
if (! SPECIAL (move) || SPECIALCASE (move) != _EN_PASSANT || (offset_ssq_bk != 1 && offset_ssq_bk != -1)) {
// uitzonderingen met en_passant komen alleen voor als koning en pion op hor. lijn staan (toch?)
// omdat er bij enpassant slaan twee stukken van de horizontale lijn verdwijnen.
while (sq != node -> bkpos) {
if (node -> matrix [sq]) {
return true; // niet gepind want er staat een stuk (w/z) tussen
}
sq += offset_ssq_bk;
}
sq = t.sqonline [node -> bkpos] [SOURCESQ (move)];
while (sq != node -> bkpos) {
BOOST_ASSERT (sq >= 0 && sq <= 63);
piece = node -> matrix [sq];
if (piece) {
return piece > QUEEN || piece < BISHOP || ! t.pieceattacks [piece] [sq] [node->bkpos];
}
sq = t.sqonline [node -> bkpos] [sq];
}
return true;
}
// en passant en koning, pion en geslagen pion op 1 horizontale lijn
int csq = TARGETSQ (move) + 8;
while (sq != node -> bkpos) {
if (node -> matrix [sq] && sq != csq) {
return true; // niet gepind want er staat een stuk (w/z) tussen
}
sq += offset_ssq_bk;
}
sq = t.sqonline [node -> bkpos] [ SOURCESQ (move)];
while (sq != node -> bkpos) {
BOOST_ASSERT (sq >= 0 && sq <= 63);
piece = node -> matrix [sq];
if (piece && sq != csq) {
return piece > QUEEN || piece < ROOK || ! t.pieceattacks [piece] [sq] [node -> bkpos];
}
sq = t.sqonline [node -> bkpos] [sq];
}
return true;
}
// de koning zet
if (attacked_by_PNBRQK (node, TARGETSQ (move))) {
return false;
}
if (! SPECIAL (move)) {
return true;
}
if (attacked_by_PNBRQK (node, e8)) {
return false;
}
if (move == ENCODESCB) {
return ! attacked_by_PNBRQK (node, f8);
}
return ! attacked_by_PNBRQK (node, d8);
}
int _fast_inspectnode (TFastNode* node) {
_int64 hashcode = 0,
pawncode = 0;
int i;
if ((bool)((node -> hashcode & 1) > 0) != (bool)((node -> flags & _WTM) >0)) {
return 500;
}
if (node->wpawns > 8 || node->wpawns < 0) {
return 1;
}
if (node->wknights + node->wpawns > 10 || node->wknights < 0) {
return 2;
}
if (node->wbishops + node->wpawns > 10 || node->wbishops < 0) {
return 3;
}
if (node->wrooks + node->wpawns > 10 || node->wrooks < 0) {
return 4;
}
if (node->wqueens + node->wpawns > 10 || node->wqueens < 0) {
return 5;
}
if (node->wkpos < 0 || node->wkpos > 63) {
return 6;
}
if (node->bpawns > 8 || node->bpawns < 0) {
return 11;
}
if (node->bknights + node->bpawns > 10 || node->bknights < 0) {
return 12;
}
if (node->bbishops + node->bpawns > 10 || node->bbishops < 0) {
return 13;
}
if (node->brooks + node->bpawns > 10 || node->brooks < 0) {
return 14;
}
if (node->bqueens + node->bpawns > 10 || node->bqueens < 0) {
return 15;
}
if (node->bkpos < 0 || node->bkpos > 63) {
return 16;
}
int sq;
char matrix[64];
memset (matrix, 0, sizeof (matrix));
for (i = 0; i < node->wpawns; i++) {
sq = node->wpawnlist [i];
hashcode ^= hashnumbers [PAWN - 1] [sq];
pawncode ^= hashnumbers [PAWN - 1] [sq];
if (node->index [sq] != i) {
std::cout << boost::format("node->index[%d] = %d ; i = %d\n") % sq % node->index[sq] % i;
return 21;
}
matrix [sq] = PAWN;
if (node->matrix [sq] != PAWN) {
return 41;
}
}
for (i = 0; i < node->wknights; i++) {
sq = node->wknightlist [i];
hashcode ^= hashnumbers [KNIGHT - 1] [sq];
if (node->index [sq] != i) {
return 22;
}
matrix [sq] = KNIGHT;
if (node->matrix [sq] != KNIGHT) {
return 42;
}
}
for (i = 0; i < node->wbishops; i++) {
sq = node->wbishoplist [i];
hashcode ^= hashnumbers [BISHOP - 1] [sq];
if (node->index [sq] != i) {
return 23;
}
matrix [sq] = BISHOP;
if (node->matrix [sq] != BISHOP) {
return 43;
}
}
for (i = 0; i < node->wrooks; i++) {
sq = node->wrooklist [i];
hashcode ^= hashnumbers [ROOK - 1] [sq];
if (node->index [sq] != i) {
return 24;
}
matrix [sq] = ROOK;
if (node->matrix [sq] != ROOK) {
return 44;
}
}
for (i = 0; i < node->wqueens; i++) {
sq = node->wqueenlist [i];
hashcode ^= hashnumbers [QUEEN - 1] [sq];
if (node->index [sq] != i) {
return 25;
}
matrix [sq] = QUEEN;
if (node->matrix [sq] != QUEEN) {
return 45;
}
}
matrix [node->wkpos] = KING;
hashcode ^= hashnumbers [KING - 1] [node -> wkpos];
if (node->matrix [node->wkpos] != KING) {
return 46;
}
for (i = 0; i < node->bpawns; i++) {
sq = node->bpawnlist [i];
hashcode ^= hashnumbers [BPAWN - 1] [sq];
pawncode ^= hashnumbers [BPAWN - 1] [sq];
if (node->index [sq] != i) {
return 31;
}
matrix [sq] = BPAWN;
if (node->matrix [sq] != BPAWN) {
return 51;
}
}
for (i = 0; i < node->bknights; i++) {
sq = node->bknightlist [i];
hashcode ^= hashnumbers [BKNIGHT - 1] [sq];
if (node->index [sq] != i) {
return 32;
}
matrix [sq] = BKNIGHT;
if (node->matrix [sq] != BKNIGHT) {
return 52;
}
}
for (i = 0; i < node->bbishops; i++) {
sq = node->bbishoplist [i];
hashcode ^= hashnumbers [BBISHOP - 1] [sq];
if (node->index [sq] != i) {
return 33;
}
matrix [sq] = BBISHOP;
if (node->matrix [sq] != BBISHOP) {
return 53;
}
}
for (i = 0; i < node->brooks; i++) {
sq = node->brooklist [i];
hashcode ^= hashnumbers [BROOK - 1] [sq];
if (node->index [sq] != i) {
return 34;
}
matrix [sq] = BROOK;
if (node->matrix [sq] != BROOK) {
return 54;
}
}
for (i = 0; i < node->bqueens; i++) {
sq = node->bqueenlist [i];
hashcode ^= hashnumbers [BQUEEN - 1] [sq];
if (node->index [sq] != i) {
return 35;
}
matrix [sq] = BQUEEN;
if (node->matrix [sq] != BQUEEN) {
return 55;
}
}
matrix [node->bkpos] = BKING;
hashcode ^= hashnumbers [BKING - 1] [node -> bkpos];
if (node->matrix [node->bkpos] != BKING) {
return 56;
}
if (memcmp (matrix, node->matrix, sizeof (matrix))) {
return 100;
}
if (_SCW(node)) {
hashcode ^= _LL(0x47bc71a493da706e);
}
if (_SCB(node)) {
hashcode ^= _LL(0x6fed622e98f98b7e);
}
if (_LCW(node)) {
hashcode ^= _LL(0x6338be439fd357dc);
}
if (_LCB(node)) {
hashcode ^= _LL(0xce107ca2947d2d58);
}
if (_EPSQ(node)) {
hashcode ^= ephash [_EPSQ (node)];
}
if (node-> flags & _WTM) {
hashcode |= 1;
} else {
hashcode &= _LL(0xFFFFFFFFFFFFFFFE);
}
if (hashcode != node -> hashcode) {
std::cout << boost::format("hashcode = %Ld, node -> hashcode = %Ld\n") % hashcode % node -> hashcode;
return 200;
}
if (pawncode != node -> pawncode) {
std::cout << boost::format("pawncode = %Ld, node -> pawncode = %Ld\n") % pawncode % node -> pawncode;
return 201;
}
// if (_result_value < -CHESS_INF || _result_value > CHESS_INF) {
// return 300;
// }
return 0;
}
| Java |
<?php
/*
* Comments cell type.
* Displays form and coments
*
*/
if( !function_exists('register_comments_cell_init') )
{
function register_comments_cell_init() {
if ( function_exists('register_dd_layout_cell_type') ) {
register_dd_layout_cell_type ( 'comments-cell',
array (
'name' => __('Comments', 'ddl-layouts'),
'description' => __('Display the comments section. This cell is typically used in layouts for blog posts and pages that need comments enable.', 'ddl-layouts'),
'category' => __('Site elements', 'ddl-layouts'),
'cell-image-url' => DDL_ICONS_SVG_REL_PATH.'layouts-comments-cell.svg',
'button-text' => __('Assign comments cell', 'ddl-layouts'),
'dialog-title-create' => __('Create a new comments cell', 'ddl-layouts'),
'dialog-title-edit' => __('Edit comments cell', 'ddl-layouts'),
'dialog-template-callback' => 'comments_cell_dialog_template_callback',
'cell-content-callback' => 'comments_cell_content_callback',
'cell-template-callback' => 'comments_cell_template_callback',
'has_settings' => true,
'cell-class' => '',
'preview-image-url' => DDL_ICONS_PNG_REL_PATH . 'comments_expand-image.png',
'allow-multiple' => false,
'register-scripts' => array(
array( 'ddl-comments-cell-script', WPDDL_GUI_RELPATH . 'editor/js/ddl-comments-cell-script.js', array( 'jquery' ), WPDDL_VERSION, true ),
),
'translatable_fields' => array(
'title_one_comment' => array('title' => 'One comment text', 'type' => 'LINE'),
'title_multi_comments' => array('title' => 'Multiple comments text', 'type' => 'LINE'),
'ddl_prev_link_text' => array('title' => 'Older Comments text', 'type' => 'LINE'),
'ddl_next_link_text' => array('title' => 'Newer Comments text', 'type' => 'LINE'),
'comments_closed_text' => array('title' => 'Comments are closed text', 'type' => 'LINE'),
'reply_text' => array('title' => 'Reply text', 'type' => 'LINE'),
'password_text' => array('title' => 'Password protected post text', 'type' => 'LINE')
)
)
);
add_action( 'wp_ajax_ddl_load_comments_page_content', 'ddl_load_comments_page_content' );
add_action( 'wp_ajax_nopriv_ddl_load_comments_page_content', 'ddl_load_comments_page_content' );
}
}
add_action( 'init', 'register_comments_cell_init' );
function comments_cell_dialog_template_callback() {
ob_start();
?>
<h3 class="ddl-section-title">
<?php _e('Comments list', 'ddl-layouts'); ?>
</h3>
<div class="ddl-form">
<p>
<label for="<?php the_ddl_name_attr('avatar_size'); ?>"><?php _e( 'Avatar size', 'ddl-layouts' ) ?>:</label>
<input type="number" value="24" placeholder="<?php _e( '32', 'ddl-layouts' ) ?>" name="<?php the_ddl_name_attr('avatar_size'); ?>" id="<?php the_ddl_name_attr('avatar_size'); ?>" class="ddl-narrow-width" onkeypress='return event.charCode >= 48 && event.charCode <= 57'>
</p>
</div>
<h3 class="ddl-section-title">
<?php _e( 'Title for comments list', 'ddl-layouts' ) ?>
</h3>
<div class="ddl-form">
<p>
<label for="<?php the_ddl_name_attr('title_one_comment'); ?>"><?php _e( 'For one comment', 'ddl-layouts' ) ?>:</label>
<input type="text" name="<?php the_ddl_name_attr('title_one_comment'); ?>" id="<?php the_ddl_name_attr('title_one_comment'); ?>" value="<?php _e( 'One thought on %TITLE%', 'ddl-layouts' ) ?>">
<div id="title_one_comment_message"></div>
</p>
<p>
<label for="<?php the_ddl_name_attr('title_multi_comments'); ?>"><?php _e( 'For two or more', 'ddl-layouts' ) ?>:</label>
<input type="text" name="<?php the_ddl_name_attr('title_multi_comments'); ?>" id="<?php the_ddl_name_attr('title_multi_comments'); ?>" value="<?php _e( '%COUNT% thoughts on %TITLE%', 'ddl-layouts' ) ?>">
<div id="title_multi_comments_message"></div>
<span class="desc"><?php _e( 'Use the %TITLE% placeholder to display the post title and the %COUNT% placeholder to display the number of comments.', 'ddl-layouts' ) ?></span>
</p>
</div>
<h3 class="ddl-section-title">
<?php _e( 'Navigation and miscellaneous texts', 'ddl-layouts' ) ?>
</h3>
<div class="ddl-form">
<p>
<label for="<?php the_ddl_name_attr('ddl_prev_link_text'); ?>"><?php _e( 'Previous link text', 'ddl-layouts' ) ?>:</label>
<input type="text" name="<?php the_ddl_name_attr('ddl_prev_link_text'); ?>" id="<?php the_ddl_name_attr('ddl_prev_link_text'); ?>" value="<?php _e( '<< Older Comments', 'ddl-layouts' ) ?>">
</p>
<p>
<label for="<?php the_ddl_name_attr('ddl_next_link_text'); ?>"><?php _e( 'Next link text', 'ddl-layouts' ) ?>:</label>
<input type="text" name="<?php the_ddl_name_attr('ddl_next_link_text'); ?>" id="<?php the_ddl_name_attr('ddl_next_link_text'); ?>" value="<?php _e( 'Newer Comments >>', 'ddl-layouts' ) ?>">
</p>
<p>
<label for="<?php the_ddl_name_attr('comments_closed_text'); ?>"><?php _e( 'Comments closed text', 'ddl-layouts' ) ?>:</label>
<input type="text" name="<?php the_ddl_name_attr('comments_closed_text'); ?>" id="<?php the_ddl_name_attr('comments_closed_text'); ?>" value="<?php _e( 'Comments are closed', 'ddl-layouts' ) ?>">
<div id="comments_closed_text_message"></div>
</p>
<p>
<label for="<?php the_ddl_name_attr('reply_text'); ?>"><?php _e( 'Reply text', 'ddl-layouts' ) ?>:</label>
<input type="text" name="<?php the_ddl_name_attr('reply_text'); ?>" id="<?php the_ddl_name_attr('reply_text'); ?>" value="<?php _e( 'Reply', 'ddl-layouts' ) ?>">
<div id="reply_text_message"></div>
</p>
<p>
<label for="<?php the_ddl_name_attr('password_text'); ?>"><?php _e( 'Password protected text', 'ddl-layouts' ) ?>:</label>
<input type="text" name="<?php the_ddl_name_attr('password_text'); ?>" id="<?php the_ddl_name_attr('password_text'); ?>" value="<?php _e( 'This post is password protected. Enter the password to view any comments.', 'ddl-layouts' ) ?>">
<div id="password_text_message"></div>
</p>
</div>
<div class="ddl-form">
<div class="ddl-form-item">
<br />
<?php ddl_add_help_link_to_dialog(WPDLL_COMMENTS_CELL,
__('Learn about the Comments cell', 'ddl-layouts'));
?>
</div>
</div>
<?php
global $current_user;
get_currentuserinfo();
?>
<?php
return ob_get_clean();
}
// Callback function for displaying the cell in the editor.
function comments_cell_template_callback() {
ob_start();
?>
<div class="cell-content">
<p class="cell-name">{{ name }} – <?php _e('Comment Cell', 'ddl-layouts'); ?></p>
<div class="cell-preview">
<div class="ddl-comments-preview">
<img src="<?php echo WPDDL_RES_RELPATH . '/images/cell-icons/comments.svg'; ?>" height="130px">
</div>
</div>
</div>
<?php
return ob_get_clean();
}
//Hook for previous page link, add post id and prev page to link
function ddl_add_previous_comments_link_data(){
global $post;
if ( !isset($post->ID)){
return;
}
$page = get_query_var('cpage');
if ( intval($page) <= 1 ){
return;
}
$prevpage = intval($page) - 1;
return ' data-page="'.$prevpage.'" data-postid="'.$post->ID.'" ';
}
//Hook for next page link, add post id and next page to link
function ddl_add_next_comments_link_data(){
global $post;
if ( !isset($post->ID)){
return;
}
$page = get_query_var('cpage');
$nextpage = intval($page) + 1;
return ' data-page="'.$nextpage.'" data-postid="'.$post->ID.'" ';
}
//Load page content, Ajax pagination. Most of code same, so we can do one function for this
function ddl_load_comments_page_content(){
$nonce = $_POST["wpnonce"];
if (! wp_verify_nonce( $nonce, 'ddl_comments_listing_page' ) ) {
echo 'Error';
} else {
global $wpddlayout, $wp_query, $withcomments, $wpdb, $id, $post, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
if ( !isset($_POST['page']) && !isset($_POST['postid']) ){
echo 'Error';
}
$load_page = $_POST['page']; // Current page to load
$post_id = $_POST['postid'];
$post = get_post($post_id); // Get post
setup_postdata( $post ); // load global $post
$comments = ddl_load_comments_array();
set_query_var('cpage' ,$load_page); //Set query page
$overridden_cpage = true;
$wp_query->query = array( 'page_id' => $post->ID, 'cpage' => $load_page);
set_query_var( 'post_id', $post->ID);
set_query_var( 'p', $post->ID);
$wp_query->is_singular = 1;
$layout_id = $_POST['layout_name'];
$cell_id = $_POST['cell_id'];
get_the_ddlayout($layout_id);
global $wpddlayout;
$wpddlayout->set_up_cell_fields_by_id( $cell_id, $layout_id );
$post = get_post($post_id); // Get post
setup_postdata( $post ); // load global $post
}
$comments_list = ddl_render_comments_list( $comments, $post, $load_page);
echo $comments_list;
die();
}
// Callback function for display the cell in the front end.
function comments_cell_content_callback() {
global $wpddlayout, $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
if ( !(is_single() || is_page() || $withcomments) || empty($post) )
return;
$wpddlayout->enqueue_scripts('ddl-comment-cell-front-end');
$wpddlayout->localize_script('ddl-comment-cell-front-end', 'DDL_Comments_cell', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'security' => wp_create_nonce( 'ddl_comments_listing_page' ),
'layout_name' => $wpddlayout->get_rendered_layout_id(),
'cell_id' => get_ddl_field('unique_id')
));
$comments = ddl_load_comments_array();
$overridden_cpage = false;
if ( '' == get_query_var('cpage') && get_option('page_comments') ) {
set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 );
$overridden_cpage = true;
}
$load_page = '';
if ( isset($_GET['cpage']) ){
$load_page = $_GET['cpage'];
}
$comments_list = ddl_render_comments_list( $comments, $post, $load_page);
return $comments_list;
}
//Get comments array for current post
function ddl_load_comments_array(){
global $wpddlayout, $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
$commenter = wp_get_current_commenter();
$comment_author = $commenter['comment_author'];
$comment_author_email = $commenter['comment_author_email'];
$comment_author_url = esc_url($commenter['comment_author_url']);
if ( $user_ID) {
$comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, $user_ID));
} else if ( empty($comment_author) ) {
$comments = get_comments( array('post_id' => $post->ID, 'status' => 'approve', 'order' => 'ASC') );
} else {
$comments = $wpdb->get_results($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) ORDER BY comment_date_gmt", $post->ID, wp_specialchars_decode($comment_author,ENT_QUOTES), $comment_author_email));
}
$wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID );
$comments = &$wp_query->comments;
$wp_query->comment_count = count($wp_query->comments);
update_comment_cache($wp_query->comments);
return $comments;
}
//Generate comments listing
function ddl_render_comments_list($comments, $post, $load_page=''){
ob_start();
?>
<div id="comments">
<?php if ( post_password_required($post) ) : ?>
<p class="nopassword"><?php the_ddl_field('password_text'); ?></p>
</div><!-- #comments -->
<?php
return ob_get_clean();
endif;
?>
<?php if ( comments_open() ):
$num_comments = get_comments_number();
?>
<?php if ( $num_comments > 0 ): ?>
<h2 id="comments-title">
<?php
$one_comment_text = str_replace( array('%TITLE%', '%COUNT%'), array('%2$s','%1$s'), get_ddl_field('title_one_comment'));
$two_comments_text = str_replace( array('%TITLE%', '%COUNT%'), array('%2$s','%1$s'), get_ddl_field('title_multi_comments'));
printf( _n( $one_comment_text, $two_comments_text, $num_comments ),
number_format_i18n( $num_comments ), '<span>' . $post->post_title . '</span>' );
?>
</h2>
<?php if ( get_comment_pages_count($comments) > 1 && get_option( 'page_comments' ) ):?>
<?php
add_filter('previous_comments_link_attributes','ddl_add_previous_comments_link_data');
add_filter('next_comments_link_attributes','ddl_add_next_comments_link_data');
?>
<nav id="comment-nav-above">
<div class="nav-previous js-ddl-previous-link"><?php previous_comments_link( get_ddl_field('ddl_prev_link_text') ); ?></div>
<div class="nav-next js-ddl-next-link"><?php next_comments_link( get_ddl_field('ddl_next_link_text') ); ?></div>
</nav>
<?php endif; // check for comment navigation ?>
<?php
$comments_defaults = array();
//Set comments style
$comments_defaults['style'] = apply_filters('ddl_comment_cell_style', 'ul');
//Avatar Size
if ( get_ddl_field('avatar_size') != '' ){
$comments_defaults['avatar_size'] = get_ddl_field('avatar_size');
}
//Reply text
if ( get_ddl_field('reply_text') != '' ){
$comments_defaults['reply_text'] = get_ddl_field('reply_text');
}
if ( get_comment_pages_count($comments) > 1 && get_option( 'page_comments' ) ):
$comments_defaults['per_page'] = get_option('comments_per_page');
if ( empty($load_page) ){
if ('newest' == get_option('default_comments_page')){
$comments_defaults['page'] = get_comment_pages_count($comments);
}else{
$comments_defaults['page'] = 1;
}
}else{
//Current page
$comments_defaults['page'] = $load_page;
}
endif;
$before_comments_list = '<ul class="commentlist">';
$after_comments_list = '</ul>';
if ( $comments_defaults['style'] == 'ol' ){
$before_comments_list = '<ol class="commentlist">';
$after_comments_list = '</ol>';
}
if ( $comments_defaults['style'] == 'div' ){
$before_comments_list = '<div class="commentlist">';
$after_comments_list = '</div>';
}
echo '<div id="comments-listing">';
echo $before_comments_list;
//Generate and print comments listing
wp_list_comments( $comments_defaults, $comments );
echo $after_comments_list;
echo '</div>';
?>
<?php endif;?>
<?php // Generate comment form
comment_form(); ?>
<?php else:?>
<p class="nocomments"><?php the_ddl_field('comments_closed_text'); ?></p>
<?php endif;?>
</div>
<?php
return ob_get_clean();
}
} | Java |
<?
class CategoryID extends Handler {
protected $REST_vars;
protected $DBs;
protected $User;
// RUN //
public function run() {
switch ( $this->REST_vars["method"] ) {
case "get":
$this->get();
break;
case "delete":
case "put":
case "post":
default:
throw new Error($GLOBALS["HTTP_STATUS"]["Bad Request"], get_class($this) . " Error: Request method not supported.");
}
}
// * //
// GET //
protected function get() {
// Get category with given categoryID
$select = "
SELECT `id`, `name`
FROM `Categories`
WHERE `id` = ?
";
$binds = ["i", $this->REST_vars["categoryID"]];
$res = $this->DBs->select($select, $binds);
if ( is_null($res) ) {
throw new Error($GLOBALS["HTTP_STATUS"]["Internal Error"], get_class($this) . " Error: Failed to retrieve request.");
}
$JSON = [];
while ($row = $res->fetch_assoc()) {
$obj = [];
$obj["id"] = $row['id'];
$obj["name"] = $row['name'];
$JSON[] = $obj;
}
////
$this->send( $JSON, $GLOBALS["HTTP_STATUS"]["OK"] );
}
// * //
}
?> | Java |
<?php
/**
* Controllo se il file viene richiamato direttamente senza
* essere incluso dalla procedura standard del plugin.
*
* @package SZGoogle
*/
if (!defined('SZ_PLUGIN_GOOGLE') or !SZ_PLUGIN_GOOGLE) die();
/**
* Definizione variabile HTML per la preparazione della stringa
* che contiene la documentazione di questa funzionalità
*/
$HTML = <<<EOD
<h2>Documentation</h2>
<p>With this feature you can place on its website a widget that displays the recommendations related to the pages of your website
based on social iterations. This feature will be displayed only on the mobile version of the web site and ignored on different
devices. To enable this option, you must select the specific field that you find the admin panel but you also need to perform
operations on google+ page connected to your site. <a target="_blank" href="https://developers.google.com/+/web/recommendations/?hl=it">Content recommendations for mobile websites</a>.</p>
<h2>Configuration</h2>
<p>In the settings section of the Google+ page you can control the behavior of the widget that relates to the advice and the display
mode. So do not try to change these settings in the options but use the plugin configuration page directly on google plus.</p>
<p><b>The following options are available from the settings page:</b></p>
<ul>
<li>Turn on or off recommendations.</li>
<li>Choose pages or paths which should not show recommendations.</li>
<li>Choose pages or paths to prevent from displaying in the recommendations bar.</li>
</ul>
<p><b>Choose when to show the recommendations bar:</b></p>
<ul>
<li>When the user scrolls up.</li>
<li>When the user scrolls past an element with a specified ID.</li>
<li>When the user scrolls past an element that matches a DOM query selector.</li>
</ul>
<h2>Warnings</h2>
<p>The plugin <b>SZ-Google</b> has been developed with a technique of loading individual modules to optimize overall performance,
so before you use a shortcode, a widget, or a PHP function you should check that the module general and the specific option appears
enabled via the field dedicated option that you find in the admin panel.</p>
EOD;
/**
* Richiamo della funzione per la creazione della pagina di
* documentazione standard in base al contenuto della variabile HTML
*/
$this->moduleCommonFormHelp(__('google+ recommendations','szgoogleadmin'),NULL,NULL,false,$HTML,basename(__FILE__)); | Java |
/**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/iWorkImport.framework/iWorkImport
*/
#import <iWorkImport/GQDRStrokePattern.h>
#import <iWorkImport/XXUnknownSuperclass.h>
#import <iWorkImport/iWorkImport-Structs.h>
__attribute__((visibility("hidden")))
@interface GQDRStrokePattern : XXUnknownSuperclass {
@private
int mType; // 4 = 0x4
}
+ (id)solidPattern; // 0xde35
- (int)type; // 0xde05
@end
@interface GQDRStrokePattern (Private)
- (int)readAttributesFromReader:(xmlTextReader *)reader; // 0xde81
@end
| Java |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="DC.type" http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<head>R%egrave%glement (CE) n o %nbsp%48/2006 de la Commission du 12 janvier 2006 fixant les restitutions applicables %agrave% l'exportation des c%eacute%r%eacute%ales, des farines et des gruaux et semoules de froment ou de seigle</head>
<div type="body">
<p>Règlement (CE) no 48/2006 de la Commission</p>
<p>du 12 janvier 2006</p>
<p>fixant les restitutions applicables à l'exportation des céréales, des farines et des gruaux et semoules de froment ou de seigle</p>
<p>LA COMMISSION DES COMMUNAUTÉS EUROPÉENNES,</p>
<p>vu le traité instituant la Communauté européenne,</p>
<p>vu le règlement (CE) no 1784/2003 du Conseil du 29 septembre 2003 portant organisation commune des marchés dans le secteur des céréales [1], et notamment son article 13, paragraphe 3,</p>
<p>considérant ce qui suit:</p>
<p>(1) Aux termes de l'article 13 du règlement (CE) no 1784/2003, la différence entre les cours ou les prix des produits visés à l'article 1er dudit règlement et les prix de ces produits dans la Communauté peut être couverte par une restitution à l'exportation.</p>
<p>(2) Les restitutions doivent être fixées en prenant en considération les éléments visés à l'article 1er du règlement (CE) no 1501/95 de la Commission du 29 juin 1995 établissant certaines modalités d'application du règlement (CEE) no 1766/92 du Conseil en ce qui concerne l'octroi des restitutions à l'exportation ainsi que les mesures à prendre, en cas de perturbation, dans le secteur des céréales [2].</p>
<p>(3) En ce qui concerne les farines, les gruaux et les semoules de froment ou de seigle, la restitution applicable à ces produits doit être calculée en tenant compte de la quantité de céréales nécessaire à la fabrication des produits considérés. Ces quantités ont été fixées dans le règlement (CE) no 1501/95.</p>
<p>(4) La situation du marché mondial ou les exigences spécifiques de certains marchés peuvent rendre nécessaire la différenciation de la restitution pour certains produits, suivant leur destination.</p>
<p>(5) La restitution doit être fixée une fois par mois. Elle peut être modifiée dans l'intervalle.</p>
<p>(6) L'application de ces modalités à la situation actuelle des marchés dans le secteur des céréales, et notamment aux cours ou prix de ces produits dans la Communauté et sur le marché mondial, conduit à fixer la restitution aux montants repris en annexe.</p>
<p>(7) Les mesures prévues au présent règlement sont conformes à l'avis du comité de gestion des céréales,</p>
<p>A ARRÊTÉ LE PRÉSENT RÈGLEMENT:</p>
<p>Article premier</p>
<p>Les restitutions à l'exportation, en l'état, des produits visés à l'article 1er, points a), b) et c), du règlement (CE) no 1784/2003, à l'exception du malt, sont fixées aux montants repris en annexe.</p>
<p>Article 2</p>
<p>Le présent règlement entre en vigueur le 13 janvier 2006.</p>
<p>Le présent règlement est obligatoire dans tous ses éléments et directement applicable dans tout État membre.</p>
</div>
<div type="signature">
<p>Fait à Bruxelles, le 12 janvier 2006.</p>
<p>Par la Commission</p>
<p>Mariann Fischer Boel</p>
<p>Membre de la Commission</p>
<p>[1] JO L 270 du 21.10.2003, p. 78. Règlement modifié par le règlement (CE) no 1154/2005 de la Commission (JO L 187 du 19.7.2005, p. 11).</p>
<p>[2] JO L 147 du 30.6.1995, p. 7. Règlement modifié en dernier lieu par le règlement (CE) no 777/2004 (JO L 123 du 27.4.2004, p. 50).</p>
<p>--------------------------------------------------</p>
</div>
<div type="annex">
<p>ANNEXE</p>
<p>du règlement de la Commission du 12 janvier 2006 fixant les restitutions applicables à l'exportation des céréales, des farines et des gruaux et semoules de froment ou de seigle</p>
<p>NB: Les codes des produits ainsi que les codes des destinations série "A" sont définis au règlement (CEE) no 3846/87 de la Commission (JO L 366 du 24.12.1987, p. 1), modifié.</p>
<p>C01 : Tous pays tiers à l'exclusion de l'Albanie, de la Bulgarie, de la Roumanie, de la Croatie, de la Bosnie-et-Herzégovine, de la Serbie-et-Monténégro, de l'ancienne République yougoslave de Macédoine, du Liechtenstein et de la Suisse.</p>
<p>Code des produits | Destination | Unité de mesure | Montant des restitutions |</p>
<p>1001 10 00 9200 | — | EUR/t | — |</p>
<p>1001 10 00 9400 | A00 | EUR/t | 0 |</p>
<p>1001 90 91 9000 | — | EUR/t | — |</p>
<p>1001 90 99 9000 | A00 | EUR/t | 0 |</p>
<p>1002 00 00 9000 | A00 | EUR/t | 0 |</p>
<p>1003 00 10 9000 | — | EUR/t | — |</p>
<p>1003 00 90 9000 | A00 | EUR/t | 0 |</p>
<p>1004 00 00 9200 | — | EUR/t | — |</p>
<p>1004 00 00 9400 | A00 | EUR/t | 0 |</p>
<p>1005 10 90 9000 | — | EUR/t | — |</p>
<p>1005 90 00 9000 | A00 | EUR/t | 0 |</p>
<p>1007 00 90 9000 | — | EUR/t | — |</p>
<p>1008 20 00 9000 | — | EUR/t | — |</p>
<p>1101 00 11 9000 | — | EUR/t | — |</p>
<p>1101 00 15 9100 | C01 | EUR/t | 12,33 |</p>
<p>1101 00 15 9130 | C01 | EUR/t | 11,52 |</p>
<p>1101 00 15 9150 | C01 | EUR/t | 10,62 |</p>
<p>1101 00 15 9170 | C01 | EUR/t | 9,81 |</p>
<p>1101 00 15 9180 | C01 | EUR/t | 9,18 |</p>
<p>1101 00 15 9190 | — | EUR/t | — |</p>
<p>1101 00 90 9000 | — | EUR/t | — |</p>
<p>1102 10 00 9500 | A00 | EUR/t | 0 |</p>
<p>1102 10 00 9700 | A00 | EUR/t | 0 |</p>
<p>1102 10 00 9900 | — | EUR/t | — |</p>
<p>1103 11 10 9200 | A00 | EUR/t | 0 |</p>
<p>1103 11 10 9400 | A00 | EUR/t | 0 |</p>
<p>1103 11 10 9900 | — | EUR/t | — |</p>
<p>1103 11 90 9200 | A00 | EUR/t | 0 |</p>
<p>1103 11 90 9800 | — | EUR/t | — |</p>
<p>--------------------------------------------------</p>
</div>
</body>
</html>
| Java |
/*
* Copyright (C) 2005-2012 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_MAP_H
#define MANGOS_MAP_H
#include "Common.h"
#include "Platform/Define.h"
#include "Policies/ThreadingModel.h"
#include "ace/RW_Thread_Mutex.h"
#include "ace/Thread_Mutex.h"
#include "DBCStructure.h"
#include "GridDefines.h"
#include "Cell.h"
#include "Object.h"
#include "Timer.h"
#include "SharedDefines.h"
#include "GridMap.h"
#include "GameSystem/GridRefManager.h"
#include "MapRefManager.h"
#include "Utilities/TypeList.h"
#include "ScriptMgr.h"
#include "CreatureLinkingMgr.h"
#include "vmap/DynamicTree.h"
#include <bitset>
#include <list>
struct CreatureInfo;
class Creature;
class Unit;
class WorldPacket;
class InstanceData;
class Group;
class MapPersistentState;
class WorldPersistentState;
class DungeonPersistentState;
class BattleGroundPersistentState;
struct ScriptInfo;
class BattleGround;
class GridMap;
class GameObjectModel;
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some platform
#if defined( __GNUC__ )
#pragma pack(1)
#else
#pragma pack(push,1)
#endif
struct InstanceTemplate
{
uint32 map; // instance map
uint32 parent; // non-continent parent instance (for instance with entrance in another instances)
// or 0 (not related to continent 0 map id)
uint32 levelMin;
uint32 levelMax;
uint32 script_id;
};
struct WorldTemplate
{
uint32 map; // non-instance map
uint32 script_id;
};
enum LevelRequirementVsMode
{
LEVELREQUIREMENT_HEROIC = 70
};
#if defined( __GNUC__ )
#pragma pack()
#else
#pragma pack(pop)
#endif
#define MIN_UNLOAD_DELAY 1 // immediate unload
class MANGOS_DLL_SPEC Map : public GridRefManager<NGridType>
{
friend class MapReference;
friend class ObjectGridLoader;
friend class ObjectWorldLoader;
protected:
Map(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode);
public:
virtual ~Map();
// currently unused for normal maps
bool CanUnload(uint32 diff)
{
if (!m_unloadTimer) return false;
if (m_unloadTimer <= diff) return true;
m_unloadTimer -= diff;
return false;
}
virtual bool Add(Player*);
virtual void Remove(Player*, bool);
template<class T> void Add(T*);
template<class T> void Remove(T*, bool);
static void DeleteFromWorld(Player* player); // player object will deleted at call
virtual void Update(const uint32&);
void MessageBroadcast(Player*, WorldPacket*, bool to_self);
void MessageBroadcast(WorldObject*, WorldPacket*);
void MessageDistBroadcast(Player*, WorldPacket*, float dist, bool to_self, bool own_team_only = false);
void MessageDistBroadcast(WorldObject*, WorldPacket*, float dist);
float GetVisibilityDistance() const { return m_VisibleDistance; }
// function for setting up visibility distance for maps on per-type/per-Id basis
virtual void InitVisibilityDistance();
void PlayerRelocation(Player*, float x, float y, float z, float angl);
void CreatureRelocation(Creature* creature, float x, float y, float z, float orientation);
template<class T, class CONTAINER> void Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER>& visitor);
bool IsRemovalGrid(float x, float y) const
{
GridPair p = MaNGOS::ComputeGridPair(x, y);
return(!getNGrid(p.x_coord, p.y_coord) || getNGrid(p.x_coord, p.y_coord)->GetGridState() == GRID_STATE_REMOVAL);
}
bool IsLoaded(float x, float y) const
{
GridPair p = MaNGOS::ComputeGridPair(x, y);
return loaded(p);
}
bool GetUnloadLock(const GridPair& p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
void SetUnloadLock(const GridPair& p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); }
void LoadGrid(const Cell& cell, bool no_unload = false);
bool UnloadGrid(const uint32& x, const uint32& y, bool pForce);
virtual void UnloadAll(bool pForce);
void ResetGridExpiry(NGridType& grid, float factor = 1) const
{
grid.ResetTimeTracker((time_t)((float)i_gridExpiry * factor));
}
time_t GetGridExpiry(void) const { return i_gridExpiry; }
uint32 GetId(void) const { return i_id; }
// some calls like isInWater should not use vmaps due to processor power
// can return INVALID_HEIGHT if under z+2 z coord not found height
virtual void RemoveAllObjectsInRemoveList();
bool CreatureRespawnRelocation(Creature* c); // used only in CreatureRelocation and ObjectGridUnloader
bool CheckGridIntegrity(Creature* c, bool moved) const;
uint32 GetInstanceId() const { return i_InstanceId; }
virtual bool CanEnter(Player* player);
const char* GetMapName() const;
// have meaning only for instanced map (that have set real difficulty), NOT USE its for BaseMap
// _currently_ spawnmode == difficulty, but this can be changes later, so use appropriate spawmmode/difficult functions
// for simplify later code support
// regular difficulty = continent/dungeon normal/first raid normal difficulty
uint8 GetSpawnMode() const { return (i_spawnMode); }
Difficulty GetDifficulty() const { return Difficulty(GetSpawnMode()); }
bool IsRegularDifficulty() const { return GetDifficulty() == REGULAR_DIFFICULTY; }
uint32 GetMaxPlayers() const; // dependent from map difficulty
uint32 GetMaxResetDelay() const; // dependent from map difficulty
MapDifficultyEntry const* GetMapDifficulty() const; // dependent from map difficulty
bool Instanceable() const { return i_mapEntry && i_mapEntry->Instanceable(); }
// NOTE: this duplicate of Instanceable(), but Instanceable() can be changed when BG also will be instanceable
bool IsDungeon() const { return i_mapEntry && i_mapEntry->IsDungeon(); }
bool IsRaid() const { return i_mapEntry && i_mapEntry->IsRaid(); }
bool IsNonRaidDungeon() const { return i_mapEntry && i_mapEntry->IsNonRaidDungeon(); }
bool IsRaidOrHeroicDungeon() const { return IsRaid() || GetDifficulty() > DUNGEON_DIFFICULTY_NORMAL; }
bool IsBattleGround() const { return i_mapEntry && i_mapEntry->IsBattleGround(); }
bool IsBattleArena() const { return i_mapEntry && i_mapEntry->IsBattleArena(); }
bool IsBattleGroundOrArena() const { return i_mapEntry && i_mapEntry->IsBattleGroundOrArena(); }
// can't be NULL for loaded map
MapPersistentState* GetPersistentState() const { return m_persistentState; }
void AddObjectToRemoveList(WorldObject* obj);
void UpdateObjectVisibility(WorldObject* obj, Cell cell, CellPair cellpair);
void resetMarkedCells() { marked_cells.reset(); }
bool isCellMarked(uint32 pCellId) { return marked_cells.test(pCellId); }
void markCell(uint32 pCellId) { marked_cells.set(pCellId); }
bool HavePlayers() const { return !m_mapRefManager.isEmpty(); }
uint32 GetPlayersCountExceptGMs() const;
bool ActiveObjectsNearGrid(uint32 x, uint32 y) const;
void SendToPlayers(WorldPacket const* data) const;
typedef MapRefManager PlayerList;
PlayerList const& GetPlayers() const { return m_mapRefManager; }
// per-map script storage
bool ScriptsStart(ScriptMapMapName const& scripts, uint32 id, Object* source, Object* target);
void ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* source, Object* target);
// must called with AddToWorld
void AddToActive(WorldObject* obj);
// must called with RemoveFromWorld
void RemoveFromActive(WorldObject* obj);
Player* GetPlayer(ObjectGuid guid);
Creature* GetCreature(ObjectGuid guid);
Pet* GetPet(ObjectGuid guid);
Creature* GetAnyTypeCreature(ObjectGuid guid); // normal creature or pet or vehicle
GameObject* GetGameObject(ObjectGuid guid);
DynamicObject* GetDynamicObject(ObjectGuid guid);
Corpse* GetCorpse(ObjectGuid guid); // !!! find corpse can be not in world
Unit* GetUnit(ObjectGuid guid); // only use if sure that need objects at current map, specially for player case
WorldObject* GetWorldObject(ObjectGuid guid); // only use if sure that need objects at current map, specially for player case
typedef TypeUnorderedMapContainer<AllMapStoredObjectTypes, ObjectGuid> MapStoredObjectTypesContainer;
MapStoredObjectTypesContainer& GetObjectsStore() { return m_objectsStore; }
void AddUpdateObject(Object* obj)
{
i_objectsToClientUpdate.insert(obj);
}
void RemoveUpdateObject(Object* obj)
{
i_objectsToClientUpdate.erase(obj);
}
// DynObjects currently
uint32 GenerateLocalLowGuid(HighGuid guidhigh);
// get corresponding TerrainData object for this particular map
const TerrainInfo* GetTerrain() const { return m_TerrainData; }
void CreateInstanceData(bool load);
InstanceData* GetInstanceData() { return i_data; }
uint32 GetScriptId() const { return i_script_id; }
void MonsterYellToMap(ObjectGuid guid, int32 textId, uint32 language, Unit* target);
void MonsterYellToMap(CreatureInfo const* cinfo, int32 textId, uint32 language, Unit* target, uint32 senderLowGuid = 0);
void PlayDirectSoundToMap(uint32 soundId, uint32 zoneId = 0);
// Dynamic VMaps
float GetHeight(uint32 phasemask, float x, float y, float z) const;
bool IsInLineOfSight(float x1, float y1, float z1, float x2, float y2, float z2, uint32 phasemask) const;
bool GetHitPosition(float srcX, float srcY, float srcZ, float& destX, float& destY, float& destZ, uint32 phasemask, float modifyDist) const;
// Object Model insertion/remove/test for dynamic vmaps use
void InsertGameObjectModel(const GameObjectModel& mdl);
void RemoveGameObjectModel(const GameObjectModel& mdl);
bool ContainsGameObjectModel(const GameObjectModel& mdl) const;
// Get Holder for Creature Linking
CreatureLinkingHolder* GetCreatureLinkingHolder() { return &m_creatureLinkingHolder; }
private:
void LoadMapAndVMap(int gx, int gy);
void SetTimer(uint32 t) { i_gridExpiry = t < MIN_GRID_DELAY ? MIN_GRID_DELAY : t; }
void SendInitSelf(Player* player);
void SendInitTransports(Player* player);
void SendRemoveTransports(Player* player);
bool CreatureCellRelocation(Creature* creature, Cell new_cell);
bool loaded(const GridPair&) const;
void EnsureGridCreated(const GridPair&);
bool EnsureGridLoaded(Cell const&);
void EnsureGridLoadedAtEnter(Cell const&, Player* player = NULL);
void buildNGridLinkage(NGridType* pNGridType) { pNGridType->link(this); }
template<class T> void AddType(T* obj);
template<class T> void RemoveType(T* obj, bool);
NGridType* getNGrid(uint32 x, uint32 y) const
{
MANGOS_ASSERT(x < MAX_NUMBER_OF_GRIDS);
MANGOS_ASSERT(y < MAX_NUMBER_OF_GRIDS);
return i_grids[x][y];
}
bool isGridObjectDataLoaded(uint32 x, uint32 y) const { return getNGrid(x, y)->isGridObjectDataLoaded(); }
void setGridObjectDataLoaded(bool pLoaded, uint32 x, uint32 y) { getNGrid(x, y)->setGridObjectDataLoaded(pLoaded); }
void setNGrid(NGridType* grid, uint32 x, uint32 y);
void ScriptsProcess();
void SendObjectUpdates();
std::set<Object*> i_objectsToClientUpdate;
protected:
MapEntry const* i_mapEntry;
uint8 i_spawnMode;
uint32 i_id;
uint32 i_InstanceId;
uint32 m_unloadTimer;
float m_VisibleDistance;
MapPersistentState* m_persistentState;
MapRefManager m_mapRefManager;
MapRefManager::iterator m_mapRefIter;
typedef std::set<WorldObject*> ActiveNonPlayers;
ActiveNonPlayers m_activeNonPlayers;
ActiveNonPlayers::iterator m_activeNonPlayersIter;
MapStoredObjectTypesContainer m_objectsStore;
private:
time_t i_gridExpiry;
NGridType* i_grids[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS];
// Shared geodata object with map coord info...
TerrainInfo* const m_TerrainData;
bool m_bLoadedGrids[MAX_NUMBER_OF_GRIDS][MAX_NUMBER_OF_GRIDS];
std::bitset<TOTAL_NUMBER_OF_CELLS_PER_MAP* TOTAL_NUMBER_OF_CELLS_PER_MAP> marked_cells;
std::set<WorldObject*> i_objectsToRemove;
typedef std::multimap<time_t, ScriptAction> ScriptScheduleMap;
ScriptScheduleMap m_scriptSchedule;
InstanceData* i_data;
uint32 i_script_id;
// Map local low guid counters
ObjectGuidGenerator<HIGHGUID_UNIT> m_CreatureGuids;
ObjectGuidGenerator<HIGHGUID_GAMEOBJECT> m_GameObjectGuids;
ObjectGuidGenerator<HIGHGUID_DYNAMICOBJECT> m_DynObjectGuids;
ObjectGuidGenerator<HIGHGUID_PET> m_PetGuids;
ObjectGuidGenerator<HIGHGUID_VEHICLE> m_VehicleGuids;
// Type specific code for add/remove to/from grid
template<class T>
void AddToGrid(T*, NGridType*, Cell const&);
template<class T>
void RemoveFromGrid(T*, NGridType*, Cell const&);
// Holder for information about linked mobs
CreatureLinkingHolder m_creatureLinkingHolder;
// Dynamic Map tree object
DynamicMapTree m_dyn_tree;
};
class MANGOS_DLL_SPEC WorldMap : public Map
{
private:
using Map::GetPersistentState; // hide in subclass for overwrite
public:
WorldMap(uint32 id, time_t expiry) : Map(id, expiry, 0, REGULAR_DIFFICULTY) {}
~WorldMap() {}
// can't be NULL for loaded map
WorldPersistentState* GetPersistanceState() const;
};
class MANGOS_DLL_SPEC DungeonMap : public Map
{
private:
using Map::GetPersistentState; // hide in subclass for overwrite
public:
DungeonMap(uint32 id, time_t, uint32 InstanceId, uint8 SpawnMode);
~DungeonMap();
bool Add(Player*) override;
void Remove(Player*, bool) override;
void Update(const uint32&) override;
bool Reset(InstanceResetMethod method);
void PermBindAllPlayers(Player* player);
void UnloadAll(bool pForce) override;
void SendResetWarnings(uint32 timeLeft) const;
void SetResetSchedule(bool on);
// can't be NULL for loaded map
DungeonPersistentState* GetPersistanceState() const;
virtual void InitVisibilityDistance() override;
private:
bool m_resetAfterUnload;
bool m_unloadWhenEmpty;
};
class MANGOS_DLL_SPEC BattleGroundMap : public Map
{
private:
using Map::GetPersistentState; // hide in subclass for overwrite
public:
BattleGroundMap(uint32 id, time_t, uint32 InstanceId, uint8 spawnMode);
~BattleGroundMap();
void Update(const uint32&) override;
bool Add(Player*) override;
void Remove(Player*, bool) override;
bool CanEnter(Player* player) override;
void SetUnload();
void UnloadAll(bool pForce) override;
virtual void InitVisibilityDistance() override;
BattleGround* GetBG() { return m_bg; }
void SetBG(BattleGround* bg) { m_bg = bg; }
// can't be NULL for loaded map
BattleGroundPersistentState* GetPersistanceState() const;
private:
BattleGround* m_bg;
};
template<class T, class CONTAINER>
inline void
Map::Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER>& visitor)
{
const uint32 x = cell.GridX();
const uint32 y = cell.GridY();
const uint32 cell_x = cell.CellX();
const uint32 cell_y = cell.CellY();
if (!cell.NoCreate() || loaded(GridPair(x, y)))
{
EnsureGridLoaded(cell);
getNGrid(x, y)->Visit(cell_x, cell_y, visitor);
}
}
#endif
| Java |
# BurnMan - a lower mantle toolkit
# Copyright (C) 2012-2014, Myhill, R., Heister, T., Unterborn, C., Rose, I. and Cottaar, S.
# Released under GPL v2 or later.
# This is a standalone program that converts a tabulated version of the Stixrude and Lithgow-Bertelloni data format into the standard burnman format (printed to stdout)
import sys
def read_dataset(datafile):
f=open(datafile,'r')
ds=[]
for line in f:
ds.append(line.decode('utf-8').split())
return ds
ds=read_dataset('HHPH2013_endmembers.dat')
print '# BurnMan - a lower mantle toolkit'
print '# Copyright (C) 2012, 2013, Heister, T., Unterborn, C., Rose, I. and Cottaar, S.'
print '# Released under GPL v2 or later.'
print ''
print '"""'
print 'HHPH_2013'
print 'Minerals from Holland et al 2013 and references therein'
print 'The values in this document are all in S.I. units,'
print 'unlike those in the original paper'
print 'File autogenerated using HHPHdata_to_burnman.py'
print '"""'
print ''
print 'from burnman.mineral import Mineral'
print 'from burnman.solidsolution import SolidSolution'
print 'from burnman.solutionmodel import *'
print 'from burnman.processchemistry import read_masses, dictionarize_formula, formula_mass'
print ''
print 'atomic_masses=read_masses()'
print ''
print '"""'
print 'ENDMEMBERS'
print '"""'
print ''
param_scales = [ -1., -1., #not nubmers, so we won't scale
1.e3, 1.e3, #kJ -> J
1.0, # J/K/mol
1.e-5, # kJ/kbar/mol -> m^3/mol
1.e3, 1.e-2, 1.e3, 1.e3, # kJ -> J and table conversion for b
1.e-5, # table conversion
1.e8, # kbar -> Pa
1.0, # no scale for K'0
1.e-8] #GPa -> Pa # no scale for eta_s
formula='0'
for idx, m in enumerate(ds):
if idx == 0:
param_names=m
else:
print 'class', m[0].lower(), '(Mineral):'
print ' def __init__(self):'
print ''.join([' formula=\'',m[1],'\''])
print ' formula = dictionarize_formula(formula)'
print ' self.params = {'
print ''.join([' \'name\': \'', m[0], '\','])
print ' \'formula\': formula,'
print ' \'equation_of_state\': \'hp_tmt\','
for pid, param in enumerate(m):
if pid > 1 and pid != 3 and pid<6:
print ' \''+param_names[pid]+'\':', float(param)*param_scales[pid], ','
print ' \'Cp\':', [round(float(m[i])*param_scales[i],10) for i in [6, 7, 8, 9]], ','
for pid, param in enumerate(m):
if pid > 9:
print ' \''+param_names[pid]+'\':', float(param)*param_scales[pid], ','
print ' \'n\': sum(formula.values()),'
print ' \'molar_mass\': formula_mass(formula, atomic_masses)}'
print ''
print ' self.uncertainties = {'
print ' \''+param_names[3]+'\':', float(m[3])*param_scales[3], '}'
print ' Mineral.__init__(self)'
print ''
| Java |
const fs = require('fs');
const util = require('../../util');
// test equality
function equal(a, b, options) {
if (a === b) {
return options.fn(this);
}
return options.inverse(this);
}
// great than
function gt(a, b, options) {
if (a >= b) {
return options.fn(this);
}
return options.inverse(this);
}
// between
function between(a, b, c, options) {
if (a >= b && a <= c) {
return options.fn(this);
}
return options.inverse(this);
}
// less than
function lt(a, b, options) {
if (a < b) {
return options.fn(this);
}
return options.inverse(this);
}
function ignoreNan(val, symbol) {
const isNumber = (val >= 0 || val < 0);
return isNumber ? `${util.roundDecimal(val, 2)} ${symbol}` : '';
}
// test inequality
function inequal(a, b, options) {
if (a !== b) {
return options.fn(this);
}
return options.inverse(this);
}
// test File Exit
function fileExist(a, b, options) {
try {
fs.statSync(`${a}${b}`);
return options.fn(this);
} catch (err) {
return options.inverse(this);
}
}
exports.equal = equal;
exports.gt = gt;
exports.lt = lt;
exports.between = between;
exports.ignoreNan = ignoreNan;
exports.inequal = inequal;
exports.fileExist = fileExist;
| Java |
<?php
/**
* @file
* Definition of Drupal\views_ui\ViewUI.
*/
namespace Drupal\views_ui;
use Drupal\views\ViewExecutable;
use Drupal\Core\Database\Database;
use Drupal\Core\TypedData\ContextAwareInterface;
use Drupal\views\Plugin\views\query\Sql;
use Drupal\views\Plugin\Core\Entity\View;
use Drupal\views\ViewStorageInterface;
/**
* Stores UI related temporary settings.
*/
class ViewUI implements ViewStorageInterface {
/**
* Indicates if a view is currently being edited.
*
* @var bool
*/
public $editing = FALSE;
/**
* Stores an array of errors for any displays.
*
* @var array
*/
public $display_errors;
/**
* Stores an array of displays that have been changed.
*
* @var array
*/
public $changed_display;
/**
* How long the view takes to build.
*
* @var int
*/
public $build_time;
/**
* How long the view takes to render.
*
* @var int
*/
public $render_time;
/**
* How long the view takes to execute.
*
* @var int
*/
public $execute_time;
/**
* If this view is locked for editing.
*
* @var bool
*/
public $locked;
/**
* If this view has been changed.
*
* @var bool
*/
public $changed;
/**
* Stores options temporarily while editing.
*
* @var array
*/
public $temporary_options;
/**
* Stores a stack of UI forms to display.
*
* @var array
*/
public $stack;
/**
* Is the view runned in a context of the preview in the admin interface.
*
* @var bool
*/
public $live_preview;
public $displayID;
public $renderPreview = FALSE;
/**
* The View storage object.
*
* @var \Drupal\views\Plugin\Core\Entity\View
*/
protected $storage;
/**
* The View executable object.
*
* @var \Drupal\views\ViewExecutable
*/
protected $executable;
/**
* Constructs a View UI object.
*
* @param \Drupal\views\ViewStorageInterface $storage
* The View storage object to wrap.
*/
public function __construct(ViewStorageInterface $storage) {
$this->entityType = 'view';
$this->storage = $storage;
$this->executable = $storage->get('executable');
}
/**
* Overrides \Drupal\Core\Config\Entity\ConfigEntityBase::get().
*/
public function get($property_name, $langcode = NULL) {
if (property_exists($this->storage, $property_name)) {
return $this->storage->get($property_name, $langcode);
}
return isset($this->{$property_name}) ? $this->{$property_name} : NULL;
}
/**
* Overrides \Drupal\Core\Config\Entity\ConfigEntityBase::set().
*/
public function set($property_name, $value) {
if (property_exists($this->storage, $property_name)) {
$this->storage->set($property_name, $value);
}
else {
$this->{$property_name} = $value;
}
}
public static function getDefaultAJAXMessage() {
return '<div class="message">' . t("Click on an item to edit that item's details.") . '</div>';
}
/**
* Basic submit handler applicable to all 'standard' forms.
*
* This submit handler determines whether the user wants the submitted changes
* to apply to the default display or to the current display, and dispatches
* control appropriately.
*/
public function standardSubmit($form, &$form_state) {
// Determine whether the values the user entered are intended to apply to
// the current display or the default display.
list($was_defaulted, $is_defaulted, $revert) = $this->getOverrideValues($form, $form_state);
// Based on the user's choice in the display dropdown, determine which display
// these changes apply to.
if ($revert) {
// If it's revert just change the override and return.
$display = &$this->executable->displayHandlers->get($form_state['display_id']);
$display->optionsOverride($form, $form_state);
// Don't execute the normal submit handling but still store the changed view into cache.
views_ui_cache_set($this);
return;
}
elseif ($was_defaulted === $is_defaulted) {
// We're not changing which display these form values apply to.
// Run the regular submit handler for this form.
}
elseif ($was_defaulted && !$is_defaulted) {
// We were using the default display's values, but we're now overriding
// the default display and saving values specific to this display.
$display = &$this->executable->displayHandlers->get($form_state['display_id']);
// optionsOverride toggles the override of this section.
$display->optionsOverride($form, $form_state);
$display->submitOptionsForm($form, $form_state);
}
elseif (!$was_defaulted && $is_defaulted) {
// We used to have an override for this display, but the user now wants
// to go back to the default display.
// Overwrite the default display with the current form values, and make
// the current display use the new default values.
$display = &$this->executable->displayHandlers->get($form_state['display_id']);
// optionsOverride toggles the override of this section.
$display->optionsOverride($form, $form_state);
$display->submitOptionsForm($form, $form_state);
}
$submit_handler = $form['#form_id'] . '_submit';
if (function_exists($submit_handler)) {
$submit_handler($form, $form_state);
}
}
/**
* Submit handler for cancel button
*/
public function standardCancel($form, &$form_state) {
if (!empty($this->changed) && isset($this->form_cache)) {
unset($this->form_cache);
views_ui_cache_set($this);
}
$form_state['redirect'] = 'admin/structure/views/view/' . $this->id() . '/edit';
}
/**
* Provide a standard set of Apply/Cancel/OK buttons for the forms. Also provide
* a hidden op operator because the forms plugin doesn't seem to properly
* provide which button was clicked.
*
* TODO: Is the hidden op operator still here somewhere, or is that part of the
* docblock outdated?
*/
public function getStandardButtons(&$form, &$form_state, $form_id, $name = NULL, $third = NULL, $submit = NULL) {
$form['buttons'] = array(
'#prefix' => '<div class="clearfix"><div class="form-buttons">',
'#suffix' => '</div></div>',
);
if (empty($name)) {
$name = t('Apply');
if (!empty($this->stack) && count($this->stack) > 1) {
$name = t('Apply and continue');
}
$names = array(t('Apply'), t('Apply and continue'));
}
// Forms that are purely informational set an ok_button flag, so we know not
// to create an "Apply" button for them.
if (empty($form_state['ok_button'])) {
$form['buttons']['submit'] = array(
'#type' => 'submit',
'#value' => $name,
// The regular submit handler ($form_id . '_submit') does not apply if
// we're updating the default display. It does apply if we're updating
// the current display. Since we have no way of knowing at this point
// which display the user wants to update, views_ui_standard_submit will
// take care of running the regular submit handler as appropriate.
'#submit' => array(array($this, 'standardSubmit')),
'#button_type' => 'primary',
);
// Form API button click detection requires the button's #value to be the
// same between the form build of the initial page request, and the initial
// form build of the request processing the form submission. Ideally, the
// button's #value shouldn't change until the form rebuild step. However,
// views_ui_ajax_form() implements a different multistep form workflow than
// the Form API does, and adjusts $view->stack prior to form processing, so
// we compensate by extending button click detection code to support any of
// the possible button labels.
if (isset($names)) {
$form['buttons']['submit']['#values'] = $names;
$form['buttons']['submit']['#process'] = array_merge(array('views_ui_form_button_was_clicked'), element_info_property($form['buttons']['submit']['#type'], '#process', array()));
}
// If a validation handler exists for the form, assign it to this button.
if (function_exists($form_id . '_validate')) {
$form['buttons']['submit']['#validate'][] = $form_id . '_validate';
}
}
// Create a "Cancel" button. For purely informational forms, label it "OK".
$cancel_submit = function_exists($form_id . '_cancel') ? $form_id . '_cancel' : array($this, 'standardCancel');
$form['buttons']['cancel'] = array(
'#type' => 'submit',
'#value' => empty($form_state['ok_button']) ? t('Cancel') : t('Ok'),
'#submit' => array($cancel_submit),
'#validate' => array(),
);
// Some forms specify a third button, with a name and submit handler.
if ($third) {
if (empty($submit)) {
$submit = 'third';
}
$third_submit = function_exists($form_id . '_' . $submit) ? $form_id . '_' . $submit : array($this, 'standardCancel');
$form['buttons'][$submit] = array(
'#type' => 'submit',
'#value' => $third,
'#validate' => array(),
'#submit' => array($third_submit),
);
}
// Compatibility, to be removed later: // TODO: When is "later"?
// We used to set these items on the form, but now we want them on the $form_state:
if (isset($form['#title'])) {
$form_state['title'] = $form['#title'];
}
if (isset($form['#url'])) {
$form_state['url'] = $form['#url'];
}
if (isset($form['#section'])) {
$form_state['#section'] = $form['#section'];
}
// Finally, we never want these cached -- our object cache does that for us.
$form['#no_cache'] = TRUE;
// If this isn't an ajaxy form, then we want to set the title.
if (!empty($form['#title'])) {
drupal_set_title($form['#title']);
}
}
/**
* Return the was_defaulted, is_defaulted and revert state of a form.
*/
public function getOverrideValues($form, $form_state) {
// Make sure the dropdown exists in the first place.
if (isset($form_state['values']['override']['dropdown'])) {
// #default_value is used to determine whether it was the default value or not.
// So the available options are: $display, 'default' and 'default_revert', not 'defaults'.
$was_defaulted = ($form['override']['dropdown']['#default_value'] === 'defaults');
$is_defaulted = ($form_state['values']['override']['dropdown'] === 'default');
$revert = ($form_state['values']['override']['dropdown'] === 'default_revert');
if ($was_defaulted !== $is_defaulted && isset($form['#section'])) {
// We're changing which display these values apply to.
// Update the #section so it knows what to mark changed.
$form['#section'] = str_replace('default-', $form_state['display_id'] . '-', $form['#section']);
}
}
else {
// The user didn't get the dropdown for overriding the default display.
$was_defaulted = FALSE;
$is_defaulted = FALSE;
$revert = FALSE;
}
return array($was_defaulted, $is_defaulted, $revert);
}
/**
* Submit handler to break_lock a view.
*/
public function submitBreakLock(&$form, &$form_state) {
drupal_container()->get('user.tempstore')->get('views')->delete($this->id());
$form_state['redirect'] = 'admin/structure/views/view/' . $this->id() . '/edit';
drupal_set_message(t('The lock has been broken and you may now edit this view.'));
}
/**
* Form constructor callback to reorder displays on a view
*/
public function buildDisplaysReorderForm($form, &$form_state) {
$display_id = $form_state['display_id'];
$form['view'] = array('#type' => 'value', '#value' => $this);
$form['#tree'] = TRUE;
$count = count($this->get('display'));
$displays = $this->get('display');
uasort($displays, array('static', 'sortPosition'));
$this->set('display', $displays);
foreach ($displays as $display) {
$form[$display['id']] = array(
'title' => array('#markup' => $display['display_title']),
'weight' => array(
'#type' => 'weight',
'#value' => $display['position'],
'#delta' => $count,
'#title' => t('Weight for @display', array('@display' => $display['display_title'])),
'#title_display' => 'invisible',
),
'#tree' => TRUE,
'#display' => $display,
'removed' => array(
'#type' => 'checkbox',
'#id' => 'display-removed-' . $display['id'],
'#attributes' => array('class' => array('views-remove-checkbox')),
'#default_value' => isset($display['deleted']),
),
);
if (isset($display['deleted']) && $display['deleted']) {
$form[$display['id']]['deleted'] = array('#type' => 'value', '#value' => TRUE);
}
if ($display['id'] === 'default') {
unset($form[$display['id']]['weight']);
unset($form[$display['id']]['removed']);
}
}
$form['#title'] = t('Displays Reorder');
$form['#section'] = 'reorder';
// Add javascript settings that will be added via $.extend for tabledragging
$form['#js']['tableDrag']['reorder-displays']['weight'][0] = array(
'target' => 'weight',
'source' => NULL,
'relationship' => 'sibling',
'action' => 'order',
'hidden' => TRUE,
'limit' => 0,
);
$form['#action'] = url('admin/structure/views/nojs/reorder-displays/' . $this->id() . '/' . $display_id);
$this->getStandardButtons($form, $form_state, 'views_ui_reorder_displays_form');
$form['buttons']['submit']['#submit'] = array(array($this, 'submitDisplaysReorderForm'));
return $form;
}
/**
* Submit handler for rearranging display form
*/
public function submitDisplaysReorderForm($form, &$form_state) {
foreach ($form_state['input'] as $display => $info) {
// add each value that is a field with a weight to our list, but only if
// it has had its 'removed' checkbox checked.
if (is_array($info) && isset($info['weight']) && empty($info['removed'])) {
$order[$display] = $info['weight'];
}
}
// Sort the order array
asort($order);
// Fixing up positions
$position = 1;
foreach (array_keys($order) as $display) {
$order[$display] = $position++;
}
// Setting up position and removing deleted displays
$displays = $this->get('display');
foreach ($displays as $display_id => $display) {
// Don't touch the default !!!
if ($display_id === 'default') {
$displays[$display_id]['position'] = 0;
continue;
}
if (isset($order[$display_id])) {
$displays[$display_id]['position'] = $order[$display_id];
}
else {
$displays[$display_id]['deleted'] = TRUE;
}
}
// Sorting back the display array as the position is not enough
uasort($displays, array('static', 'sortPosition'));
$this->set('display', $displays);
// Store in cache
views_ui_cache_set($this);
$form_state['redirect'] = array('admin/structure/views/view/' . $this->id() . '/edit', array('fragment' => 'views-tab-default'));
}
/**
* Add another form to the stack; clicking 'apply' will go to this form
* rather than closing the ajax popup.
*/
public function addFormToStack($key, $display_id, $args, $top = FALSE, $rebuild_keys = FALSE) {
// Reset the cache of IDs. Drupal rather aggressively prevents ID
// duplication but this causes it to remember IDs that are no longer even
// being used.
$seen_ids_init = &drupal_static('drupal_html_id:init');
$seen_ids_init = array();
if (empty($this->stack)) {
$this->stack = array();
}
$stack = array($this->buildIdentifier($key, $display_id, $args), $key, $display_id, $args);
// If we're being asked to add this form to the bottom of the stack, no
// special logic is required. Our work is equally easy if we were asked to add
// to the top of the stack, but there's nothing in it yet.
if (!$top || empty($this->stack)) {
$this->stack[] = $stack;
}
// If we're adding to the top of an existing stack, we have to maintain the
// existing integer keys, so they can be used for the "2 of 3" progress
// indicator (which will now read "2 of 4").
else {
$keys = array_keys($this->stack);
$first = current($keys);
$last = end($keys);
for ($i = $last; $i >= $first; $i--) {
if (!isset($this->stack[$i])) {
continue;
}
// Move form number $i to the next position in the stack.
$this->stack[$i + 1] = $this->stack[$i];
unset($this->stack[$i]);
}
// Now that the previously $first slot is free, move the new form into it.
$this->stack[$first] = $stack;
ksort($this->stack);
// Start the keys from 0 again, if requested.
if ($rebuild_keys) {
$this->stack = array_values($this->stack);
}
}
}
/**
* Submit handler for adding new item(s) to a view.
*/
public function submitItemAdd($form, &$form_state) {
$type = $form_state['type'];
$types = ViewExecutable::viewsHandlerTypes();
$section = $types[$type]['plural'];
// Handle the override select.
list($was_defaulted, $is_defaulted) = $this->getOverrideValues($form, $form_state);
if ($was_defaulted && !$is_defaulted) {
// We were using the default display's values, but we're now overriding
// the default display and saving values specific to this display.
$display = &$this->executable->displayHandlers->get($form_state['display_id']);
// setOverride toggles the override of this section.
$display->setOverride($section);
}
elseif (!$was_defaulted && $is_defaulted) {
// We used to have an override for this display, but the user now wants
// to go back to the default display.
// Overwrite the default display with the current form values, and make
// the current display use the new default values.
$display = &$this->executable->displayHandlers->get($form_state['display_id']);
// optionsOverride toggles the override of this section.
$display->setOverride($section);
}
if (!empty($form_state['values']['name']) && is_array($form_state['values']['name'])) {
// Loop through each of the items that were checked and add them to the view.
foreach (array_keys(array_filter($form_state['values']['name'])) as $field) {
list($table, $field) = explode('.', $field, 2);
if ($cut = strpos($field, '$')) {
$field = substr($field, 0, $cut);
}
$id = $this->executable->addItem($form_state['display_id'], $type, $table, $field);
// check to see if we have group by settings
$key = $type;
// Footer,header and empty text have a different internal handler type(area).
if (isset($types[$type]['type'])) {
$key = $types[$type]['type'];
}
$handler = views_get_handler($table, $field, $key);
if ($this->executable->displayHandlers->get('default')->useGroupBy() && $handler->usesGroupBy()) {
$this->addFormToStack('config-item-group', $form_state['display_id'], array($type, $id));
}
// check to see if this type has settings, if so add the settings form first
if ($handler && $handler->hasExtraOptions()) {
$this->addFormToStack('config-item-extra', $form_state['display_id'], array($type, $id));
}
// Then add the form to the stack
$this->addFormToStack('config-item', $form_state['display_id'], array($type, $id));
}
}
if (isset($this->form_cache)) {
unset($this->form_cache);
}
// Store in cache
views_ui_cache_set($this);
}
public function renderPreview($display_id, $args = array()) {
// Save the current path so it can be restored before returning from this function.
$old_q = current_path();
// Determine where the query and performance statistics should be output.
$config = config('views.settings');
$show_query = $config->get('ui.show.sql_query.enabled');
$show_info = $config->get('ui.show.preview_information');
$show_location = $config->get('ui.show.sql_query.where');
$show_stats = $config->get('ui.show.performance_statistics');
if ($show_stats) {
$show_stats = $config->get('ui.show.sql_query.where');
}
$combined = $show_query && $show_stats;
$rows = array('query' => array(), 'statistics' => array());
$output = '';
$errors = $this->executable->validate();
if ($errors === TRUE) {
$this->ajax = TRUE;
$this->executable->live_preview = TRUE;
$this->views_ui_context = TRUE;
// AJAX happens via $_POST but everything expects exposed data to
// be in GET. Copy stuff but remove ajax-framework specific keys.
// If we're clicking on links in a preview, though, we could actually
// still have some in $_GET, so we use $_REQUEST to ensure we get it all.
$exposed_input = drupal_container()->get('request')->request->all();
foreach (array('view_name', 'view_display_id', 'view_args', 'view_path', 'view_dom_id', 'pager_element', 'view_base_path', 'ajax_html_ids', 'ajax_page_state', 'form_id', 'form_build_id', 'form_token') as $key) {
if (isset($exposed_input[$key])) {
unset($exposed_input[$key]);
}
}
$this->executable->setExposedInput($exposed_input);
if (!$this->executable->setDisplay($display_id)) {
return t('Invalid display id @display', array('@display' => $display_id));
}
$this->executable->setArguments($args);
// Store the current view URL for later use:
if ($this->executable->display_handler->getOption('path')) {
$path = $this->executable->getUrl();
}
// Make view links come back to preview.
$this->override_path = 'admin/structure/views/nojs/preview/' . $this->id() . '/' . $display_id;
// Also override the current path so we get the pager.
$original_path = current_path();
$q = _current_path($this->override_path);
if ($args) {
$q .= '/' . implode('/', $args);
_current_path($q);
}
// Suppress contextual links of entities within the result set during a
// Preview.
// @todo We'll want to add contextual links specific to editing the View, so
// the suppression may need to be moved deeper into the Preview pipeline.
views_ui_contextual_links_suppress_push();
$preview = $this->executable->preview($display_id, $args);
views_ui_contextual_links_suppress_pop();
// Reset variables.
unset($this->override_path);
_current_path($original_path);
// Prepare the query information and statistics to show either above or
// below the view preview.
if ($show_info || $show_query || $show_stats) {
// Get information from the preview for display.
if (!empty($this->executable->build_info['query'])) {
if ($show_query) {
$query = $this->executable->build_info['query'];
// Only the sql default class has a method getArguments.
$quoted = array();
if ($this->executable->query instanceof Sql) {
$quoted = $query->getArguments();
$connection = Database::getConnection();
foreach ($quoted as $key => $val) {
if (is_array($val)) {
$quoted[$key] = implode(', ', array_map(array($connection, 'quote'), $val));
}
else {
$quoted[$key] = $connection->quote($val);
}
}
}
$rows['query'][] = array('<strong>' . t('Query') . '</strong>', '<pre>' . check_plain(strtr($query, $quoted)) . '</pre>');
if (!empty($this->executable->additional_queries)) {
$queries = '<strong>' . t('These queries were run during view rendering:') . '</strong>';
foreach ($this->executable->additional_queries as $query) {
if ($queries) {
$queries .= "\n";
}
$queries .= t('[@time ms]', array('@time' => intval($query[1] * 100000) / 100)) . ' ' . $query[0];
}
$rows['query'][] = array('<strong>' . t('Other queries') . '</strong>', '<pre>' . $queries . '</pre>');
}
}
if ($show_info) {
$rows['query'][] = array('<strong>' . t('Title') . '</strong>', filter_xss_admin($this->executable->getTitle()));
if (isset($path)) {
$path = l($path, $path);
}
else {
$path = t('This display has no path.');
}
$rows['query'][] = array('<strong>' . t('Path') . '</strong>', $path);
}
if ($show_stats) {
$rows['statistics'][] = array('<strong>' . t('Query build time') . '</strong>', t('@time ms', array('@time' => intval($this->executable->build_time * 100000) / 100)));
$rows['statistics'][] = array('<strong>' . t('Query execute time') . '</strong>', t('@time ms', array('@time' => intval($this->executable->execute_time * 100000) / 100)));
$rows['statistics'][] = array('<strong>' . t('View render time') . '</strong>', t('@time ms', array('@time' => intval($this->executable->render_time * 100000) / 100)));
}
drupal_alter('views_preview_info', $rows, $this);
}
else {
// No query was run. Display that information in place of either the
// query or the performance statistics, whichever comes first.
if ($combined || ($show_location === 'above')) {
$rows['query'] = array(array('<strong>' . t('Query') . '</strong>', t('No query was run')));
}
else {
$rows['statistics'] = array(array('<strong>' . t('Query') . '</strong>', t('No query was run')));
}
}
}
}
else {
foreach ($errors as $error) {
drupal_set_message($error, 'error');
}
$preview = t('Unable to preview due to validation errors.');
}
// Assemble the preview, the query info, and the query statistics in the
// requested order.
if ($show_location === 'above') {
if ($combined) {
$output .= '<div class="views-query-info">' . theme('table', array('rows' => array_merge($rows['query'], $rows['statistics']))) . '</div>';
}
else {
$output .= '<div class="views-query-info">' . theme('table', array('rows' => $rows['query'])) . '</div>';
}
}
elseif ($show_stats === 'above') {
$output .= '<div class="views-query-info">' . theme('table', array('rows' => $rows['statistics'])) . '</div>';
}
$output .= $preview;
if ($show_location === 'below') {
if ($combined) {
$output .= '<div class="views-query-info">' . theme('table', array('rows' => array_merge($rows['query'], $rows['statistics']))) . '</div>';
}
else {
$output .= '<div class="views-query-info">' . theme('table', array('rows' => $rows['query'])) . '</div>';
}
}
elseif ($show_stats === 'below') {
$output .= '<div class="views-query-info">' . theme('table', array('rows' => $rows['statistics'])) . '</div>';
}
_current_path($old_q);
return $output;
}
/**
* Get the user's current progress through the form stack.
*
* @return
* FALSE if the user is not currently in a multiple-form stack. Otherwise,
* an associative array with the following keys:
* - current: The number of the current form on the stack.
* - total: The total number of forms originally on the stack.
*/
public function getFormProgress() {
$progress = FALSE;
if (!empty($this->stack)) {
$stack = $this->stack;
// The forms on the stack have integer keys that don't change as the forms
// are completed, so we can see which ones are still left.
$keys = array_keys($this->stack);
// Add 1 to the array keys for the benefit of humans, who start counting
// from 1 and not 0.
$current = reset($keys) + 1;
$total = end($keys) + 1;
if ($total > 1) {
$progress = array();
$progress['current'] = $current;
$progress['total'] = $total;
}
}
return $progress;
}
/**
* Build a form identifier that we can use to see if one form
* is the same as another. Since the arguments differ slightly
* we do a lot of spiffy concatenation here.
*/
public function buildIdentifier($key, $display_id, $args) {
$form = views_ui_ajax_forms($key);
// Automatically remove the single-form cache if it exists and
// does not match the key.
$identifier = implode('-', array($key, $this->id(), $display_id));
foreach ($form['args'] as $id) {
$arg = (!empty($args)) ? array_shift($args) : NULL;
$identifier .= '-' . $arg;
}
return $identifier;
}
/**
* Display position sorting function
*/
public static function sortPosition($display1, $display2) {
if ($display1['position'] != $display2['position']) {
return $display1['position'] < $display2['position'] ? -1 : 1;
}
return 0;
}
/**
* Build up a $form_state object suitable for use with drupal_build_form
* based on known information about a form.
*/
public function buildFormState($js, $key, $display_id, $args) {
$form = views_ui_ajax_forms($key);
// Build up form state
$form_state = array(
'form_key' => $key,
'form_id' => $form['form_id'],
'view' => &$this,
'ajax' => $js,
'display_id' => $display_id,
'no_redirect' => TRUE,
);
// If an method was specified, use that for the callback.
if (isset($form['callback'])) {
$form_state['build_info']['args'] = array();
$form_state['build_info']['callback'] = array($this, $form['callback']);
}
foreach ($form['args'] as $id) {
$form_state[$id] = (!empty($args)) ? array_shift($args) : NULL;
}
return $form_state;
}
/**
* Passes through all unknown calls onto the storage object.
*/
public function __call($method, $args) {
return call_user_func_array(array($this->storage, $method), $args);
}
/**
* Implements \IteratorAggregate::getIterator().
*/
public function getIterator() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::id().
*/
public function id() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::uuid().
*/
public function uuid() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::isNew().
*/
public function isNew() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::entityType().
*/
public function entityType() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::bundle().
*/
public function bundle() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::isDefaultRevision().
*/
public function isDefaultRevision($new_value = NULL) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::getRevisionId().
*/
public function getRevisionId() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::entityInfo().
*/
public function entityInfo() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::createDuplicate().
*/
public function createDuplicate() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::delete().
*/
public function delete() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::save().
*/
public function save() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::uri().
*/
public function uri() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::label().
*/
public function label($langcode = NULL) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::isNewRevision().
*/
public function isNewRevision() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::setNewRevision().
*/
public function setNewRevision($value = TRUE) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::enforceIsNew().
*/
public function enforceIsNew($value = TRUE) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Entity\EntityInterface::getExportProperties().
*/
public function getExportProperties() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\TranslatableInterface::getTranslation().
*/
public function getTranslation($langcode, $strict = TRUE) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\TranslatableInterface::getTranslationLanguages().
*/
public function getTranslationLanguages($include_default = TRUE) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\TranslatableInterface::language)().
*/
public function language() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\AccessibleInterface::access().
*/
public function access($operation = 'view', \Drupal\user\Plugin\Core\Entity\User $account = NULL) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::isEmpty)().
*/
public function isEmpty() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyValues().
*/
public function getPropertyValues() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinitions().
*/
public function getPropertyDefinitions() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::getPropertyDefinition().
*/
public function getPropertyDefinition($name) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::setPropertyValues().
*/
public function setPropertyValues($values) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ComplexDataInterface::getProperties().
*/
public function getProperties($include_computed = FALSE) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\views\ViewStorageInterface::enable().
*/
public function enable() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\views\ViewStorageInterface::disable().
*/
public function disable() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\views\ViewStorageInterface::isEnabled().
*/
public function isEnabled() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::getOriginalID().
*/
public function getOriginalID() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::setOriginalID().
*/
public function setOriginalID($id) {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements Drupal\Core\Entity\EntityInterface::getBCEntity().
*/
public function getBCEntity() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements Drupal\Core\Entity\EntityInterface::getOriginalEntity().
*/
public function getOriginalEntity() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ContextAwareInterface::getName().
*/
public function getName() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ContextAwareInterface::getRoot().
*/
public function getRoot() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ContextAwareInterface::getPropertyPath().
*/
public function getPropertyPath() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ContextAwareInterface::getParent().
*/
public function getParent() {
return $this->__call(__FUNCTION__, func_get_args());
}
/**
* Implements \Drupal\Core\TypedData\ContextAwareInterface::setContext().
*/
public function setContext($name = NULL, ContextAwareInterface $parent = NULL) {
return $this->__call(__FUNCTION__, func_get_args());
}
}
| Java |
#ifndef LINUX_HARDIRQ_H
#define LINUX_HARDIRQ_H
#include <linux/preempt.h>
#include <linux/lockdep.h>
#include <linux/ftrace_irq.h>
#include <asm/hardirq.h>
/*
* We put the hardirq and softirq counter into the preemption
* counter. The bitmask has the following meaning:
*
* - bits 0-7 are the preemption count (max preemption depth: 256)
* - bits 8-15 are the softirq count (max # of softirqs: 256)
*
* The hardirq count can in theory reach the same as NR_IRQS.
* In reality, the number of nested IRQS is limited to the stack
* size as well. For archs with over 1000 IRQS it is not practical
* to expect that they will all nest. We give a max of 10 bits for
* hardirq nesting. An arch may choose to give less than 10 bits.
* m68k expects it to be 8.
*
* - bits 16-25 are the hardirq count (max # of nested hardirqs: 1024)
* - bit 26 is the NMI_MASK
* - bit 28 is the PREEMPT_ACTIVE flag
*
* PREEMPT_MASK: 0x000000ff
* SOFTIRQ_MASK: 0x0000ff00
* HARDIRQ_MASK: 0x03ff0000
* NMI_MASK: 0x04000000
*/
#define PREEMPT_BITS 8
#define SOFTIRQ_BITS 8
#define NMI_BITS 1
#define MAX_HARDIRQ_BITS 10
#ifndef HARDIRQ_BITS
# define HARDIRQ_BITS MAX_HARDIRQ_BITS
#endif
#if HARDIRQ_BITS > MAX_HARDIRQ_BITS
#error HARDIRQ_BITS too high!
#endif
#define PREEMPT_SHIFT 0
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define NMI_SHIFT (HARDIRQ_SHIFT + HARDIRQ_BITS)
#define __IRQ_MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define NMI_MASK (__IRQ_MASK(NMI_BITS) << NMI_SHIFT)
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
#define NMI_OFFSET (1UL << NMI_SHIFT)
#define SOFTIRQ_DISABLE_OFFSET (2 * SOFTIRQ_OFFSET)
#ifndef PREEMPT_ACTIVE
#define PREEMPT_ACTIVE_BITS 1
#define PREEMPT_ACTIVE_SHIFT (NMI_SHIFT + NMI_BITS)
#define PREEMPT_ACTIVE (__IRQ_MASK(PREEMPT_ACTIVE_BITS) << PREEMPT_ACTIVE_SHIFT)
#endif
#if PREEMPT_ACTIVE < (1 << (NMI_SHIFT + NMI_BITS))
#error PREEMPT_ACTIVE is too low!
#endif
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK \
| NMI_MASK))
/*
* Are we doing bottom half or hardware interrupt processing?
* Are we in a softirq context? Interrupt context?
* in_softirq - Are we currently processing softirq or have bh disabled?
* in_serving_softirq - Are we currently processing softirq?
*/
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define in_serving_softirq() (softirq_count() & SOFTIRQ_OFFSET)
/*
* Are we in NMI context?
*/
#define in_nmi() (preempt_count() & NMI_MASK)
#if defined(CONFIG_PREEMPT_COUNT)
# define PREEMPT_CHECK_OFFSET 1
#else
# define PREEMPT_CHECK_OFFSET 0
#endif
/*
* Are we running in atomic context? WARNING: this macro cannot
* always detect atomic context; in particular, it cannot know about
* held spinlocks in non-preemptible kernels. Thus it should not be
* used in the general case to determine whether sleeping is possible.
* Do not use in_atomic() in driver code.
*/
#define in_atomic() ((preempt_count() & ~PREEMPT_ACTIVE) != 0)
/*
* Check whether we were atomic before we did preempt_disable():
* (used by the scheduler, *after* releasing the kernel lock)
*/
#define in_atomic_preempt_off() \
((preempt_count() & ~PREEMPT_ACTIVE) != PREEMPT_CHECK_OFFSET)
#ifdef CONFIG_PREEMPT_COUNT
# define preemptible() (preempt_count() == 0 && !irqs_disabled())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define preemptible() 0
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
extern void synchronize_irq(unsigned int irq);
struct task_struct;
#if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING)
static inline void account_system_vtime(struct task_struct *tsk)
{
}
#else
extern void account_system_vtime(struct task_struct *tsk);
#endif
#if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU)
static inline void rcu_nmi_enter(void)
{
}
static inline void rcu_nmi_exit(void)
{
}
#else
extern void rcu_nmi_enter(void);
extern void rcu_nmi_exit(void);
#endif
/*
* It is safe to do non-atomic ops on ->hardirq_context,
* because NMI handlers may not preempt and the ops are
* always balanced, so the interrupted value of ->hardirq_context
* will always be restored.
*/
#define __irq_enter() \
do { \
account_system_vtime(current); \
add_preempt_count(HARDIRQ_OFFSET); \
trace_hardirq_enter(); \
} while (0)
/*
* Enter irq context (on NO_HZ, update jiffies):
*/
extern void irq_enter(void);
/*
* Exit irq context without processing softirqs:
*/
#define __irq_exit() \
do { \
trace_hardirq_exit(); \
account_system_vtime(current); \
sub_preempt_count(HARDIRQ_OFFSET); \
} while (0)
/*
* Exit irq context and process softirqs if needed:
*/
extern void irq_exit(void);
#define nmi_enter() \
do { \
ftrace_nmi_enter(); \
BUG_ON(in_nmi()); \
add_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET); \
lockdep_off(); \
rcu_nmi_enter(); \
trace_hardirq_enter(); \
} while (0)
#define nmi_exit() \
do { \
trace_hardirq_exit(); \
rcu_nmi_exit(); \
lockdep_on(); \
BUG_ON(!in_nmi()); \
sub_preempt_count(NMI_OFFSET + HARDIRQ_OFFSET); \
ftrace_nmi_exit(); \
} while (0)
#endif /* LINUX_HARDIRQ_H */
| Java |
<?php
/**
* @version 2.3, Creation Date : March-24-2011
* @name impressionclicks.php
* @location /components/com_contushdvideosahre/views/impressionclicks/tmpl/impressionclicks.php
* @package Joomla 1.6
* @subpackage contushdvideoshare
* @author Contus Support - http://www.contussupport.com
* @copyright Copyright (C) 2011 Contus Support
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
* @link http://www.hdvideoshare.net
*/
/*
* Description : front page video search page layout
*/
?> | Java |
//=============================================================================
//
// m25pxx.c
//
// SPI flash driver for Numonyx M25Pxx devices and compatibles.
//
//=============================================================================
// ####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 2008, 2009 Free Software Foundation, Inc.
//
// eCos 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.
//
// eCos 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 eCos; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// As a special exception, if other files instantiate templates or use
// macros or inline functions from this file, or you compile this file
// and link it with other works to produce a work based on this file,
// this file does not by itself cause the resulting work to be covered by
// the GNU General Public License. However the source code for this file
// must still be made available in accordance with section (3) of the GNU
// General Public License v2.
//
// This exception does not invalidate any other reasons why a work based
// on this file might be covered by the GNU General Public License.
// -------------------------------------------
// ####ECOSGPLCOPYRIGHTEND####
//=============================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s): Chris Holgate
// Date: 2008-12-22
// Purpose: Numonyx M25Pxx SPI flash driver implementation
//
//####DESCRIPTIONEND####
//
//=============================================================================
#include <cyg/io/spi.h>
#include <cyg/io/flash.h>
#include <cyg/io/flash_dev.h>
#include <cyg/infra/cyg_type.h>
#include <cyg/infra/cyg_ass.h>
#include <pkgconf/devs_flash_spi_m25pxx.h>
#include <string.h>
//-----------------------------------------------------------------------------
// Enable polled SPI operation for non-kernel builds.
#ifdef CYGPKG_KERNEL
#define M25PXX_POLLED false
#else
#define M25PXX_POLLED true
#endif
//-----------------------------------------------------------------------------
// Implement delay functions for kernel and non-kernel builds. The kernel
// build assumes that the API calls are made in the thread context.
#ifdef CYGPKG_KERNEL
#define M25PXX_DELAY_MS(_msdelay_) cyg_thread_delay (\
1 + ((1000 * _msdelay_ * CYGNUM_HAL_RTC_DENOMINATOR) / (CYGNUM_HAL_RTC_NUMERATOR / 1000)))
#else
#define M25PXX_DELAY_MS(_msdelay_) CYGACC_CALL_IF_DELAY_US (_msdelay_ * 1000)
#endif
//-----------------------------------------------------------------------------
// Maintenance and debug macros.
#define TODO_M25P(_msg_) CYG_ASSERT(false, "TODO (M25P) : " _msg_)
#define FAIL_M25P(_msg_) CYG_ASSERT(false, "FAIL (M25P) : " _msg_)
#define ASSERT_M25P(_test_, _msg_) CYG_ASSERT(_test_, "FAIL (M25P) : " _msg_)
#define TRACE_M25P(_msg_, _args_...) if (dev->pf) dev->pf ("M25PXX : " _msg_, ##_args_)
//=============================================================================
// Define M25Pxx SPI protocol.
//=============================================================================
typedef enum m25pxx_cmd {
M25PXX_CMD_WREN = 0x06, // Write enable.
M25PXX_CMD_WDRI = 0x04, // Write disable.
M25PXX_CMD_RDID = 0x9F, // Read identification.
M25PXX_CMD_RDSR = 0x05, // Read status register.
M25PXX_CMD_WRSR = 0x01, // Write status register.
M25PXX_CMD_READ = 0x03, // Read data.
M25PXX_CMD_FREAD = 0x0B, // Read data (fast transaction).
M25PXX_CMD_PP = 0x02, // Page program.
M25PXX_CMD_SE = 0x20, //0xD8, // Sector erase. // Modified for MX25L1606E by reille 2013.05.26
M25PXX_CMD_BE = 0xC7, // Bulk erase.
M25PXX_CMD_RES = 0xAB, // Read electronic signature.
} m25pxx_cmd;
// Status register bitfields.
#define M25PXX_STATUS_WIP 0x01 /* Write in progress. */
#define M25PXX_STATUS_WEL 0x02 /* Write enable latch. */
#define M25PXX_STATUS_BP0 0x04 /* Block protect 0. */
#define M25PXX_STATUS_BP1 0x08 /* Block protect 1. */
#define M25PXX_STATUS_BP2 0x10 /* Block protect 2. */
#define M25PXX_STATUS_SRWD 0x80 /* Status register write protect. */
// Page size of 256 bytes appears to be common for all devices.
#define M25PXX_PAGE_SIZE 256
//=============================================================================
// Array containing a list of supported devices. This allows the device
// parameters to be dynamically detected on initialisation.
//=============================================================================
typedef struct m25pxx_params {
cyg_uint16 sector_size; // Number of pages in a sector.
cyg_uint16 sector_count; // Number of sectors on device.
cyg_uint32 jedec_id; // 3 byte JEDEC identifier for this device.
} m25pxx_params;
static const m25pxx_params m25pxx_supported_devices [] = {
{ // Support for Numonyx 128 MBit devices.
sector_size : 1024,
sector_count : 64,
jedec_id : 0x00202018
},
{ // Support for Numonyx 64 MBit devices.
sector_size : 256,
sector_count : 128,
jedec_id : 0x00202017
},
{ // Support for Numonyx 16 MBit devices.
sector_size : 256,
sector_count : 64,
jedec_id : 0x00202016
},
{ // Support for Numonyx 16 MBit devices.
sector_size : 16, // 256, // Modified for MX25L1606E by reille 2013.05.26
sector_count : 512, // 32, // Modified for MX25L1606E by reille 2013.05.26
jedec_id : 0x00C22015, // 0x00202015 // Modified for MX25L1606E by reille 2013.05.26
},
{ // Support for Numonyx 8 MBit devices.
sector_size : 256,
sector_count : 16,
jedec_id : 0x00202014
},
{ // Support for Numonyx 4 MBit devices.
sector_size : 256,
sector_count : 8,
jedec_id : 0x00202013
},
{ // Support for Numonyx 2 MBit devices.
sector_size : 256,
sector_count : 4,
jedec_id : 0x00202012
},
{ // Support for Numonyx 1 MBit devices.
sector_size : 128,
sector_count : 4,
jedec_id : 0x00202011
},
{ // Support for Numonyx 512 KBit devices.
sector_size : 128,
sector_count : 2,
jedec_id : 0x00202010
},
{ // Null terminating entry.
sector_size : 0,
sector_count : 0,
jedec_id : 0
}
};
//=============================================================================
// Utility functions for address calculations.
//=============================================================================
//-----------------------------------------------------------------------------
// Strips out any device address offset to give address within device.
static cyg_bool m25pxx_to_local_addr
(struct cyg_flash_dev* dev, cyg_flashaddr_t* addr)
{
cyg_bool retval = false;
// Range check address before modifying it.
if ((*addr >= dev->start) && (*addr <= dev->end)) {
*addr -= dev->start;
retval = true;
}
return retval;
}
//=============================================================================
// Wrapper functions for various SPI transactions.
//=============================================================================
//-----------------------------------------------------------------------------
// Read back the 3-byte JEDEC ID, returning it as a 32-bit integer.
// This function is called during flash initialisation, which can often be
// called from the startup/idle thread. This means that we should always use
// SPI polled mode in order to prevent the thread from attempting to sleep.
static inline cyg_uint32 m25pxx_spi_rdid
(struct cyg_flash_dev *dev)
{
cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv;
const cyg_uint8 tx_buf [4] = { M25PXX_CMD_RDID, 0, 0, 0 };
cyg_uint8 rx_buf [4];
cyg_uint32 retval = 0;
// Carry out SPI transfer.
cyg_spi_transfer (spi_device, true, 4, tx_buf, rx_buf);
// Convert 3-byte ID to 32-bit integer.
retval |= ((cyg_uint32) rx_buf[1]) << 16;
retval |= ((cyg_uint32) rx_buf[2]) << 8;
retval |= ((cyg_uint32) rx_buf[3]);
return retval;
}
//-----------------------------------------------------------------------------
// Send write enable command.
static inline void m25pxx_spi_wren
(struct cyg_flash_dev *dev)
{
cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv;
const cyg_uint8 tx_buf [1] = { M25PXX_CMD_WREN };
cyg_spi_transfer (spi_device, M25PXX_POLLED, 1, tx_buf, NULL);
}
//-----------------------------------------------------------------------------
// Send sector erase command. The address parameter is a device local address
// within the sector to be erased.
static inline void m25pxx_spi_se
(struct cyg_flash_dev *dev, cyg_flashaddr_t addr)
{
cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv;
const cyg_uint8 tx_buf [4] = { M25PXX_CMD_SE,
(cyg_uint8) (addr >> 16), (cyg_uint8) (addr >> 8), (cyg_uint8) (addr) };
cyg_spi_transfer (spi_device, M25PXX_POLLED, 4, tx_buf, NULL);
}
//-----------------------------------------------------------------------------
// Read and return the 8-bit device status register.
static inline cyg_uint8 m25pxx_spi_rdsr
(struct cyg_flash_dev *dev)
{
cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv;
const cyg_uint8 tx_buf [2] = { M25PXX_CMD_RDSR, 0 };
cyg_uint8 rx_buf [2];
// Carry out SPI transfer and return the status byte.
cyg_spi_transfer (spi_device, M25PXX_POLLED, 2, tx_buf, rx_buf);
return rx_buf [1];
}
//-----------------------------------------------------------------------------
// Program a single page.
static inline void m25pxx_spi_pp
(struct cyg_flash_dev *dev, cyg_flashaddr_t addr, cyg_uint8* wbuf, cyg_uint32 wbuf_len)
{
cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv;
const cyg_uint8 tx_buf [4] = { M25PXX_CMD_PP,
(cyg_uint8) (addr >> 16), (cyg_uint8) (addr >> 8), (cyg_uint8) (addr) };
// Implement the program operation as a multistage SPI transaction.
cyg_spi_transaction_begin (spi_device);
cyg_spi_transaction_transfer (spi_device, M25PXX_POLLED, 4, tx_buf, NULL, false);
cyg_spi_transaction_transfer (spi_device, M25PXX_POLLED, wbuf_len, wbuf, NULL, false);
cyg_spi_transaction_end (spi_device);
}
//-----------------------------------------------------------------------------
// Implement fast reads to the specified buffer.
static inline void m25pxx_spi_fread
(struct cyg_flash_dev *dev, cyg_flashaddr_t addr, cyg_uint8* rbuf, cyg_uint32 rbuf_len)
{
cyg_spi_device* spi_device = (cyg_spi_device*) dev->priv;
const cyg_uint8 tx_buf [5] = { M25PXX_CMD_FREAD,
(cyg_uint8) (addr >> 16), (cyg_uint8) (addr >> 8), (cyg_uint8) (addr), 0 };
// Implement the read operation as a multistage SPI transaction.
cyg_spi_transaction_begin (spi_device);
cyg_spi_transaction_transfer (spi_device, M25PXX_POLLED, 5, tx_buf, NULL, false);
cyg_spi_transaction_transfer (spi_device, M25PXX_POLLED, rbuf_len, NULL, rbuf, false);
cyg_spi_transaction_end (spi_device);
}
//=============================================================================
// Standard Flash device API. All the following functions assume that a valid
// SPI device handle is passed in the 'priv' reference of the flash device
// data structure.
//=============================================================================
//-----------------------------------------------------------------------------
// Initialise the SPI flash, reading back the flash parameters.
static int m25pxx_init
(struct cyg_flash_dev *dev)
{
m25pxx_params* dev_params = (m25pxx_params*) m25pxx_supported_devices;
cyg_uint32 device_id;
int retval = FLASH_ERR_INVALID;
// Find the device in the supported devices list.
device_id = m25pxx_spi_rdid (dev);
while ((dev_params->jedec_id != 0) && (dev_params->jedec_id != device_id)) {
dev_params ++;
}
// Found supported device - update device parameters. M25PXX devices have a
// uniform sector distribution, so only 1 block info record is required.
if (dev_params->jedec_id != 0) {
ASSERT_M25P (dev->num_block_infos == 1, "Only 1 block info record required.");
ASSERT_M25P (dev->block_info != NULL, "Null pointer to block info record.");
if ((dev->num_block_infos == 1) && (dev->block_info != NULL)) {
TRACE_M25P ("Init device with JEDEC ID 0x%06X.\n", device_id);
dev->end = dev->start + (M25PXX_PAGE_SIZE * (cyg_flashaddr_t) dev_params->sector_size *
(cyg_flashaddr_t) dev_params->sector_count) - 1;
// Strictly speaking the block info fields are 'read only'. However, we
// have a legitimate reason for updating the contents here and can cast
// away the const.
((cyg_flash_block_info_t*) dev->block_info)->block_size =
M25PXX_PAGE_SIZE * (size_t) dev_params->sector_size;
((cyg_flash_block_info_t*) dev->block_info)->blocks =
(cyg_uint32) dev_params->sector_count;
retval = FLASH_ERR_OK;
}
}
return retval;
}
//-----------------------------------------------------------------------------
// Erase a single sector of the flash.
static int m25pxx_erase_block
(struct cyg_flash_dev *dev, cyg_flashaddr_t block_base)
{
cyg_flashaddr_t local_base = block_base;
int retval = FLASH_ERR_INVALID;
cyg_uint8 dev_status;
// Fix up the block address and send the sector erase command.
if (m25pxx_to_local_addr (dev, &local_base)) {
m25pxx_spi_wren (dev);
m25pxx_spi_se (dev, local_base);
// Spin waiting for the erase to complete. This can take between 1 and 3
// seconds, so we use a polling interval of 1/2 sec.
do {
M25PXX_DELAY_MS (500);
dev_status = m25pxx_spi_rdsr (dev);
} while (dev_status & M25PXX_STATUS_WIP);
retval = FLASH_ERR_OK;
}
return retval;
}
//-----------------------------------------------------------------------------
// Program an arbitrary number of pages into flash and verify written data.
static int m25pxx_program
(struct cyg_flash_dev *dev, cyg_flashaddr_t base, const void* data, size_t len)
{
cyg_flashaddr_t local_base = base;
int retval = FLASH_ERR_OK;
cyg_uint8* tx_ptr = (cyg_uint8*) data;
cyg_uint32 tx_bytes_left = (cyg_uint32) len;
cyg_uint32 tx_bytes;
cyg_uint8 dev_status;
// Fix up the block address.
if (!m25pxx_to_local_addr (dev, &local_base)) {
retval = FLASH_ERR_INVALID;
goto out;
}
// The start of the transaction may not be page aligned, so we need to work
// out how many bytes to transmit before we hit the first page boundary.
tx_bytes = M25PXX_PAGE_SIZE - (((cyg_uint32) local_base) & (M25PXX_PAGE_SIZE - 1));
if (tx_bytes > tx_bytes_left) tx_bytes = tx_bytes_left;
// Perform page program operations.
while (tx_bytes_left) {
m25pxx_spi_wren (dev);
m25pxx_spi_pp (dev, local_base, tx_ptr, tx_bytes);
// Spin waiting for write to complete. This can take up to 5ms, so
// we use a polling interval of 1ms - which may get rounded up to the
// RTC tick granularity.
do {
M25PXX_DELAY_MS (1);
dev_status = m25pxx_spi_rdsr (dev);
} while (dev_status & M25PXX_STATUS_WIP);
// Update counters and data pointers for the next page.
tx_bytes_left -= tx_bytes;
tx_ptr += tx_bytes;
local_base += tx_bytes;
tx_bytes = (tx_bytes_left > M25PXX_PAGE_SIZE) ? M25PXX_PAGE_SIZE : tx_bytes_left;
}
out:
return retval;
}
//-----------------------------------------------------------------------------
// Read back an arbitrary amount of data from flash.
static int m25pxx_read
(struct cyg_flash_dev *dev, const cyg_flashaddr_t base, void* data, size_t len)
{
cyg_flashaddr_t local_base = base;
int retval = FLASH_ERR_INVALID;
cyg_uint8* rx_ptr = (cyg_uint8*) data;
cyg_uint32 rx_bytes_left = (cyg_uint32) len;
cyg_uint32 rx_bytes;
// Determine the maximum transfer size to use.
cyg_uint32 rx_block_size = (CYGNUM_DEVS_FLASH_SPI_M25PXX_READ_BLOCK_SIZE == 0) ?
0xFFFFFFFF : CYGNUM_DEVS_FLASH_SPI_M25PXX_READ_BLOCK_SIZE;
// Fix up the block address and fill the read buffer.
if (m25pxx_to_local_addr (dev, &local_base)) {
while (rx_bytes_left) {
rx_bytes = (rx_bytes_left < rx_block_size) ? rx_bytes_left : rx_block_size;
m25pxx_spi_fread (dev, local_base, rx_ptr, rx_bytes);
// Update counters and data pointers for next read block.
rx_bytes_left -= rx_bytes;
rx_ptr += rx_bytes;
local_base += rx_bytes;
}
retval = FLASH_ERR_OK;
}
return retval;
}
//=============================================================================
// Fill in the driver data structures.
//=============================================================================
CYG_FLASH_FUNS (
cyg_devs_flash_spi_m25pxx_funs, // Exported name of function pointers.
m25pxx_init, // Flash initialisation.
cyg_flash_devfn_query_nop, // Query operations not supported.
m25pxx_erase_block, // Sector erase.
m25pxx_program, // Program multiple pages.
m25pxx_read, // Read arbitrary amount of data.
cyg_flash_devfn_lock_nop, // Locking not supported (no per-sector locks).
cyg_flash_devfn_unlock_nop
);
//=============================================================================
| Java |
<?php
/**
* TOP API: taobao.shop.remainshowcase.get request
*
* @author auto create
* @since 1.0, 2012-03-21 12:35:10
*/
class ShopRemainshowcaseGetRequest
{
private $apiParas = array();
public function getApiMethodName()
{
return "taobao.shop.remainshowcase.get";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
}
}
| Java |
/*
* Core definitions and data structures shareable across OS platforms.
*
* Copyright (c) 1994-2002 Justin T. Gibbs.
* Copyright (c) 2000-2002 Adaptec 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#109 $
*
* $FreeBSD$
*/
#ifndef _AIC79XX_H_
#define _AIC79XX_H_
/* Register Definitions */
#include "aic79xx_reg.h"
/************************* Forward Declarations *******************************/
struct ahd_platform_data;
struct scb_platform_data;
/****************************** Useful Macros *********************************/
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#define ALL_CHANNELS '\0'
#define ALL_TARGETS_MASK 0xFFFF
#define INITIATOR_WILDCARD (~0)
#define SCB_LIST_NULL 0xFF00
#define SCB_LIST_NULL_LE (ahd_htole16(SCB_LIST_NULL))
#define QOUTFIFO_ENTRY_VALID 0x80
#define SCBID_IS_NULL(scbid) (((scbid) & 0xFF00 ) == SCB_LIST_NULL)
#define SCSIID_TARGET(ahd, scsiid) \
(((scsiid) & TID) >> TID_SHIFT)
#define SCSIID_OUR_ID(scsiid) \
((scsiid) & OID)
#define SCSIID_CHANNEL(ahd, scsiid) ('A')
#define SCB_IS_SCSIBUS_B(ahd, scb) (0)
#define SCB_GET_OUR_ID(scb) \
SCSIID_OUR_ID((scb)->hscb->scsiid)
#define SCB_GET_TARGET(ahd, scb) \
SCSIID_TARGET((ahd), (scb)->hscb->scsiid)
#define SCB_GET_CHANNEL(ahd, scb) \
SCSIID_CHANNEL(ahd, (scb)->hscb->scsiid)
#define SCB_GET_LUN(scb) \
((scb)->hscb->lun)
#define SCB_GET_TARGET_OFFSET(ahd, scb) \
SCB_GET_TARGET(ahd, scb)
#define SCB_GET_TARGET_MASK(ahd, scb) \
(0x01 << (SCB_GET_TARGET_OFFSET(ahd, scb)))
#ifdef AHD_DEBUG
#define SCB_IS_SILENT(scb) \
((ahd_debug & AHD_SHOW_MASKED_ERRORS) == 0 \
&& (((scb)->flags & SCB_SILENT) != 0))
#else
#define SCB_IS_SILENT(scb) \
(((scb)->flags & SCB_SILENT) != 0)
#endif
/*
* TCLs have the following format: TTTTLLLLLLLL
*/
#define TCL_TARGET_OFFSET(tcl) \
((((tcl) >> 4) & TID) >> 4)
#define TCL_LUN(tcl) \
(tcl & (AHD_NUM_LUNS - 1))
#define BUILD_TCL(scsiid, lun) \
((lun) | (((scsiid) & TID) << 4))
#define BUILD_TCL_RAW(target, channel, lun) \
((lun) | ((target) << 8))
#define SCB_GET_TAG(scb) \
ahd_le16toh(scb->hscb->tag)
#ifndef AHD_TARGET_MODE
#undef AHD_TMODE_ENABLE
#define AHD_TMODE_ENABLE 0
#endif
#define AHD_BUILD_COL_IDX(target, lun) \
(((lun) << 4) | target)
#define AHD_GET_SCB_COL_IDX(ahd, scb) \
((SCB_GET_LUN(scb) << 4) | SCB_GET_TARGET(ahd, scb))
#define AHD_SET_SCB_COL_IDX(scb, col_idx) \
do { \
(scb)->hscb->scsiid = ((col_idx) << TID_SHIFT) & TID; \
(scb)->hscb->lun = ((col_idx) >> 4) & (AHD_NUM_LUNS_NONPKT-1); \
} while (0)
#define AHD_COPY_SCB_COL_IDX(dst, src) \
do { \
dst->hscb->scsiid = src->hscb->scsiid; \
dst->hscb->lun = src->hscb->lun; \
} while (0)
#define AHD_NEVER_COL_IDX 0xFFFF
/**************************** Driver Constants ********************************/
/*
* The maximum number of supported targets.
*/
#define AHD_NUM_TARGETS 16
/*
* The maximum number of supported luns.
* The identify message only supports 64 luns in non-packetized transfers.
* You can have 2^64 luns when information unit transfers are enabled,
* but until we see a need to support that many, we support 256.
*/
#define AHD_NUM_LUNS_NONPKT 64
#define AHD_NUM_LUNS 256
/*
* The maximum transfer per S/G segment.
*/
#define AHD_MAXTRANSFER_SIZE 0x00ffffff /* limited by 24bit counter */
/*
* The maximum amount of SCB storage in hardware on a controller.
* This value represents an upper bound. Due to software design,
* we may not be able to use this number.
*/
#define AHD_SCB_MAX 512
/*
* The maximum number of concurrent transactions supported per driver instance.
* Sequencer Control Blocks (SCBs) store per-transaction information.
*/
#define AHD_MAX_QUEUE AHD_SCB_MAX
/*
* Define the size of our QIN and QOUT FIFOs. They must be a power of 2
* in size and accommodate as many transactions as can be queued concurrently.
*/
#define AHD_QIN_SIZE AHD_MAX_QUEUE
#define AHD_QOUT_SIZE AHD_MAX_QUEUE
#define AHD_QIN_WRAP(x) ((x) & (AHD_QIN_SIZE-1))
/*
* The maximum amount of SCB storage we allocate in host memory.
*/
#define AHD_SCB_MAX_ALLOC AHD_MAX_QUEUE
/*
* Ring Buffer of incoming target commands.
* We allocate 256 to simplify the logic in the sequencer
* by using the natural wrap point of an 8bit counter.
*/
#define AHD_TMODE_CMDS 256
/* Reset line assertion time in us */
#define AHD_BUSRESET_DELAY 25
/******************* Chip Characteristics/Operating Settings *****************/
/*
* Chip Type
* The chip order is from least sophisticated to most sophisticated.
*/
typedef enum {
AHD_NONE = 0x0000,
AHD_CHIPID_MASK = 0x00FF,
AHD_AIC7901 = 0x0001,
AHD_AIC7902 = 0x0002,
AHD_AIC7901A = 0x0003,
AHD_PCI = 0x0100, /* Bus type PCI */
AHD_PCIX = 0x0200, /* Bus type PCIX */
AHD_BUS_MASK = 0x0F00
} ahd_chip;
/*
* Features available in each chip type.
*/
typedef enum {
AHD_FENONE = 0x00000,
AHD_WIDE = 0x00001,/* Wide Channel */
AHD_AIC79XXB_SLOWCRC = 0x00002,/* SLOWCRC bit should be set */
AHD_MULTI_FUNC = 0x00100,/* Multi-Function/Channel Device */
AHD_TARGETMODE = 0x01000,/* Has tested target mode support */
AHD_MULTIROLE = 0x02000,/* Space for two roles at a time */
AHD_RTI = 0x04000,/* Retained Training Support */
AHD_NEW_IOCELL_OPTS = 0x08000,/* More Signal knobs in the IOCELL */
AHD_NEW_DFCNTRL_OPTS = 0x10000,/* SCSIENWRDIS bit */
AHD_FAST_CDB_DELIVERY = 0x20000,/* CDB acks released to Output Sync */
AHD_REMOVABLE = 0x00000,/* Hot-Swap supported - None so far*/
AHD_AIC7901_FE = AHD_FENONE,
AHD_AIC7901A_FE = AHD_FENONE,
AHD_AIC7902_FE = AHD_MULTI_FUNC
} ahd_feature;
/*
* Bugs in the silicon that we work around in software.
*/
typedef enum {
AHD_BUGNONE = 0x0000,
/*
* Rev A hardware fails to update LAST/CURR/NEXTSCB
* correctly in certain packetized selection cases.
*/
AHD_SENT_SCB_UPDATE_BUG = 0x0001,
/* The wrong SCB is accessed to check the abort pending bit. */
AHD_ABORT_LQI_BUG = 0x0002,
/* Packetized bitbucket crosses packet boundaries. */
AHD_PKT_BITBUCKET_BUG = 0x0004,
/* The selection timer runs twice as long as its setting. */
AHD_LONG_SETIMO_BUG = 0x0008,
/* The Non-LQ CRC error status is delayed until phase change. */
AHD_NLQICRC_DELAYED_BUG = 0x0010,
/* The chip must be reset for all outgoing bus resets. */
AHD_SCSIRST_BUG = 0x0020,
/* Some PCIX fields must be saved and restored across chip reset. */
AHD_PCIX_CHIPRST_BUG = 0x0040,
/* MMAPIO is not functional in PCI-X mode. */
AHD_PCIX_MMAPIO_BUG = 0x0080,
/* Reads to SCBRAM fail to reset the discard timer. */
AHD_PCIX_SCBRAM_RD_BUG = 0x0100,
/* Bug workarounds that can be disabled on non-PCIX busses. */
AHD_PCIX_BUG_MASK = AHD_PCIX_CHIPRST_BUG
| AHD_PCIX_MMAPIO_BUG
| AHD_PCIX_SCBRAM_RD_BUG,
/*
* LQOSTOP0 status set even for forced selections with ATN
* to perform non-packetized message delivery.
*/
AHD_LQO_ATNO_BUG = 0x0200,
/* FIFO auto-flush does not always trigger. */
AHD_AUTOFLUSH_BUG = 0x0400,
/* The CLRLQO registers are not self-clearing. */
AHD_CLRLQO_AUTOCLR_BUG = 0x0800,
/* The PACKETIZED status bit refers to the previous connection. */
AHD_PKTIZED_STATUS_BUG = 0x1000,
/* "Short Luns" are not placed into outgoing LQ packets correctly. */
AHD_PKT_LUN_BUG = 0x2000,
/*
* Only the FIFO allocated to the non-packetized connection may
* be in use during a non-packetzied connection.
*/
AHD_NONPACKFIFO_BUG = 0x4000,
/*
* Writing to a DFF SCBPTR register may fail if concurent with
* a hardware write to the other DFF SCBPTR register. This is
* not currently a concern in our sequencer since all chips with
* this bug have the AHD_NONPACKFIFO_BUG and all writes of concern
* occur in non-packetized connections.
*/
AHD_MDFF_WSCBPTR_BUG = 0x8000,
/* SGHADDR updates are slow. */
AHD_REG_SLOW_SETTLE_BUG = 0x10000,
/*
* Changing the MODE_PTR coincident with an interrupt that
* switches to a different mode will cause the interrupt to
* be in the mode written outside of interrupt context.
*/
AHD_SET_MODE_BUG = 0x20000,
/* Non-packetized busfree revision does not work. */
AHD_BUSFREEREV_BUG = 0x40000,
/*
* Paced transfers are indicated with a non-standard PPR
* option bit in the neg table, 160MHz is indicated by
* sync factor 0x7, and the offset if off by a factor of 2.
*/
AHD_PACED_NEGTABLE_BUG = 0x80000,
/* LQOOVERRUN false positives. */
AHD_LQOOVERRUN_BUG = 0x100000,
/*
* Controller write to INTSTAT will lose to a host
* write to CLRINT.
*/
AHD_INTCOLLISION_BUG = 0x200000,
/*
* The GEM318 violates the SCSI spec by not waiting
* the mandated bus settle delay between phase changes
* in some situations. Some aic79xx chip revs. are more
* strict in this regard and will treat REQ assertions
* that fall within the bus settle delay window as
* glitches. This flag tells the firmware to tolerate
* early REQ assertions.
*/
AHD_EARLY_REQ_BUG = 0x400000,
/*
* The LED does not stay on long enough in packetized modes.
*/
AHD_FAINT_LED_BUG = 0x800000
} ahd_bug;
/*
* Configuration specific settings.
* The driver determines these settings by probing the
* chip/controller's configuration.
*/
typedef enum {
AHD_FNONE = 0x00000,
AHD_BOOT_CHANNEL = 0x00001,/* We were set as the boot channel. */
AHD_USEDEFAULTS = 0x00004,/*
* For cards without an seeprom
* or a BIOS to initialize the chip's
* SRAM, we use the default target
* settings.
*/
AHD_SEQUENCER_DEBUG = 0x00008,
AHD_RESET_BUS_A = 0x00010,
AHD_EXTENDED_TRANS_A = 0x00020,
AHD_TERM_ENB_A = 0x00040,
AHD_SPCHK_ENB_A = 0x00080,
AHD_STPWLEVEL_A = 0x00100,
AHD_INITIATORROLE = 0x00200,/*
* Allow initiator operations on
* this controller.
*/
AHD_TARGETROLE = 0x00400,/*
* Allow target operations on this
* controller.
*/
AHD_RESOURCE_SHORTAGE = 0x00800,
AHD_TQINFIFO_BLOCKED = 0x01000,/* Blocked waiting for ATIOs */
AHD_INT50_SPEEDFLEX = 0x02000,/*
* Internal 50pin connector
* sits behind an aic3860
*/
AHD_BIOS_ENABLED = 0x04000,
AHD_ALL_INTERRUPTS = 0x08000,
AHD_39BIT_ADDRESSING = 0x10000,/* Use 39 bit addressing scheme. */
AHD_64BIT_ADDRESSING = 0x20000,/* Use 64 bit addressing scheme. */
AHD_CURRENT_SENSING = 0x40000,
AHD_SCB_CONFIG_USED = 0x80000,/* No SEEPROM but SCB had info. */
AHD_HP_BOARD = 0x100000,
AHD_BUS_RESET_ACTIVE = 0x200000,
AHD_UPDATE_PEND_CMDS = 0x400000,
AHD_RUNNING_QOUTFIFO = 0x800000,
AHD_HAD_FIRST_SEL = 0x1000000
} ahd_flag;
/************************* Hardware SCB Definition ***************************/
/*
* The driver keeps up to MAX_SCB scb structures per card in memory. The SCB
* consists of a "hardware SCB" mirroring the fields available on the card
* and additional information the kernel stores for each transaction.
*
* To minimize space utilization, a portion of the hardware scb stores
* different data during different portions of a SCSI transaction.
* As initialized by the host driver for the initiator role, this area
* contains the SCSI cdb (or a pointer to the cdb) to be executed. After
* the cdb has been presented to the target, this area serves to store
* residual transfer information and the SCSI status byte.
* For the target role, the contents of this area do not change, but
* still serve a different purpose than for the initiator role. See
* struct target_data for details.
*/
/*
* Status information embedded in the shared poriton of
* an SCB after passing the cdb to the target. The kernel
* driver will only read this data for transactions that
* complete abnormally.
*/
struct initiator_status {
uint32_t residual_datacnt; /* Residual in the current S/G seg */
uint32_t residual_sgptr; /* The next S/G for this transfer */
uint8_t scsi_status; /* Standard SCSI status byte */
};
struct target_status {
uint32_t residual_datacnt; /* Residual in the current S/G seg */
uint32_t residual_sgptr; /* The next S/G for this transfer */
uint8_t scsi_status; /* SCSI status to give to initiator */
uint8_t target_phases; /* Bitmap of phases to execute */
uint8_t data_phase; /* Data-In or Data-Out */
uint8_t initiator_tag; /* Initiator's transaction tag */
};
/*
* Initiator mode SCB shared data area.
* If the embedded CDB is 12 bytes or less, we embed
* the sense buffer address in the SCB. This allows
* us to retrieve sense information without interrupting
* the host in packetized mode.
*/
typedef uint32_t sense_addr_t;
#define MAX_CDB_LEN 16
#define MAX_CDB_LEN_WITH_SENSE_ADDR (MAX_CDB_LEN - sizeof(sense_addr_t))
union initiator_data {
struct {
uint64_t cdbptr;
uint8_t cdblen;
} cdb_from_host;
uint8_t cdb[MAX_CDB_LEN];
struct {
uint8_t cdb[MAX_CDB_LEN_WITH_SENSE_ADDR];
sense_addr_t sense_addr;
} cdb_plus_saddr;
};
/*
* Target mode version of the shared data SCB segment.
*/
struct target_data {
uint32_t spare[2];
uint8_t scsi_status; /* SCSI status to give to initiator */
uint8_t target_phases; /* Bitmap of phases to execute */
uint8_t data_phase; /* Data-In or Data-Out */
uint8_t initiator_tag; /* Initiator's transaction tag */
};
struct hardware_scb {
/*0*/ union {
union initiator_data idata;
struct target_data tdata;
struct initiator_status istatus;
struct target_status tstatus;
} shared_data;
/*
* A word about residuals.
* The scb is presented to the sequencer with the dataptr and datacnt
* fields initialized to the contents of the first S/G element to
* transfer. The sgptr field is initialized to the bus address for
* the S/G element that follows the first in the in core S/G array
* or'ed with the SG_FULL_RESID flag. Sgptr may point to an invalid
* S/G entry for this transfer (single S/G element transfer with the
* first elements address and length preloaded in the dataptr/datacnt
* fields). If no transfer is to occur, sgptr is set to SG_LIST_NULL.
* The SG_FULL_RESID flag ensures that the residual will be correctly
* noted even if no data transfers occur. Once the data phase is entered,
* the residual sgptr and datacnt are loaded from the sgptr and the
* datacnt fields. After each S/G element's dataptr and length are
* loaded into the hardware, the residual sgptr is advanced. After
* each S/G element is expired, its datacnt field is checked to see
* if the LAST_SEG flag is set. If so, SG_LIST_NULL is set in the
* residual sg ptr and the transfer is considered complete. If the
* sequencer determines that there is a residual in the tranfer, or
* there is non-zero status, it will set the SG_STATUS_VALID flag in
* sgptr and dma the scb back into host memory. To sumarize:
*
* Sequencer:
* o A residual has occurred if SG_FULL_RESID is set in sgptr,
* or residual_sgptr does not have SG_LIST_NULL set.
*
* o We are transfering the last segment if residual_datacnt has
* the SG_LAST_SEG flag set.
*
* Host:
* o A residual can only have occurred if a completed scb has the
* SG_STATUS_VALID flag set. Inspection of the SCSI status field,
* the residual_datacnt, and the residual_sgptr field will tell
* for sure.
*
* o residual_sgptr and sgptr refer to the "next" sg entry
* and so may point beyond the last valid sg entry for the
* transfer.
*/
#define SG_PTR_MASK 0xFFFFFFF8
/*16*/ uint16_t tag; /* Reused by Sequencer. */
/*18*/ uint8_t control; /* See SCB_CONTROL in aic79xx.reg for details */
/*19*/ uint8_t scsiid; /*
* Selection out Id
* Our Id (bits 0-3) Their ID (bits 4-7)
*/
/*20*/ uint8_t lun;
/*21*/ uint8_t task_attribute;
/*22*/ uint8_t cdb_len;
/*23*/ uint8_t task_management;
/*24*/ uint64_t dataptr;
/*32*/ uint32_t datacnt; /* Byte 3 is spare. */
/*36*/ uint32_t sgptr;
/*40*/ uint32_t hscb_busaddr;
/*44*/ uint32_t next_hscb_busaddr;
/********** Long lun field only downloaded for full 8 byte lun support ********/
/*48*/ uint8_t pkt_long_lun[8];
/******* Fields below are not Downloaded (Sequencer may use for scratch) ******/
/*56*/ uint8_t spare[8];
};
/************************ Kernel SCB Definitions ******************************/
/*
* Some fields of the SCB are OS dependent. Here we collect the
* definitions for elements that all OS platforms need to include
* in there SCB definition.
*/
/*
* Definition of a scatter/gather element as transfered to the controller.
* The aic7xxx chips only support a 24bit length. We use the top byte of
* the length to store additional address bits and a flag to indicate
* that a given segment terminates the transfer. This gives us an
* addressable range of 512GB on machines with 64bit PCI or with chips
* that can support dual address cycles on 32bit PCI busses.
*/
struct ahd_dma_seg {
uint32_t addr;
uint32_t len;
#define AHD_DMA_LAST_SEG 0x80000000
#define AHD_SG_HIGH_ADDR_MASK 0x7F000000
#define AHD_SG_LEN_MASK 0x00FFFFFF
};
struct ahd_dma64_seg {
uint64_t addr;
uint32_t len;
uint32_t pad;
};
struct map_node {
bus_dmamap_t dmamap;
dma_addr_t physaddr;
uint8_t *vaddr;
SLIST_ENTRY(map_node) links;
};
/*
* The current state of this SCB.
*/
typedef enum {
SCB_FLAG_NONE = 0x00000,
SCB_TRANSMISSION_ERROR = 0x00001,/*
* We detected a parity or CRC
* error that has effected the
* payload of the command. This
* flag is checked when normal
* status is returned to catch
* the case of a target not
* responding to our attempt
* to report the error.
*/
SCB_OTHERTCL_TIMEOUT = 0x00002,/*
* Another device was active
* during the first timeout for
* this SCB so we gave ourselves
* an additional timeout period
* in case it was hogging the
* bus.
*/
SCB_DEVICE_RESET = 0x00004,
SCB_SENSE = 0x00008,
SCB_CDB32_PTR = 0x00010,
SCB_RECOVERY_SCB = 0x00020,
SCB_AUTO_NEGOTIATE = 0x00040,/* Negotiate to achieve goal. */
SCB_NEGOTIATE = 0x00080,/* Negotiation forced for command. */
SCB_ABORT = 0x00100,
SCB_ACTIVE = 0x00200,
SCB_TARGET_IMMEDIATE = 0x00400,
SCB_PACKETIZED = 0x00800,
SCB_EXPECT_PPR_BUSFREE = 0x01000,
SCB_PKT_SENSE = 0x02000,
SCB_EXTERNAL_RESET = 0x04000,/* Device was reset externally */
SCB_ON_COL_LIST = 0x08000,
SCB_SILENT = 0x10000 /*
* Be quiet about transmission type
* errors. They are expected and we
* don't want to upset the user. This
* flag is typically used during DV.
*/
} scb_flag;
struct scb {
struct hardware_scb *hscb;
union {
SLIST_ENTRY(scb) sle;
LIST_ENTRY(scb) le;
TAILQ_ENTRY(scb) tqe;
} links;
union {
SLIST_ENTRY(scb) sle;
LIST_ENTRY(scb) le;
TAILQ_ENTRY(scb) tqe;
} links2;
#define pending_links links2.le
#define collision_links links2.le
struct scb *col_scb;
ahd_io_ctx_t io_ctx;
struct ahd_softc *ahd_softc;
scb_flag flags;
#ifndef __linux__
bus_dmamap_t dmamap;
#endif
struct scb_platform_data *platform_data;
struct map_node *hscb_map;
struct map_node *sg_map;
struct map_node *sense_map;
void *sg_list;
uint8_t *sense_data;
dma_addr_t sg_list_busaddr;
dma_addr_t sense_busaddr;
u_int sg_count;/* How full ahd_dma_seg is */
#define AHD_MAX_LQ_CRC_ERRORS 5
u_int crc_retry_count;
};
TAILQ_HEAD(scb_tailq, scb);
LIST_HEAD(scb_list, scb);
struct scb_data {
/*
* TAILQ of lists of free SCBs grouped by device
* collision domains.
*/
struct scb_tailq free_scbs;
/*
* Per-device lists of SCBs whose tag ID would collide
* with an already active tag on the device.
*/
struct scb_list free_scb_lists[AHD_NUM_TARGETS * AHD_NUM_LUNS_NONPKT];
/*
* SCBs that will not collide with any active device.
*/
struct scb_list any_dev_free_scb_list;
/*
* Mapping from tag to SCB.
*/
struct scb *scbindex[AHD_SCB_MAX];
/*
* "Bus" addresses of our data structures.
*/
bus_dma_tag_t hscb_dmat; /* dmat for our hardware SCB array */
bus_dma_tag_t sg_dmat; /* dmat for our sg segments */
bus_dma_tag_t sense_dmat; /* dmat for our sense buffers */
SLIST_HEAD(, map_node) hscb_maps;
SLIST_HEAD(, map_node) sg_maps;
SLIST_HEAD(, map_node) sense_maps;
int scbs_left; /* unallocated scbs in head map_node */
int sgs_left; /* unallocated sgs in head map_node */
int sense_left; /* unallocated sense in head map_node */
uint16_t numscbs;
uint16_t maxhscbs; /* Number of SCBs on the card */
uint8_t init_level; /*
* How far we've initialized
* this structure.
*/
};
/************************ Target Mode Definitions *****************************/
/*
* Connection desciptor for select-in requests in target mode.
*/
struct target_cmd {
uint8_t scsiid; /* Our ID and the initiator's ID */
uint8_t identify; /* Identify message */
uint8_t bytes[22]; /*
* Bytes contains any additional message
* bytes terminated by 0xFF. The remainder
* is the cdb to execute.
*/
uint8_t cmd_valid; /*
* When a command is complete, the firmware
* will set cmd_valid to all bits set.
* After the host has seen the command,
* the bits are cleared. This allows us
* to just peek at host memory to determine
* if more work is complete. cmd_valid is on
* an 8 byte boundary to simplify setting
* it on aic7880 hardware which only has
* limited direct access to the DMA FIFO.
*/
uint8_t pad[7];
};
/*
* Number of events we can buffer up if we run out
* of immediate notify ccbs.
*/
#define AHD_TMODE_EVENT_BUFFER_SIZE 8
struct ahd_tmode_event {
uint8_t initiator_id;
uint8_t event_type; /* MSG type or EVENT_TYPE_BUS_RESET */
#define EVENT_TYPE_BUS_RESET 0xFF
uint8_t event_arg;
};
/*
* Per enabled lun target mode state.
* As this state is directly influenced by the host OS'es target mode
* environment, we let the OS module define it. Forward declare the
* structure here so we can store arrays of them, etc. in OS neutral
* data structures.
*/
#ifdef AHD_TARGET_MODE
struct ahd_tmode_lstate {
struct cam_path *path;
struct ccb_hdr_slist accept_tios;
struct ccb_hdr_slist immed_notifies;
struct ahd_tmode_event event_buffer[AHD_TMODE_EVENT_BUFFER_SIZE];
uint8_t event_r_idx;
uint8_t event_w_idx;
};
#else
struct ahd_tmode_lstate;
#endif
/******************** Transfer Negotiation Datastructures *********************/
#define AHD_TRANS_CUR 0x01 /* Modify current neogtiation status */
#define AHD_TRANS_ACTIVE 0x03 /* Assume this target is on the bus */
#define AHD_TRANS_GOAL 0x04 /* Modify negotiation goal */
#define AHD_TRANS_USER 0x08 /* Modify user negotiation settings */
#define AHD_PERIOD_10MHz 0x19
#define AHD_WIDTH_UNKNOWN 0xFF
#define AHD_PERIOD_UNKNOWN 0xFF
#define AHD_OFFSET_UNKNOWN 0xFF
#define AHD_PPR_OPTS_UNKNOWN 0xFF
/*
* Transfer Negotiation Information.
*/
struct ahd_transinfo {
uint8_t protocol_version; /* SCSI Revision level */
uint8_t transport_version; /* SPI Revision level */
uint8_t width; /* Bus width */
uint8_t period; /* Sync rate factor */
uint8_t offset; /* Sync offset */
uint8_t ppr_options; /* Parallel Protocol Request options */
};
/*
* Per-initiator current, goal and user transfer negotiation information. */
struct ahd_initiator_tinfo {
struct ahd_transinfo curr;
struct ahd_transinfo goal;
struct ahd_transinfo user;
};
/*
* Per enabled target ID state.
* Pointers to lun target state as well as sync/wide negotiation information
* for each initiator<->target mapping. For the initiator role we pretend
* that we are the target and the targets are the initiators since the
* negotiation is the same regardless of role.
*/
struct ahd_tmode_tstate {
struct ahd_tmode_lstate* enabled_luns[AHD_NUM_LUNS];
struct ahd_initiator_tinfo transinfo[AHD_NUM_TARGETS];
/*
* Per initiator state bitmasks.
*/
uint16_t auto_negotiate;/* Auto Negotiation Required */
uint16_t discenable; /* Disconnection allowed */
uint16_t tagenable; /* Tagged Queuing allowed */
};
/*
* Points of interest along the negotiated transfer scale.
*/
#define AHD_SYNCRATE_160 0x8
#define AHD_SYNCRATE_PACED 0x8
#define AHD_SYNCRATE_DT 0x9
#define AHD_SYNCRATE_ULTRA2 0xa
#define AHD_SYNCRATE_ULTRA 0xc
#define AHD_SYNCRATE_FAST 0x19
#define AHD_SYNCRATE_MIN_DT AHD_SYNCRATE_FAST
#define AHD_SYNCRATE_SYNC 0x32
#define AHD_SYNCRATE_MIN 0x60
#define AHD_SYNCRATE_ASYNC 0xFF
#define AHD_SYNCRATE_MAX AHD_SYNCRATE_160
/* Safe and valid period for async negotiations. */
#define AHD_ASYNC_XFER_PERIOD 0x44
/*
* In RevA, the synctable uses a 120MHz rate for the period
* factor 8 and 160MHz for the period factor 7. The 120MHz
* rate never made it into the official SCSI spec, so we must
* compensate when setting the negotiation table for Rev A
* parts.
*/
#define AHD_SYNCRATE_REVA_120 0x8
#define AHD_SYNCRATE_REVA_160 0x7
/***************************** Lookup Tables **********************************/
/*
* Phase -> name and message out response
* to parity errors in each phase table.
*/
struct ahd_phase_table_entry {
uint8_t phase;
uint8_t mesg_out; /* Message response to parity errors */
const char *phasemsg;
};
/************************** Serial EEPROM Format ******************************/
struct seeprom_config {
/*
* Per SCSI ID Configuration Flags
*/
uint16_t device_flags[16]; /* words 0-15 */
#define CFXFER 0x003F /* synchronous transfer rate */
#define CFXFER_ASYNC 0x3F
#define CFQAS 0x0040 /* Negotiate QAS */
#define CFPACKETIZED 0x0080 /* Negotiate Packetized Transfers */
#define CFSTART 0x0100 /* send start unit SCSI command */
#define CFINCBIOS 0x0200 /* include in BIOS scan */
#define CFDISC 0x0400 /* enable disconnection */
#define CFMULTILUNDEV 0x0800 /* Probe multiple luns in BIOS scan */
#define CFWIDEB 0x1000 /* wide bus device */
#define CFHOSTMANAGED 0x8000 /* Managed by a RAID controller */
/*
* BIOS Control Bits
*/
uint16_t bios_control; /* word 16 */
#define CFSUPREM 0x0001 /* support all removeable drives */
#define CFSUPREMB 0x0002 /* support removeable boot drives */
#define CFBIOSSTATE 0x000C /* BIOS Action State */
#define CFBS_DISABLED 0x00
#define CFBS_ENABLED 0x04
#define CFBS_DISABLED_SCAN 0x08
#define CFENABLEDV 0x0010 /* Perform Domain Validation */
#define CFCTRL_A 0x0020 /* BIOS displays Ctrl-A message */
#define CFSPARITY 0x0040 /* SCSI parity */
#define CFEXTEND 0x0080 /* extended translation enabled */
#define CFBOOTCD 0x0100 /* Support Bootable CD-ROM */
#define CFMSG_LEVEL 0x0600 /* BIOS Message Level */
#define CFMSG_VERBOSE 0x0000
#define CFMSG_SILENT 0x0200
#define CFMSG_DIAG 0x0400
#define CFRESETB 0x0800 /* reset SCSI bus at boot */
/* UNUSED 0xf000 */
/*
* Host Adapter Control Bits
*/
uint16_t adapter_control; /* word 17 */
#define CFAUTOTERM 0x0001 /* Perform Auto termination */
#define CFSTERM 0x0002 /* SCSI low byte termination */
#define CFWSTERM 0x0004 /* SCSI high byte termination */
#define CFSEAUTOTERM 0x0008 /* Ultra2 Perform secondary Auto Term*/
#define CFSELOWTERM 0x0010 /* Ultra2 secondary low term */
#define CFSEHIGHTERM 0x0020 /* Ultra2 secondary high term */
#define CFSTPWLEVEL 0x0040 /* Termination level control */
#define CFBIOSAUTOTERM 0x0080 /* Perform Auto termination */
#define CFTERM_MENU 0x0100 /* BIOS displays termination menu */
#define CFCLUSTERENB 0x8000 /* Cluster Enable */
/*
* Bus Release Time, Host Adapter ID
*/
uint16_t brtime_id; /* word 18 */
#define CFSCSIID 0x000f /* host adapter SCSI ID */
/* UNUSED 0x00f0 */
#define CFBRTIME 0xff00 /* bus release time/PCI Latency Time */
/*
* Maximum targets
*/
uint16_t max_targets; /* word 19 */
#define CFMAXTARG 0x00ff /* maximum targets */
#define CFBOOTLUN 0x0f00 /* Lun to boot from */
#define CFBOOTID 0xf000 /* Target to boot from */
uint16_t res_1[10]; /* words 20-29 */
uint16_t signature; /* BIOS Signature */
#define CFSIGNATURE 0x400
uint16_t checksum; /* word 31 */
};
/*
* Vital Product Data used during POST and by the BIOS.
*/
struct vpd_config {
uint8_t bios_flags;
#define VPDMASTERBIOS 0x0001
#define VPDBOOTHOST 0x0002
uint8_t reserved_1[21];
uint8_t resource_type;
uint8_t resource_len[2];
uint8_t resource_data[8];
uint8_t vpd_tag;
uint16_t vpd_len;
uint8_t vpd_keyword[2];
uint8_t length;
uint8_t revision;
uint8_t device_flags;
uint8_t termnation_menus[2];
uint8_t fifo_threshold;
uint8_t end_tag;
uint8_t vpd_checksum;
uint16_t default_target_flags;
uint16_t default_bios_flags;
uint16_t default_ctrl_flags;
uint8_t default_irq;
uint8_t pci_lattime;
uint8_t max_target;
uint8_t boot_lun;
uint16_t signature;
uint8_t reserved_2;
uint8_t checksum;
uint8_t reserved_3[4];
};
/****************************** Flexport Logic ********************************/
#define FLXADDR_TERMCTL 0x0
#define FLX_TERMCTL_ENSECHIGH 0x8
#define FLX_TERMCTL_ENSECLOW 0x4
#define FLX_TERMCTL_ENPRIHIGH 0x2
#define FLX_TERMCTL_ENPRILOW 0x1
#define FLXADDR_ROMSTAT_CURSENSECTL 0x1
#define FLX_ROMSTAT_SEECFG 0xF0
#define FLX_ROMSTAT_EECFG 0x0F
#define FLX_ROMSTAT_SEE_93C66 0x00
#define FLX_ROMSTAT_SEE_NONE 0xF0
#define FLX_ROMSTAT_EE_512x8 0x0
#define FLX_ROMSTAT_EE_1MBx8 0x1
#define FLX_ROMSTAT_EE_2MBx8 0x2
#define FLX_ROMSTAT_EE_4MBx8 0x3
#define FLX_ROMSTAT_EE_16MBx8 0x4
#define CURSENSE_ENB 0x1
#define FLXADDR_FLEXSTAT 0x2
#define FLX_FSTAT_BUSY 0x1
#define FLXADDR_CURRENT_STAT 0x4
#define FLX_CSTAT_SEC_HIGH 0xC0
#define FLX_CSTAT_SEC_LOW 0x30
#define FLX_CSTAT_PRI_HIGH 0x0C
#define FLX_CSTAT_PRI_LOW 0x03
#define FLX_CSTAT_MASK 0x03
#define FLX_CSTAT_SHIFT 2
#define FLX_CSTAT_OKAY 0x0
#define FLX_CSTAT_OVER 0x1
#define FLX_CSTAT_UNDER 0x2
#define FLX_CSTAT_INVALID 0x3
int ahd_read_seeprom(struct ahd_softc *ahd, uint16_t *buf,
u_int start_addr, u_int count, int bstream);
int ahd_write_seeprom(struct ahd_softc *ahd, uint16_t *buf,
u_int start_addr, u_int count);
int ahd_verify_cksum(struct seeprom_config *sc);
int ahd_acquire_seeprom(struct ahd_softc *ahd);
void ahd_release_seeprom(struct ahd_softc *ahd);
/**************************** Message Buffer *********************************/
typedef enum {
MSG_FLAG_NONE = 0x00,
MSG_FLAG_EXPECT_PPR_BUSFREE = 0x01,
MSG_FLAG_IU_REQ_CHANGED = 0x02,
MSG_FLAG_EXPECT_IDE_BUSFREE = 0x04,
MSG_FLAG_EXPECT_QASREJ_BUSFREE = 0x08,
MSG_FLAG_PACKETIZED = 0x10
} ahd_msg_flags;
typedef enum {
MSG_TYPE_NONE = 0x00,
MSG_TYPE_INITIATOR_MSGOUT = 0x01,
MSG_TYPE_INITIATOR_MSGIN = 0x02,
MSG_TYPE_TARGET_MSGOUT = 0x03,
MSG_TYPE_TARGET_MSGIN = 0x04
} ahd_msg_type;
typedef enum {
MSGLOOP_IN_PROG,
MSGLOOP_MSGCOMPLETE,
MSGLOOP_TERMINATED
} msg_loop_stat;
/*********************** Software Configuration Structure *********************/
struct ahd_suspend_channel_state {
uint8_t scsiseq;
uint8_t sxfrctl0;
uint8_t sxfrctl1;
uint8_t simode0;
uint8_t simode1;
uint8_t seltimer;
uint8_t seqctl;
};
struct ahd_suspend_pci_state {
uint32_t devconfig;
uint8_t command;
uint8_t csize_lattime;
};
struct ahd_suspend_state {
struct ahd_suspend_channel_state channel[2];
struct ahd_suspend_pci_state pci_state;
uint8_t optionmode;
uint8_t dscommand0;
uint8_t dspcistatus;
/* hsmailbox */
uint8_t crccontrol1;
uint8_t scbbaddr;
/* Host and sequencer SCB counts */
uint8_t dff_thrsh;
uint8_t *scratch_ram;
uint8_t *btt;
};
typedef void (*ahd_bus_intr_t)(struct ahd_softc *);
typedef enum {
AHD_MODE_DFF0,
AHD_MODE_DFF1,
AHD_MODE_CCHAN,
AHD_MODE_SCSI,
AHD_MODE_CFG,
AHD_MODE_UNKNOWN
} ahd_mode;
#define AHD_MK_MSK(x) (0x01 << (x))
#define AHD_MODE_DFF0_MSK AHD_MK_MSK(AHD_MODE_DFF0)
#define AHD_MODE_DFF1_MSK AHD_MK_MSK(AHD_MODE_DFF1)
#define AHD_MODE_CCHAN_MSK AHD_MK_MSK(AHD_MODE_CCHAN)
#define AHD_MODE_SCSI_MSK AHD_MK_MSK(AHD_MODE_SCSI)
#define AHD_MODE_CFG_MSK AHD_MK_MSK(AHD_MODE_CFG)
#define AHD_MODE_UNKNOWN_MSK AHD_MK_MSK(AHD_MODE_UNKNOWN)
#define AHD_MODE_ANY_MSK (~0)
typedef uint8_t ahd_mode_state;
typedef void ahd_callback_t (void *);
struct ahd_completion
{
uint16_t tag;
uint8_t sg_status;
uint8_t valid_tag;
};
struct ahd_softc {
bus_space_tag_t tags[2];
bus_space_handle_t bshs[2];
#ifndef __linux__
bus_dma_tag_t buffer_dmat; /* dmat for buffer I/O */
#endif
struct scb_data scb_data;
struct hardware_scb *next_queued_hscb;
struct map_node *next_queued_hscb_map;
/*
* SCBs that have been sent to the controller
*/
LIST_HEAD(, scb) pending_scbs;
/*
* Current register window mode information.
*/
ahd_mode dst_mode;
ahd_mode src_mode;
/*
* Saved register window mode information
* used for restore on next unpause.
*/
ahd_mode saved_dst_mode;
ahd_mode saved_src_mode;
/*
* Platform specific data.
*/
struct ahd_platform_data *platform_data;
/*
* Platform specific device information.
*/
ahd_dev_softc_t dev_softc;
/*
* Bus specific device information.
*/
ahd_bus_intr_t bus_intr;
/*
* Target mode related state kept on a per enabled lun basis.
* Targets that are not enabled will have null entries.
* As an initiator, we keep one target entry for our initiator
* ID to store our sync/wide transfer settings.
*/
struct ahd_tmode_tstate *enabled_targets[AHD_NUM_TARGETS];
/*
* The black hole device responsible for handling requests for
* disabled luns on enabled targets.
*/
struct ahd_tmode_lstate *black_hole;
/*
* Device instance currently on the bus awaiting a continue TIO
* for a command that was not given the disconnect priveledge.
*/
struct ahd_tmode_lstate *pending_device;
/*
* Timer handles for timer driven callbacks.
*/
ahd_timer_t reset_timer;
ahd_timer_t stat_timer;
/*
* Statistics.
*/
#define AHD_STAT_UPDATE_US 250000 /* 250ms */
#define AHD_STAT_BUCKETS 4
u_int cmdcmplt_bucket;
uint32_t cmdcmplt_counts[AHD_STAT_BUCKETS];
uint32_t cmdcmplt_total;
/*
* Card characteristics
*/
ahd_chip chip;
ahd_feature features;
ahd_bug bugs;
ahd_flag flags;
struct seeprom_config *seep_config;
/* Command Queues */
struct ahd_completion *qoutfifo;
uint16_t qoutfifonext;
uint16_t qoutfifonext_valid_tag;
uint16_t qinfifonext;
uint16_t qinfifo[AHD_SCB_MAX];
/*
* Our qfreeze count. The sequencer compares
* this value with its own counter to determine
* whether to allow selections to occur.
*/
uint16_t qfreeze_cnt;
/* Values to store in the SEQCTL register for pause and unpause */
uint8_t unpause;
uint8_t pause;
/* Critical Section Data */
struct cs *critical_sections;
u_int num_critical_sections;
/* Buffer for handling packetized bitbucket. */
uint8_t *overrun_buf;
/* Links for chaining softcs */
TAILQ_ENTRY(ahd_softc) links;
/* Channel Names ('A', 'B', etc.) */
char channel;
/* Initiator Bus ID */
uint8_t our_id;
/*
* Target incoming command FIFO.
*/
struct target_cmd *targetcmds;
uint8_t tqinfifonext;
/*
* Cached verson of the hs_mailbox so we can avoid
* pausing the sequencer during mailbox updates.
*/
uint8_t hs_mailbox;
/*
* Incoming and outgoing message handling.
*/
uint8_t send_msg_perror;
ahd_msg_flags msg_flags;
ahd_msg_type msg_type;
uint8_t msgout_buf[12];/* Message we are sending */
uint8_t msgin_buf[12];/* Message we are receiving */
u_int msgout_len; /* Length of message to send */
u_int msgout_index; /* Current index in msgout */
u_int msgin_index; /* Current index in msgin */
/*
* Mapping information for data structures shared
* between the sequencer and kernel.
*/
bus_dma_tag_t parent_dmat;
bus_dma_tag_t shared_data_dmat;
struct map_node shared_data_map;
/* Information saved through suspend/resume cycles */
struct ahd_suspend_state suspend_state;
/* Number of enabled target mode device on this card */
u_int enabled_luns;
/* Initialization level of this data structure */
u_int init_level;
/* PCI cacheline size. */
u_int pci_cachesize;
/* IO Cell Parameters */
uint8_t iocell_opts[AHD_NUM_PER_DEV_ANNEXCOLS];
u_int stack_size;
uint16_t *saved_stack;
/* Per-Unit descriptive information */
const char *description;
const char *bus_description;
char *name;
int unit;
/* Selection Timer settings */
int seltime;
/*
* Interrupt coalescing settings.
*/
#define AHD_INT_COALESCING_TIMER_DEFAULT 250 /*us*/
#define AHD_INT_COALESCING_MAXCMDS_DEFAULT 10
#define AHD_INT_COALESCING_MAXCMDS_MAX 127
#define AHD_INT_COALESCING_MINCMDS_DEFAULT 5
#define AHD_INT_COALESCING_MINCMDS_MAX 127
#define AHD_INT_COALESCING_THRESHOLD_DEFAULT 2000
#define AHD_INT_COALESCING_STOP_THRESHOLD_DEFAULT 1000
u_int int_coalescing_timer;
u_int int_coalescing_maxcmds;
u_int int_coalescing_mincmds;
u_int int_coalescing_threshold;
u_int int_coalescing_stop_threshold;
uint16_t user_discenable;/* Disconnection allowed */
uint16_t user_tagenable;/* Tagged Queuing allowed */
};
/*************************** IO Cell Configuration ****************************/
#define AHD_PRECOMP_SLEW_INDEX \
(AHD_ANNEXCOL_PRECOMP_SLEW - AHD_ANNEXCOL_PER_DEV0)
#define AHD_AMPLITUDE_INDEX \
(AHD_ANNEXCOL_AMPLITUDE - AHD_ANNEXCOL_PER_DEV0)
#define AHD_SET_SLEWRATE(ahd, new_slew) \
do { \
(ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] &= ~AHD_SLEWRATE_MASK; \
(ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] |= \
(((new_slew) << AHD_SLEWRATE_SHIFT) & AHD_SLEWRATE_MASK); \
} while (0)
#define AHD_SET_PRECOMP(ahd, new_pcomp) \
do { \
(ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] &= ~AHD_PRECOMP_MASK; \
(ahd)->iocell_opts[AHD_PRECOMP_SLEW_INDEX] |= \
(((new_pcomp) << AHD_PRECOMP_SHIFT) & AHD_PRECOMP_MASK); \
} while (0)
#define AHD_SET_AMPLITUDE(ahd, new_amp) \
do { \
(ahd)->iocell_opts[AHD_AMPLITUDE_INDEX] &= ~AHD_AMPLITUDE_MASK; \
(ahd)->iocell_opts[AHD_AMPLITUDE_INDEX] |= \
(((new_amp) << AHD_AMPLITUDE_SHIFT) & AHD_AMPLITUDE_MASK); \
} while (0)
/************************ Active Device Information ***************************/
typedef enum {
ROLE_UNKNOWN,
ROLE_INITIATOR,
ROLE_TARGET
} role_t;
struct ahd_devinfo {
int our_scsiid;
int target_offset;
uint16_t target_mask;
u_int target;
u_int lun;
char channel;
role_t role; /*
* Only guaranteed to be correct if not
* in the busfree state.
*/
};
/****************************** PCI Structures ********************************/
#define AHD_PCI_IOADDR0 PCIR_BAR(0) /* I/O BAR*/
#define AHD_PCI_MEMADDR PCIR_BAR(1) /* Memory BAR */
#define AHD_PCI_IOADDR1 PCIR_BAR(3) /* Second I/O BAR */
typedef int (ahd_device_setup_t)(struct ahd_softc *);
struct ahd_pci_identity {
uint64_t full_id;
uint64_t id_mask;
const char *name;
ahd_device_setup_t *setup;
};
/***************************** VL/EISA Declarations ***************************/
struct aic7770_identity {
uint32_t full_id;
uint32_t id_mask;
const char *name;
ahd_device_setup_t *setup;
};
extern struct aic7770_identity aic7770_ident_table [];
extern const int ahd_num_aic7770_devs;
#define AHD_EISA_SLOT_OFFSET 0xc00
#define AHD_EISA_IOSIZE 0x100
/*************************** Function Declarations ****************************/
/******************************************************************************/
/***************************** PCI Front End *********************************/
const struct ahd_pci_identity *ahd_find_pci_device(ahd_dev_softc_t);
int ahd_pci_config(struct ahd_softc *,
const struct ahd_pci_identity *);
int ahd_pci_test_register_access(struct ahd_softc *);
#ifdef CONFIG_PM
void ahd_pci_suspend(struct ahd_softc *);
void ahd_pci_resume(struct ahd_softc *);
#endif
/************************** SCB and SCB queue management **********************/
void ahd_qinfifo_requeue_tail(struct ahd_softc *ahd,
struct scb *scb);
/****************************** Initialization ********************************/
struct ahd_softc *ahd_alloc(void *platform_arg, char *name);
int ahd_softc_init(struct ahd_softc *);
void ahd_controller_info(struct ahd_softc *ahd, char *buf);
int ahd_init(struct ahd_softc *ahd);
#ifdef CONFIG_PM
int ahd_suspend(struct ahd_softc *ahd);
void ahd_resume(struct ahd_softc *ahd);
#endif
int ahd_default_config(struct ahd_softc *ahd);
int ahd_parse_vpddata(struct ahd_softc *ahd,
struct vpd_config *vpd);
int ahd_parse_cfgdata(struct ahd_softc *ahd,
struct seeprom_config *sc);
void ahd_intr_enable(struct ahd_softc *ahd, int enable);
void ahd_pause_and_flushwork(struct ahd_softc *ahd);
void ahd_set_unit(struct ahd_softc *, int);
void ahd_set_name(struct ahd_softc *, char *);
struct scb *ahd_get_scb(struct ahd_softc *ahd, u_int col_idx);
void ahd_free_scb(struct ahd_softc *ahd, struct scb *scb);
void ahd_free(struct ahd_softc *ahd);
int ahd_reset(struct ahd_softc *ahd, int reinit);
int ahd_write_flexport(struct ahd_softc *ahd,
u_int addr, u_int value);
int ahd_read_flexport(struct ahd_softc *ahd, u_int addr,
uint8_t *value);
/***************************** Error Recovery *********************************/
typedef enum {
SEARCH_COMPLETE,
SEARCH_COUNT,
SEARCH_REMOVE,
SEARCH_PRINT
} ahd_search_action;
int ahd_search_qinfifo(struct ahd_softc *ahd, int target,
char channel, int lun, u_int tag,
role_t role, uint32_t status,
ahd_search_action action);
int ahd_search_disc_list(struct ahd_softc *ahd, int target,
char channel, int lun, u_int tag,
int stop_on_first, int remove,
int save_state);
int ahd_reset_channel(struct ahd_softc *ahd, char channel,
int initiate_reset);
/*************************** Utility Functions ********************************/
void ahd_compile_devinfo(struct ahd_devinfo *devinfo,
u_int our_id, u_int target,
u_int lun, char channel,
role_t role);
/************************** Transfer Negotiation ******************************/
void ahd_find_syncrate(struct ahd_softc *ahd, u_int *period,
u_int *ppr_options, u_int maxsync);
/*
* Negotiation types. These are used to qualify if we should renegotiate
* even if our goal and current transport parameters are identical.
*/
typedef enum {
AHD_NEG_TO_GOAL, /* Renegotiate only if goal and curr differ. */
AHD_NEG_IF_NON_ASYNC, /* Renegotiate so long as goal is non-async. */
AHD_NEG_ALWAYS /* Renegotiat even if goal is async. */
} ahd_neg_type;
int ahd_update_neg_request(struct ahd_softc*,
struct ahd_devinfo*,
struct ahd_tmode_tstate*,
struct ahd_initiator_tinfo*,
ahd_neg_type);
void ahd_set_width(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo,
u_int width, u_int type, int paused);
void ahd_set_syncrate(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo,
u_int period, u_int offset,
u_int ppr_options,
u_int type, int paused);
typedef enum {
AHD_QUEUE_NONE,
AHD_QUEUE_BASIC,
AHD_QUEUE_TAGGED
} ahd_queue_alg;
/**************************** Target Mode *************************************/
#ifdef AHD_TARGET_MODE
void ahd_send_lstate_events(struct ahd_softc *,
struct ahd_tmode_lstate *);
void ahd_handle_en_lun(struct ahd_softc *ahd,
struct cam_sim *sim, union ccb *ccb);
cam_status ahd_find_tmode_devs(struct ahd_softc *ahd,
struct cam_sim *sim, union ccb *ccb,
struct ahd_tmode_tstate **tstate,
struct ahd_tmode_lstate **lstate,
int notfound_failure);
#ifndef AHD_TMODE_ENABLE
#define AHD_TMODE_ENABLE 0
#endif
#endif
/******************************* Debug ***************************************/
#ifdef AHD_DEBUG
extern uint32_t ahd_debug;
#define AHD_SHOW_MISC 0x00001
#define AHD_SHOW_SENSE 0x00002
#define AHD_SHOW_RECOVERY 0x00004
#define AHD_DUMP_SEEPROM 0x00008
#define AHD_SHOW_TERMCTL 0x00010
#define AHD_SHOW_MEMORY 0x00020
#define AHD_SHOW_MESSAGES 0x00040
#define AHD_SHOW_MODEPTR 0x00080
#define AHD_SHOW_SELTO 0x00100
#define AHD_SHOW_FIFOS 0x00200
#define AHD_SHOW_QFULL 0x00400
#define AHD_SHOW_DV 0x00800
#define AHD_SHOW_MASKED_ERRORS 0x01000
#define AHD_SHOW_QUEUE 0x02000
#define AHD_SHOW_TQIN 0x04000
#define AHD_SHOW_SG 0x08000
#define AHD_SHOW_INT_COALESCING 0x10000
#define AHD_DEBUG_SEQUENCER 0x20000
#endif
void ahd_print_devinfo(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo);
void ahd_dump_card_state(struct ahd_softc *ahd);
int ahd_print_register(const ahd_reg_parse_entry_t *table,
u_int num_entries,
const char *name,
u_int address,
u_int value,
u_int *cur_column,
u_int wrap_point);
#endif /* _AIC79XX_H_ */
| Java |
/*
* Timeval.cc -- time arithmetic
*
* (c) 2003 Dr. Andreas Mueller, Beratung und Entwicklung
*
* $Id: Timeval.cc,v 1.7 2009/01/10 19:00:25 afm Exp $
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */
#include <Timeval.h>
#ifdef HAVE_MATH_H
#include <math.h>
#endif /* HAVE_MATH_H */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
#include <mdebug.h>
namespace meteo {
Timeval::Timeval(void) {
t.tv_sec = t.tv_usec = 0;
}
Timeval::Timeval(struct timeval tv) {
t.tv_sec = tv.tv_sec;
t.tv_usec = tv.tv_usec;
}
Timeval::Timeval(double r) {
t.tv_sec = (int)r;
t.tv_usec = (int)(1000000. * (r - t.tv_sec));
}
Timeval::Timeval(int l) {
t.tv_sec = l; t.tv_usec = 0;
}
void Timeval::now(void) {
gettimeofday(&t, NULL);
}
time_t Timeval::getTimekey(void) const {
time_t result = t.tv_sec;
result -= (result % 60);
return result;
}
void Timeval::wait(void) {
struct timeval local;
local = t;
if (0 != select(0, NULL, NULL, NULL, &local)) {
mdebug(LOG_DEBUG, MDEBUG_LOG, MDEBUG_ERRNO,
"select problem in drain");
}
}
double Timeval::getValue(void) const {
return t.tv_sec + t.tv_usec/1000000.;
}
Timeval& Timeval::operator+=(double b) {
t.tv_sec += (int)b;
t.tv_usec += (int)(1000000 * (b - (int)b));
if (t.tv_usec >= 1000000) {
t.tv_usec -= 1000000;
t.tv_sec++;
}
return *this;
}
Timeval& Timeval::operator+=(int b) {
t.tv_sec += b;
return *this;
}
Timeval operator+(const Timeval& a, const Timeval& b) {
struct timeval tv;
tv.tv_sec = a.t.tv_sec + b.t.tv_sec;
tv.tv_usec = a.t.tv_usec + b.t.tv_usec;
if (tv.tv_usec >= 1000000) {
tv.tv_sec++;
tv.tv_usec -= 1000000;
}
return Timeval(tv);
}
Timeval operator+(const Timeval& a, const double b) {
return Timeval(a.getValue() + b);
}
Timeval operator+(const Timeval& a, const int b) {
struct timeval tv;
tv.tv_sec = a.t.tv_sec + b; tv.tv_usec = a.t.tv_usec;
return Timeval(tv);
}
Timeval operator-(const Timeval& a, const Timeval& b) {
return Timeval(a.getValue() - b.getValue());
}
} /* namespace meteo */
| Java |
using Rocket.API;
using Rocket.API.Extensions;
using Rocket.Core.Logging;
using Rocket.Unturned.Chat;
using Rocket.Unturned.Commands;
using Rocket.Unturned.Player;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace coolpuppy24.rpevents
{
public class ArrestFinishCommand : IRocketCommand
{
public static Main Instance;
public List<string> Aliases
{
get
{
return new List<string>() { };
}
}
public AllowedCaller AllowedCaller
{
get
{
return AllowedCaller.Player;
}
}
public string Help
{
get
{
return "Finishes arrest on a player";
}
}
public string Name
{
get
{
return "arrestfinish";
}
}
public List<string> Permissions
{
get
{
return new List<string>() { "rpevents.arrest" };
}
}
public string Syntax
{
get
{
return "<playername>";
}
}
public void Execute(IRocketPlayer caller, string[] command)
{
UnturnedPlayer player = command.GetUnturnedPlayerParameter(0);
if (player == null) UnturnedChat.Say(caller, Main.Instance.Translate("player_not_found"));
if (caller is ConsolePlayer)
{
Rocket.Core.Logging.Logger.Log("This command cannot be called from the console!");
return;
}
else
{
UnturnedChat.Say("[RPEvents]: " + Main.Instance.Translate("command_arrestfinish", caller.DisplayName), UnturnedChat.GetColorFromName(Main.Instance.Configuration.Instance.FinishColor, Color.red));
return;
}
}
}
}
| Java |
///////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/custombgwin.h
// Purpose: wxMSW implementation of wxCustomBackgroundWindow
// Author: Vadim Zeitlin
// Created: 2011-10-10
// RCS-ID: $Id: custombgwin.h 69378 2011-10-11 17:07:43Z VZ $
// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_MSW_CUSTOMBGWIN_H_
#define _WX_MSW_CUSTOMBGWIN_H_
#include "wx/bitmap.h"
#include "wx/brush.h"
// ----------------------------------------------------------------------------
// wxCustomBackgroundWindow
// ----------------------------------------------------------------------------
template <class W>
class wxCustomBackgroundWindow : public W,
public wxCustomBackgroundWindowBase
{
public:
typedef W BaseWindowClass;
wxCustomBackgroundWindow() { m_backgroundBrush = NULL; }
virtual ~wxCustomBackgroundWindow() { delete m_backgroundBrush; }
protected:
virtual void DoSetBackgroundBitmap(const wxBitmap& bmp)
{
delete m_backgroundBrush;
m_backgroundBrush = bmp.IsOk() ? new wxBrush(bmp) : NULL;
// Our transparent children should use our background if we have it,
// otherwise try to restore m_inheritBgCol to some reasonable value: true
// if we also have non-default background colour or false otherwise.
BaseWindowClass::m_inheritBgCol = bmp.IsOk()
|| BaseWindowClass::UseBgCol();
}
virtual WXHBRUSH MSWGetCustomBgBrush()
{
if ( m_backgroundBrush )
return (WXHBRUSH)m_backgroundBrush->GetResourceHandle();
return BaseWindowClass::MSWGetCustomBgBrush();
}
wxBrush *m_backgroundBrush;
wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxCustomBackgroundWindow, W);
};
#endif // _WX_MSW_CUSTOMBGWIN_H_
| Java |
package com.omnicrola.panoptes.ui.autocomplete;
import static org.easymock.EasyMock.expect;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import com.omnicrola.panoptes.control.DataController;
import com.omnicrola.panoptes.control.IControlObserver;
import com.omnicrola.panoptes.control.TimeblockSet;
import com.omnicrola.panoptes.data.IReadTimeblock;
import com.omnicrola.panoptes.data.TimeData;
import com.omnicrola.testing.util.EnhancedTestCase;
public class CardNumberProviderTest extends EnhancedTestCase {
private DataController mockController;
private String expectedNumber1;
private String expectedNumber2;
private String expectedNumber3;
@Test
public void testImplementsInterfaces() throws Exception {
assertImplementsInterface(IOptionProvider.class, CardNumberProvider.class);
assertImplementsInterface(IControlObserver.class, CardNumberProvider.class);
}
@Test
public void testConstructorParams() throws Exception {
DataController mockController = useMock(DataController.class);
startReplay();
CardNumberProvider cardNumberProvider = new CardNumberProvider(mockController);
assertConstructionParamSame("dataController", mockController, cardNumberProvider);
}
@Test
public void testDataChanged_UpdatesOptionList() throws Exception {
setupMockTimeblockSet();
startReplay();
CardNumberProvider cardNumberProvider = new CardNumberProvider(this.mockController);
assertEquals(0, cardNumberProvider.getOptionsList().size());
cardNumberProvider.dataChanged();
List<Object> optionsList = cardNumberProvider.getOptionsList();
assertEquals(3, optionsList.size());
assertTrue(optionsList.contains(this.expectedNumber1));
assertTrue(optionsList.contains(this.expectedNumber2));
assertTrue(optionsList.contains(this.expectedNumber3));
}
@Test
public void testTimeblockSetChanged_UpdatesOptionList() throws Exception {
TimeblockSet mockTimeblockSet = useMock(TimeblockSet.class);
setupMockTimeblockSet();
startReplay();
CardNumberProvider cardNumberProvider = new CardNumberProvider(this.mockController);
assertEquals(0, cardNumberProvider.getOptionsList().size());
cardNumberProvider.timeblockSetChanged(mockTimeblockSet);
List<Object> optionsList = cardNumberProvider.getOptionsList();
assertEquals(3, optionsList.size());
assertTrue(optionsList.contains(this.expectedNumber1));
assertTrue(optionsList.contains(this.expectedNumber2));
assertTrue(optionsList.contains(this.expectedNumber3));
}
public void setupMockTimeblockSet() {
TimeblockSet mockTimeblockSet = useMock(TimeblockSet.class);
this.expectedNumber1 = "cardnumber";
this.expectedNumber2 = "a different number";
this.expectedNumber3 = "duplicate";
IReadTimeblock mockTimeblock1 = createMockBlockWithCardNumber(this.expectedNumber1);
IReadTimeblock mockTimeblock2 = createMockBlockWithCardNumber(this.expectedNumber2);
IReadTimeblock mockTimeblock3 = createMockBlockWithCardNumber(this.expectedNumber3);
IReadTimeblock mockTimeblock4 = createMockBlockWithCardNumber(this.expectedNumber3);
List<IReadTimeblock> timblocks = Arrays.asList(mockTimeblock1, mockTimeblock2, mockTimeblock3, mockTimeblock4);
expect(mockTimeblockSet.getBlockSet()).andReturn(timblocks);
this.mockController = useMock(DataController.class);
expect(this.mockController.getAllTimeblocks()).andReturn(mockTimeblockSet);
}
private IReadTimeblock createMockBlockWithCardNumber(String expectedNumber) {
IReadTimeblock mockTimeblock = useMock(IReadTimeblock.class);
TimeData mockData = useMock(TimeData.class);
expect(mockTimeblock.getTimeData()).andReturn(mockData);
expect(mockData.getCard()).andReturn(expectedNumber);
return mockTimeblock;
}
}
| Java |
<?php
namespace ApacheSolrForTypo3\Solr\IndexQueue;
/***************************************************************
* Copyright notice
*
* (c) 2010-2015 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project 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 GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script 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.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* IndexQueuePageIndexerDocumentsModifier interface, allows to modify documents
* before adding them to the Solr index in the index queue page indexer.
*
* @author Ingo Renner <ingo@typo3.org>
*/
interface PageIndexerDocumentsModifier
{
/**
* Modifies the given documents
*
* @param Item $item The currently being indexed item.
* @param int $language The language uid of the documents
* @param array $documents An array of documents to be indexed
* @return array An array of modified documents
*/
public function modifyDocuments(Item $item, $language, array $documents);
}
| Java |
<?php
$xml = simplexml_load_file("http://animacionugm.blogspot.com/feeds/posts/default");
$json = json_encode($xml);
echo "<pre>";
echo $json;
echo "</pre>";
?> | Java |
<?php
/**
* @package syscart
* libraries/platform/language.php
*
* @autor majeed mohammadian
*/
defined('syscart') or die('access denied...!');
class platformLanguage
{
private $language = 'persian';
private $code = 'fa-IR';
private $direction = 'rtl';
private $id = null;
public function set($language = 'persian', $code = 'fa-IR', $direction = 'rtl')
{
$this->language = $language;
$this->code = $code;
$this->direction = $direction;
}
public function getLanguage()
{
return $this->language;
}
public function getCode()
{
return $this->code;
}
public function getID()
{
if(!isset( $this->id )) {
global $sysDbo;
$sql = "SELECT id
FROM #__language
WHERE code = :code";
$sql = platformQuery::refactor($sql);
$query = $sysDbo->prepare($sql);
$query->bindParam(':code', $this->code, PDO::PARAM_INT);
$query->execute();
$result = $query->fetch(\PDO::FETCH_ASSOC);
$this->id = $result['id'];
}
return $this->id;
}
public function getDirection()
{
return $this->direction;
}
public function generate($data = '')
{
global $sysDbo, $sysLang;
$regex = "/\\{\\{t:(\\S+)\\}\\}/";
preg_match_all($regex, $data, $matches);
$languageGroups = [];
foreach( $matches[1] as $textLang ) {
$partLang = explode('.', $textLang);
if( !in_array($partLang[0], $languageGroups, true) ) {
array_push($languageGroups, "'".$partLang[0]."'");
}
}
if($languageGroups) {
$sql = "SELECT groups, meta, value
FROM #__language_code
WHERE languageId = :langID
AND groups IN (".implode(',', $languageGroups).")
AND state = '1'";
$sql = platformQuery::refactor($sql);
$query = $sysDbo->prepare($sql);
$query->bindValue(':langID', $sysLang->getID(), PDO::PARAM_INT);
$query->execute();
$result = $query->fetchAll(\PDO::FETCH_ASSOC);
$langKey = $langValue = [];
foreach( $result as $langData ) {
$langKey[] = '{{t:'.$langData[ 'groups' ].'.'.$langData[ 'meta' ].'}}';
$langValue[] = $langData[ 'value' ];
}
return str_replace($langKey, $langValue, $data);
} else {
return $data;
}
}
} | Java |
#ifndef PLAYER_H
#define PLAYER_H
#include "Vector2d.h"
#include "Polygon.h"
#include "CollisionController.h"
#include <vector>
const float WALKING_ACCEL = 0.5;
const float MAX_WALKING_SPEED = 11.0;
const float FALLING_ACCEL = 1.2;
const float MAX_FALLING_SPEED = 20.0;
const float JUMPING_SPEED = -25.0;
class Player {
public:
Player(Vector2d, std::vector<Polygon*>*);
~Player();
void control();
void update();
void render();
bool verticalCollision(const Polygon&);
bool horizontalCollision(const Polygon&);
void setPosition(const Vector2d);
void setVelocity(const Vector2d);
void setAcceleration(const Vector2d);
Vector2d getPosition() const;
Vector2d getVelocity() const;
Vector2d getAcceleration() const;
private:
bool grounded;
bool groundedLatch;
bool jumping;
//Position and derivatives for movement.
Vector2d m_Position;
Vector2d m_Velocity;
Vector2d m_Acceleration;
//Polygon for rendering.
Polygon m_Polygon;
std::vector<Polygon*> *m_Platforms;
void enableGrounded();
};
#endif
| Java |
<?php
/**
* TOP API: taobao.wlb.inventory.detail.get request
*
* @author auto create
* @since 1.0, 2012-11-01 12:40:06
*/
class WlbInventoryDetailGetRequest
{
/**
* 库存类型列表,值包括:
VENDIBLE--可销售库存
FREEZE--冻结库存
ONWAY--在途库存
DEFECT--残次品库存
ENGINE_DAMAGE--机损
BOX_DAMAGE--箱损
EXPIRATION--过保
**/
private $inventoryTypeList;
/**
* 商品ID
**/
private $itemId;
/**
* 仓库编码
**/
private $storeCode;
private $apiParas = array();
public function setInventoryTypeList($inventoryTypeList)
{
$this->inventoryTypeList = $inventoryTypeList;
$this->apiParas["inventory_type_list"] = $inventoryTypeList;
}
public function getInventoryTypeList()
{
return $this->inventoryTypeList;
}
public function setItemId($itemId)
{
$this->itemId = $itemId;
$this->apiParas["item_id"] = $itemId;
}
public function getItemId()
{
return $this->itemId;
}
public function setStoreCode($storeCode)
{
$this->storeCode = $storeCode;
$this->apiParas["store_code"] = $storeCode;
}
public function getStoreCode()
{
return $this->storeCode;
}
public function getApiMethodName()
{
return "taobao.wlb.inventory.detail.get";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkMaxListSize($this->inventoryTypeList,20,"inventoryTypeList");
RequestCheckUtil::checkNotNull($this->itemId,"itemId");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}
| Java |
<?php
if(!class_exists('WP_List_Table')){
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
}
class EasySocialMetricsLiteResultTable extends WP_List_Table {
public $total_results = array();
public $top_content = array();
/** ************************************************************************
* REQUIRED. Set up a constructor that references the parent constructor. We
* use the parent reference to set some default configs.
***************************************************************************/
function __construct(){
global $status, $page;
//Set parent defaults
parent::__construct( array(
'singular' => 'post', //singular name of the listed records
'plural' => 'posts', //plural name of the listed records
'ajax' => false //does this table support ajax?
) );
$this->services = array(
'facebook' => 'Facebook',
'twitter' => 'Twitter',
'googleplus' => 'Google Plus',
'linkedin' => 'LinkedIn',
'pinterest' => 'Pinterest',
'diggs' => 'Digg.com',
'delicious' => 'Delicious',
'facebook_comments' => 'Facebook Comments',
'stumbleupon'=> 'Stumble Upon'
);
}
/** ************************************************************************
* Recommended. This method is called when the parent class can't find a method
* specifically build for a given column. Generally, it's recommended to include
* one method for each column you want to render, keeping your package class
* neat and organized. For example, if the class needs to process a column
* named 'title', it would first see if a method named $this->column_title()
* exists - if it does, that method will be used. If it doesn't, this one will
* be used. Generally, you should try to use custom column methods as much as
* possible.
*
* Since we have defined a column_title() method later on, this method doesn't
* need to concern itself with any column with a name of 'title'. Instead, it
* needs to handle everything else.
*
* For more detailed insight into how columns are handled, take a look at
* WP_List_Table::single_row_columns()
*
* @param array $item A singular item (one full row's worth of data)
* @param array $column_name The name/slug of the column to be processed
* @return string Text or HTML to be placed inside the column <td>
**************************************************************************/
function column_default($item, $column_name){
switch($column_name){
case 'total':
return number_format(intval($item['esml_socialcount_total']));
case 'comment_count':
return number_format(intval($item[$column_name]));
case 'facebook':
case 'twitter':
case 'googleplus':
case 'pinterest':
case 'linkedin':
case 'stumbleupon':
case 'facebook_comments':
return number_format(intval($item['esml_socialcount_'.$column_name]));
default:
return print_r($item,true); //Show the whole array for troubleshooting purposes
}
}
/** ************************************************************************
* Recommended. This is a custom column method and is responsible for what
* is rendered in any column with a name/slug of 'title'. Every time the class
* needs to render a column, it first looks for a method named
* column_{$column_title} - if it exists, that method is run. If it doesn't
* exist, column_default() is called instead.
*
* This example also illustrates how to implement rollover actions. Actions
* should be an associative array formatted as 'slug'=>'link html' - and you
* will need to generate the URLs yourself. You could even ensure the links
*
*
* @see WP_List_Table::::single_row_columns()
* @param array $item A singular item (one full row's worth of data)
* @return string Text to be placed inside the column <td> (movie title only)
**************************************************************************/
function column_post_title($item){
//Build row actions
$actions = array(
'edit' => sprintf('<a href="post.php?post=%s&action=edit">Edit Post</a>',$item['ID'],'edit',$item['ID']),
'update' => '<a href="'.add_query_arg( 'esml_sync_now', $item['ID']).'">Update Stats</a>',
'info' => sprintf('Updated %s',EasySocialMetricsLite::timeago($item['esml_socialcount_LAST_UPDATED']))
);
//Return the title contents
return sprintf('%1$s <span style="color:silver">(id:%2$s)</span>%3$s',
/*$1%s*/ $item['post_title'],
/*$2%s*/ $item['ID'],
/*$3%s*/ $this->row_actions($actions)
);
}
/** ************************************************************************
* REQUIRED! This method dictates the table's columns and titles. This should
* return an array where the key is the column slug (and class) and the value
* is the column's title text. If you need a checkbox for bulk actions, refer
* to the $columns array below.
*
* The 'cb' column is treated differently than the rest. If including a checkbox
* column in your table you must create a column_cb() method. If you don't need
* bulk actions or checkboxes, simply leave the 'cb' entry out of your array.
*
* @see WP_List_Table::::single_row_columns()
* @return array An associative array containing column information: 'slugs'=>'Visible Titles'
**************************************************************************/
function get_columns(){
$columns = array(
'post_title' => 'Title',
'total' => 'Total',
'facebook' => 'Facebook',
'twitter' => 'Twitter',
'googleplus' => 'Google+',
'linkedin' => 'LinkedIn',
'pinterest' => 'Pinterest',
'stumbleupon' => 'StumbleUpon',
'comment_count' => 'Post Comments',
'facebook_comments' => 'Facebook Comments'
);
return $columns;
}
/** ************************************************************************
* Optional. If you want one or more columns to be sortable (ASC/DESC toggle),
* you will need to register it here. This should return an array where the
* key is the column that needs to be sortable, and the value is db column to
* sort by. Often, the key and value will be the same, but this is not always
* the case (as the value is a column name from the database, not the list table).
*
* This method merely defines which columns should be sortable and makes them
* clickable - it does not handle the actual sorting. You still need to detect
* the ORDERBY and ORDER querystring variables within prepare_items() and sort
* your data accordingly (usually by modifying your query).
*
* @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
**************************************************************************/
function get_sortable_columns() {
$sortable_columns = array(
'post_title' => array('post_title',false), //true means it's already sorted
'total' => array('total',false),
'facebook' => array('facebook',false),
'twitter' => array('twitter',false),
'googleplus' => array('googleplus',false),
'linkedin' => array('linkedin',false),
'pinterest' => array('pinterest',false),
'stumbleupon' => array('stumbleupon',false),
'comment_count' => array('comment_count',false),
'facebook_comments' => array('facebook_comments',false)
);
return $sortable_columns;
}
/** ************************************************************************
* Optional. If you need to include bulk actions in your list table, this is
* the place to define them. Bulk actions are an associative array in the format
* 'slug'=>'Visible Title'
*
* If this method returns an empty value, no bulk action will be rendered. If
* you specify any bulk actions, the bulk actions box will be rendered with
* the table automatically on display().
*
* Also note that list tables are not automatically wrapped in <form> elements,
* so you will need to create those manually in order for bulk actions to function.
*
* @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
**************************************************************************/
function get_bulk_actions() {
$actions = array(
//'delete' => 'Delete'
);
return $actions;
}
/** ************************************************************************
* Optional. You can handle your bulk actions anywhere or anyhow you prefer.
* For this example package, we will handle it in the class to keep things
* clean and organized.
*
* @see $this->prepare_items()
**************************************************************************/
function process_bulk_action() {
//Detect when a bulk action is being triggered...
if( 'delete'===$this->current_action() ) {
wp_die('Items deleted (or they would be if we had items to delete)!');
}
}
/** ************************************************************************
* REQUIRED! This is where you prepare your data for display. This method will
* usually be used to query the database, sort and filter the data, and generally
* get it ready to be displayed. At a minimum, we should set $this->items and
* $this->set_pagination_args(), although the following properties and methods
* are frequently interacted with here...
*
* @global WPDB $wpdb
* @uses $this->_column_headers
* @uses $this->items
* @uses $this->get_columns()
* @uses $this->get_sortable_columns()
* @uses $this->get_pagenum()
* @uses $this->set_pagination_args()
**************************************************************************/
function prepare_items() {
global $wpdb; //This is used only if making any database queries
/**
* First, lets decide how many records per page to show
*/
$per_page = 20;
/**
* REQUIRED. Now we need to define our column headers. This includes a complete
* array of columns to be displayed (slugs & titles), a list of columns
* to keep hidden, and a list of columns that are sortable. Each of these
* can be defined in another method (as we've done here) before being
* used to build the value for our _column_headers property.
*/
$columns = $this->get_columns();
$hidden = array();
$sortable = $this->get_sortable_columns();
/**
* REQUIRED. Finally, we build an array to be used by the class for column
* headers. The $this->_column_headers property takes an array which contains
* 3 other arrays. One for all columns, one for hidden columns, and one
* for sortable columns.
*/
$this->_column_headers = array($columns, $hidden, $sortable);
/**
* Optional. You can handle your bulk actions however you see fit. In this
* case, we'll handle them within our package just to keep things clean.
*/
$this->process_bulk_action();
/**
* Instead of querying a database, we're going to fetch the example data
* property we created for use in this plugin. This makes this example
* package slightly different than one you might build on your own. In
* this example, we'll be using array manipulation to sort and paginate
* our data. In a real-world implementation, you will probably want to
* use sort and pagination data to build a custom query instead, as you'll
* be able to use your precisely-queried data immediately.
*/
$data = $this->generate_data();
//print_r($data);
/**
* This checks for sorting input and sorts the data in our array accordingly.
*
* In a real-world situation involving a database, you would probably want
* to handle sorting by passing the 'orderby' and 'order' values directly
* to a custom query. The returned data will be pre-sorted, and this array
* sorting technique would be unnecessary.
*/
function usort_reorder($a,$b){
$orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'total'; //If no sort, default to title
$order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'desc'; //If no order, default to asc
if ($orderby == 'total') { $orderby = 'esml_socialcount_total'; }
switch ($orderby) {
case 'facebook':
case 'twitter':
case 'googleplus':
case 'pinterest':
case 'linkedin':
case 'stumbleupon':
case 'facebook_comments':
$orderby = 'esml_socialcount_'.$orderby;
}
if ($orderby == "post_title") {
$result = strcmp($a[$orderby], $b[$orderby]);
} //Determine sort order
else {
if (intval($a[$orderby]) < intval($b[$orderby])) {
$result = -1;
}
else if (intval($a[$orderby]) > intval($b[$orderby])) {
$result = 1;
}
else {
$result = 0;
}
}
return ($order==='asc') ? $result : -$result; //Send final sort direction to usort
}
usort($data, 'usort_reorder');
/***********************************************************************
* ---------------------------------------------------------------------
* vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
*
* In a real-world situation, this is where you would place your query.
*
* For information on making queries in WordPress, see this Codex entry:
* http://codex.wordpress.org/Class_Reference/wpdb
*
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* ---------------------------------------------------------------------
**********************************************************************/
/**
* REQUIRED for pagination. Let's figure out what page the user is currently
* looking at. We'll need this later, so you should always include it in
* your own package classes.
*/
$current_page = $this->get_pagenum();
/**
* REQUIRED for pagination. Let's check how many items are in our data array.
* In real-world use, this would be the total number of items in your database,
* without filtering. We'll need this later, so you should always include it
* in your own package classes.
*/
$total_items = count($data);
/**
* The WP_List_Table class does not handle pagination for us, so we need
* to ensure that the data is trimmed to only the current page. We can use
* array_slice() to
*/
$data = array_slice($data,(($current_page-1)*$per_page),$per_page);
/**
* REQUIRED. Now we can add our *sorted* data to the items property, where
* it can be used by the rest of the class.
*/
$this->items = $data;
/**
* REQUIRED. We also have to register our pagination options & calculations.
*/
$this->set_pagination_args( array(
'total_items' => $total_items, //WE have to calculate the total number of items
'per_page' => $per_page, //WE have to determine how many items to show on a page
'total_pages' => ceil($total_items/$per_page) //WE have to calculate the total number of pages
) );
}
function generate_data() {
global $wpdb; //This is used only if making any database queries
$per_page = 10;
$this->process_bulk_action();
// Get custom post types to display in our report.
$post_types = $this->get_post_types();
//print "post types = ";
$limit = 30;
add_filter( 'posts_where', array($this, 'date_range_filter') );
$querydata = new WP_Query(array(
'posts_per_page'=> -1,
'post_status' => 'publish',
'post_type' => $post_types
));
remove_filter( 'posts_where', array($this, 'date_range_filter') );
$data=array();
// foreach ($querydata as $querydatum ) {
if ( $querydata->have_posts() ) : while ( $querydata->have_posts() ) : $querydata->the_post();
global $post;
$item['ID'] = $post->ID;
$item['post_title'] = $post->post_title;
$item['post_date'] = $post->post_date;
$item['comment_count'] = $post->comment_count;
$item['esml_socialcount_total'] = (get_post_meta($post->ID, "esml_socialcount_TOTAL", true)) ? get_post_meta($post->ID, "esml_socialcount_TOTAL", true) : 0;
$item['esml_socialcount_LAST_UPDATED'] = get_post_meta($post->ID, "esml_socialcount_LAST_UPDATED", true);
$item['permalink'] = get_permalink($post->ID);
if (!isset($this->total_results['esml_socialcount_total'])) { $this->total_results['esml_socialcount_total'] = 0; }
$this->total_results['esml_socialcount_total'] = $this->total_results['esml_socialcount_total'] + $item['esml_socialcount_total'];
foreach ($this->services as $slug => $name) {
$item['esml_socialcount_'.$slug] = get_post_meta($post->ID, "esml_socialcount_$slug", true);
if (!isset($this->total_results['esml_socialcount_'.$slug])) {
$this->total_results['esml_socialcount_'.$slug] = 0;
}
$this->total_results['esml_socialcount_'.$slug] = $this->total_results['esml_socialcount_'.$slug] + $item['esml_socialcount_'.$slug];
if (!isset($this->top_content['esml_socialcount_'.$slug ])) {
$blank = array("title" => "", "permalink" => "", "value" => "0");
$this->top_content['esml_socialcount_'.$slug ] = $blank;
}
if ($item['esml_socialcount_'.$slug] > $this->top_content['esml_socialcount_'.$slug ]["value"]) {
$this->top_content['esml_socialcount_'.$slug ]["value"] = $item['esml_socialcount_'.$slug];
$this->top_content['esml_socialcount_'.$slug ]["title"] = $item['post_title'] = $post->post_title;
$this->top_content['esml_socialcount_'.$slug ]["permalink"] = $item['permalink'];
}
}
array_push($data, $item);
endwhile;
endif;
return $data;
}
public function get_post_types() {
$types_to_track = array();
$pts = get_post_types ( array ('public' => true, 'show_ui' => true, '_builtin' => true ) );
$cpts = get_post_types ( array ('public' => true, 'show_ui' => true, '_builtin' => false ) );
$options = $this->options;
if (is_array($options)) {
if (!isset($options['esml_monitor_types'])) {
$options['esml_monitor_types'] = array();
}
}
if (is_array ( $options ) && isset ( $options ['esml_monitor_types'] ) && is_array ( $options ['esml_monitor_types'] )) {
global $wp_post_types;
// classical post type listing
foreach ( $pts as $pt ) {
$selected = in_array ( $pt, $options ['esml_monitor_types'] ) ? '1' : '0';
if ($selected == '1') {
$types_to_track[] = $pt;
}
}
// custom post types listing
if (is_array ( $cpts ) && ! empty ( $cpts )) {
foreach ( $cpts as $cpt ) {
$selected = in_array ( $cpt, $options ['esml_monitor_types'] ) ? '1' : '0';
if ($selected == '1') {
$types_to_track[] = $cpt;
}
$selected = in_array ( $cpt, $options ['esml_monitor_types'] ) ? 'checked="checked"' : '';
}
}
}
return $types_to_track;
}
function extra_tablenav( $which ) {
if ( $which == "top" ){
//The code that goes before the table is here
$range = (isset($_GET['range'])) ? $_GET['range'] : 0;
?>
<label for="range">Show only:</label>
<select name="range">
<option value="1"<?php if ($range == 1) echo 'selected="selected"'; ?>>Items published within 1 Month</option>
<option value="3"<?php if ($range == 3) echo 'selected="selected"'; ?>>Items published within 3 Months</option>
<option value="6"<?php if ($range == 6) echo 'selected="selected"'; ?>>Items published within 6 Months</option>
<option value="12"<?php if ($range == 12) echo 'selected="selected"'; ?>>Items published within 12 Months</option>
<option value="0"<?php if ($range == 0) echo 'selected="selected"'; ?>>Items published anytime</option>
</select>
<?php do_action( 'esml_dashboard_query_options' ); // Allows developers to add additional sort options ?>
<input type="submit" name="filter" id="submit_filter" class="button" value="Filter">
<a href="<?php echo admin_url('admin.php?page=easy-social-metrics-lite&esml_sync_all=true'); ?>" class="button">Update all posts</a>
<?php
}
if ( $which == "bottom" ){
//The code that goes after the table is there
}
}
function date_range_filter( $where = '' ) {
$range = (isset($_GET['range'])) ? $_GET['range'] : '0';
if ($range <= 0) return $where;
$range_bottom = " AND post_date >= '".date("Y-m-d", strtotime('-'.$range.' month') );
$range_top = "' AND post_date <= '".date("Y-m-d")."'";
$where .= $range_bottom . $range_top;
return $where;
}
public function output_total_results() {
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%">';
echo '<col width="30%"/>';
echo '<col width="30%"/>';
echo '<col width="40%"/>';
echo '<tr>';
echo '<td><strong>Total Social Shares:</strong></td>';
echo '<td align="right"><strong>'.number_format($this->total_results['esml_socialcount_total']).'</strong></td>';
echo '<td> </td>';
echo '</tr>';
$total = $this->total_results['esml_socialcount_total'];
$parse_list = array("facebook" => "Facebook", "twitter" => "Twitter", "googleplus" => "Google+", "pinterest" => "Pinterest", "linkedin" => "LinkedIn", "stumbleupon" => "StumbleUpon");
foreach ($parse_list as $singleValueCode => $singleValue) {
$single_value = $this->total_results['esml_socialcount_'.$singleValueCode];
if ($total != 0) {
$display_percent = number_format($single_value * 100 / $total, 2);
$percent = number_format($single_value * 100 / $total);
}
else {
$display_percent = "0.00";
$percent = "0";
}
if (intval($percent) == 0 && intval($single_value) != 0) { $percent = 1; }
echo '<tr>';
echo '<td>'.$singleValue.' <span style="background-color: #2980b9; padding: 2px 5px; color: #fff; font-size: 10px; border-radius: 3px;">'.$display_percent.' %</span></td>';
echo '<td align="right"><strong>'.number_format($single_value).'</strong></td>';
echo '<td><div style="background-color: #2980b9; display: block; height: 24px; width:'.$percent.'%;"> </div></td>';
echo '</tr>';
}
echo '</table>';
}
public function output_total_content() {
echo '<table border="0" cellpadding="5" cellspacing="0" width="100%">';
echo '<col width="20%"/>';
echo '<col width="20%"/>';
echo '<col width="60%"/>';
$parse_list = array("facebook" => "Facebook", "twitter" => "Twitter", "googleplus" => "Google+", "pinterest" => "Pinterest", "linkedin" => "LinkedIn", "stumbleupon" => "StumbleUpon");
foreach ($parse_list as $singleValueCode => $singleValue) {
$single_value = $this->top_content['esml_socialcount_'.$singleValueCode]['value'];
$title = $this->top_content['esml_socialcount_'.$singleValueCode]['title'];
$permalink = $this->top_content['esml_socialcount_'.$singleValueCode]['permalink'];
echo '<tr>';
echo '<td>'.$singleValue.'</td>';
echo '<td align="right"><strong>'.number_format($single_value).'</strong></td>';
echo '<td><a href="'.$permalink.'" target="_blank">'.$title.'</a></td>';
echo '</tr>';
}
echo '</table>';
}
}
function esml_render_dashboard_view($options){
//Create an instance of our package class...
$testListTable = new EasySocialMetricsLiteResultTable();
$testListTable->options = $options;
//Fetch, prepare, sort, and filter our data...
$testListTable->prepare_items();
?>
<style type="text/css">
.column-post_title { width: 30%; }
.column-total { font-weight: bold; }
</style>
<div class="wrap">
<h2>Easy Social Metrics Lite Dashboard</h2>
<div style="clear:both;"></div>
<div class="welcome-panel">
<div class="welcome-panel-content">
<div class="welcome-panel-column-container">
<div class="welcome-panel-column" style="width: 49%;">
<h4>Social Networks Presentation</h4>
<?php $testListTable->output_total_results(); ?>
</div>
<div class="welcome-panel-column" style="width: 49%;">
<h4>Top Shared Content by Social Network</h4>
<?php $testListTable->output_total_content();?>
</div>
</div>
</div>
</div>
<?php EasySocialMetricsUpdater::printQueueLength(); ?>
<form id="easy-social-metrics-lite" method="get" action="admin.php?page=easy-social-metrics-lite">
<!-- For plugins, we also need to ensure that the form posts back to our current page -->
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'] ?>" />
<input type="hidden" name="orderby" value="<?php echo (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'total'; ?>" />
<input type="hidden" name="order" value="<?php echo (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'DESC'; ?>" />
<?php $testListTable->display() ?>
</form>
</div>
<?php
} | Java |
<form>
<i class="glyphicon glyphicon-search"></i>
<input type="text" name="q">
<button type="submit" class="hidden">{{ trans('labels.search') }}</button>
</form> | Java |
<?php
/**
* @file
* Contains Drupal\views\Plugin\views\display\DisplayPluginBase.
*/
namespace Drupal\views\Plugin\views\display;
use Drupal\views\Plugin\views\area\AreaPluginBase;
use Drupal\views\ViewExecutable;
use \Drupal\views\Plugin\views\PluginBase;
use Drupal\views\Views;
/**
* @defgroup views_display_plugins Views display plugins
* @{
* Display plugins control how Views interact with the rest of Drupal.
*
* They can handle creating Views from a Drupal page hook; they can
* handle creating Views from a Drupal block hook. They can also
* handle creating Views from an external module source.
*/
/**
* The default display plugin handler. Display plugins handle options and
* basic mechanisms for different output methods.
*/
abstract class DisplayPluginBase extends PluginBase {
/**
* The top object of a view.
*
* @var Drupal\views\ViewExecutable
*/
var $view = NULL;
var $handlers = array();
/**
* An array of instantiated plugins used in this display.
*
* @var array
*/
protected $plugins = array();
/**
* Stores all available display extenders.
*/
var $extender = array();
/**
* Overrides Drupal\views\Plugin\Plugin::$usesOptions.
*/
protected $usesOptions = TRUE;
/**
* Stores the rendered output of the display.
*
* @see View::render
* @var string
*/
public $output = NULL;
/**
* Whether the display allows the use of AJAX or not.
*
* @var bool
*/
protected $usesAJAX = TRUE;
/**
* Whether the display allows the use of a pager or not.
*
* @var bool
*/
protected $usesPager = TRUE;
/**
* Whether the display allows the use of a 'more' link or not.
*
* @var bool
*/
protected $usesMore = TRUE;
/**
* Whether the display allows attachments.
*
* @var bool
* TRUE if the display can use attachments, or FALSE otherwise.
*/
protected $usesAttachments = FALSE;
/**
* Whether the display allows area plugins.
*
* @var bool
*/
protected $usesAreas = TRUE;
public function initDisplay(ViewExecutable $view, array &$display, array &$options = NULL) {
$this->setOptionDefaults($this->options, $this->defineOptions());
$this->view = $view;
$this->display = &$display;
// Load extenders as soon as possible.
$this->extender = array();
$extenders = views_get_enabled_display_extenders();
if (!empty($extenders)) {
$manager = Views::pluginManager('display_extender');
foreach ($extenders as $extender) {
$plugin = $manager->createInstance($extender);
if ($plugin) {
$plugin->init($this->view, $this);
$this->extender[$extender] = $plugin;
}
}
}
// Track changes that the user should know about.
$changed = FALSE;
// Make some modifications:
if (!isset($options) && isset($display['display_options'])) {
$options = $display['display_options'];
}
if ($this->isDefaultDisplay() && isset($options['defaults'])) {
unset($options['defaults']);
}
// Cache for unpackOptions, but not if we are in the ui.
static $unpack_options = array();
if (empty($view->editing)) {
$cid = 'unpackOptions:' . hash('sha256', serialize(array($this->options, $options)));
if (empty($unpack_options[$cid])) {
$cache = views_cache_get($cid, TRUE);
if (!empty($cache->data)) {
$this->options = $cache->data;
}
else {
$this->unpackOptions($this->options, $options);
views_cache_set($cid, $this->options, TRUE);
}
$unpack_options[$cid] = $this->options;
}
else {
$this->options = $unpack_options[$cid];
}
}
else {
$this->unpackOptions($this->options, $options);
}
// Convert the field_language and field_language_add_to_query settings.
$field_language = $this->getOption('field_language');
$field_language_add_to_query = $this->getOption('field_language_add_to_query');
if (isset($field_langcode)) {
$this->setOption('field_langcode', $field_language);
$this->setOption('field_langcode_add_to_query', $field_language_add_to_query);
$changed = TRUE;
}
// Mark the view as changed so the user has a chance to save it.
if ($changed) {
$this->view->changed = TRUE;
}
}
public function destroy() {
parent::destroy();
foreach ($this->handlers as $type => $handlers) {
foreach ($handlers as $id => $handler) {
if (is_object($handler)) {
$this->handlers[$type][$id]->destroy();
}
}
}
if (isset($this->default_display)) {
unset($this->default_display);
}
foreach ($this->extender as $extender) {
$extender->destroy();
}
}
/**
* Determine if this display is the 'default' display which contains
* fallback settings
*/
public function isDefaultDisplay() { return FALSE; }
/**
* Determine if this display uses exposed filters, so the view
* will know whether or not to build them.
*/
public function usesExposed() {
if (!isset($this->has_exposed)) {
foreach ($this->handlers as $type => $value) {
foreach ($this->view->$type as $id => $handler) {
if ($handler->canExpose() && $handler->isExposed()) {
// one is all we need; if we find it, return true.
$this->has_exposed = TRUE;
return TRUE;
}
}
}
$pager = $this->getPlugin('pager');
if (isset($pager) && $pager->uses_exposed()) {
$this->has_exposed = TRUE;
return TRUE;
}
$this->has_exposed = FALSE;
}
return $this->has_exposed;
}
/**
* Determine if this display should display the exposed
* filters widgets, so the view will know whether or not
* to render them.
*
* Regardless of what this function
* returns, exposed filters will not be used nor
* displayed unless usesExposed() returns TRUE.
*/
public function displaysExposed() {
return TRUE;
}
/**
* Whether the display allows the use of AJAX or not.
*
* @return bool
*/
public function usesAJAX() {
return $this->usesAJAX;
}
/**
* Whether the display is actually using AJAX or not.
*
* @return bool
*/
public function ajaxEnabled() {
if ($this->usesAJAX()) {
return $this->getOption('use_ajax');
}
return FALSE;
}
/**
* Whether the display is enabled.
*
* @return bool
* Returns TRUE if the display is marked as enabled, else FALSE.
*/
public function isEnabled() {
return (bool) $this->getOption('enabled');
}
/**
* Whether the display allows the use of a pager or not.
*
* @return bool
*/
public function usesPager() {
return $this->usesPager;
}
/**
* Whether the display is using a pager or not.
*
* @return bool
*/
public function isPagerEnabled() {
if ($this->usesPager()) {
$pager = $this->getPlugin('pager');
if ($pager) {
return $pager->use_pager();
}
}
return FALSE;
}
/**
* Whether the display allows the use of a 'more' link or not.
*
* @return bool
*/
public function usesMore() {
return $this->usesMore;
}
/**
* Whether the display is using the 'more' link or not.
*
* @return bool
*/
public function isMoreEnabled() {
if ($this->usesMore()) {
return $this->getOption('use_more');
}
return FALSE;
}
/**
* Does the display have groupby enabled?
*/
public function useGroupBy() {
return $this->getOption('group_by');
}
/**
* Should the enabled display more link be shown when no more items?
*/
public function useMoreAlways() {
if ($this->usesMore()) {
return $this->getOption('useMoreAlways');
}
return FALSE;
}
/**
* Does the display have custom link text?
*/
public function useMoreText() {
if ($this->usesMore()) {
return $this->getOption('useMoreText');
}
return FALSE;
}
/**
* Determines whether this display can use attachments.
*
* @return bool
*/
public function acceptAttachments() {
// To be able to accept attachments this display have to be able to use
// attachments but at the same time, you cannot attach a display to itself.
if (!$this->usesAttachments() || ($this->definition['id'] == $this->view->current_display)) {
return FALSE;
}
if (!empty($this->view->argument) && $this->getOption('hide_attachment_summary')) {
foreach ($this->view->argument as $argument_id => $argument) {
if ($argument->needsStylePlugin() && empty($argument->argument_validated)) {
return FALSE;
}
}
}
return TRUE;
}
/**
* Returns whether the display can use attachments.
*
* @return bool
*/
public function usesAttachments() {
return $this->usesAttachments;
}
/**
* Returns whether the display can use areas.
*
* @return bool
* TRUE if the display can use areas, or FALSE otherwise.
*/
public function usesAreas() {
return $this->usesAreas;
}
/**
* Allow displays to attach to other views.
*/
public function attachTo(ViewExecutable $view, $display_id) { }
/**
* Static member function to list which sections are defaultable
* and what items each section contains.
*/
public function defaultableSections($section = NULL) {
$sections = array(
'access' => array('access'),
'cache' => array('cache'),
'title' => array('title'),
'css_class' => array('css_class'),
'use_ajax' => array('use_ajax'),
'hide_attachment_summary' => array('hide_attachment_summary'),
'show_admin_links' => array('show_admin_links'),
'group_by' => array('group_by'),
'query' => array('query'),
'use_more' => array('use_more', 'use_more_always', 'use_more_text'),
'use_more_always' => array('use_more', 'use_more_always', 'use_more_text'),
'use_more_text' => array('use_more', 'use_more_always', 'use_more_text'),
'link_display' => array('link_display', 'link_url'),
// Force these to cascade properly.
'style' => array('style', 'row'),
'row' => array('style', 'row'),
'pager' => array('pager', 'pager_options'),
'pager_options' => array('pager', 'pager_options'),
'exposed_form' => array('exposed_form', 'exposed_form_options'),
'exposed_form_options' => array('exposed_form', 'exposed_form_options'),
// These guys are special
'header' => array('header'),
'footer' => array('footer'),
'empty' => array('empty'),
'relationships' => array('relationships'),
'fields' => array('fields'),
'sorts' => array('sorts'),
'arguments' => array('arguments'),
'filters' => array('filters', 'filter_groups'),
'filter_groups' => array('filters', 'filter_groups'),
);
// If the display cannot use a pager, then we cannot default it.
if (!$this->usesPager()) {
unset($sections['pager']);
unset($sections['items_per_page']);
}
foreach ($this->extender as $extender) {
$extender->defaultableSections($sections, $section);
}
if ($section) {
if (!empty($sections[$section])) {
return $sections[$section];
}
}
else {
return $sections;
}
}
protected function defineOptions() {
$options = array(
'defaults' => array(
'default' => array(
'access' => TRUE,
'cache' => TRUE,
'query' => TRUE,
'title' => TRUE,
'css_class' => TRUE,
'display_description' => FALSE,
'use_ajax' => TRUE,
'hide_attachment_summary' => TRUE,
'show_admin_links' => TRUE,
'pager' => TRUE,
'use_more' => TRUE,
'use_more_always' => TRUE,
'use_more_text' => TRUE,
'exposed_form' => TRUE,
'link_display' => TRUE,
'link_url' => '',
'group_by' => TRUE,
'style' => TRUE,
'row' => TRUE,
'header' => TRUE,
'footer' => TRUE,
'empty' => TRUE,
'relationships' => TRUE,
'fields' => TRUE,
'sorts' => TRUE,
'arguments' => TRUE,
'filters' => TRUE,
'filter_groups' => TRUE,
),
),
'title' => array(
'default' => '',
'translatable' => TRUE,
),
'enabled' => array(
'default' => TRUE,
'translatable' => FALSE,
'bool' => TRUE,
),
'display_comment' => array(
'default' => '',
),
'css_class' => array(
'default' => '',
'translatable' => FALSE,
),
'display_description' => array(
'default' => '',
'translatable' => TRUE,
),
'use_ajax' => array(
'default' => FALSE,
'bool' => TRUE,
),
'hide_attachment_summary' => array(
'default' => FALSE,
'bool' => TRUE,
),
'show_admin_links' => array(
'default' => TRUE,
'bool' => TRUE,
),
'use_more' => array(
'default' => FALSE,
'bool' => TRUE,
),
'use_more_always' => array(
'default' => FALSE,
'bool' => TRUE,
),
'use_more_text' => array(
'default' => 'more',
'translatable' => TRUE,
),
'link_display' => array(
'default' => '',
),
'link_url' => array(
'default' => '',
),
'group_by' => array(
'default' => FALSE,
'bool' => TRUE,
),
'field_langcode' => array(
'default' => '***CURRENT_LANGUAGE***',
),
'field_langcode_add_to_query' => array(
'default' => TRUE,
'bool' => TRUE,
),
// These types are all plugins that can have individual settings
// and therefore need special handling.
'access' => array(
'contains' => array(
'type' => array('default' => 'none'),
'options' => array('default' => array()),
),
),
'cache' => array(
'contains' => array(
'type' => array('default' => 'none'),
'options' => array('default' => array()),
),
),
'query' => array(
'contains' => array(
'type' => array('default' => 'views_query'),
'options' => array('default' => array()),
),
),
'exposed_form' => array(
'contains' => array(
'type' => array('default' => 'basic'),
'options' => array('default' => array()),
),
),
'pager' => array(
'contains' => array(
'type' => array('default' => 'mini'),
'options' => array('default' => array()),
),
),
'style' => array(
'contains' => array(
'type' => array('default' => 'default'),
'options' => array('default' => array()),
),
),
'row' => array(
'contains' => array(
'type' => array('default' => 'fields'),
'options' => array('default' => array()),
),
),
'exposed_block' => array(
'default' => FALSE,
),
'header' => array(
'default' => array(),
),
'footer' => array(
'default' => array(),
),
'empty' => array(
'default' => array(),
),
// We want these to export last.
// These are the 5 handler types.
'relationships' => array(
'default' => array(),
),
'fields' => array(
'default' => array(),
),
'sorts' => array(
'default' => array(),
),
'arguments' => array(
'default' => array(),
),
'filter_groups' => array(
'contains' => array(
'operator' => array('default' => 'AND'),
'groups' => array('default' => array(1 => 'AND')),
),
),
'filters' => array(
'default' => array(),
),
);
if (!$this->usesPager()) {
$options['defaults']['default']['use_pager'] = FALSE;
$options['defaults']['default']['items_per_page'] = FALSE;
$options['defaults']['default']['offset'] = FALSE;
$options['defaults']['default']['pager'] = FALSE;
$options['pager']['contains']['type']['default'] = 'some';
}
if ($this->isDefaultDisplay()) {
unset($options['defaults']);
}
foreach ($this->extender as $extender) {
$extender->defineOptionsAlter($options);
}
return $options;
}
/**
* Check to see if the display has a 'path' field.
*
* This is a pure function and not just a setting on the definition
* because some displays (such as a panel pane) may have a path based
* upon configuration.
*
* By default, displays do not have a path.
*/
public function hasPath() { return FALSE; }
/**
* Check to see if the display has some need to link to another display.
*
* For the most part, displays without a path will use a link display. However,
* sometimes displays that have a path might also need to link to another display.
* This is true for feeds.
*/
public function usesLinkDisplay() { return !$this->hasPath(); }
/**
* Check to see if the display can put the exposed formin a block.
*
* By default, displays that do not have a path cannot disconnect
* the exposed form and put it in a block, because the form has no
* place to go and Views really wants the forms to go to a specific
* page.
*/
public function usesExposedFormInBlock() { return $this->hasPath(); }
/**
* Find out all displays which are attached to this display.
*
* The method is just using the pure storage object to avoid loading of the
* sub displays which would kill lazy loading.
*/
public function getAttachedDisplays() {
$current_display_id = $this->display['id'];
$attached_displays = array();
// Go through all displays and search displays which link to this one.
foreach ($this->view->storage->get('display') as $display_id => $display) {
if (isset($display['display_options']['displays'])) {
$displays = $display['display_options']['displays'];
if (isset($displays[$current_display_id])) {
$attached_displays[] = $display_id;
}
}
}
return $attached_displays;
}
/**
* Check to see which display to use when creating links within
* a view using this display.
*/
public function getLinkDisplay() {
$display_id = $this->getOption('link_display');
// If unknown, pick the first one.
if (empty($display_id) || !$this->view->displayHandlers->has($display_id)) {
foreach ($this->view->displayHandlers as $display_id => $display) {
if (!empty($display) && $display->hasPath()) {
return $display_id;
}
}
}
else {
return $display_id;
}
// fall-through returns NULL
}
/**
* Return the base path to use for this display.
*
* This can be overridden for displays that do strange things
* with the path.
*/
public function getPath() {
if ($this->hasPath()) {
return $this->getOption('path');
}
$display_id = $this->getLinkDisplay();
if ($display_id && $this->view->displayHandlers->has($display_id) && is_object($this->view->displayHandlers->get($display_id))) {
return $this->view->displayHandlers->get($display_id)->getPath();
}
}
public function getUrl() {
return $this->view->getUrl();
}
/**
* Check to see if the display needs a breadcrumb
*
* By default, displays do not need breadcrumbs
*/
public function usesBreadcrumb() { return FALSE; }
/**
* Determine if a given option is set to use the default display or the
* current display
*
* @return
* TRUE for the default display
*/
public function isDefaulted($option) {
return !$this->isDefaultDisplay() && !empty($this->default_display) && !empty($this->options['defaults'][$option]);
}
/**
* Intelligently get an option either from this display or from the
* default display, if directed to do so.
*/
public function getOption($option) {
if ($this->isDefaulted($option)) {
return $this->default_display->getOption($option);
}
if (array_key_exists($option, $this->options)) {
return $this->options[$option];
}
}
/**
* Determine if the display's style uses fields.
*
* @return bool
*/
public function usesFields() {
return $this->getPlugin('style')->usesFields();
}
/**
* Get the instance of a plugin, for example style or row.
*
* @param string $type
* The type of the plugin.
*
* @return \Drupal\views\Plugin\views\PluginBase
*/
public function getPlugin($type) {
// Look up the plugin name to use for this instance.
$options = $this->getOption($type);
$name = $options['type'];
// Query plugins allow specifying a specific query class per base table.
if ($type == 'query') {
$views_data = Views::viewsData()->get($this->view->storage->get('base_table'));
$name = isset($views_data['table']['base']['query_id']) ? $views_data['table']['base']['query_id'] : 'views_query';
}
// Plugin instances are stored on the display for re-use.
if (!isset($this->plugins[$type][$name])) {
$plugin = Views::pluginManager($type)->createInstance($name);
// Initialize the plugin.
$plugin->init($this->view, $this, $options['options']);
$this->plugins[$type][$name] = $plugin;
}
return $this->plugins[$type][$name];
}
/**
* Get the handler object for a single handler.
*/
public function &getHandler($type, $id) {
if (!isset($this->handlers[$type])) {
$this->getHandlers($type);
}
if (isset($this->handlers[$type][$id])) {
return $this->handlers[$type][$id];
}
// So we can return a reference.
$null = NULL;
return $null;
}
/**
* Get a full array of handlers for $type. This caches them.
*/
public function getHandlers($type) {
if (!isset($this->handlers[$type])) {
$this->handlers[$type] = array();
$types = ViewExecutable::viewsHandlerTypes();
$plural = $types[$type]['plural'];
foreach ($this->getOption($plural) as $id => $info) {
// If this is during form submission and there are temporary options
// which can only appear if the view is in the edit cache, use those
// options instead. This is used for AJAX multi-step stuff.
if (isset($_POST['form_id']) && isset($this->view->temporary_options[$type][$id])) {
$info = $this->view->temporary_options[$type][$id];
}
if ($info['id'] != $id) {
$info['id'] = $id;
}
// If aggregation is on, the group type might override the actual
// handler that is in use. This piece of code checks that and,
// if necessary, sets the override handler.
$override = NULL;
if ($this->useGroupBy() && !empty($info['group_type'])) {
if (empty($this->view->query)) {
$this->view->initQuery();
}
$aggregate = $this->view->query->get_aggregation_info();
if (!empty($aggregate[$info['group_type']]['handler'][$type])) {
$override = $aggregate[$info['group_type']]['handler'][$type];
}
}
if (!empty($types[$type]['type'])) {
$handler_type = $types[$type]['type'];
}
else {
$handler_type = $type;
}
if ($handler = views_get_handler($info, $handler_type, $override)) {
// Special override for area types so they know where they come from.
if ($handler instanceof AreaPluginBase) {
$handler->areaType = $type;
}
$handler->init($this->view, $this, $info);
$this->handlers[$type][$id] = &$handler;
}
// Prevent reference problems.
unset($handler);
}
}
return $this->handlers[$type];
}
/**
* Retrieves a list of fields for the current display.
*
* This also takes into account any associated relationships, if they exist.
*
* @param bool $groupable_only
* (optional) TRUE to only return an array of field labels from handlers
* that support the use_string_group_by method, defaults to FALSE.
*
* @return array
* An array of applicable field options, keyed by ID.
*/
public function getFieldLabels($groupable_only = FALSE) {
$options = array();
foreach ($this->getHandlers('relationship') as $relationship => $handler) {
$relationships[$relationship] = $handler->adminLabel();
}
foreach ($this->getHandlers('field') as $id => $handler) {
if ($groupable_only && !$handler->use_string_group_by()) {
// Continue to next handler if it's not groupable.
continue;
}
if ($label = $handler->label()) {
$options[$id] = $label;
}
else {
$options[$id] = $handler->adminLabel();
}
if (!empty($handler->options['relationship']) && !empty($relationships[$handler->options['relationship']])) {
$options[$id] = '(' . $relationships[$handler->options['relationship']] . ') ' . $options[$id];
}
}
return $options;
}
/**
* Intelligently set an option either from this display or from the
* default display, if directed to do so.
*/
public function setOption($option, $value) {
if ($this->isDefaulted($option)) {
return $this->default_display->setOption($option, $value);
}
// Set this in two places: On the handler where we'll notice it
// but also on the display object so it gets saved. This should
// only be a temporary fix.
$this->display['display_options'][$option] = $value;
return $this->options[$option] = $value;
}
/**
* Set an option and force it to be an override.
*/
public function overrideOption($option, $value) {
$this->setOverride($option, FALSE);
$this->setOption($option, $value);
}
/**
* Because forms may be split up into sections, this provides
* an easy URL to exactly the right section. Don't override this.
*/
public function optionLink($text, $section, $class = '', $title = '') {
if (!empty($class)) {
$text = '<span>' . $text . '</span>';
}
if (!trim($text)) {
$text = t('Broken field');
}
if (empty($title)) {
$title = $text;
}
return l($text, 'admin/structure/views/nojs/display/' . $this->view->storage->id() . '/' . $this->display['id'] . '/' . $section, array('attributes' => array('class' => 'views-ajax-link ' . $class, 'title' => $title, 'id' => drupal_html_id('views-' . $this->display['id'] . '-' . $section)), 'html' => TRUE));
}
/**
* Returns to tokens for arguments.
*
* This function is similar to views_handler_field::get_render_tokens()
* but without fields tokens.
*/
public function getArgumentsTokens() {
$tokens = array();
if (!empty($this->view->build_info['substitutions'])) {
$tokens = $this->view->build_info['substitutions'];
}
$count = 0;
foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
$token = '%' . ++$count;
if (!isset($tokens[$token])) {
$tokens[$token] = '';
}
// Use strip tags as there should never be HTML in the path.
// However, we need to preserve special characters like " that
// were removed by check_plain().
$tokens['!' . $count] = isset($this->view->args[$count - 1]) ? strip_tags(decode_entities($this->view->args[$count - 1])) : '';
}
return $tokens;
}
/**
* Provide the default summary for options in the views UI.
*
* This output is returned as an array.
*/
public function optionsSummary(&$categories, &$options) {
$categories = array(
'title' => array(
'title' => t('Title'),
'column' => 'first',
),
'format' => array(
'title' => t('Format'),
'column' => 'first',
),
'filters' => array(
'title' => t('Filters'),
'column' => 'first',
),
'fields' => array(
'title' => t('Fields'),
'column' => 'first',
),
'pager' => array(
'title' => t('Pager'),
'column' => 'second',
),
'exposed' => array(
'title' => t('Exposed form'),
'column' => 'third',
'build' => array(
'#weight' => 1,
),
),
'access' => array(
'title' => '',
'column' => 'second',
'build' => array(
'#weight' => -5,
),
),
'other' => array(
'title' => t('Other'),
'column' => 'third',
'build' => array(
'#weight' => 2,
),
),
);
if ($this->display['id'] != 'default') {
$options['display_id'] = array(
'category' => 'other',
'title' => t('Machine Name'),
'value' => !empty($this->display['new_id']) ? check_plain($this->display['new_id']) : check_plain($this->display['id']),
'desc' => t('Change the machine name of this display.'),
);
}
$display_comment = check_plain(drupal_substr($this->getOption('display_comment'), 0, 10));
$options['display_comment'] = array(
'category' => 'other',
'title' => t('Administrative comment'),
'value' => !empty($display_comment) ? $display_comment : t('None'),
'desc' => t('Comment or document this display.'),
);
$title = strip_tags($this->getOption('title'));
if (!$title) {
$title = t('None');
}
$options['title'] = array(
'category' => 'title',
'title' => t('Title'),
'value' => $title,
'desc' => t('Change the title that this display will use.'),
);
$style_plugin_instance = $this->getPlugin('style');
$style_summary = empty($style_plugin_instance->definition['title']) ? t('Missing style plugin') : $style_plugin_instance->summaryTitle();
$style_title = empty($style_plugin_instance->definition['title']) ? t('Missing style plugin') : $style_plugin_instance->pluginTitle();
$style = '';
$options['style'] = array(
'category' => 'format',
'title' => t('Format'),
'value' => $style_title,
'setting' => $style_summary,
'desc' => t('Change the way content is formatted.'),
);
// This adds a 'Settings' link to the style_options setting if the style has options.
if ($style_plugin_instance->usesOptions()) {
$options['style']['links']['style_options'] = t('Change settings for this format');
}
if ($style_plugin_instance->usesRowPlugin()) {
$row_plugin_instance = $this->getPlugin('row');
$row_summary = empty($row_plugin_instance->definition['title']) ? t('Missing style plugin') : $row_plugin_instance->summaryTitle();
$row_title = empty($row_plugin_instance->definition['title']) ? t('Missing style plugin') : $row_plugin_instance->pluginTitle();
$options['row'] = array(
'category' => 'format',
'title' => t('Show'),
'value' => $row_title,
'setting' => $row_summary,
'desc' => t('Change the way each row in the view is styled.'),
);
// This adds a 'Settings' link to the row_options setting if the row style has options.
if ($row_plugin_instance->usesOptions()) {
$options['row']['links']['row_options'] = t('Change settings for this style');
}
}
if ($this->usesAJAX()) {
$options['use_ajax'] = array(
'category' => 'other',
'title' => t('Use AJAX'),
'value' => $this->getOption('use_ajax') ? t('Yes') : t('No'),
'desc' => t('Change whether or not this display will use AJAX.'),
);
}
if ($this->usesAttachments()) {
$options['hide_attachment_summary'] = array(
'category' => 'other',
'title' => t('Hide attachments in summary'),
'value' => $this->getOption('hide_attachment_summary') ? t('Yes') : t('No'),
'desc' => t('Change whether or not to display attachments when displaying a contextual filter summary.'),
);
}
if (!isset($this->definition['contextual links locations']) || !empty($this->definition['contextual links locations'])) {
$options['show_admin_links'] = array(
'category' => 'other',
'title' => t('Contextual links'),
'value' => $this->getOption('show_admin_links') ? t('Shown') : t('Hidden'),
'desc' => t('Change whether or not to display contextual links for this view.'),
);
}
$pager_plugin = $this->getPlugin('pager');
if (!$pager_plugin) {
// default to the no pager plugin.
$pager_plugin = Views::pluginManager('pager')->createInstance('none');
}
$pager_str = $pager_plugin->summaryTitle();
$options['pager'] = array(
'category' => 'pager',
'title' => t('Use pager'),
'value' => $pager_plugin->pluginTitle(),
'setting' => $pager_str,
'desc' => t("Change this display's pager setting."),
);
// If pagers aren't allowed, change the text of the item:
if (!$this->usesPager()) {
$options['pager']['title'] = t('Items to display');
}
if ($pager_plugin->usesOptions()) {
$options['pager']['links']['pager_options'] = t('Change settings for this pager type.');
}
if ($this->usesMore()) {
$options['use_more'] = array(
'category' => 'pager',
'title' => t('More link'),
'value' => $this->getOption('use_more') ? t('Yes') : t('No'),
'desc' => t('Specify whether this display will provide a "more" link.'),
);
}
$this->view->initQuery();
if ($this->view->query->get_aggregation_info()) {
$options['group_by'] = array(
'category' => 'other',
'title' => t('Use aggregation'),
'value' => $this->getOption('group_by') ? t('Yes') : t('No'),
'desc' => t('Allow grouping and aggregation (calculation) of fields.'),
);
}
$options['query'] = array(
'category' => 'other',
'title' => t('Query settings'),
'value' => t('Settings'),
'desc' => t('Allow to set some advanced settings for the query plugin'),
);
$languages = array(
'***CURRENT_LANGUAGE***' => t("Current user's language"),
'***DEFAULT_LANGUAGE***' => t("Default site language"),
LANGUAGE_NOT_SPECIFIED => t('Language neutral'),
);
if (\Drupal::moduleHandler()->moduleExists('language')) {
$languages = array_merge($languages, language_list());
}
$options['field_langcode'] = array(
'category' => 'other',
'title' => t('Field Language'),
'value' => $languages[$this->getOption('field_langcode')],
'desc' => t('All fields which support translations will be displayed in the selected language.'),
);
$access_plugin = $this->getPlugin('access');
if (!$access_plugin) {
// default to the no access control plugin.
$access_plugin = Views::pluginManager('access')->createInstance('none');
}
$access_str = $access_plugin->summaryTitle();
$options['access'] = array(
'category' => 'access',
'title' => t('Access'),
'value' => $access_plugin->pluginTitle(),
'setting' => $access_str,
'desc' => t('Specify access control type for this display.'),
);
if ($access_plugin->usesOptions()) {
$options['access']['links']['access_options'] = t('Change settings for this access type.');
}
$cache_plugin = $this->getPlugin('cache');
if (!$cache_plugin) {
// default to the no cache control plugin.
$cache_plugin = Views::pluginManager('cache')->createInstance('none');
}
$cache_str = $cache_plugin->summaryTitle();
$options['cache'] = array(
'category' => 'other',
'title' => t('Caching'),
'value' => $cache_plugin->pluginTitle(),
'setting' => $cache_str,
'desc' => t('Specify caching type for this display.'),
);
if ($cache_plugin->usesOptions()) {
$options['cache']['links']['cache_options'] = t('Change settings for this caching type.');
}
if ($access_plugin->usesOptions()) {
$options['access']['links']['access_options'] = t('Change settings for this access type.');
}
if ($this->usesLinkDisplay()) {
$display_id = $this->getLinkDisplay();
$displays = $this->view->storage->get('display');
$link_display = empty($displays[$display_id]) ? t('None') : check_plain($displays[$display_id]['display_title']);
$link_display = $this->getOption('link_display') == 'custom_url' ? t('Custom URL') : $link_display;
$options['link_display'] = array(
'category' => 'other',
'title' => t('Link display'),
'value' => $link_display,
'desc' => t('Specify which display or custom url this display will link to.'),
);
}
if ($this->usesExposedFormInBlock()) {
$options['exposed_block'] = array(
'category' => 'exposed',
'title' => t('Exposed form in block'),
'value' => $this->getOption('exposed_block') ? t('Yes') : t('No'),
'desc' => t('Allow the exposed form to appear in a block instead of the view.'),
);
}
$exposed_form_plugin = $this->getPlugin('exposed_form');
if (!$exposed_form_plugin) {
// default to the no cache control plugin.
$exposed_form_plugin = Views::pluginManager('exposed_form')->createInstance('basic');
}
$exposed_form_str = $exposed_form_plugin->summaryTitle();
$options['exposed_form'] = array(
'category' => 'exposed',
'title' => t('Exposed form style'),
'value' => $exposed_form_plugin->pluginTitle(),
'setting' => $exposed_form_str,
'desc' => t('Select the kind of exposed filter to use.'),
);
if ($exposed_form_plugin->usesOptions()) {
$options['exposed_form']['links']['exposed_form_options'] = t('Exposed form settings for this exposed form style.');
}
$css_class = check_plain(trim($this->getOption('css_class')));
if (!$css_class) {
$css_class = t('None');
}
$options['css_class'] = array(
'category' => 'other',
'title' => t('CSS class'),
'value' => $css_class,
'desc' => t('Change the CSS class name(s) that will be added to this display.'),
);
$options['analyze-theme'] = array(
'category' => 'other',
'title' => t('Output'),
'value' => t('Templates'),
'desc' => t('Get information on how to theme this display'),
);
foreach ($this->extender as $extender) {
$extender->optionsSummary($categories, $options);
}
}
/**
* Provide the default form for setting options.
*/
public function buildOptionsForm(&$form, &$form_state) {
parent::buildOptionsForm($form, $form_state);
if ($this->defaultableSections($form_state['section'])) {
views_ui_standard_display_dropdown($form, $form_state, $form_state['section']);
}
$form['#title'] = check_plain($this->display['display_title']) . ': ';
// Set the 'section' to hilite on the form.
// If it's the item we're looking at is pulling from the default display,
// reflect that. Don't use is_defaulted since we want it to show up even
// on the default display.
if (!empty($this->options['defaults'][$form_state['section']])) {
$form['#section'] = 'default-' . $form_state['section'];
}
else {
$form['#section'] = $this->display['id'] . '-' . $form_state['section'];
}
switch ($form_state['section']) {
case 'display_id':
$form['#title'] .= t('The machine name of this display');
$form['display_id'] = array(
'#type' => 'textfield',
'#title' => t('Machine name of the display'),
'#default_value' => !empty($this->display['new_id']) ? $this->display['new_id'] : $this->display['id'],
'#required' => TRUE,
'#size' => 64,
);
break;
case 'display_title':
$form['#title'] .= t('The name and the description of this display');
$form['display_title'] = array(
'#title' => t('Administrative name'),
'#type' => 'textfield',
'#default_value' => $this->display['display_title'],
);
$form['display_description'] = array(
'#title' => t('Administrative description'),
'#type' => 'textfield',
'#default_value' => $this->getOption('display_description'),
);
break;
case 'display_comment':
$form['#title'] .= t('Administrative comment');
$form['display_comment'] = array(
'#type' => 'textarea',
'#title' => t('Administrative comment'),
'#description' => t('This description will only be seen within the administrative interface and can be used to document this display.'),
'#default_value' => $this->getOption('display_comment'),
);
break;
case 'title':
$form['#title'] .= t('The title of this view');
$form['title'] = array(
'#type' => 'textfield',
'#description' => t('This title will be displayed with the view, wherever titles are normally displayed; i.e, as the page title, block title, etc.'),
'#default_value' => $this->getOption('title'),
);
break;
case 'css_class':
$form['#title'] .= t('CSS class');
$form['css_class'] = array(
'#type' => 'textfield',
'#title' => t('CSS class name(s)'),
'#description' => t('Multiples classes should be separated by spaces.'),
'#default_value' => $this->getOption('css_class'),
);
break;
case 'use_ajax':
$form['#title'] .= t('Use AJAX when available to load this view');
$form['use_ajax'] = array(
'#description' => t('When viewing a view, things like paging, table sorting, and exposed filters will not trigger a page refresh.'),
'#type' => 'checkbox',
'#title' => t('Use AJAX'),
'#default_value' => $this->getOption('use_ajax') ? 1 : 0,
);
break;
case 'hide_attachment_summary':
$form['#title'] .= t('Hide attachments when displaying a contextual filter summary');
$form['hide_attachment_summary'] = array(
'#type' => 'checkbox',
'#title' => t('Hide attachments in summary'),
'#default_value' => $this->getOption('hide_attachment_summary') ? 1 : 0,
);
break;
case 'show_admin_links':
$form['#title'] .= t('Show contextual links on this view.');
$form['show_admin_links'] = array(
'#type' => 'checkbox',
'#title' => t('Show contextual links'),
'#default_value' => $this->getOption('show_admin_links'),
);
break;
case 'use_more':
$form['#title'] .= t('Add a more link to the bottom of the display.');
$form['use_more'] = array(
'#type' => 'checkbox',
'#title' => t('Create more link'),
'#description' => t("This will add a more link to the bottom of this view, which will link to the page view. If you have more than one page view, the link will point to the display specified in 'Link display' section under advanced. You can override the url at the link display setting."),
'#default_value' => $this->getOption('use_more'),
);
$form['use_more_always'] = array(
'#type' => 'checkbox',
'#title' => t("Display 'more' link only if there is more content"),
'#description' => t("Leave this unchecked to display the 'more' link even if there are no more items to display."),
'#default_value' => !$this->getOption('use_more_always'),
'#states' => array(
'visible' => array(
':input[name="use_more"]' => array('checked' => TRUE),
),
),
);
$form['use_more_text'] = array(
'#type' => 'textfield',
'#title' => t('More link text'),
'#description' => t("The text to display for the more link."),
'#default_value' => $this->getOption('useMoreText'),
'#states' => array(
'visible' => array(
':input[name="use_more"]' => array('checked' => TRUE),
),
),
);
break;
case 'group_by':
$form['#title'] .= t('Allow grouping and aggregation (calculation) of fields.');
$form['group_by'] = array(
'#type' => 'checkbox',
'#title' => t('Aggregate'),
'#description' => t('If enabled, some fields may become unavailable. All fields that are selected for grouping will be collapsed to one record per distinct value. Other fields which are selected for aggregation will have the function run on them. For example, you can group nodes on title and count the number of nids in order to get a list of duplicate titles.'),
'#default_value' => $this->getOption('group_by'),
);
break;
case 'access':
$form['#title'] .= t('Access restrictions');
$form['access'] = array(
'#prefix' => '<div class="clearfix">',
'#suffix' => '</div>',
'#tree' => TRUE,
);
$access = $this->getOption('access');
$form['access']['type'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('access', $this->getType(), array($this->view->storage->get('base_table'))),
'#default_value' => $access['type'],
);
$access_plugin = $this->getPlugin('access');
if ($access_plugin->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#markup' => t('You may also adjust the !settings for the currently selected access restriction.', array('!settings' => $this->optionLink(t('settings'), 'access_options'))),
'#suffix' => '</div>',
);
}
break;
case 'access_options':
$plugin = $this->getPlugin('access');
$form['#title'] .= t('Access options');
if ($plugin) {
$form['access_options'] = array(
'#tree' => TRUE,
);
$plugin->buildOptionsForm($form['access_options'], $form_state);
}
break;
case 'cache':
$form['#title'] .= t('Caching');
$form['cache'] = array(
'#prefix' => '<div class="clearfix">',
'#suffix' => '</div>',
'#tree' => TRUE,
);
$cache = $this->getOption('cache');
$form['cache']['type'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('cache', $this->getType(), array($this->view->storage->get('base_table'))),
'#default_value' => $cache['type'],
);
$cache_plugin = $this->getPlugin('cache');
if ($cache_plugin->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#suffix' => '</div>',
'#markup' => t('You may also adjust the !settings for the currently selected cache mechanism.', array('!settings' => $this->optionLink(t('settings'), 'cache_options'))),
);
}
break;
case 'cache_options':
$plugin = $this->getPlugin('cache');
$form['#title'] .= t('Caching options');
if ($plugin) {
$form['cache_options'] = array(
'#tree' => TRUE,
);
$plugin->buildOptionsForm($form['cache_options'], $form_state);
}
break;
case 'query':
$query_options = $this->getOption('query');
$plugin_name = $query_options['type'];
$form['#title'] .= t('Query options');
$this->view->initQuery();
if ($this->view->query) {
$form['query'] = array(
'#tree' => TRUE,
'type' => array(
'#type' => 'value',
'#value' => $plugin_name,
),
'options' => array(
'#tree' => TRUE,
),
);
$this->view->query->buildOptionsForm($form['query']['options'], $form_state);
}
break;
case 'field_language':
$form['#title'] .= t('Field Language');
$entities = entity_get_info();
$entity_tables = array();
$has_translation_handlers = FALSE;
foreach ($entities as $type => $entity_info) {
$entity_tables[] = $entity_info['base_table'];
if (!empty($entity_info['translation'])) {
$has_translation_handlers = TRUE;
}
}
// Doesn't make sense to show a field setting here if we aren't querying
// an entity base table. Also, we make sure that there's at least one
// entity type with a translation handler attached.
if (in_array($this->view->storage->get('base_table'), $entity_tables) && $has_translation_handlers) {
$languages = array(
'***CURRENT_LANGUAGE***' => t("Current user's language"),
'***DEFAULT_LANGUAGE***' => t("Default site language"),
LANGUAGE_NOT_SPECIFIED => t('Language neutral'),
);
$languages = array_merge($languages, views_language_list());
$form['field_langcode'] = array(
'#type' => 'select',
'#title' => t('Field Language'),
'#description' => t('All fields which support translations will be displayed in the selected language.'),
'#options' => $languages,
'#default_value' => $this->getOption('field_langcode'),
);
$form['field_langcode_add_to_query'] = array(
'#type' => 'checkbox',
'#title' => t('When needed, add the field language condition to the query'),
'#default_value' => $this->getOption('field_langcode_add_to_query'),
);
}
else {
$form['field_language']['#markup'] = t("You don't have translatable entity types.");
}
break;
case 'style':
$form['#title'] .= t('How should this view be styled');
$style_plugin = $this->getPlugin('style');
$form['style'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('style', $this->getType(), array($this->view->storage->get('base_table'))),
'#default_value' => $style_plugin->definition['id'],
'#description' => t('If the style you choose has settings, be sure to click the settings button that will appear next to it in the View summary.'),
);
if ($style_plugin->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#suffix' => '</div>',
'#markup' => t('You may also adjust the !settings for the currently selected style.', array('!settings' => $this->optionLink(t('settings'), 'style_options'))),
);
}
break;
case 'style_options':
$form['#title'] .= t('Style options');
$style = TRUE;
$style_plugin = $this->getOption('style');
$name = $style_plugin['type'];
case 'row_options':
if (!isset($name)) {
$row_plugin = $this->getOption('row');
$name = $row_plugin['type'];
}
// if row, $style will be empty.
if (empty($style)) {
$form['#title'] .= t('Row style options');
}
$plugin = $this->getPlugin(empty($style) ? 'row' : 'style', $name);
if ($plugin) {
$form[$form_state['section']] = array(
'#tree' => TRUE,
);
$plugin->buildOptionsForm($form[$form_state['section']], $form_state);
}
break;
case 'row':
$form['#title'] .= t('How should each row in this view be styled');
$row_plugin_instance = $this->getPlugin('row');
$form['row'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('row', $this->getType(), array($this->view->storage->get('base_table'))),
'#default_value' => $row_plugin_instance->definition['id'],
);
if ($row_plugin_instance->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#suffix' => '</div>',
'#markup' => t('You may also adjust the !settings for the currently selected row style.', array('!settings' => $this->optionLink(t('settings'), 'row_options'))),
);
}
break;
case 'link_display':
$form['#title'] .= t('Which display to use for path');
foreach ($this->view->storage->get('display') as $display_id => $display) {
if ($this->view->displayHandlers->get($display_id)->hasPath()) {
$options[$display_id] = $display['display_title'];
}
}
$options['custom_url'] = t('Custom URL');
if (count($options)) {
$form['link_display'] = array(
'#type' => 'radios',
'#options' => $options,
'#description' => t("Which display to use to get this display's path for things like summary links, rss feed links, more links, etc."),
'#default_value' => $this->getOption('link_display'),
);
}
$options = array();
$count = 0; // This lets us prepare the key as we want it printed.
foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
$options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->adminLabel()));
$options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->adminLabel()));
}
// Default text.
// We have some options, so make a list.
$output = '';
if (!empty($options)) {
$output = t('<p>The following tokens are available for this link.</p>');
foreach (array_keys($options) as $type) {
if (!empty($options[$type])) {
$items = array();
foreach ($options[$type] as $key => $value) {
$items[] = $key . ' == ' . $value;
}
$output .= theme('item_list',
array(
'items' => $items,
'type' => $type
));
}
}
}
$form['link_url'] = array(
'#type' => 'textfield',
'#title' => t('Custom URL'),
'#default_value' => $this->getOption('link_url'),
'#description' => t('A Drupal path or external URL the more link will point to. Note that this will override the link display setting above.') . $output,
'#states' => array(
'visible' => array(
':input[name="link_display"]' => array('value' => 'custom_url'),
),
),
);
break;
case 'analyze-theme':
$form['#title'] .= t('Theming information');
if ($theme = drupal_container()->get('request')->request->get('theme')) {
$this->theme = $theme;
}
elseif (empty($this->theme)) {
$this->theme = config('system.theme')->get('default');
}
if (isset($GLOBALS['theme']) && $GLOBALS['theme'] == $this->theme) {
$this->theme_registry = theme_get_registry();
$theme_engine = $GLOBALS['theme_engine'];
}
else {
$themes = list_themes();
$theme = $themes[$this->theme];
// Find all our ancestor themes and put them in an array.
$base_theme = array();
$ancestor = $this->theme;
while ($ancestor && isset($themes[$ancestor]->base_theme)) {
$ancestor = $themes[$ancestor]->base_theme;
$base_theme[] = $themes[$ancestor];
}
// The base themes should be initialized in the right order.
$base_theme = array_reverse($base_theme);
// This code is copied directly from _drupal_theme_initialize()
$theme_engine = NULL;
// Initialize the theme.
if (isset($theme->engine)) {
// Include the engine.
include_once DRUPAL_ROOT . '/' . $theme->owner;
$theme_engine = $theme->engine;
if (function_exists($theme_engine . '_init')) {
foreach ($base_theme as $base) {
call_user_func($theme_engine . '_init', $base);
}
call_user_func($theme_engine . '_init', $theme);
}
}
else {
// include non-engine theme files
foreach ($base_theme as $base) {
// Include the theme file or the engine.
if (!empty($base->owner)) {
include_once DRUPAL_ROOT . '/' . $base->owner;
}
}
// and our theme gets one too.
if (!empty($theme->owner)) {
include_once DRUPAL_ROOT . '/' . $theme->owner;
}
}
$this->theme_registry = _theme_load_registry($theme, $base_theme, $theme_engine);
}
// If there's a theme engine involved, we also need to know its extension
// so we can give the proper filename.
$this->theme_extension = '.tpl.php';
if (isset($theme_engine)) {
$extension_function = $theme_engine . '_extension';
if (function_exists($extension_function)) {
$this->theme_extension = $extension_function();
}
}
$funcs = array();
// Get theme functions for the display. Note that some displays may
// not have themes. The 'feed' display, for example, completely
// delegates to the style.
if (!empty($this->definition['theme'])) {
$funcs[] = $this->optionLink(t('Display output'), 'analyze-theme-display') . ': ' . $this->formatThemes($this->themeFunctions());
}
$plugin = $this->getPlugin('style');
if ($plugin) {
$funcs[] = $this->optionLink(t('Style output'), 'analyze-theme-style') . ': ' . $this->formatThemes($plugin->themeFunctions());
if ($plugin->usesRowPlugin()) {
$row_plugin = $this->getPlugin('row');
if ($row_plugin) {
$funcs[] = $this->optionLink(t('Row style output'), 'analyze-theme-row') . ': ' . $this->formatThemes($row_plugin->themeFunctions());
}
}
if ($plugin->usesFields()) {
foreach ($this->getHandlers('field') as $id => $handler) {
$funcs[] = $this->optionLink(t('Field @field (ID: @id)', array('@field' => $handler->adminLabel(), '@id' => $id)), 'analyze-theme-field') . ': ' . $this->formatThemes($handler->themeFunctions());
}
}
}
$form['important'] = array(
'#markup' => '<div class="form-item description"><p>' . t('This section lists all possible templates for the display plugin and for the style plugins, ordered roughly from the least specific to the most specific. The active template for each plugin -- which is the most specific template found on the system -- is highlighted in bold.') . '</p></div>',
);
if (isset($this->view->display_handler->new_id)) {
$form['important']['new_id'] = array(
'#prefix' => '<div class="description">',
'#suffix' => '</div>',
'#value' => t("<strong>Important!</strong> You have changed the display's machine name. Anything that attached to this display specifically, such as theming, may stop working until it is updated. To see theme suggestions for it, you need to save the view."),
);
}
foreach (list_themes() as $key => $theme) {
if (!empty($theme->info['hidden'])) {
continue;
}
$options[$key] = $theme->info['name'];
}
$form['box'] = array(
'#prefix' => '<div class="container-inline">',
'#suffix' => '</div>',
);
$form['box']['theme'] = array(
'#type' => 'select',
'#options' => $options,
'#default_value' => $this->theme,
);
$form['box']['change'] = array(
'#type' => 'submit',
'#value' => t('Change theme'),
'#submit' => array(array($this, 'changeThemeForm')),
);
$form['analysis'] = array(
'#markup' => '<div class="form-item">' . theme('item_list', array('items' => $funcs)) . '</div>',
);
$form['rescan_button'] = array(
'#prefix' => '<div class="form-item">',
'#suffix' => '</div>',
);
$form['rescan_button']['button'] = array(
'#type' => 'submit',
'#value' => t('Rescan template files'),
'#submit' => array(array($this, 'rescanThemes')),
);
$form['rescan_button']['markup'] = array(
'#markup' => '<div class="description">' . t("<strong>Important!</strong> When adding, removing, or renaming template files, it is necessary to make Drupal aware of the changes by making it rescan the files on your system. By clicking this button you clear Drupal's theme registry and thereby trigger this rescanning process. The highlighted templates above will then reflect the new state of your system.") . '</div>',
);
$form_state['ok_button'] = TRUE;
break;
case 'analyze-theme-display':
$form['#title'] .= t('Theming information (display)');
$output = '<p>' . t('Back to !info.', array('!info' => $this->optionLink(t('theming information'), 'analyze-theme'))) . '</p>';
if (empty($this->definition['theme'])) {
$output .= t('This display has no theming information');
}
else {
$output .= '<p>' . t('This is the default theme template used for this display.') . '</p>';
$output .= '<pre>' . check_plain(file_get_contents('./' . $this->definition['theme_path'] . '/' . strtr($this->definition['theme'], '_', '-') . '.tpl.php')) . '</pre>';
}
$form['analysis'] = array(
'#markup' => '<div class="form-item">' . $output . '</div>',
);
$form_state['ok_button'] = TRUE;
break;
case 'analyze-theme-style':
$form['#title'] .= t('Theming information (style)');
$output = '<p>' . t('Back to !info.', array('!info' => $this->optionLink(t('theming information'), 'analyze-theme'))) . '</p>';
$plugin = $this->getPlugin('style');
if (empty($plugin->definition['theme'])) {
$output .= t('This display has no style theming information');
}
else {
$output .= '<p>' . t('This is the default theme template used for this style.') . '</p>';
$output .= '<pre>' . check_plain(file_get_contents('./' . $plugin->definition['theme_path'] . '/' . strtr($plugin->definition['theme'], '_', '-') . '.tpl.php')) . '</pre>';
}
$form['analysis'] = array(
'#markup' => '<div class="form-item">' . $output . '</div>',
);
$form_state['ok_button'] = TRUE;
break;
case 'analyze-theme-row':
$form['#title'] .= t('Theming information (row style)');
$output = '<p>' . t('Back to !info.', array('!info' => $this->optionLink(t('theming information'), 'analyze-theme'))) . '</p>';
$plugin = $this->getPlugin('row');
if (empty($plugin->definition['theme'])) {
$output .= t('This display has no row style theming information');
}
else {
$output .= '<p>' . t('This is the default theme template used for this row style.') . '</p>';
$output .= '<pre>' . check_plain(file_get_contents('./' . $plugin->definition['theme_path'] . '/' . strtr($plugin->definition['theme'], '_', '-') . '.tpl.php')) . '</pre>';
}
$form['analysis'] = array(
'#markup' => '<div class="form-item">' . $output . '</div>',
);
$form_state['ok_button'] = TRUE;
break;
case 'analyze-theme-field':
$form['#title'] .= t('Theming information (row style)');
$output = '<p>' . t('Back to !info.', array('!info' => $this->optionLink(t('theming information'), 'analyze-theme'))) . '</p>';
$output .= '<p>' . t('This is the default theme template used for this row style.') . '</p>';
// Field templates aren't registered the normal way...and they're always
// this one, anyhow.
$output .= '<pre>' . check_plain(file_get_contents(drupal_get_path('module', 'views') . '/templates/views-view-field.tpl.php')) . '</pre>';
$form['analysis'] = array(
'#markup' => '<div class="form-item">' . $output . '</div>',
);
$form_state['ok_button'] = TRUE;
break;
case 'exposed_block':
$form['#title'] .= t('Put the exposed form in a block');
$form['description'] = array(
'#markup' => '<div class="description form-item">' . t('If set, any exposed widgets will not appear with this view. Instead, a block will be made available to the Drupal block administration system, and the exposed form will appear there. Note that this block must be enabled manually, Views will not enable it for you.') . '</div>',
);
$form['exposed_block'] = array(
'#type' => 'radios',
'#options' => array(1 => t('Yes'), 0 => t('No')),
'#default_value' => $this->getOption('exposed_block') ? 1 : 0,
);
break;
case 'exposed_form':
$form['#title'] .= t('Exposed Form');
$form['exposed_form'] = array(
'#prefix' => '<div class="clearfix">',
'#suffix' => '</div>',
'#tree' => TRUE,
);
$exposed_form = $this->getOption('exposed_form');
$form['exposed_form']['type'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('exposed_form', $this->getType(), array($this->view->storage->get('base_table'))),
'#default_value' => $exposed_form['type'],
);
$exposed_form_plugin = $this->getPlugin('exposed_form');
if ($exposed_form_plugin->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#suffix' => '</div>',
'#markup' => t('You may also adjust the !settings for the currently selected style.', array('!settings' => $this->optionLink(t('settings'), 'exposed_form_options'))),
);
}
break;
case 'exposed_form_options':
$plugin = $this->getPlugin('exposed_form');
$form['#title'] .= t('Exposed form options');
if ($plugin) {
$form['exposed_form_options'] = array(
'#tree' => TRUE,
);
$plugin->buildOptionsForm($form['exposed_form_options'], $form_state);
}
break;
case 'pager':
$form['#title'] .= t('Select which pager, if any, to use for this view');
$form['pager'] = array(
'#prefix' => '<div class="clearfix">',
'#suffix' => '</div>',
'#tree' => TRUE,
);
$pager = $this->getOption('pager');
$form['pager']['type'] = array(
'#type' => 'radios',
'#options' => views_fetch_plugin_names('pager', !$this->usesPager() ? 'basic' : NULL, array($this->view->storage->get('base_table'))),
'#default_value' => $pager['type'],
);
$pager_plugin = $this->getPlugin('pager');
if ($pager_plugin->usesOptions()) {
$form['markup'] = array(
'#prefix' => '<div class="form-item description">',
'#suffix' => '</div>',
'#markup' => t('You may also adjust the !settings for the currently selected pager.', array('!settings' => $this->optionLink(t('settings'), 'pager_options'))),
);
}
break;
case 'pager_options':
$plugin = $this->getPlugin('pager');
$form['#title'] .= t('Pager options');
if ($plugin) {
$form['pager_options'] = array(
'#tree' => TRUE,
);
$plugin->buildOptionsForm($form['pager_options'], $form_state);
}
break;
}
foreach ($this->extender as $extender) {
$extender->buildOptionsForm($form, $form_state);
}
}
/**
* Submit hook to clear Drupal's theme registry (thereby triggering
* a templates rescan).
*/
public function rescanThemes($form, &$form_state) {
drupal_theme_rebuild();
// The 'Theme: Information' page is about to be shown again. That page
// analyzes the output of theme_get_registry(). However, this latter
// function uses an internal cache (which was initialized before we
// called drupal_theme_rebuild()) so it won't reflect the
// current state of our theme registry. The only way to clear that cache
// is to re-initialize the theme system:
unset($GLOBALS['theme']);
drupal_theme_initialize();
$form_state['rerender'] = TRUE;
$form_state['rebuild'] = TRUE;
}
/**
* Displays the Change Theme form.
*/
public function changeThemeForm($form, &$form_state) {
// This is just a temporary variable.
$form_state['view']->theme = $form_state['values']['theme'];
$form_state['view']->cacheSet();
$form_state['rerender'] = TRUE;
$form_state['rebuild'] = TRUE;
}
/**
* Format a list of theme templates for output by the theme info helper.
*/
protected function formatThemes($themes) {
$registry = $this->theme_registry;
$extension = $this->theme_extension;
$output = '';
$picked = FALSE;
foreach ($themes as $theme) {
$template = strtr($theme, '_', '-') . $extension;
if (!$picked && !empty($registry[$theme])) {
$template_path = isset($registry[$theme]['path']) ? $registry[$theme]['path'] . '/' : './';
if (file_exists($template_path . $template)) {
$hint = t('File found in folder @template-path', array('@template-path' => $template_path));
$template = '<strong title="'. $hint .'">' . $template . '</strong>';
}
else {
$template = '<strong class="error">' . $template . ' ' . t('(File not found, in folder @template-path)', array('@template-path' => $template_path)) . '</strong>';
}
$picked = TRUE;
}
$fixed[] = $template;
}
return theme('item_list', array('items' => array_reverse($fixed)));
}
/**
* Validate the options form.
*/
public function validateOptionsForm(&$form, &$form_state) {
switch ($form_state['section']) {
case 'display_title':
if (empty($form_state['values']['display_title'])) {
form_error($form['display_title'], t('Display title may not be empty.'));
}
break;
case 'css_class':
$css_class = $form_state['values']['css_class'];
if (preg_match('/[^a-zA-Z0-9-_ ]/', $css_class)) {
form_error($form['css_class'], t('CSS classes must be alphanumeric or dashes only.'));
}
break;
case 'display_id':
if ($form_state['values']['display_id']) {
if (preg_match('/[^a-z0-9_]/', $form_state['values']['display_id'])) {
form_error($form['display_id'], t('Display name must be letters, numbers, or underscores only.'));
}
foreach ($this->view->display as $id => $display) {
if ($id != $this->view->current_display && ($form_state['values']['display_id'] == $id || (isset($display->new_id) && $form_state['values']['display_id'] == $display->new_id))) {
form_error($form['display_id'], t('Display id should be unique.'));
}
}
}
break;
case 'query':
if ($this->view->query) {
$this->view->query->validateOptionsForm($form['query'], $form_state);
}
break;
}
// Validate plugin options. Every section with "_options" in it, belongs to
// a plugin type, like "style_options".
if (strpos($form_state['section'], '_options') !== FALSE) {
$plugin_type = str_replace('_options', '', $form_state['section']);
// Load the plugin and let it handle the validation.
if ($plugin = $this->getPlugin($plugin_type)) {
$plugin->validateOptionsForm($form[$form_state['section']], $form_state);
}
}
foreach ($this->extender as $extender) {
$extender->validateOptionsForm($form, $form_state);
}
}
/**
* Perform any necessary changes to the form values prior to storage.
* There is no need for this function to actually store the data.
*/
public function submitOptionsForm(&$form, &$form_state) {
// Not sure I like this being here, but it seems (?) like a logical place.
$cache_plugin = $this->getPlugin('cache');
if ($cache_plugin) {
$cache_plugin->cache_flush();
}
$section = $form_state['section'];
switch ($section) {
case 'display_id':
if (isset($form_state['values']['display_id'])) {
$this->display['new_id'] = $form_state['values']['display_id'];
}
break;
case 'display_title':
$this->display['display_title'] = $form_state['values']['display_title'];
$this->setOption('display_description', $form_state['values']['display_description']);
break;
case 'access':
$access = $this->getOption('access');
if ($access['type'] != $form_state['values']['access']['type']) {
$plugin = Views::pluginManager('access')->createInstance($form_state['values']['access']['type']);
if ($plugin) {
$access = array('type' => $form_state['values']['access']['type']);
$this->setOption('access', $access);
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'access_options');
}
}
}
break;
case 'access_options':
$plugin = $this->getPlugin('access');
if ($plugin) {
$access = $this->getOption('access');
$plugin->submitOptionsForm($form['access_options'], $form_state);
$access['options'] = $form_state['values'][$section];
$this->setOption('access', $access);
}
break;
case 'cache':
$cache = $this->getOption('cache');
if ($cache['type'] != $form_state['values']['cache']['type']) {
$plugin = Views::pluginManager('cache')->createInstance($form_state['values']['cache']['type']);
if ($plugin) {
$cache = array('type' => $form_state['values']['cache']['type']);
$this->setOption('cache', $cache);
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'cache_options');
}
}
}
break;
case 'cache_options':
$plugin = $this->getPlugin('cache');
if ($plugin) {
$cache = $this->getOption('cache');
$plugin->submitOptionsForm($form['cache_options'], $form_state);
$cache['options'] = $form_state['values'][$section];
$this->setOption('cache', $cache);
}
break;
case 'query':
$plugin = $this->getPlugin('query');
if ($plugin) {
$plugin->submitOptionsForm($form['query']['options'], $form_state);
$this->setOption('query', $form_state['values'][$section]);
}
break;
case 'link_display':
$this->setOption('link_url', $form_state['values']['link_url']);
case 'title':
case 'css_class':
case 'display_comment':
$this->setOption($section, $form_state['values'][$section]);
break;
case 'field_language':
$this->setOption('field_langcode', $form_state['values']['field_langcode']);
$this->setOption('field_langcode_add_to_query', $form_state['values']['field_langcode_add_to_query']);
break;
case 'use_ajax':
case 'hide_attachment_summary':
case 'show_admin_links':
$this->setOption($section, (bool) $form_state['values'][$section]);
break;
case 'use_more':
$this->setOption($section, intval($form_state['values'][$section]));
$this->setOption('use_more_always', !intval($form_state['values']['use_more_always']));
$this->setOption('use_more_text', $form_state['values']['use_more_text']);
case 'distinct':
$this->setOption($section, $form_state['values'][$section]);
break;
case 'group_by':
$this->setOption($section, $form_state['values'][$section]);
break;
case 'row':
// This if prevents resetting options to default if they don't change
// the plugin.
$row = $this->getOption('row');
if ($row['type'] != $form_state['values'][$section]) {
$plugin = Views::pluginManager('row')->createInstance($form_state['values'][$section]);
if ($plugin) {
$row = array('type' => $form_state['values'][$section]);
$this->setOption($section, $row);
// send ajax form to options page if we use it.
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'row_options');
}
}
}
break;
case 'style':
// This if prevents resetting options to default if they don't change
// the plugin.
$style = $this->getOption('style');
if ($style['type'] != $form_state['values'][$section]) {
$plugin = views::pluginManager('style')->createInstance($form_state['values'][$section]);
if ($plugin) {
$row = array('type' => $form_state['values'][$section]);
$this->setOption($section, $row);
// send ajax form to options page if we use it.
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'style_options');
}
}
}
break;
case 'style_options':
$plugin = $this->getPlugin('style');
if ($plugin) {
$style = $this->getOption('style');
$plugin->submitOptionsForm($form['style_options'], $form_state);
$style['options'] = $form_state['values'][$section];
$this->setOption('style', $style);
}
break;
case 'row_options':
$plugin = $this->getPlugin('row');
if ($plugin) {
$row = $this->getOption('row');
$plugin->submitOptionsForm($form['row_options'], $form_state);
$row['options'] = $form_state['values'][$section];
$this->setOption('row', $row);
}
break;
case 'exposed_block':
$this->setOption($section, (bool) $form_state['values'][$section]);
break;
case 'exposed_form':
$exposed_form = $this->getOption('exposed_form');
if ($exposed_form['type'] != $form_state['values']['exposed_form']['type']) {
$plugin = Views::pluginManager('exposed_form')->createInstance($form_state['values']['exposed_form']['type']);
if ($plugin) {
$exposed_form = array('type' => $form_state['values']['exposed_form']['type'], 'options' => array());
$this->setOption('exposed_form', $exposed_form);
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'exposed_form_options');
}
}
}
break;
case 'exposed_form_options':
$plugin = $this->getPlugin('exposed_form');
if ($plugin) {
$exposed_form = $this->getOption('exposed_form');
$plugin->submitOptionsForm($form['exposed_form_options'], $form_state);
$exposed_form['options'] = $form_state['values'][$section];
$this->setOption('exposed_form', $exposed_form);
}
break;
case 'pager':
$pager = $this->getOption('pager');
if ($pager['type'] != $form_state['values']['pager']['type']) {
$plugin = Views::pluginManager('pager')->createInstance($form_state['values']['pager']['type']);
if ($plugin) {
// Because pagers have very similar options, let's allow pagers to
// try to carry the options over.
$plugin->init($this->view, $this, $pager['options']);
$pager = array('type' => $form_state['values']['pager']['type'], 'options' => $plugin->options);
$this->setOption('pager', $pager);
if ($plugin->usesOptions()) {
$form_state['view']->addFormToStack('display', $this->display['id'], 'pager_options');
}
}
}
break;
case 'pager_options':
$plugin = $this->getPlugin('pager');
if ($plugin) {
$pager = $this->getOption('pager');
$plugin->submitOptionsForm($form['pager_options'], $form_state);
$pager['options'] = $form_state['values'][$section];
$this->setOption('pager', $pager);
}
break;
}
foreach ($this->extender as $extender) {
$extender->submitOptionsForm($form, $form_state);
}
}
/**
* If override/revert was clicked, perform the proper toggle.
*/
public function optionsOverride($form, &$form_state) {
$this->setOverride($form_state['section']);
}
/**
* Flip the override setting for the given section.
*
* @param string $section
* Which option should be marked as overridden, for example "filters".
* @param bool $new_state
* Select the new state of the option.
* - TRUE: Revert to default.
* - FALSE: Mark it as overridden.
*/
public function setOverride($section, $new_state = NULL) {
$options = $this->defaultableSections($section);
if (!$options) {
return;
}
if (!isset($new_state)) {
$new_state = empty($this->options['defaults'][$section]);
}
// For each option that is part of this group, fix our settings.
foreach ($options as $option) {
if ($new_state) {
// Revert to defaults.
unset($this->options[$option]);
unset($this->display['display_options'][$option]);
}
else {
// copy existing values into our display.
$this->options[$option] = $this->getOption($option);
$this->display['display_options'][$option] = $this->options[$option];
}
$this->options['defaults'][$option] = $new_state;
$this->display['display_options']['defaults'][$option] = $new_state;
}
}
/**
* Inject anything into the query that the display handler needs.
*/
public function query() {
foreach ($this->extender as $extender) {
$extender->query();
}
}
/**
* Not all display plugins will support filtering
*
* @todo this doesn't seems to be used
*/
public function renderFilters() { }
/**
* Not all display plugins will suppert pager rendering.
*/
public function renderPager() {
return TRUE;
}
/**
* Render the 'more' link
*/
public function renderMoreLink() {
if ($this->usesMore() && ($this->useMoreAlways() || (!empty($this->view->pager) && $this->view->pager->has_more_records()))) {
$path = $this->getPath();
if ($this->getOption('link_display') == 'custom_url' && $override_path = $this->getOption('link_url')) {
$tokens = $this->getArgumentsTokens();
$path = strtr($override_path, $tokens);
}
if ($path) {
if (empty($override_path)) {
$path = $this->view->getUrl(NULL, $path);
}
$url_options = array();
if (!empty($this->view->exposed_raw_input)) {
$url_options['query'] = $this->view->exposed_raw_input;
}
$theme = views_theme_functions('views_more', $this->view, $this->view->display_handler->display);
$path = check_url(url($path, $url_options));
return theme($theme, array('more_url' => $path, 'link_text' => check_plain($this->useMoreText()), 'view' => $this->view));
}
}
}
/**
* If this display creates a page with a menu item, implement it here.
*
* @param array $callbacks
* An array of already existing menu items provided by drupal.
*
* @return array
* The menu router items registers for this display.
*
* @see hook_menu()
*/
public function executeHookMenu($callbacks) {
return array();
}
/**
* Render this display.
*/
public function render() {
$element = array(
'#theme' => $this->themeFunctions(),
'#view' => $this->view,
);
$element['#attached'] = &$this->view->element['#attached'];
return $element;
}
/**
* Render one of the available areas.
*
* @param string $area
* Identifier of the specific area to render.
* @param bool $empty
* (optional) Indicator whether or not the view result is empty. Defaults to
* FALSE
*
* @return array
* A render array for the given area.
*/
public function renderArea($area, $empty = FALSE) {
$return = array();
foreach ($this->getHandlers($area) as $key => $area_handler) {
$return[$key] = $area_handler->render($empty);
}
return $return;
}
/**
* Determine if the user has access to this display of the view.
*/
public function access($account = NULL) {
if (!isset($account)) {
global $user;
$account = $user;
}
// Full override.
if (user_access('access all views', $account)) {
return TRUE;
}
$plugin = $this->getPlugin('access');
if ($plugin) {
return $plugin->access($account);
}
// fallback to all access if no plugin.
return TRUE;
}
/**
* Set up any variables on the view prior to execution. These are separated
* from execute because they are extremely common and unlikely to be
* overridden on an individual display.
*/
public function preExecute() {
$this->view->setAjaxEnabled($this->ajaxEnabled());
if ($this->usesMore() && !$this->useMoreAlways()) {
$this->view->get_total_rows = TRUE;
}
$this->view->initHandlers();
if ($this->usesExposed()) {
$exposed_form = $this->getPlugin('exposed_form');
$exposed_form->pre_execute();
}
foreach ($this->extender as $extender) {
$extender->pre_execute();
}
$this->view->setShowAdminLinks($this->getOption('show_admin_links'));
}
/**
* When used externally, this is how a view gets run and returns
* data in the format required.
*
* The base class cannot be executed.
*/
public function execute() { }
/**
* Fully render the display for the purposes of a live preview or
* some other AJAXy reason.
*/
function preview() {
return $this->view->render();
}
/**
* Returns the display type that this display requires.
*
* This can be used for filtering views plugins. E.g. if a plugin category of
* 'foo' is specified, only plugins with no 'types' declared or 'types'
* containing 'foo'. If you have a type of bar, this plugin will not be used.
* This is applicable for style, row, access, cache, and exposed_form plugins.
*
* @return string
* The required display type. Defaults to 'normal'.
*
* @see views_fetch_plugin_names()
*/
protected function getType() {
return 'normal';
}
/**
* Make sure the display and all associated handlers are valid.
*
* @return
* Empty array if the display is valid; an array of error strings if it is not.
*/
public function validate() {
$errors = array();
// Make sure displays that use fields HAVE fields.
if ($this->usesFields()) {
$fields = FALSE;
foreach ($this->getHandlers('field') as $field) {
if (empty($field->options['exclude'])) {
$fields = TRUE;
}
}
if (!$fields) {
$errors[] = t('Display "@display" uses fields but there are none defined for it or all are excluded.', array('@display' => $this->display['display_title']));
}
}
if ($this->hasPath() && !$this->getOption('path')) {
$errors[] = t('Display "@display" uses a path but the path is undefined.', array('@display' => $this->display['display_title']));
}
// Validate style plugin
$style = $this->getPlugin('style');
if (empty($style)) {
$errors[] = t('Display "@display" has an invalid style plugin.', array('@display' => $this->display['display_title']));
}
else {
$result = $style->validate();
if (!empty($result) && is_array($result)) {
$errors = array_merge($errors, $result);
}
}
// Validate query plugin.
$query = $this->getPlugin('query');
$result = $query->validate();
if (!empty($result) && is_array($result)) {
$errors = array_merge($errors, $result);
}
// Validate handlers
foreach (ViewExecutable::viewsHandlerTypes() as $type => $info) {
foreach ($this->getHandlers($type) as $handler) {
$result = $handler->validate();
if (!empty($result) && is_array($result)) {
$errors = array_merge($errors, $result);
}
}
}
return $errors;
}
/**
* Reacts on deleting a display.
*/
public function remove() {
}
/**
* Check if the provided identifier is unique.
*
* @param string $id
* The id of the handler which is checked.
* @param string $identifier
* The actual get identifier configured in the exposed settings.
*
* @return bool
* Returns whether the identifier is unique on all handlers.
*
*/
public function isIdentifierUnique($id, $identifier) {
foreach (ViewExecutable::viewsHandlerTypes() as $type => $info) {
foreach ($this->getHandlers($type) as $key => $handler) {
if ($handler->canExpose() && $handler->isExposed()) {
if ($handler->isAGroup()) {
if ($id != $key && $identifier == $handler->options['group_info']['identifier']) {
return FALSE;
}
}
else {
if ($id != $key && $identifier == $handler->options['expose']['identifier']) {
return FALSE;
}
}
}
}
}
return TRUE;
}
/**
* Provide the block system with any exposed widget blocks for this display.
*/
public function getSpecialBlocks() {
$blocks = array();
if ($this->usesExposedFormInBlock()) {
$delta = '-exp-' . $this->view->storage->id() . '-' . $this->display['id'];
$desc = t('Exposed form: @view-@display_id', array('@view' => $this->view->storage->id(), '@display_id' => $this->display['id']));
$blocks[$delta] = array(
'info' => $desc,
'cache' => DRUPAL_NO_CACHE,
);
}
return $blocks;
}
/**
* Render the exposed form as block.
*
* @return string|NULL
* The rendered exposed form as string or NULL otherwise.
*/
public function viewExposedFormBlocks() {
// avoid interfering with the admin forms.
if (arg(0) == 'admin' && arg(1) == 'structure' && arg(2) == 'views') {
return;
}
$this->view->initHandlers();
if ($this->usesExposed() && $this->getOption('exposed_block')) {
$exposed_form = $this->getPlugin('exposed_form');
return $exposed_form->render_exposed_form(TRUE);
}
}
/**
* Provide some helpful text for the arguments.
* The result should contain of an array with
* - filter value present: The title of the fieldset in the argument
* where you can configure what should be done with a given argument.
* - filter value not present: The tiel of the fieldset in the argument
* where you can configure what should be done if the argument does not
* exist.
* - description: A description about how arguments comes to the display.
* For example blocks don't get it from url.
*/
public function getArgumentText() {
return array(
'filter value not present' => t('When the filter value is <em>NOT</em> available'),
'filter value present' => t('When the filter value <em>IS</em> available or a default is provided'),
'description' => t("This display does not have a source for contextual filters, so no contextual filter value will be available unless you select 'Provide default'."),
);
}
/**
* Provide some helpful text for pagers.
*
* The result should contain of an array within
* - items per page title
*/
public function getPagerText() {
return array(
'items per page title' => t('Items to display'),
'items per page description' => t('Enter 0 for no limit.')
);
}
}
/**
* @}
*/
| Java |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>basic_datagram_socket::cancel (2 of 2 overloads)</title>
<link rel="stylesheet" href="../../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../cancel.html" title="basic_datagram_socket::cancel">
<link rel="prev" href="overload1.html" title="basic_datagram_socket::cancel (1 of 2 overloads)">
<link rel="next" href="../close.html" title="basic_datagram_socket::close">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../cancel.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../boost_asio.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../close.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h5 class="title">
<a name="boost_asio.reference.basic_datagram_socket.cancel.overload2"></a><a class="link" href="overload2.html" title="basic_datagram_socket::cancel (2 of 2 overloads)">
basic_datagram_socket::cancel (2 of 2 overloads)</a>
</h5></div></div></div>
<p>
<span class="emphasis"><em>Inherited from basic_socket.</em></span>
</p>
<p>
Cancel all asynchronous operations associated with the socket.
</p>
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="identifier">cancel</span><span class="special">(</span>
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <span class="special">&</span> <span class="identifier">ec</span><span class="special">);</span>
</pre>
<p>
This function causes all outstanding asynchronous connect, send and receive
operations to finish immediately, and the handlers for cancelled operations
will be passed the boost::asio::error::operation_aborted error.
</p>
<a name="boost_asio.reference.basic_datagram_socket.cancel.overload2.parameters"></a><h6>
<a name="id2900664"></a>
<a class="link" href="overload2.html#boost_asio.reference.basic_datagram_socket.cancel.overload2.parameters">Parameters</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">ec</span></dt>
<dd><p>
Set to indicate what error occurred, if any.
</p></dd>
</dl>
</div>
<a name="boost_asio.reference.basic_datagram_socket.cancel.overload2.remarks"></a><h6>
<a name="id2900705"></a>
<a class="link" href="overload2.html#boost_asio.reference.basic_datagram_socket.cancel.overload2.remarks">Remarks</a>
</h6>
<p>
Calls to cancel() will always fail with boost::asio::error::operation_not_supported
when run on Windows XP, Windows Server 2003, and earlier versions of
Windows, unless BOOST_ASIO_ENABLE_CANCELIO is defined. However, the CancelIo
function has two issues that should be considered before enabling its
use:
</p>
<div class="itemizedlist"><ul type="disc">
<li>
It will only cancel asynchronous operations that were initiated in
the current thread.
</li>
<li>
It can appear to complete without error, but the request to cancel
the unfinished operations may be silently ignored by the operating
system. Whether it works or not seems to depend on the drivers that
are installed.
</li>
</ul></div>
<p>
For portable cancellation, consider using one of the following alternatives:
</p>
<div class="itemizedlist"><ul type="disc">
<li>
Disable asio's I/O completion port backend by defining BOOST_ASIO_DISABLE_IOCP.
</li>
<li>
Use the close() function to simultaneously cancel the outstanding operations
and close the socket.
</li>
</ul></div>
<p>
When running on Windows Vista, Windows Server 2008, and later, the CancelIoEx
function is always used. This function does not have the problems described
above.
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003 - 2008 Christopher M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overload1.html"><img src="../../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../cancel.html"><img src="../../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../boost_asio.html"><img src="../../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="../close.html"><img src="../../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
| Java |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>PHPXRef 0.7.1 : Unnamed Project : Function Reference: create_relations()</title>
<link rel="stylesheet" href="../sample.css" type="text/css">
<link rel="stylesheet" href="../sample-print.css" type="text/css" media="print">
<style id="hilight" type="text/css"></style>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000" link="#801800" vlink="#300540" alink="#ffffff">
<table class="pagetitle" width="100%">
<tr>
<td valign="top" class="pagetitle">
[ <a href="../index.html">Index</a> ]
</td>
<td align="right" class="pagetitle">
<h2 style="margin-bottom: 0px">PHP Cross Reference of Unnamed Project</h2>
</td>
</tr>
</table>
<!-- Generated by PHPXref 0.7.1 at Sat Nov 21 22:13:19 2015 -->
<!-- PHPXref (c) 2000-2010 Gareth Watts - gareth@omnipotent.net -->
<!-- http://phpxref.sourceforge.net/ -->
<script src="../phpxref.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
ext='.html';
relbase='../';
subdir='_functions';
filename='index.html';
cookiekey='phpxref';
handleNavFrame(relbase, subdir, filename);
logFunction('create_relations');
// -->
</script>
<script language="JavaScript" type="text/javascript">
if (gwGetCookie('xrefnav')=='off')
document.write('<p class="navlinks">[ <a href="javascript:navOn()">Show Explorer<\/a> ]<\/p>');
else
document.write('<p class="navlinks">[ <a href="javascript:navOff()">Hide Explorer<\/a> ]<\/p>');
</script>
<noscript>
<p class="navlinks">
[ <a href="../nav.html" target="_top">Show Explorer</a> ]
[ <a href="index.html" target="_top">Hide Navbar</a> ]
</p>
</noscript>
[<a href="../index.html">Top level directory</a>]<br>
<script language="JavaScript" type="text/javascript">
<!--
document.writeln('<table align="right" class="searchbox-link"><tr><td><a class="searchbox-link" href="javascript:void(0)" onMouseOver="showSearchBox()">Search</a><br>');
document.writeln('<table border="0" cellspacing="0" cellpadding="0" class="searchbox" id="searchbox">');
document.writeln('<tr><td class="searchbox-title">');
document.writeln('<a class="searchbox-title" href="javascript:showSearchPopup()">Search History +</a>');
document.writeln('<\/td><\/tr>');
document.writeln('<tr><td class="searchbox-body" id="searchbox-body">');
document.writeln('<form name="search" style="margin:0px; padding:0px" onSubmit=\'return jump()\'>');
document.writeln('<a class="searchbox-body" href="../_classes/index.html">Class<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="classname"><br>');
document.writeln('<a id="funcsearchlink" class="searchbox-body" href="../_functions/index.html">Function<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="funcname"><br>');
document.writeln('<a class="searchbox-body" href="../_variables/index.html">Variable<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="varname"><br>');
document.writeln('<a class="searchbox-body" href="../_constants/index.html">Constant<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="constname"><br>');
document.writeln('<a class="searchbox-body" href="../_tables/index.html">Table<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="tablename"><br>');
document.writeln('<input type="submit" class="searchbox-button" value="Search">');
document.writeln('<\/form>');
document.writeln('<\/td><\/tr><\/table>');
document.writeln('<\/td><\/tr><\/table>');
// -->
</script>
<div id="search-popup" class="searchpopup"><p id="searchpopup-title" class="searchpopup-title">title</p><div id="searchpopup-body" class="searchpopup-body">Body</div><p class="searchpopup-close"><a href="javascript:gwCloseActive()">[close]</a></p></div>
<h3>Function and Method Cross Reference</h3>
<h2><a href="index.html#create_relations">create_relations()</a></h2>
<b>Defined at:</b><ul>
<li><a href="../install/_functions_install.php.html#create_relations">/install/_functions_install.php</a> -> <a onClick="logFunction('create_relations', '/install/_functions_install.php.source.html#l781')" href="../install/_functions_install.php.source.html#l781"> line 781</a></li>
</ul>
<b>No references found.</b><br><br>
</ul>
<!-- A link to the phpxref site in your customized footer file is appreciated ;-) -->
<br><hr>
<table width="100%">
<tr><td>Generated: Sat Nov 21 22:13:19 2015</td>
<td align="right"><i>Cross-referenced by <a href="http://phpxref.sourceforge.net/">PHPXref 0.7.1</a></i></td>
</tr>
</table>
</body></html>
| Java |
<?php
namespace Nutri\IngredientBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Nutri\IngredientBundle\Entity\Ingredient;
use Nutri\IngredientBundle\Form\IngredientType;
/**
* Ingredient controller.
*
* @Route("/ingredient")
*/
class IngredientController extends Controller
{
/** ************************************************************************
* Display the Ingredient's homepage.
* @Route("/{currentPageNumber}", requirements={"currentPageNumber" = "\d+"}, defaults={"currentPageNumber" = 1})
**************************************************************************/
public function homeAction($currentPageNumber)
{
$maxIngredients = 20;
$ingredientsCount = $this->getDoctrine()
->getRepository('NutriIngredientBundle:Ingredient')
->countTotal();
$pagination = array(
'page' => $currentPageNumber,
'route' => 'nutri_ingredient_ingredient_home',
'pages_count' => ceil($ingredientsCount / $maxIngredients),
'route_params' => array()
);
$ingredients = $this->getDoctrine()->getRepository('NutriIngredientBundle:Ingredient')
->getList($currentPageNumber, $maxIngredients);
return $this->render('NutriIngredientBundle:Ingredient:home.html.twig', array(
'ingredients' => $ingredients,
'pagination' => $pagination
));
}
/** ************************************************************************
* Create a new Ingredient according to the information given in the form.
* @Route("/add")
**************************************************************************/
public function addAction()
{
$ingredient = new Ingredient();
$form = $this->createForm(new IngredientType(), $ingredient);
// ------------- Request Management ------------------------------------
$request = $this->get('request');
if ($request->getMethod() == 'POST') {
$form->bind($request);// Link Request and Form
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($ingredient);
$em->flush();
return $this->redirect($this->generateUrl('nutri_ingredient_ingredient_see', array('ingredient_id' => $ingredient->getId())));
}
}
return $this->render('NutriIngredientBundle:Ingredient:add.html.twig', array(
'form' => $form->createView(),
));
}
/** ************************************************************************
* Display a Ingredient
* @param Ingredient $ingredient
* @ParamConverter("ingredient", options={"mapping": {"ingredient_id": "id"}})
* @Route("/see/{ingredient_id}", requirements={"ingredient_id" = "\d+"})
**************************************************************************/
public function seeAction(Ingredient $ingredient)
{
return $this->render('NutriIngredientBundle:Ingredient:see.html.twig', array(
'ingredient' => $ingredient,
));
}
/** ************************************************************************
* Modify a Ingredient according to the information given in the form.
*
* @param Ingredient $ingredient
* @ParamConverter("ingredient", options={"mapping": {"ingredient_id": "id"}})
* @Route("/modify/{ingredient_id}", requirements={"ingredient_id" = "\d+"})
**************************************************************************/
public function modifyAction(Ingredient $ingredient)
{
$form = $this->createForm(new IngredientType($ingredient), $ingredient);
// ------------- Request Management ------------------------------------
$request = $this->get('request');
if ($request->getMethod() == 'POST') {
$form->bind($request); // Link Request and Form
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($ingredient);
$em->flush();
return $this->redirect($this->generateUrl('nutri_ingredient_ingredient_see', array('ingredient_id' => $ingredient->getId())));
}
}
return $this->render('NutriIngredientBundle:Ingredient:modify.html.twig', array(
'ingredient' => $ingredient,
'form' => $form->createView(),
));
}
/** ************************************************************************
* Delete a Ingredient.
*
* @param Ingredient $ingredient
* @ParamConverter("ingredient", options={"mapping": {"ingredient_id": "id"}})
* @Route("/delete/{ingredient_id}", requirements={"ingredient_id" = "\d+"})
**************************************************************************/
public function deleteAction(Ingredient $ingredient)
{
$request = $this->get('request');
if ($request->getMethod() == 'POST') {
$em = $this->getDoctrine()->getManager();
$em->remove($ingredient);
$em->flush();
return $this->redirect($this->generateUrl(/* Redirect to some page */));
}
else{
throw new \Symfony\Component\Security\Core\Exception\AccessDeniedException;
}
}
/** ************************************************************************
* Ajax function.
*
* @Route("/search")
* @Method({"POST","GET"})
**************************************************************************/
public function searchAction()
{
$name = $this->get('request')->request->get('name');
$nameStringArray = explode(' ',$name);
$searchInCiqual = ($this->get('request')->request->get('ciqual') === 'true');
$searchInOpenFoodFact = ($this->get('request')->request->get('openfoodfact') === 'true');
$em = $this->getDoctrine()->getManager();
$qb = $em->createQueryBuilder();
$qb->select('i');
$qb->from("NutriIngredientBundle:Ingredient",'i');
foreach($nameStringArray as $key=>$nameString) {
$qb->andWhere($qb->expr()->like('i.name', ':nameSearched_'.$key));
$qb->setParameter(':nameSearched_'.$key, '%'.$nameString.'%');
}
if(!$searchInCiqual) {
$qb->andWhere($qb->expr()->isNull('i.ciqualcode'));
}
if(!$searchInOpenFoodFact) {
$qb->andWhere($qb->expr()->isNull('i.barcode'));
}
$qb->orderBy('i.name');
$ingredientArray = $qb->getQuery()->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
return $this->render('NutriIngredientBundle:Ingredient:searchResultDisplay.html.twig', array(
'ingredients' => $ingredientArray,
));
}
}
| Java |
class Java::Util::ArrayList < Array
overload_protected {
include Java::Util::JavaList
}
class Iterator
def initialize(array, from_index = 0, to_index = nil)
@array = array
@index = from_index
@to_index = to_index || @array.size
end
def has_next
@index < @to_index
end
def next_
entry = @array[@index]
@index += 1
entry
end
def remove
@index -= 1
@to_index -= 1
@array.delete_at @index
end
end
class SubList
def initialize(parent_list, from_index, to_index)
@parent_list = parent_list
@from_index = from_index
@to_index = to_index
end
def size
@to_index - @from_index
end
def iterator
Iterator.new @parent_list, @from_index, @to_index
end
end
def initialize(data = nil)
case data
when nil
# do nothing
when Array
self.concat data
when Integer
# initial capacity, ignored
else
raise ArgumentError
end
end
alias_method :add, :<<
alias_method :get, :[]
alias_method :contains, :include?
alias_method :is_empty, :empty?
def add(a1, a2 = nil)
if a2
self.insert a1, a2
else
self << a1
end
end
def remove(o)
if o.is_a? Integer
delete_at o
else
delete o
end
end
def index_of(e)
index(e) || -1
end
def to_a
self
end
def to_array(target_array = nil)
target_array ||= Array.typed(Object).new
if target_array.size <= self.size
target_array.replace self
else
target_array[0, self.size] = self
target_array[self.size] = nil
end
target_array
end
def iterator
Iterator.new self
end
def sub_list(from_index, to_index)
SubList.new self, from_index, to_index
end
def remove_all(list)
delete_if { |item| list.include? item }
end
end
| Java |
<?php
function ___main___()
{
$descriptor = json_decode(file_get_contents(dirname(dirname(dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))))) . '/program.json'), true);
$versions = json_decode(file_get_contents(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/workspace/packages/test/etc/versions.json'), true);
$urls = json_decode(file_get_contents(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/workspace/packages/test/etc/urls.json'), true);
$url = str_replace('%%VERSION%%', $versions['ZendFramework'][$descriptor['implements']['github.com/firephp/firephp/workspace/packages/test/0.1']['dependencies']['ZendFramework']], $urls['ZendFramework']);
$path = dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/workspace/.pinf-packages/downloads/packages/' . substr($url, strpos($url, '/') + 2) . "~pkg/library";
set_include_path('.' . PATH_SEPARATOR . $path);
date_default_timezone_set('America/Vancouver');
}
___main___();
// @see http://framework.zend.com/manual/1.11/en/learning.autoloading.usage.html
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Wildfire
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
/* NOTE: You must have Zend Framework in your include path! */
/*
* Add our Firebug Log Writer to the registry
*/
require_once 'Zend/Registry.php';
require_once 'Zend/Log.php';
require_once 'Zend/Log/Writer/Firebug.php';
$writer = new Zend_Log_Writer_Firebug();
$writer->setPriorityStyle(8, 'TABLE');
$writer->setPriorityStyle(9, 'TRACE');
$logger = new Zend_Log($writer);
$logger->addPriority('TABLE', 8);
$logger->addPriority('TRACE', 9);
Zend_Registry::set('logger',$logger);
/*
* Add our Firebug DB Profiler to the registry
*/
require_once 'Zend/Db.php';
require_once 'Zend/Db/Profiler/Firebug.php';
$profiler = new Zend_Db_Profiler_Firebug('All DB Queries');
$db = Zend_Db::factory('PDO_SQLITE',
array('dbname' => ':memory:',
'profiler' => $profiler));
$db->getProfiler()->setEnabled(true);
Zend_Registry::set('db',$db);
/*
* Run the front controller
*/
require_once 'Zend/Controller/Front.php';
Zend_Controller_Front::run(dirname(dirname(__FILE__)).'/application/controllers');
| Java |
<div id="page-wrapper" >
<div id="page-inner">
<!-- Row de Titulos -->
<div class="row">
<div class="col-lg-6">
<div class="input-group">
<input type="text" class="form-control" placeholder="Buscar por Palabras Clave">
<span class="input-group-btn">
<button class="btn btn-default glyphicon glyphicon-search" type="button"></button>
</span>
</div>
</div>
<br />
<hr />
<!-- paginacion de videos -->
<div class="col-md-12">
<?php
if ($material){
echo $material;
}
else {
echo 'No Hay Nada Que Mostrar';
}
?>
</div>
<br />
<div align='center' class="col-sm-6 col-md-12">
<?=$pagination?>
</div>
<!-- END paginacion de videos -->
<!-- /. row -->
</div>
<!-- /. PAGE INNER -->
</div> | Java |
using NPOI.HSSF.UserModel;
using NPOI.HSSF.Util;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
namespace NoRain.Toolkits
{
public class XMLOutputTool
{
private static Type[] _valueTypes = new[] { typeof(bool),typeof(byte),typeof(sbyte),typeof(char) ,typeof(decimal),
typeof(double),typeof(float),typeof(int),typeof(uint),typeof(long),typeof(ulong),typeof(object),typeof(short),typeof(ushort),typeof(string)};
private static Type[] _numTypes = new[] {typeof(byte),typeof(sbyte) ,typeof(decimal),
typeof(double),typeof(float),typeof(int),typeof(uint),typeof(long),typeof(ulong),typeof(short),typeof(ushort)};
/// <summary>
/// 导出数据为Excel文件
/// </summary>
/// <param name="items">数据源</param>
public static void HandleItems<T>(IEnumerable<T> items, string tabelName) where T : class
{
var response = HttpContext.Current.Response;
string filename = "test.xlsx";
response.Clear();
response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
response.AddHeader("Content-Disposition", string.Format("attachment;filename={0}", filename));
XSSFWorkbook workbook = new XSSFWorkbook();
ISheet sheet1 = workbook.CreateSheet("Sheet1");
if (items == null || items.Count() == 0)
{
response.Write("无相关记录");
response.Flush();
response.End();
}
var item = items.ToList()[0];
Type t = item.GetType();
var fields = t.GetFields();
var properties = t.GetProperties();
ICellStyle style = workbook.CreateCellStyle();
style.Alignment = HorizontalAlignment.Center;
IFont font = workbook.CreateFont();
font.FontHeightInPoints = 12;
font.FontHeight = 20;
font.Boldweight = 600;
style.SetFont(font);
//标题行
var titleCell = sheet1.CreateRow(0).CreateCell(0);
titleCell.SetCellValue(tabelName ?? "统计报表");
titleCell.CellStyle = style;
//合并首行标题
sheet1.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(0, 0, 0, fields.Length + properties.Length - 1));
//列名
var headRow = sheet1.CreateRow(1);
foreach (var f in fields)
{
var cell = headRow.CreateCell(fields.ToList().IndexOf(f));
cell.SetCellValue(f.Name);
}
foreach (var f in properties)
{
var cell = headRow.CreateCell(properties.ToList().IndexOf(f));
cell.SetCellValue(f.Name);
}
foreach (var obj in items)
{
var itemRow = sheet1.CreateRow(2 + items.ToList().IndexOf(obj));
foreach (var f in fields)
{ //判断单元格类型
var cellType = CellType.Blank;
//数字
if (_numTypes.Contains(f.FieldType)) cellType = CellType.Numeric;
var itemCell = itemRow.CreateCell(fields.ToList().IndexOf(f), cellType);
if (_valueTypes.Contains(f.FieldType)) itemCell.SetCellValue(f.GetValue(obj).ToString());
else if (f.GetType() == typeof(DateTime) || f.GetType() == typeof(DateTime?)) itemCell.SetCellValue(f.GetValue(obj).ToString());
}
foreach (var f in properties)
{
//判断单元格类型
var cellType = CellType.Blank;
//数字
if (_numTypes.Contains(f.PropertyType)) cellType = CellType.Numeric;
////日期
//else if (f.GetType() == typeof(DateTime) || f.GetType() == typeof(DateTime?)) cellType=CellType.d;
var itemCell = itemRow.CreateCell(fields.Length + properties.ToList().IndexOf(f), cellType);
if (_valueTypes.Contains(f.PropertyType)) itemCell.SetCellValue(f.GetValue(obj, null).ToString());
else if (f.GetType() == typeof(DateTime) || f.GetType() == typeof(DateTime?)) itemCell.SetCellValue(f.GetValue(obj, null).ToString());
}
}
using (var f = File.Create(@"d:\test.xlsx"))
{
workbook.Write(f);
}
response.WriteFile(@"d:\test.xlsx");
//http://social.msdn.microsoft.com/Forums/en-US/3a7bdd79-f926-4a5e-bcb0-ef81b6c09dcf/responseoutputstreamwrite-writes-all-but-insetrs-a-char-every-64k?forum=ncl
//workbook.Write(Response.OutputStream); cannot be used
//root cause: Response.OutputStream will insert unnecessary byte into the response bytes.
response.Flush();
response.End();
}
/// <summary>
/// 导出数据为Excel文件
/// </summary>
/// <param name="items">数据源</param>
/// <param name="nameFields">列对应的名称</param>
public static void HandleItems(IEnumerable<dynamic> items, Dictionary<string, string> nameFields)
{
}
}
}
| Java |
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Reflection;
using HazTech.Json.Utilities;
using System.Globalization;
namespace HazTech.Json.Serialization
{
/// <summary>
/// Get and set values for a <see cref="MemberInfo"/> using reflection.
/// </summary>
public class ReflectionValueProvider : IValueProvider
{
private readonly MemberInfo _memberInfo;
/// <summary>
/// Initializes a new instance of the <see cref="ReflectionValueProvider"/> class.
/// </summary>
/// <param name="memberInfo">The member info.</param>
public ReflectionValueProvider(MemberInfo memberInfo)
{
ValidationUtils.ArgumentNotNull(memberInfo, "memberInfo");
_memberInfo = memberInfo;
}
/// <summary>
/// Sets the value.
/// </summary>
/// <param name="target">The target to set the value on.</param>
/// <param name="value">The value to set on the target.</param>
public void SetValue(object target, object value)
{
try
{
ReflectionUtils.SetMemberValue(_memberInfo, target, value);
}
catch (Exception ex)
{
throw new JsonSerializationException("Error setting value to '{0}' on '{1}'.".FormatWith(CultureInfo.InvariantCulture, _memberInfo.Name, target.GetType()), ex);
}
}
/// <summary>
/// Gets the value.
/// </summary>
/// <param name="target">The target to get the value from.</param>
/// <returns>The value.</returns>
public object GetValue(object target)
{
try
{
return ReflectionUtils.GetMemberValue(_memberInfo, target);
}
catch (Exception ex)
{
throw new JsonSerializationException("Error getting value from '{0}' on '{1}'.".FormatWith(CultureInfo.InvariantCulture, _memberInfo.Name, target.GetType()), ex);
}
}
}
} | Java |
// **********************************************************************
//
// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
#include <Ice/Ice.h>
#include <ThroughputI.h>
using namespace std;
class ThroughputServer : public Ice::Application
{
public:
virtual int run(int, char*[]);
};
int
main(int argc, char* argv[])
{
ThroughputServer app;
return app.main(argc, argv, "config.server");
}
int
ThroughputServer::run(int argc, char*[])
{
if(argc > 1)
{
cerr << appName() << ": too many arguments" << endl;
return EXIT_FAILURE;
}
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Throughput");
Demo::ThroughputPtr servant = new ThroughputI;
adapter->add(servant, communicator()->stringToIdentity("throughput"));
adapter->activate();
communicator()->waitForShutdown();
return EXIT_SUCCESS;
}
| Java |
# This file shows how to program a computer to calculate
# logarithms and powers, without a calculator.
# The benefit of this method is that it does not
# require any multiplications. It can be implemented
# entirely with shift and additions. Therefore, it
# is well suited for a FPGA.
# TODO: Change the logarithms, so they are base 2 instead of base 20
# TODO: Change all floating point numbers to fixed point numbers.
# Use Newton's method to calculate square roots.
def msqrt(x)
res = 1.0;
begin
delta = (x/res - res)*0.5;
res += delta;
max_err = res * Float::EPSILON;
end while delta > max_err or delta < -max_err;
return res;
end
# This is the method used to calculate the below table of logarithms.
def make_log_2_5()
pow = 1.0;
pow_2 = (Float::DIG+1)/0.301
pow_2.to_i.times do
$log_2_5 << Math.log10(1.0+pow)
pow *= 0.5
end
end
# This table contains log_10(2), log_10(1.5), log_10(1.25), log_10(1.125), etc.
$log_2_5 = [
0.3010299956639812,
0.17609125905568124,
0.09691001300805642,
0.05115252244738129,
0.026328938722349145,
0.013363961557981502,
0.006733382658968403,
0.003379740651380597,
0.0016931580194449753,
0.0008474041359855164,
0.00042390875196115195,
0.00021200609740185334,
0.00010601598536797005,
5.30112276402169e-05,
2.6506422657881923e-05,
1.3253413550725743e-05,
6.626757332351867e-06,
3.3133913056160403e-06,
1.6566988126921545e-06,
8.283501963201243e-07,
4.141752956539506e-07,
2.0708769720049452e-07,
1.0354386094363294e-07,
5.1771933557663626e-08,
2.5885967550293695e-08,
1.2942983968012329e-08,
6.471492032222536e-09,
3.2357460281653614e-09,
1.6178730170962039e-09,
8.089365093014828e-10,
4.044682548390866e-10,
2.022341274666296e-10,
1.0111706374508637e-10,
5.055853187548608e-11,
2.5279265938478767e-11,
1.2639632969423313e-11,
6.3198164847576394e-12,
3.1599082423903154e-12,
1.5799541211980316e-12,
7.899770605997343e-13,
3.9498853030004676e-13,
1.9749426515006829e-13,
9.874713257504538e-14,
4.937356628752549e-14,
2.468678314376345e-14,
1.23433915718819e-14,
6.171695785940993e-15,
3.0858478929705076e-15,
1.5429239464852566e-15,
7.71461973242629e-16,
3.857309866213147e-16,
1.9286549331065737e-16,
9.64327466553287e-17
]
def pow_10(x)
res = 1.0
while x >= $log_2_5[0]
res *= 2.0
x -= $log_2_5[0]
end
while x < 0
res *= 0.5
x += $log_2_5[0]
end
# Now x is between 0 and log(2)
fact = 1.0
$log_2_5.each {|val|
if (x >= val)
res *= (1 + fact)
x -= val
end
fact *= 0.5
}
return res;
end
def log_10(x)
if x <= 0
return Float::NAN
end
# Now x is positive
#
res = 0.0
while x >= 2.0
x *= 0.5
res += $log_2_5[0]
end
while x < 1.0
x *= 2.0
res -= $log_2_5[0]
end
# Now x is between 1 and 2
fact = 1.0
temp = 1.0
$log_2_5.each {|delt|
temp2 = temp * (1 + fact)
if x >= temp2
temp = temp2
res += delt
end
fact *= 0.5
}
return res
end
def test_func(xmin, xmax, xstep, f1, f2)
puts "Testing in the range #{xmin} to #{xmax} in steps of #{xstep}"
max_diff = 0.0
max_x = 0.0
(0..((xmax-xmin)/xstep).to_i).each {|i|
x = i*xstep + xmin;
app = method(f1).call(x)
re = method(f2).call(x)
diff = (app - re)/re
if diff < 0
diff = -diff
end
if diff > max_diff
max_x = x
max_diff = diff
end
}
return max_x, max_diff
end
def pow_10_math(x)
return 10.0**x
end
def test_pow_10
puts "Testing pow_10"
max_x, max_diff = test_func(-5.0, 5.0, 0.001, :pow_10, :pow_10_math)
puts "#{max_x}, #{max_diff}"
end
def log_10_math(x)
return Math::log10(x)
end
def test_log_10
puts "Testing log_10"
max_x, max_diff = test_func(0.10, 100.0, 0.01, :log_10, :log_10_math)
puts "#{max_x}, #{max_diff}"
end
test_pow_10
test_log_10
| Java |
#include "locked_queue.h" | Java |
<?php
// Just some basics.
$per_page_limit = 20;
// get all forms
$forms = Caldera_Forms::get_forms();
$forms = apply_filters( 'caldera_forms_admin_forms', $forms );
$style_includes = get_option( '_caldera_forms_styleincludes' );
if(empty($style_includes)){
$style_includes = array(
'alert' => true,
'form' => true,
'grid' => true,
);
update_option( '_caldera_forms_styleincludes', $style_includes);
}
// load fields
//$field_types = apply_filters( 'caldera_forms_get_field_types', array() );
// create user modal buttons
$modal_new_form = __('Create Form', 'caldera-forms').'|{"data-action" : "create_form", "data-active-class": "disabled", "data-load-class": "disabled", "data-callback": "new_form_redirect", "data-before" : "serialize_modal_form", "data-modal-autoclose" : "new_form" }';
?><div class="caldera-editor-header">
<ul class="caldera-editor-header-nav">
<li class="caldera-editor-logo">
<span class="dashicons-cf-logo"></span>
<?php _e('Caldera Forms', 'caldera-forms'); ?>
</li>
<li class="caldera-forms-version">
v<?php echo CFCORE_VER; ?>
</li>
<li class="caldera-forms-toolbar-item">
<a class="button ajax-trigger" data-request="start_new_form" data-modal-buttons='<?php echo $modal_new_form; ?>' data-modal-width="600" data-modal-height="400" data-load-class="none" data-modal="new_form" data-modal-title="<?php echo __('Create New Form', 'caldera-forms'); ?>" data-template="#new-form-tmpl"><?php echo __('New Form', 'caldera-forms'); ?></a>
</li>
<li class="caldera-forms-toolbar-item">
<a class="button ajax-trigger" data-request="start_new_form" data-modal-width="400" data-modal-height="192" data-modal-element="div" data-load-class="none" data-modal="new_form" data-template="#import-form-tmpl" data-modal-title="<?php echo __('Import Form', 'caldera-forms'); ?>" ><?php echo __('Import', 'caldera-forms'); ?></a>
</li>
<li class="caldera-forms-toolbar-item">
</li>
<li class="caldera-forms-headtext">
<?php echo __('Front-end Style Includes', 'caldera-forms'); ?>
</li>
<li class="caldera-forms-toolbar-item">
<div class="toggle_option_preview">
<button type="button" title="<?php echo __('Includes Bootstrap 3 styles on the frontend for form alert notices', 'caldera-forms'); ?>" data-action="save_cf_setting" data-active-class="none" data-set="alert" data-callback="update_setting_toggle" class="ajax-trigger setting_toggle_alert button <?php if(!empty($style_includes['alert'])){ ?>button-primary<?php } ?>"><?php echo __('Alert' , 'caldera-forms'); ?></button>
<button type="button" title="<?php echo __('Includes Bootstrap 3 styles on the frontend for form fields and buttons', 'caldera-forms'); ?>" data-action="save_cf_setting" data-active-class="none" data-set="form" data-callback="update_setting_toggle" class="ajax-trigger setting_toggle_form button <?php if(!empty($style_includes['form'])){ ?>button-primary<?php } ?>"><?php echo __('Form' , 'caldera-forms'); ?></button>
<button type="button" title="<?php echo __('Includes Bootstrap 3 styles on the frontend for form grid layouts', 'caldera-forms'); ?>" data-action="save_cf_setting" data-active-class="none" data-set="grid" data-callback="update_setting_toggle" class="ajax-trigger setting_toggle_grid button <?php if(!empty($style_includes['grid'])){ ?>button-primary<?php } ?>"><?php echo __('Grid' , 'caldera-forms'); ?></button>
</div>
</li>
<li class="caldera-forms-toolbar-item">
</li>
</ul>
</div>
<div class="form-admin-page-wrap">
<div class="form-panel-wrap">
<?php if(!empty($forms)){ ?>
<table class="widefat fixed">
<thead>
<tr>
<th><?php _e('Form', 'caldera-forms'); ?></th>
<th style="width:5em; text-align:center;"><?php _e('Entries', 'caldera-forms'); ?></th>
</tr>
</thead>
<tbody>
<?php
global $wpdb;
$class = "alternate";
foreach($forms as $form_id=>$form){
if( !empty( $form['hidden'] ) ){
continue;
}
if(!empty($form['db_support'])){
$total = $wpdb->get_var($wpdb->prepare("SELECT COUNT(`id`) AS `total` FROM `" . $wpdb->prefix . "cf_form_entries` WHERE `form_id` = %s && `status` = 'active';", $form_id));
}else{
$total = __('Disabled', 'caldera-forms');
}
?>
<tr id="form_row_<?php echo $form_id; ?>" class="<?php echo $class; ?> form_entry_row">
<td class="<?php if( !empty( $form['form_draft'] ) ) { echo 'draft-form'; }else{ echo 'active-form'; } ?>">
<?php echo $form['name']; ?>
<?php if( !empty( $form['debug_mailer'] ) ) { ?>
<span style="color: rgb(207, 0, 0);" class="description"><?php _e('Mailer Debug enabled.', 'caldera-forms') ;?></span>
<?php } ?>
<div class="row-actions">
<?php if( empty( $form['_external_form'] ) ){ ?><span class="edit"><a class="form-control" href="admin.php?page=caldera-forms&edit=<?php echo $form_id; ?>"><?php echo __('Edit'); ?></a> | </span>
<span class="edit"><a class="form-control ajax-trigger" href="#entres"
data-load-element="#form_row_<?php echo $form_id; ?>"
data-action="toggle_form_state"
data-active-element="#form_row_<?php echo $form_id; ?>"
data-callback="set_form_state"
data-form="<?php echo $form_id; ?>"
><?php if( !empty( $form['form_draft'] ) ) { echo __('Activate', 'caldera-forms'); }else{ echo __('Deactivate', 'caldera-forms'); } ?></a> | </span><?php } ?>
<?php if(!empty($form['db_support'])){ ?><span class="edit"><a class="form-control form-entry-trigger ajax-trigger" href="#entres"
data-action="browse_entries"
data-target="#form-entries-viewer"
data-form="<?php echo $form_id; ?>"
data-template="#forms-list-alt-tmpl"
data-active-element="#form_row_<?php echo $form_id; ?>"
data-load-class="spinner"
data-active-class="highlight"
data-group="entry_nav"
data-callback="setup_pagination"
data-status="active"
data-page="1"
><?php echo __('Entries', 'caldera-forms'); ?></a> | </span><?php } ?>
<?php if( empty( $form['_external_form'] ) ){ ?><span class="export"><a class="form-control" href="admin.php?page=caldera-forms&export-form=<?php echo $form_id; ?>&cal_del=<?php echo wp_create_nonce( 'cf_del_frm' ); ?>"><?php echo __('Export', 'caldera-forms'); ?></a> | </span><?php } ?>
<span><a class="ajax-trigger" href="#clone" data-request="start_new_form" data-modal-buttons='<?php echo $modal_new_form; ?>' data-clone="<?php echo $form_id; ?>" data-modal-width="600" data-modal-height="400" data-load-class="none" data-modal="new_form" data-modal-title="<?php echo __('Clone Form', 'caldera-forms'); ?>" data-template="#new-form-tmpl"><?php echo __('Clone', 'caldera-forms'); ?></a><?php if( empty( $form['_external_form'] ) ){ ?> | </span>
<span class="trash form-delete"><a class="form-control" data-confirm="<?php echo __('This will delete this form permanently. Continue?', 'caldera-forms'); ?>" href="admin.php?page=caldera-forms&delete=<?php echo $form_id; ?>&cal_del=<?php echo wp_create_nonce( 'cf_del_frm' ); ?>"><?php echo __('Delete'); ?></a></span><?php } ?>
</div>
</td>
<td style="width:4em; text-align:center;" class="entry_count_<?php echo $form_id; ?>"><?php echo $total; ?></td>
</tr>
<?php
if($class == 'alternate'){
$class = '';
}else{
$class = "alternate";
}
}
?></tbody>
</table>
<?php }else{ ?>
<p><?php echo __('You don\'t have any forms.', 'caldera-forms'); ?></p>
<?php } ?>
</div>
<div class="form-entries-wrap">
<?php include CFCORE_PATH . 'ui/entries_toolbar.php'; ?>
<div id="form-entries-viewer"></div>
</div>
</div>
<?php
do_action('caldera_forms_admin_templates');
?>
<script type="text/javascript">
function set_form_state( obj ){
if( true === obj.data.success ){
var row = jQuery('#form_row_' + obj.data.data.ID + '>td');
row.first().attr('class', obj.data.data.state );
obj.params.trigger.text( obj.data.data.label );
}
}
function new_form_redirect(obj){
if(typeof obj.data === 'string'){
window.location = 'admin.php?page=caldera-forms&edit=' + obj.data;
}else{
alert(obj.data.error);
}
}
// profile form saver
function serialize_modal_form(el){
var clicked = jQuery(el),
data = jQuery('#new_form_baldrickModal'),
name = data.find('.new-form-name');
//verify name is set
if(name.val().length < 1){
alert("<?php echo __('An form name is required', 'caldera-forms'); ?>");
name.focus().addClass('has-error');
return false;
}
clicked.data('data', data.serialize());
return true;
}
function update_setting_toggle(obj){
for( var k in obj.data){
if(obj.data[k] === true){
jQuery('.setting_toggle_' + k).addClass('button-primary');
}else{
jQuery('.setting_toggle_' + k).removeClass('button-primary');
}
}
//for()
}
function extend_fail_notice(el){
jQuery("#extend_cf_baldrickModalBody").html('<div class="alert error"><p><?php echo __('Looks like something is not working. Please try again a little later or post to the <a href="http://wordpress.org/support/plugin/caldera-forms" target="_blank">support forum</a>.', 'caldera-forms'); ?></p></div>');
}
function start_new_form(obj){
if( obj.trigger.data('clone') ){
return {clone: obj.trigger.data('clone') };
}
return {};
}
</script>
<?php
include CFCORE_PATH . 'ui/entry_navigation.php';
do_action('caldera_forms_admin_footer');
?>
| Java |
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <main id="main">
*
* @package GeneratePress
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<?php if ( ! function_exists( '_wp_render_title_tag' ) ) : ?>
<title><?php wp_title( '|', true, 'right' ); ?></title>
<?php endif; ?>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body <?php generate_body_schema();?> <?php body_class(); ?>>
<?php do_action( 'generate_before_header' ); ?>
<a class="screen-reader-text skip-link" href="#content" title="<?php esc_attr_e( 'Skip to content', 'generate' ); ?>"><?php _e( 'Skip to content', 'generate' ); ?></a>
<header itemtype="http://schema.org/WPHeader" itemscope="itemscope" id="masthead" <?php generate_header_class(); ?>>
<div <?php generate_inside_header_class(); ?>>
<?php do_action( 'generate_before_header_content'); ?>
<?php generate_header_items(); ?>
<?php do_action( 'generate_after_header_content'); ?>
</div><!-- .inside-header -->
</header><!-- #masthead -->
<?php do_action( 'generate_after_header' ); ?>
<div id="page" class="hfeed site grid-container container grid-parent">
<div id="content" class="site-content">
<?php do_action('generate_inside_container'); ?> | Java |
# See bottom of file for license and copyright information
package Foswiki::Configure::Checkers::Cache::DependencyFilter;
use strict;
use warnings;
use Foswiki::Configure::Checker ();
our @ISA = ('Foswiki::Configure::Checker');
sub check {
my $this = shift;
my $e = $this->showExpandedValue( $Foswiki::cfg{Cache}{DependencyFilter} );
return $e unless $Foswiki::cfg{Cache}{Enabled};
return $e . $this->checkRE('{Cache}{DependencyFilter}');
}
1;
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2008-2010 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
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. For
more details read LICENSE in the root of this distribution.
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.
As per the GPL, removal of this notice is prohibited.
| Java |
//
// NXTableView.h
// GestureOnTableViewCell
//
// Created by CornerZhang on 14-9-15.
// Copyright (c) 2014年 NeXtreme.com. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface NXTableView : UITableView <UITableViewDataSource, UITableViewDelegate>
@end
| Java |
<?php
declare(strict_types=1);
class CommentListTest extends ShimmiePHPUnitTestCase
{
public function setUp(): void
{
global $config;
parent::setUp();
$config->set_int("comment_limit", 100);
$this->log_out();
}
public function tearDown(): void
{
global $config;
$config->set_int("comment_limit", 10);
parent::tearDown();
}
public function testCommentsPage()
{
global $user;
$this->log_in_as_user();
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
# a good comment
send_event(new CommentPostingEvent($image_id, $user, "Test Comment ASDFASDF"));
$this->get_page("post/view/$image_id");
$this->assert_text("ASDFASDF");
# dupe
try {
send_event(new CommentPostingEvent($image_id, $user, "Test Comment ASDFASDF"));
} catch (CommentPostingException $e) {
$this->assertStringContainsString("try and be more original", $e->getMessage());
}
# empty comment
try {
send_event(new CommentPostingEvent($image_id, $user, ""));
} catch (CommentPostingException $e) {
$this->assertStringContainsString("Comments need text", $e->getMessage());
}
# whitespace is still empty...
try {
send_event(new CommentPostingEvent($image_id, $user, " \t\r\n"));
} catch (CommentPostingException $e) {
$this->assertStringContainsString("Comments need text", $e->getMessage());
}
# repetitive (aka. gzip gives >= 10x improvement)
try {
send_event(new CommentPostingEvent($image_id, $user, str_repeat("U", 5000)));
} catch (CommentPostingException $e) {
$this->assertStringContainsString("Comment too repetitive", $e->getMessage());
}
# test UTF8
send_event(new CommentPostingEvent($image_id, $user, "Test Comment むちむち"));
$this->get_page("post/view/$image_id");
$this->assert_text("むちむち");
# test that search by comment metadata works
// $this->get_page("post/list/commented_by=test/1");
// $this->assert_title("Image $image_id: pbx");
// $this->get_page("post/list/comments=2/1");
// $this->assert_title("Image $image_id: pbx");
$this->log_out();
$this->get_page('comment/list');
$this->assert_title('Comments');
$this->assert_text('ASDFASDF');
$this->get_page('comment/list/2');
$this->assert_title('Comments');
$this->log_in_as_admin();
$this->delete_image($image_id);
$this->log_out();
$this->get_page('comment/list');
$this->assert_title('Comments');
$this->assert_no_text('ASDFASDF');
}
public function testSingleDel()
{
global $database, $user;
$this->log_in_as_admin();
$image_id = $this->post_image("tests/pbx_screenshot.jpg", "pbx");
# make a comment
send_event(new CommentPostingEvent($image_id, $user, "Test Comment ASDFASDF"));
$this->get_page("post/view/$image_id");
$this->assert_text("ASDFASDF");
# delete a comment
$comment_id = (int)$database->get_one("SELECT id FROM comments");
send_event(new CommentDeletionEvent($comment_id));
$this->get_page("post/view/$image_id");
$this->assert_no_text("ASDFASDF");
}
}
| Java |
#ifndef VALUESCOPE_H_
#define VALUESCOPE_H_
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "ValueEntry.h"
#include "types/Type.h"
namespace semantic_analyzer {
class ValueScope {
public:
bool insertSymbol(std::string name, const type::Type& type, translation_unit::Context context);
void insertFunctionArgument(std::string name, const type::Type& type, translation_unit::Context context);
ValueEntry createTemporarySymbol(type::Type type);
bool isSymbolDefined(std::string symbolName) const;
ValueEntry lookup(std::string name) const;
std::map<std::string, ValueEntry> getSymbols() const;
std::vector<ValueEntry> getArguments() const;
private:
std::vector<ValueEntry> arguments;
std::map<std::string, ValueEntry> localSymbols;
};
} // namespace semantic_analyzer
#endif // VALUESCOPE_H_
| Java |
cmd_drivers/mtd/lpddr/built-in.o := rm -f drivers/mtd/lpddr/built-in.o; mips-openwrt-linux-uclibc-ar rcsD drivers/mtd/lpddr/built-in.o
| Java |
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Drupal SimpleTest: TestOfExceptionThrownInSetUpDoesNotRunTestBody Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>TestOfExceptionThrownInSetUpDoesNotRunTestBody Class Reference</h1><!-- doxytag: class="TestOfExceptionThrownInSetUpDoesNotRunTestBody" --><!-- doxytag: inherits="UnitTestCase" --><div class="dynheader">
Inheritance diagram for TestOfExceptionThrownInSetUpDoesNotRunTestBody:</div>
<div class="dynsection">
<div class="center">
<img src="class_test_of_exception_thrown_in_set_up_does_not_run_test_body.gif" usemap="#TestOfExceptionThrownInSetUpDoesNotRunTestBody_map" alt=""/>
<map id="TestOfExceptionThrownInSetUpDoesNotRunTestBody_map" name="TestOfExceptionThrownInSetUpDoesNotRunTestBody_map">
<area href="class_unit_test_case.html" alt="UnitTestCase" shape="rect" coords="0,0,311,24"/>
</map>
</div>
</div>
<p><a href="class_test_of_exception_thrown_in_set_up_does_not_run_test_body-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c949f31295e4def2d5991c8671f8f9a"></a><!-- doxytag: member="TestOfExceptionThrownInSetUpDoesNotRunTestBody::setUp" ref="a5c949f31295e4def2d5991c8671f8f9a" args="()" -->
</td><td class="memItemRight" valign="bottom"><b>setUp</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae32b9c8a8fb7c414a1a3f6489b54ab80"></a><!-- doxytag: member="TestOfExceptionThrownInSetUpDoesNotRunTestBody::testShouldNotBeRun" ref="ae32b9c8a8fb7c414a1a3f6489b54ab80" args="()" -->
</td><td class="memItemRight" valign="bottom"><b>testShouldNotBeRun</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0c188e31b815e74fb52ca413db2ffa99"></a><!-- doxytag: member="TestOfExceptionThrownInSetUpDoesNotRunTestBody::testShouldNotBeRunEither" ref="a0c188e31b815e74fb52ca413db2ffa99" args="()" -->
</td><td class="memItemRight" valign="bottom"><b>testShouldNotBeRunEither</b> ()</td></tr>
</table>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/Applications/MAMP/htdocs/drump/drupalcodedump.com/sites/all/modules/simpletest/simpletest/test/exceptions_test.php</li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Dec 16 16:15:31 2009 for Drupal SimpleTest by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>
| Java |
//-*-c++-*-
// ====================================================================
// ====================================================================
//
// Module: opt_ssa.h
// $Revision: 1.99 $
// $Date: 2000/04/06 15:25:34 $
// $Author: dlstephe $
// $Source: /isms/cmplrs.src/osprey1.0/be/opt/RCS/opt_ssa.h,v $
//
// Revision history:
// 4-OCT-94 shin - Original Version
//
// ====================================================================
//
/*
Copyright (C) 2001 Tensilica, Inc. All Rights Reserved.
Revised to support Tensilica processors and to improve overall performance
*/
//
// Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of version 2 of the GNU General Public License as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it would be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// Further, this software is distributed without any warranty that it
// is free of the rightful claim of any third person regarding
// infringement or the like. Any license provided herein, whether
// implied or otherwise, applies only to this software file. Patent
// licenses, if any, provided herein do not apply to combinations of
// this program with other software, or any other product whatsoever.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
//
// Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky,
// Mountain View, CA 94043, or:
//
// http://www.sgi.com
//
// For further information regarding this notice, see:
//
// http://oss.sgi.com/projects/GenInfo/NoticeExplan
//
// ====================================================================
//
// Description:
//
// ====================================================================
// ====================================================================
#ifndef opt_ssa_INCLUDED
#define opt_ssa_INCLUDED "opt_ssa.h"
#include "defs.h"
#include "opt_defs.h"
#include "cxx_memory.h"
#include "opt_sym.h"
// Forward declaration
class CFG;
class OPT_STAB;
class BB_NODE;
class BB_LIST;
class STMTREP;
class COLOR;
class PHI_LIST;
class COPYPROP;
class EXC;
class EXC_SCOPE;
class SSA {
private:
MEM_POOL *mem_pool;
MEM_POOL *loc_pool;
CFG *_cfg;
CODEMAP *_htable;
OPT_STAB *_opt_stab;
SSA(void);
SSA(const SSA&);
SSA& operator = (const SSA&);
OPT_STAB *Opt_stab(void) { return _opt_stab; }
CFG *Cfg(void) { return _cfg; }
CODEMAP *Htable(void) { return _htable; }
void Collect_defs_bb(MEM_POOL *);
void Place_phi_node(MEM_POOL *);
BB_NODE *Insert_identity_assignment_4_loopexit(BB_NODE *,AUX_ID,MEM_POOL *);
void Insert_identity_assignment_4_entry(CFG *cfg, OPT_STAB *opt_stab);
void Rename(CFG *cfg, OPT_STAB *opt_stab, BB_NODE *bb);
void Rename_rhs(OPT_STAB *opt_stab, WN *wn);
void Gen_name(OPT_STAB *opt_stab, IDTYPE var);
void Value_number(CODEMAP *htable, OPT_STAB *opt_stab, BB_NODE *bb,
COPYPROP *copyprop, EXC *exc);
CODEREP *Du2cr( CODEMAP *htable, OPT_STAB *opt_stab, VER_ID du, STMTREP *stmt);
CODEREP *Revive_phi_chi_opnd(VER_ID du);
void Make_live_phi_chi_opnd(VER_ID du);
public:
SSA(MEM_POOL *gpool,
MEM_POOL *lpool){mem_pool=gpool; loc_pool=lpool; }
~SSA(void) {};
MEM_POOL *Mem_pool(void) { return mem_pool; }
void Construct(CODEMAP *htable,
CFG *cfg, OPT_STAB *opt_stab); // Construct SSA form.
CODEREP *Get_zero_version_CR(AUX_ID aux_id, OPT_STAB *, VER_ID);
void Pointer_Alias_Analysis(void);
void Dead_store_elim(CFG *, OPT_STAB *, EXC *);
void Find_zero_versions();
void Create_CODEMAP(void);
void Value_number_mu_list(MU_LIST *mu_list);
void Value_number_mu_node(MU_NODE *mu_node);
void Resurrect_phi(PHI_NODE *phi);
void Resurrect_chi(CHI_NODE *chi);
};
class CODEREP;
class PHI_KEY {
IDTYPE _bb_id;
AUX_ID _aux_id;
public:
// A constructor is not allowed because
// PHI_KEY is a union member in ID_MAP!
void Init(IDTYPE bb_id, AUX_ID aux_id) {
_bb_id = bb_id;
_aux_id = aux_id;
}
friend BOOL operator==(const PHI_KEY x, const PHI_KEY y)
{
return (x._bb_id == y._bb_id && x._aux_id == y._aux_id);
}
friend BOOL operator!=(const PHI_KEY x, const PHI_KEY y)
{
return (x._bb_id != y._bb_id || x._aux_id != y._aux_id);
}
};
// Phi functions
class PHI_NODE : public SLIST_NODE {
DECLARE_SLIST_NODE_CLASS(PHI_NODE)
private:
enum PHI_NODE_FLAGS {
PNF_NONE = 0x00,
PNF_LIVE = 0x01,
PNF_DSE_DEAD = 0x02,
PNF_DCE_DEAD = 0x04,// phi res is dead after DCE
PNF_RES_IS_CR = 0x08,// phi res is CODEREP, not VER_STAB index
PNF_OPND_IV_UPDATE = 0x10,// an opnd is defined by an IV update
PNF_OPND_NOT_IV_UPDATE = 0x20,// an opnd is not defined by an IV update
PNF_VISITED = 0x40, // vistied bit.
PNF_NULL_SSU_PROCESSED = 0x80, // prevent infinite loop in setting
// NULL_SSU_VERSION flag in SPRE step 2
PNF_FIND_DEF_PROCESSED = 0x100, // prevent infinite loop in looking for
// real stores in SPRE step 6
PNF_INCOMPLETE = 0x200, // when this bit is set, its dominator
// frontier might not have a phi
// this bit is set by phi generated by LPRE/EPRE.
PNF_SIZE_VISITED = 0x400, // No_trucation_by_value_size visited
PNF_FIND_CORR_PROCESSED = 0x800, // prevent infinite loop in looking for
// corresponding preg in SPRE step 6
};
AUX_ID _aux_id;
mUINT32 _flags;
mINT16 size;
mINT16 count;
BB_NODE *_bb;
union PHI_ELEM {
friend class PHI_NODE;
private:
AUX_ID version;
CODEREP *cr;
};
// vec[0] is the result
// vec[1..] are the operands
PHI_ELEM *vec;
PHI_NODE(void);
PHI_NODE(const PHI_NODE&);
PHI_NODE& operator = (const PHI_NODE&);
public:
PHI_NODE(mINT16 in_degree, MEM_POOL *pool, BB_NODE *bb)
{ vec = (PHI_ELEM*) CXX_NEW_ARRAY(PHI_ELEM, (in_degree + 1), pool);
size = in_degree; count = 0; _bb = bb;
_flags = PNF_NONE; }
~PHI_NODE(void) { /*CXX_DELETE_ARRAY(vec, Opt_default_pool);*/ }
AUX_ID Opnd(INT32 i) const { return vec[i+1].version; }
AUX_ID Result(void) const { return vec[0].version; }
CODEREP *OPND(INT32 i) const { return vec[i+1].cr; }
CODEREP *RESULT(void) const { return vec[0].cr; }
mINT16 Size(void) const { return size; }
mINT16 Count(void) const { return count; }
IDTYPE Aux_id(void) const { return _aux_id; }
BB_NODE *Bb(void) const { return _bb; }
void Set_bb(BB_NODE *bb) { _bb = bb; }
PHI_KEY Key(void) const { PHI_KEY key; key.Init(_bb->Id(), _aux_id); return key; }
mUINT8 Flags(void) const { return _flags; }
void Set_flags(mUINT8 i) { _flags = i; }
void Set_opnd(const INT32 i, AUX_ID cr)
{ vec[i+1].version = cr;}
void Set_result(AUX_ID cr) { vec[0].version = cr; }
void Set_opnd(const INT32 i, CODEREP *c)
{ vec[i+1].cr = c; }
void Set_result(CODEREP *c) { vec[0].cr = c; }
void Set_count(mINT16 c) { count = c; }
void Set_aux_id(AUX_ID v) { _aux_id = v; }
void Set_invalid(void) { vec[0].cr = NULL; }
void Reset_OPND(INT32 i) { vec[i+1].cr = NULL; }
// Remove the i'th operand from the phi-node (0 is first opnd)
void Remove_opnd(INT32 i);
// flags field accessors
BOOL Live(void) const { return _flags & PNF_LIVE; }
void Set_live(void) { _flags |= PNF_LIVE; }
void Reset_live(void) { _flags &= ~PNF_LIVE; }
BOOL Dse_dead(void) const { return _flags & PNF_DSE_DEAD; }
void Set_dse_dead(void) { _flags |= PNF_DSE_DEAD; }
void Reset_dse_dead(void) { _flags &= ~PNF_DSE_DEAD; }
BOOL Dce_dead(void) const { return _flags & PNF_DCE_DEAD; }
void Reset_dce_dead(void) { _flags &= ~PNF_DCE_DEAD; }
void Set_dce_dead(void) { _flags |= PNF_DCE_DEAD; }
BOOL Res_is_cr(void) const { return _flags & PNF_RES_IS_CR; }
void Set_res_is_cr(void) { _flags |= PNF_RES_IS_CR; }
// is one of the operands defined by an IV update statement
BOOL Opnd_iv_update(void) const { return _flags & PNF_OPND_IV_UPDATE; }
void Set_opnd_iv_update(void) { _flags |= PNF_OPND_IV_UPDATE; }
// none of the operands defined by an IV update statement
BOOL Opnd_not_iv_update(void) const{ return _flags & PNF_OPND_NOT_IV_UPDATE; }
void Set_opnd_not_iv_update(void) { _flags |= PNF_OPND_NOT_IV_UPDATE; }
BOOL Visited(void) const { return _flags & PNF_VISITED; }
void Set_visited(void) { _flags |= PNF_VISITED; }
void Reset_visited(void) { _flags &= ~PNF_VISITED; }
BOOL Null_ssu_processed(void) const { return _flags & PNF_NULL_SSU_PROCESSED; }
void Set_null_ssu_processed(void) { _flags |= PNF_NULL_SSU_PROCESSED; }
BOOL Find_def_processed(void) const { return _flags & PNF_FIND_DEF_PROCESSED; }
void Set_find_def_processed(void) { _flags |= PNF_FIND_DEF_PROCESSED; }
void Reset_find_def_processed(void) { _flags &= ~PNF_FIND_DEF_PROCESSED; }
BOOL Find_corr_processed(void) const { return _flags & PNF_FIND_CORR_PROCESSED; }
void Set_find_corr_processed(void) { _flags |= PNF_FIND_CORR_PROCESSED; }
BOOL Incomplete(void) const { return _flags & PNF_INCOMPLETE; }
void Set_incomplete(void) { _flags |= PNF_INCOMPLETE; }
void Reset_incomplete(void) { _flags &= ~PNF_INCOMPLETE; }
BOOL Is_size_visited(void) const { return _flags & PNF_SIZE_VISITED; }
void Set_size_visited(void) { _flags |= PNF_SIZE_VISITED; }
void Reset_size_visited(void) { _flags &= ~PNF_SIZE_VISITED; }
// Print functions
void Print(INT32 in_degree,
FILE *fp=stderr) const;
void PRINT(INT32 in_degree,
FILE *fp=stderr) const;
void Print(FILE *fp=stderr) const;
};
class PHI_LIST : public SLIST {
DECLARE_SLIST_CLASS (PHI_LIST, PHI_NODE)
private:
INT32 in_degree;
PHI_LIST(const PHI_LIST&);
PHI_LIST& operator = (const PHI_LIST&);
public:
PHI_LIST(BB_NODE *bb);
~PHI_LIST(void) {}
PHI_NODE *New_phi_node(IDTYPE var, MEM_POOL *pool, BB_NODE *bb)
{ PHI_NODE *p = (PHI_NODE *) CXX_NEW (PHI_NODE(in_degree, pool, bb), pool);
for (INT32 i = 0; i < in_degree; i++)
p->Set_opnd(i, (AUX_ID)0);
p->Set_result((AUX_ID)0);
p->Set_aux_id(var);
Append(p);
return p;
}
PHI_LIST *Dup_phi_node(MEM_POOL *pool, BB_NODE *bb, INT pos);
// Remove the i'th operand from the phi-nodes (0 is first opnd)
void Remove_opnd(INT32 i);
INT32 In_degree(void) const { return in_degree; }
void Set_in_degree( INT32 n ) { in_degree = n; }
void Print(FILE *fp=stderr);
void PRINT(FILE *fp=stderr);
};
class PHI_LIST_ITER : public SLIST_ITER {
private:
DECLARE_SLIST_ITER_CLASS (PHI_LIST_ITER, PHI_NODE, PHI_LIST)
PHI_LIST_ITER(const PHI_LIST_ITER&);
PHI_LIST_ITER& operator = (const PHI_LIST_ITER&);
public:
~PHI_LIST_ITER(void) {}
PHI_NODE *First_elem(void) { return First(); }
PHI_NODE *Next_elem(void) { return Next(); }
};
class PHI_OPND_ITER {
private:
PHI_NODE *_phi;
INT _curidx;
PHI_OPND_ITER(void);
PHI_OPND_ITER(const PHI_OPND_ITER&);
PHI_OPND_ITER& operator = (const PHI_OPND_ITER&);
public:
PHI_OPND_ITER(PHI_NODE *phi) { _phi = phi; }
~PHI_OPND_ITER(void) {}
void Init(PHI_NODE *phi) { _phi = phi; }
void Init(void) {}
CODEREP *First_elem(void) { _curidx = 0; return _phi->OPND(_curidx); }
CODEREP *Next_elem(void) { _curidx++;
return (Is_Empty())? NULL:_phi->OPND(_curidx); }
BOOL Is_Empty(void) const { return _curidx >= _phi->Size(); }
INT Curidx(void) const { return _curidx; }
};
#endif // opt_ssa_INCLUDED
| Java |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Hibernate Mappings - Table Info</title>
<link rel="stylesheet" type="text/css" href="../../assets/doc-style.css" title="Style"/>
</head>
<body>
<div id="header">
<div id="logo">
<a href="http://www.hibernate.org/" target="_blank">
<img src="../../assets/hibernate_logo.gif" alt="Hibernate"/>
</a>
</div>
<ul><li><a href="../index.html" target="_top">Tables</a></li><li><a href="../../entities/index.html" target="_top">Entities</a></li></ul>
<hr/>
</div>
<h4>Schema owner_track</h4>
<h2>Table data_sensor_p50</h2>
<table id="column_summary">
<thead>
<tr>
<th class="MainTableHeading" colspan="7">
Column Summary
</th>
</tr>
<tr>
<th style="width: 14%">
Name
</th>
<th style="width: 14%">
SqlType
</th>
<th style="width: 14%">
Length
</th>
<th style="width: 14%">
Precision
</th>
<th style="width: 14%">
Scale
</th>
<th style="width: 14%">
Nullable
</th>
<th style="width: 14%">
Unique
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="#column_detail_dasn_id">
dasn_id
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
false
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_uid">
dasn_uid
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
false
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_datetime">
dasn_datetime
</a>
</td>
<td>
timestamp
</td>
<td>
29
</td>
<td>
19
</td>
<td>
2
</td>
<td>
false
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_latitude">
dasn_latitude
</a>
</td>
<td>
float8
</td>
<td>
255
</td>
<td>
17
</td>
<td>
17
</td>
<td>
false
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_longitude">
dasn_longitude
</a>
</td>
<td>
float8
</td>
<td>
255
</td>
<td>
17
</td>
<td>
17
</td>
<td>
false
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_status">
dasn_status
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
false
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_sat_used">
dasn_sat_used
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_zone_alarm">
dasn_zone_alarm
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_macro_id">
dasn_macro_id
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_macro_src">
dasn_macro_src
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_sog">
dasn_sog
</a>
</td>
<td>
float8
</td>
<td>
255
</td>
<td>
17
</td>
<td>
17
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_course">
dasn_course
</a>
</td>
<td>
float8
</td>
<td>
255
</td>
<td>
17
</td>
<td>
17
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_hdop">
dasn_hdop
</a>
</td>
<td>
float8
</td>
<td>
255
</td>
<td>
17
</td>
<td>
17
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_hgeo">
dasn_hgeo
</a>
</td>
<td>
float8
</td>
<td>
255
</td>
<td>
17
</td>
<td>
17
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_hmet">
dasn_hmet
</a>
</td>
<td>
float8
</td>
<td>
255
</td>
<td>
17
</td>
<td>
17
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_gpio">
dasn_gpio
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_adc">
dasn_adc
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_temp">
dasn_temp
</a>
</td>
<td>
float8
</td>
<td>
255
</td>
<td>
17
</td>
<td>
17
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_type">
dasn_type
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
false
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_xml">
dasn_xml
</a>
</td>
<td>
varchar(255)
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
false
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_dtm">
dasn_dtm
</a>
</td>
<td>
timestamp
</td>
<td>
29
</td>
<td>
19
</td>
<td>
2
</td>
<td>
false
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_spsn_id">
dasn_spsn_id
</a>
</td>
<td>
int8
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
false
</td>
<td>
false
</td>
</tr>
<tr>
<td>
<a href="#column_detail_dasn_vehicle">
dasn_vehicle
</a>
</td>
<td>
varchar(255)
</td>
<td>
255
</td>
<td>
19
</td>
<td>
2
</td>
<td>
true
</td>
<td>
false
</td>
</tr>
</tbody>
</table>
<table id="primary_key">
<thead>
<tr>
<th class="MainTableHeading" colspan="2">
Primary Key
</th>
</tr>
<tr>
<th style="width: 50%">
Name
</th>
<th style="width: 50%">
Columns
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
No Primary Key
</td>
</tr>
</tbody>
</table>
<table id="indexes">
<thead>
<tr>
<th class="MainTableHeading" colspan="2">
Indexes
</th>
</tr>
<tr>
<th style="width: 50%">
Name
</th>
<th style="width: 50%">
Columns
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
dasn_datetime_i50
</td>
<td>
<a href="#column_detail_dasn_datetime">
dasn_datetime
</a>
</td>
</tr>
</tbody>
</table>
<p id="column_detail" class="MainTableHeading">
Column Detail
</p>
<h3 id="column_detail_dasn_id">dasn_id</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> false
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_uid">dasn_uid</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> false
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_datetime">dasn_datetime</h3>
<ul>
<li>
<strong>Type:</strong> timestamp
</li>
<li>
<strong>Length:</strong> 29
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> false
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_latitude">dasn_latitude</h3>
<ul>
<li>
<strong>Type:</strong> float8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 17
</li>
<li>
<strong>Scale:</strong> 17
</li>
<li>
<strong>Nullable:</strong> false
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_longitude">dasn_longitude</h3>
<ul>
<li>
<strong>Type:</strong> float8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 17
</li>
<li>
<strong>Scale:</strong> 17
</li>
<li>
<strong>Nullable:</strong> false
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_status">dasn_status</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> false
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_sat_used">dasn_sat_used</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_zone_alarm">dasn_zone_alarm</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_macro_id">dasn_macro_id</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_macro_src">dasn_macro_src</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_sog">dasn_sog</h3>
<ul>
<li>
<strong>Type:</strong> float8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 17
</li>
<li>
<strong>Scale:</strong> 17
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_course">dasn_course</h3>
<ul>
<li>
<strong>Type:</strong> float8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 17
</li>
<li>
<strong>Scale:</strong> 17
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_hdop">dasn_hdop</h3>
<ul>
<li>
<strong>Type:</strong> float8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 17
</li>
<li>
<strong>Scale:</strong> 17
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_hgeo">dasn_hgeo</h3>
<ul>
<li>
<strong>Type:</strong> float8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 17
</li>
<li>
<strong>Scale:</strong> 17
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_hmet">dasn_hmet</h3>
<ul>
<li>
<strong>Type:</strong> float8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 17
</li>
<li>
<strong>Scale:</strong> 17
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_gpio">dasn_gpio</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_adc">dasn_adc</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_temp">dasn_temp</h3>
<ul>
<li>
<strong>Type:</strong> float8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 17
</li>
<li>
<strong>Scale:</strong> 17
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_type">dasn_type</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> false
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_xml">dasn_xml</h3>
<ul>
<li>
<strong>Type:</strong> varchar(255)
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> false
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_dtm">dasn_dtm</h3>
<ul>
<li>
<strong>Type:</strong> timestamp
</li>
<li>
<strong>Length:</strong> 29
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> false
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_spsn_id">dasn_spsn_id</h3>
<ul>
<li>
<strong>Type:</strong> int8
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> false
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
<h3 id="column_detail_dasn_vehicle">dasn_vehicle</h3>
<ul>
<li>
<strong>Type:</strong> varchar(255)
</li>
<li>
<strong>Length:</strong> 255
</li>
<li>
<strong>Precision:</strong> 19
</li>
<li>
<strong>Scale:</strong> 2
</li>
<li>
<strong>Nullable:</strong> true
</li>
<li>
<strong>Unique:</strong> false
</li>
<li>
<strong>Comment:</strong>
</li>
</ul>
<hr/>
</body>
</html>
| Java |
/*
* drivers/power/process.c - Functions for starting/stopping processes on
* suspend transitions.
*
* Originally from swsusp.
*/
#undef DEBUG
#include <linux/interrupt.h>
#include <linux/oom.h>
#include <linux/suspend.h>
#include <linux/module.h>
#include <linux/syscalls.h>
#include <linux/freezer.h>
#include <linux/delay.h>
#include <linux/workqueue.h>
#include <linux/kmod.h>
#include <linux/wakelock.h>
#include "power.h"
/*
* Timeout for stopping processes
*/
#define TIMEOUT (20 * HZ)
static int try_to_freeze_tasks(bool user_only)
{
struct task_struct *g, *p;
unsigned long end_time;
unsigned int todo;
bool wq_busy = false;
struct timeval start, end;
u64 elapsed_csecs64;
unsigned int elapsed_csecs;
bool wakeup = false;
do_gettimeofday(&start);
end_time = jiffies + TIMEOUT;
if (!user_only)
freeze_workqueues_begin();
while (true) {
todo = 0;
read_lock(&tasklist_lock);
do_each_thread(g, p) {
if (p == current || !freeze_task(p))
continue;
/*
* Now that we've done set_freeze_flag, don't
* perturb a task in TASK_STOPPED or TASK_TRACED.
* It is "frozen enough". If the task does wake
* up, it will immediately call try_to_freeze.
*
* Because freeze_task() goes through p's scheduler lock, it's
* guaranteed that TASK_STOPPED/TRACED -> TASK_RUNNING
* transition can't race with task state testing here.
*/
if (!task_is_stopped_or_traced(p) &&
!freezer_should_skip(p))
todo++;
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
if (!user_only) {
wq_busy = freeze_workqueues_busy();
todo += wq_busy;
}
if (todo && has_wake_lock(WAKE_LOCK_SUSPEND)) {
wakeup = 1;
break;
}
if (!todo || time_after(jiffies, end_time))
break;
if (pm_wakeup_pending()) {
wakeup = true;
break;
}
/*
* We need to retry, but first give the freezing tasks some
* time to enter the regrigerator.
*/
msleep(10);
}
do_gettimeofday(&end);
elapsed_csecs64 = timeval_to_ns(&end) - timeval_to_ns(&start);
do_div(elapsed_csecs64, NSEC_PER_SEC / 100);
elapsed_csecs = elapsed_csecs64;
if (todo) {
/* This does not unfreeze processes that are already frozen
* (we have slightly ugly calling convention in that respect,
* and caller must call thaw_processes() if something fails),
* but it cleans up leftover PF_FREEZE requests.
*/
if(wakeup) {
printk("\n");
printk(KERN_ERR "Freezing of %s aborted\n",
user_only ? "user space " : "tasks ");
}
else {
printk("\n");
printk(KERN_ERR "Freezing of tasks %s after %d.%02d seconds "
"(%d tasks refusing to freeze, wq_busy=%d):\n",
wakeup ? "aborted" : "failed",
elapsed_csecs / 100, elapsed_csecs % 100,
todo - wq_busy, wq_busy);
}
if (!wakeup) {
read_lock(&tasklist_lock);
do_each_thread(g, p) {
if (p != current && !freezer_should_skip(p)
&& freezing(p) && !frozen(p) &&
elapsed_csecs > 100)
sched_show_task(p);
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
}
} else {
printk("(elapsed %d.%02d seconds) ", elapsed_csecs / 100,
elapsed_csecs % 100);
}
return todo ? -EBUSY : 0;
}
/**
* freeze_processes - Signal user space processes to enter the refrigerator.
*
* On success, returns 0. On failure, -errno and system is fully thawed.
*/
int freeze_processes(void)
{
int error;
error = suspend_sys_sync_wait();
if (error)
return error;
error = __usermodehelper_disable(UMH_FREEZING);
if (error)
return error;
if (!pm_freezing)
atomic_inc(&system_freezing_cnt);
printk("Freezing user space processes ... ");
pm_freezing = true;
error = try_to_freeze_tasks(true);
if (!error) {
printk("done.");
__usermodehelper_set_disable_depth(UMH_DISABLED);
oom_killer_disable();
}
printk("\n");
BUG_ON(in_atomic());
if (error)
thaw_processes();
return error;
}
/**
* freeze_kernel_threads - Make freezable kernel threads go to the refrigerator.
*
* On success, returns 0. On failure, -errno and only the kernel threads are
* thawed, so as to give a chance to the caller to do additional cleanups
* (if any) before thawing the userspace tasks. So, it is the responsibility
* of the caller to thaw the userspace tasks, when the time is right.
*/
int freeze_kernel_threads(void)
{
int error;
// error = suspend_sys_sync_wait();
// if (error)
// return error;
printk("Freezing remaining freezable tasks ... ");
pm_nosig_freezing = true;
error = try_to_freeze_tasks(false);
if (!error)
printk("done.");
printk("\n");
BUG_ON(in_atomic());
if (error)
thaw_kernel_threads();
return error;
}
void thaw_processes(void)
{
struct task_struct *g, *p;
if (pm_freezing)
atomic_dec(&system_freezing_cnt);
pm_freezing = false;
pm_nosig_freezing = false;
oom_killer_enable();
printk("Restarting tasks ... ");
__usermodehelper_set_disable_depth(UMH_FREEZING);
thaw_workqueues();
read_lock(&tasklist_lock);
do_each_thread(g, p) {
__thaw_task(p);
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
usermodehelper_enable();
schedule();
printk("done.\n");
}
void thaw_kernel_threads(void)
{
struct task_struct *g, *p;
pm_nosig_freezing = false;
printk("Restarting kernel threads ... ");
thaw_workqueues();
read_lock(&tasklist_lock);
do_each_thread(g, p) {
if (p->flags & (PF_KTHREAD | PF_WQ_WORKER))
__thaw_task(p);
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
schedule();
printk("done.\n");
}
| Java |
<?php
namespace RandomRango\Bundle\MainBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
public function indexAction()
{
return $this->render('RandomRangoMainBundle:Default:index.html.twig');
}
}
| Java |
/* packet-lbmr.c
* Routines for LBM Topic Resolution Packet dissection
*
* Copyright (c) 2005-2014 Informatica Corporation. All Rights Reserved.
*
* 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.
*/
#include "config.h"
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#if HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include <epan/packet.h>
#include <epan/address.h>
#include <epan/strutil.h>
#include <epan/prefs.h>
#include <epan/tap.h>
#include <epan/stats_tree.h>
#include <epan/expert.h>
#include <epan/uat.h>
#include <epan/to_str.h>
#ifndef HAVE_INET_ATON
#include <wsutil/inet_aton.h>
#endif
#include <wsutil/pint.h>
#include "packet-lbm.h"
#include "packet-lbtru.h"
#include "packet-lbtrm.h"
#include "packet-lbttcp.h"
#define LBMR_MAX_NAMELEN 256
void proto_register_lbmr(void);
void proto_reg_handoff_lbmr(void);
/*----------------------------------------------------------------------------*/
/* LBT-IPC transport management. */
/*----------------------------------------------------------------------------*/
typedef struct
{
guint32 host_id;
guint32 session_id;
guint16 xport_id;
guint64 channel;
} lbtipc_transport_t;
static wmem_tree_t * lbtipc_transport_table = NULL;
#define LBTIPC_KEY_ELEMENT_COUNT 3
#define LBTIPC_KEY_ELEMENT_HOST_ID 0
#define LBTIPC_KEY_ELEMENT_SESSION_ID 1
#define LBTIPC_KEY_ELEMENT_XPORT_ID 2
static void lbtipc_transport_init(void)
{
lbtipc_transport_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
}
static lbtipc_transport_t * lbtipc_transport_find(guint32 host_id, guint32 session_id, guint16 xport_id)
{
lbtipc_transport_t * entry = NULL;
guint32 keyval[LBTIPC_KEY_ELEMENT_COUNT];
wmem_tree_key_t tkey[2];
keyval[LBTIPC_KEY_ELEMENT_HOST_ID] = host_id;
keyval[LBTIPC_KEY_ELEMENT_SESSION_ID] = session_id;
keyval[LBTIPC_KEY_ELEMENT_XPORT_ID] = (guint32) xport_id;
tkey[0].length = LBTIPC_KEY_ELEMENT_COUNT;
tkey[0].key = keyval;
tkey[1].length = 0;
tkey[1].key = NULL;
entry = (lbtipc_transport_t *) wmem_tree_lookup32_array(lbtipc_transport_table, tkey);
return (entry);
}
static lbtipc_transport_t * lbtipc_transport_add(guint32 host_id, guint32 session_id, guint16 xport_id)
{
lbtipc_transport_t * entry;
guint32 keyval[LBTIPC_KEY_ELEMENT_COUNT];
wmem_tree_key_t tkey[2];
entry = lbtipc_transport_find(host_id, session_id, xport_id);
if (entry != NULL)
{
return (entry);
}
entry = wmem_new(wmem_file_scope(), lbtipc_transport_t);
entry->host_id = host_id;
entry->session_id = session_id;
entry->xport_id = xport_id;
entry->channel = lbm_channel_assign(LBM_CHANNEL_TRANSPORT_LBTIPC);
keyval[LBTIPC_KEY_ELEMENT_HOST_ID] = host_id;
keyval[LBTIPC_KEY_ELEMENT_SESSION_ID] = session_id;
keyval[LBTIPC_KEY_ELEMENT_XPORT_ID] = (guint32) xport_id;
tkey[0].length = LBTIPC_KEY_ELEMENT_COUNT;
tkey[0].key = keyval;
tkey[1].length = 0;
tkey[1].key = NULL;
wmem_tree_insert32_array(lbtipc_transport_table, tkey, (void *) entry);
return (entry);
}
static char * lbtipc_transport_source_string(guint32 host_id _U_, guint32 session_id, guint16 xport_id)
{
return (wmem_strdup_printf(wmem_file_scope(), "LBT-IPC:%x:%" G_GUINT16_FORMAT, session_id, xport_id));
}
/*----------------------------------------------------------------------------*/
/* LBT-SMX transport management. */
/*----------------------------------------------------------------------------*/
typedef struct
{
guint32 host_id;
guint32 session_id;
guint16 xport_id;
guint64 channel;
} lbtsmx_transport_t;
static wmem_tree_t * lbtsmx_transport_table = NULL;
#define LBTSMX_KEY_ELEMENT_COUNT 3
#define LBTSMX_KEY_ELEMENT_HOST_ID 0
#define LBTSMX_KEY_ELEMENT_SESSION_ID 1
#define LBTSMX_KEY_ELEMENT_XPORT_ID 2
static void lbtsmx_transport_init(void)
{
lbtsmx_transport_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
}
static lbtsmx_transport_t * lbtsmx_transport_find(guint32 host_id, guint32 session_id, guint16 xport_id)
{
lbtsmx_transport_t * entry = NULL;
guint32 keyval[LBTSMX_KEY_ELEMENT_COUNT];
wmem_tree_key_t tkey[2];
keyval[LBTSMX_KEY_ELEMENT_HOST_ID] = host_id;
keyval[LBTSMX_KEY_ELEMENT_SESSION_ID] = session_id;
keyval[LBTSMX_KEY_ELEMENT_XPORT_ID] = (guint32) xport_id;
tkey[0].length = LBTSMX_KEY_ELEMENT_COUNT;
tkey[0].key = keyval;
tkey[1].length = 0;
tkey[1].key = NULL;
entry = (lbtsmx_transport_t *) wmem_tree_lookup32_array(lbtsmx_transport_table, tkey);
return (entry);
}
static lbtsmx_transport_t * lbtsmx_transport_add(guint32 host_id, guint32 session_id, guint16 xport_id)
{
lbtsmx_transport_t * entry;
guint32 keyval[LBTSMX_KEY_ELEMENT_COUNT];
wmem_tree_key_t tkey[2];
entry = lbtsmx_transport_find(host_id, session_id, xport_id);
if (entry != NULL)
{
return (entry);
}
entry = wmem_new(wmem_file_scope(), lbtsmx_transport_t);
entry->host_id = host_id;
entry->session_id = session_id;
entry->xport_id = xport_id;
entry->channel = lbm_channel_assign(LBM_CHANNEL_TRANSPORT_LBTSMX);
keyval[LBTSMX_KEY_ELEMENT_HOST_ID] = host_id;
keyval[LBTSMX_KEY_ELEMENT_SESSION_ID] = session_id;
keyval[LBTSMX_KEY_ELEMENT_XPORT_ID] = (guint32) xport_id;
tkey[0].length = LBTSMX_KEY_ELEMENT_COUNT;
tkey[0].key = keyval;
tkey[1].length = 0;
tkey[1].key = NULL;
wmem_tree_insert32_array(lbtsmx_transport_table, tkey, (void *) entry);
return (entry);
}
static char * lbtsmx_transport_source_string(guint32 host_id _U_, guint32 session_id, guint16 xport_id)
{
return (wmem_strdup_printf(wmem_file_scope(), "LBT-SMX:%x:%" G_GUINT16_FORMAT, session_id, xport_id));
}
/*----------------------------------------------------------------------------*/
/* LBT-RDMA transport management. */
/*----------------------------------------------------------------------------*/
typedef struct
{
address source_address;
guint32 session_id;
guint16 port;
guint64 channel;
} lbtrdma_transport_t;
static wmem_tree_t * lbtrdma_transport_table = NULL;
#define LBTRDMA_KEY_ELEMENT_COUNT 3
#define LBTRDMA_KEY_ELEMENT_SOURCE_ADDRESS 0
#define LBTRDMA_KEY_ELEMENT_SESSION_ID 1
#define LBTRDMA_KEY_ELEMENT_PORT 2
static void lbtrdma_transport_init(void)
{
lbtrdma_transport_table = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
}
static void lbtrdma_transport_build_key(guint32 * key_value, wmem_tree_key_t * key, const lbtrdma_transport_t * transport)
{
guint32 val;
memcpy((void *) &val, (void *) transport->source_address.data, sizeof(guint32));
key_value[LBTRDMA_KEY_ELEMENT_SOURCE_ADDRESS] = val;
key_value[LBTRDMA_KEY_ELEMENT_SESSION_ID] = transport->session_id;
key_value[LBTRDMA_KEY_ELEMENT_PORT] = (guint32) transport->port;
key[0].length = LBTRDMA_KEY_ELEMENT_COUNT;
key[0].key = key_value;
key[1].length = 0;
key[1].key = NULL;
}
static lbtrdma_transport_t * lbtrdma_transport_find(const address * source_address, guint32 session_id, guint16 port)
{
lbtrdma_transport_t key;
lbtrdma_transport_t * entry = NULL;
guint32 keyval[LBTRDMA_KEY_ELEMENT_COUNT];
wmem_tree_key_t tkey[2];
memset((void *)&key, 0, sizeof(lbtrdma_transport_t));
COPY_ADDRESS_SHALLOW(&(key.source_address), source_address);
key.session_id = session_id;
key.port = port;
lbtrdma_transport_build_key(keyval, tkey, &key);
entry = (lbtrdma_transport_t *) wmem_tree_lookup32_array(lbtrdma_transport_table, tkey);
return (entry);
}
static lbtrdma_transport_t * lbtrdma_transport_add(const address * source_address, guint32 session_id, guint16 port)
{
lbtrdma_transport_t * entry;
guint32 keyval[LBTRDMA_KEY_ELEMENT_COUNT];
wmem_tree_key_t tkey[2];
entry = lbtrdma_transport_find(source_address, session_id, port);
if (entry != NULL)
{
return (entry);
}
entry = wmem_new(wmem_file_scope(), lbtrdma_transport_t);
WMEM_COPY_ADDRESS(wmem_file_scope(), &(entry->source_address), source_address);
entry->session_id = session_id;
entry->port = port;
entry->channel = lbm_channel_assign(LBM_CHANNEL_TRANSPORT_LBTRDMA);
lbtrdma_transport_build_key(keyval, tkey, entry);
wmem_tree_insert32_array(lbtrdma_transport_table, tkey, (void *) entry);
return (entry);
}
static char * lbtrdma_transport_source_string(const address * source_address _U_, guint32 session_id, guint16 port)
{
return (wmem_strdup_printf(wmem_file_scope(), "LBT-RDMA:%x:%" G_GUINT16_FORMAT, session_id, port));
}
/*----------------------------------------------------------------------------*/
/* Packet layouts. */
/*----------------------------------------------------------------------------*/
/* LBMR main header. */
typedef struct
{
lbm_uint8_t ver_type;
lbm_uint8_t tqrs;
lbm_uint16_t tirs;
} lbmr_hdr_t;
#define O_LBMR_HDR_T_VER_TYPE OFFSETOF(lbmr_hdr_t, ver_type)
#define L_LBMR_HDR_T_VER_TYPE SIZEOF(lbmr_hdr_t, ver_type)
#define O_LBMR_HDR_T_TQRS OFFSETOF(lbmr_hdr_t, tqrs)
#define L_LBMR_HDR_T_TQRS SIZEOF(lbmr_hdr_t, tqrs)
#define O_LBMR_HDR_T_TIRS OFFSETOF(lbmr_hdr_t, tirs)
#define L_LBMR_HDR_T_TIRS SIZEOF(lbmr_hdr_t, tirs)
#define L_LBMR_HDR_T (gint) sizeof(lbmr_hdr_t)
#define LBMR_HDR_VER_VER_MASK 0xf0
#define LBMR_HDR_VER_TYPE_MASK 0x07
#define LBMR_HDR_VER(x) (((x) & LBMR_HDR_VER_VER_MASK) >> 4)
#define LBMR_HDR_TYPE(x) ((x) & LBMR_HDR_VER_TYPE_MASK)
#define LBMR_HDR_TYPE_NORMAL 0x0
#define LBMR_HDR_TYPE_WC_TQRS 0x1
#define LBMR_HDR_TYPE_UCAST_RCV_ALIVE 0x2
#define LBMR_HDR_TYPE_UCAST_SRC_ALIVE 0x3
#define LBMR_HDR_TYPE_TOPIC_MGMT 0x4
#define LBMR_HDR_TYPE_QUEUE_RES 0x6
#define LBMR_HDR_TYPE_EXT 0x7
#define LBMR_HDR_TYPE_OPTS_MASK 0x8
/* LBMR extended header. */
typedef struct
{
lbm_uint8_t ver_type;
lbm_uint8_t ext_type;
lbm_uint16_t dep;
} lbmr_hdr_ext_type_t;
#define O_LBMR_HDR_EXT_TYPE_T_VER_TYPE OFFSETOF(lbmr_hdr_ext_type_t, ver_type)
#define L_LBMR_HDR_EXT_TYPE_T_VER_TYPE SIZEOF(lbmr_hdr_ext_type_t, ver_type)
#define O_LBMR_HDR_EXT_TYPE_T_EXT_TYPE OFFSETOF(lbmr_hdr_ext_type_t, ext_type)
#define L_LBMR_HDR_EXT_TYPE_T_EXT_TYPE SIZEOF(lbmr_hdr_ext_type_t, ext_type)
#define O_LBMR_HDR_EXT_TYPE_T_DEP OFFSETOF(lbmr_hdr_ext_type_t, dep)
#define L_LBMR_HDR_EXT_TYPE_T_DEP SIZEOF(lbmr_hdr_ext_type_t, dep)
#define L_LBMR_HDR_EXT_TYPE_T (gint) sizeof(lbmr_hdr_ext_type_t)
#define LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT 0x1
#define LBMR_HDR_EXT_TYPE_UMQ_QUEUE_MGMT 0x2
#define LBMR_HDR_EXT_TYPE_CONTEXT_INFO 0x3
#define LBMR_HDR_EXT_TYPE_TOPIC_RES_REQUEST 0x4
#define LBMR_HDR_EXT_TYPE_TNWG_MSG 0x5
#define LBMR_HDR_EXT_TYPE_REMOTE_DOMAIN_ROUTE 0x6
#define LBMR_HDR_EXT_TYPE_REMOTE_CONTEXT_INFO 0x7
/* LBMR topic information record */
typedef struct
{
lbm_uint8_t transport;
lbm_uint8_t tlen;
lbm_uint16_t ttl;
lbm_uint32_t index;
} lbmr_tir_t;
#define O_LBMR_TIR_T_TRANSPORT OFFSETOF(lbmr_tir_t, transport)
#define L_LBMR_TIR_T_TRANSPORT SIZEOF(lbmr_tir_t, transport)
#define O_LBMR_TIR_T_TLEN OFFSETOF(lbmr_tir_t, tlen)
#define L_LBMR_TIR_T_TLEN SIZEOF(lbmr_tir_t, tlen)
#define O_LBMR_TIR_T_TTL OFFSETOF(lbmr_tir_t, ttl)
#define L_LBMR_TIR_T_TTL SIZEOF(lbmr_tir_t, ttl)
#define O_LBMR_TIR_T_INDEX OFFSETOF(lbmr_tir_t, index)
#define L_LBMR_TIR_T_INDEX SIZEOF(lbmr_tir_t, index)
#define L_LBMR_TIR_T (gint) sizeof(lbmr_tir_t)
/* LBMR topic information record TCP option data */
typedef struct
{
lbm_uint32_t ip;
lbm_uint16_t port;
} lbmr_tir_tcp_t;
#define O_LBMR_TIR_TCP_T_IP OFFSETOF(lbmr_tir_tcp_t, ip)
#define L_LBMR_TIR_TCP_T_IP SIZEOF(lbmr_tir_tcp_t, ip)
#define O_LBMR_TIR_TCP_T_PORT OFFSETOF(lbmr_tir_tcp_t, port)
#define L_LBMR_TIR_TCP_T_PORT SIZEOF(lbmr_tir_tcp_t, port)
#define L_LBMR_TIR_TCP_T 6
typedef struct {
lbm_uint32_t ip;
lbm_uint32_t session_id;
lbm_uint16_t port;
} lbmr_tir_tcp_with_sid_t;
#define O_LBMR_TIR_TCP_WITH_SID_T_IP OFFSETOF(lbmr_tir_tcp_with_sid_t, ip)
#define L_LBMR_TIR_TCP_WITH_SID_T_IP SIZEOF(lbmr_tir_tcp_with_sid_t, ip)
#define O_LBMR_TIR_TCP_WITH_SID_T_SESSION_ID OFFSETOF(lbmr_tir_tcp_with_sid_t, session_id)
#define L_LBMR_TIR_TCP_WITH_SID_T_SESSION_ID SIZEOF(lbmr_tir_tcp_with_sid_t, session_id)
#define O_LBMR_TIR_TCP_WITH_SID_T_PORT OFFSETOF(lbmr_tir_tcp_with_sid_t, port)
#define L_LBMR_TIR_TCP_WITH_SID_T_PORT SIZEOF(lbmr_tir_tcp_with_sid_t, port)
#define L_LBMR_TIR_TCP_WITH_SID_T 10
/* LBMR topic information record LBT-RM option data */
typedef struct
{
lbm_uint32_t src_addr;
lbm_uint32_t mcast_addr;
lbm_uint32_t session_id;
lbm_uint16_t udp_dest_port;
lbm_uint16_t src_ucast_port;
} lbmr_tir_lbtrm_t;
#define O_LBMR_TIR_LBTRM_T_SRC_ADDR OFFSETOF(lbmr_tir_lbtrm_t, src_addr)
#define L_LBMR_TIR_LBTRM_T_SRC_ADDR SIZEOF(lbmr_tir_lbtrm_t, src_addr)
#define O_LBMR_TIR_LBTRM_T_MCAST_ADDR OFFSETOF(lbmr_tir_lbtrm_t, mcast_addr)
#define L_LBMR_TIR_LBTRM_T_MCAST_ADDR SIZEOF(lbmr_tir_lbtrm_t, mcast_addr)
#define O_LBMR_TIR_LBTRM_T_SESSION_ID OFFSETOF(lbmr_tir_lbtrm_t, session_id)
#define L_LBMR_TIR_LBTRM_T_SESSION_ID SIZEOF(lbmr_tir_lbtrm_t, session_id)
#define O_LBMR_TIR_LBTRM_T_UDP_DEST_PORT OFFSETOF(lbmr_tir_lbtrm_t, udp_dest_port)
#define L_LBMR_TIR_LBTRM_T_UDP_DEST_PORT SIZEOF(lbmr_tir_lbtrm_t, udp_dest_port)
#define O_LBMR_TIR_LBTRM_T_SRC_UCAST_PORT OFFSETOF(lbmr_tir_lbtrm_t, src_ucast_port)
#define L_LBMR_TIR_LBTRM_T_SRC_UCAST_PORT SIZEOF(lbmr_tir_lbtrm_t, src_ucast_port)
#define L_LBMR_TIR_LBTRM_T (gint) sizeof(lbmr_tir_lbtrm_t)
/* LBMR topic information record LBT-RU option data */
typedef struct
{
lbm_uint32_t ip;
lbm_uint16_t port;
} lbmr_tir_lbtru_t;
#define O_LBMR_TIR_LBTRU_T_IP OFFSETOF(lbmr_tir_lbtru_t, ip)
#define L_LBMR_TIR_LBTRU_T_IP SIZEOF(lbmr_tir_lbtru_t, ip)
#define O_LBMR_TIR_LBTRU_T_PORT OFFSETOF(lbmr_tir_lbtru_t, port)
#define L_LBMR_TIR_LBTRU_T_PORT SIZEOF(lbmr_tir_lbtru_t, port)
#define L_LBMR_TIR_LBTRU_T 6
typedef struct
{
lbm_uint32_t ip;
lbm_uint32_t session_id;
lbm_uint16_t port;
} lbmr_tir_lbtru_with_sid_t;
#define O_LBMR_TIR_LBTRU_WITH_SID_T_IP OFFSETOF(lbmr_tir_lbtru_with_sid_t, ip)
#define L_LBMR_TIR_LBTRU_WITH_SID_T_IP SIZEOF(lbmr_tir_lbtru_with_sid_t, ip)
#define O_LBMR_TIR_LBTRU_WITH_SID_T_SESSION_ID OFFSETOF(lbmr_tir_lbtru_with_sid_t, session_id)
#define L_LBMR_TIR_LBTRU_WITH_SID_T_SESSION_ID SIZEOF(lbmr_tir_lbtru_with_sid_t, session_id)
#define O_LBMR_TIR_LBTRU_WITH_SID_T_PORT OFFSETOF(lbmr_tir_lbtru_with_sid_t, port)
#define L_LBMR_TIR_LBTRU_WITH_SID_T_PORT SIZEOF(lbmr_tir_lbtru_with_sid_t, port)
#define L_LBMR_TIR_LBTRU_WITH_SID_T 10
/* LBMR topic information record LBT-IPC option data */
typedef struct
{
lbm_uint32_t host_id;
lbm_uint32_t session_id;
lbm_uint16_t xport_id;
} lbmr_tir_lbtipc_t;
#define O_LBMR_TIR_LBTIPC_T_HOST_ID OFFSETOF(lbmr_tir_lbtipc_t, host_id)
#define L_LBMR_TIR_LBTIPC_T_HOST_ID SIZEOF(lbmr_tir_lbtipc_t, host_id)
#define O_LBMR_TIR_LBTIPC_T_SESSION_ID OFFSETOF(lbmr_tir_lbtipc_t, session_id)
#define L_LBMR_TIR_LBTIPC_T_SESSION_ID SIZEOF(lbmr_tir_lbtipc_t, session_id)
#define O_LBMR_TIR_LBTIPC_T_XPORT_ID OFFSETOF(lbmr_tir_lbtipc_t, xport_id)
#define L_LBMR_TIR_LBTIPC_T_XPORT_ID SIZEOF(lbmr_tir_lbtipc_t, xport_id)
#define L_LBMR_TIR_LBTIPC_T 10
/* LBMR topic information record LBT-RDMA option data */
typedef struct
{
lbm_uint32_t ip;
lbm_uint32_t session_id;
lbm_uint16_t port;
} lbmr_tir_lbtrdma_t;
#define O_LBMR_TIR_LBTRDMA_T_IP OFFSETOF(lbmr_tir_lbtrdma_t, ip)
#define L_LBMR_TIR_LBTRDMA_T_IP SIZEOF(lbmr_tir_lbtrdma_t, ip)
#define O_LBMR_TIR_LBTRDMA_T_SESSION_ID OFFSETOF(lbmr_tir_lbtrdma_t, session_id)
#define L_LBMR_TIR_LBTRDMA_T_SESSION_ID SIZEOF(lbmr_tir_lbtrdma_t, session_id)
#define O_LBMR_TIR_LBTRDMA_T_PORT OFFSETOF(lbmr_tir_lbtrdma_t, port)
#define L_LBMR_TIR_LBTRDMA_T_PORT SIZEOF(lbmr_tir_lbtrdma_t, port)
#define L_LBMR_TIR_LBTRDMA_T 10
/* LBMR topic information record LBT-SMX option data */
typedef struct
{
lbm_uint32_t host_id;
lbm_uint32_t session_id;
lbm_uint16_t xport_id;
} lbmr_tir_lbtsmx_t;
#define O_LBMR_TIR_LBTSMX_T_HOST_ID OFFSETOF(lbmr_tir_lbtsmx_t, host_id)
#define L_LBMR_TIR_LBTSMX_T_HOST_ID SIZEOF(lbmr_tir_lbtsmx_t, host_id)
#define O_LBMR_TIR_LBTSMX_T_SESSION_ID OFFSETOF(lbmr_tir_lbtsmx_t, session_id)
#define L_LBMR_TIR_LBTSMX_T_SESSION_ID SIZEOF(lbmr_tir_lbtsmx_t, session_id)
#define O_LBMR_TIR_LBTSMX_T_XPORT_ID OFFSETOF(lbmr_tir_lbtsmx_t, xport_id)
#define L_LBMR_TIR_LBTSMX_T_XPORT_ID SIZEOF(lbmr_tir_lbtsmx_t, xport_id)
#define L_LBMR_TIR_LBTSMX_T 10
#define LBMR_TIR_TRANSPORT 0x7F
#define LBMR_TIR_OPTIONS 0x80
/* LBMR topic option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
} lbmr_topic_opt_t;
#define O_LBMR_TOPIC_OPT_T_TYPE OFFSETOF(lbmr_topic_opt_t, type)
#define L_LBMR_TOPIC_OPT_T_TYPE SIZEOF(lbmr_topic_opt_t, type)
#define O_LBMR_TOPIC_OPT_T_LEN OFFSETOF(lbmr_topic_opt_t, len)
#define L_LBMR_TOPIC_OPT_T_LEN SIZEOF(lbmr_topic_opt_t, len)
#define O_LBMR_TOPIC_OPT_T_FLAGS OFFSETOF(lbmr_topic_opt_t, flags)
#define L_LBMR_TOPIC_OPT_T_FLAGS SIZEOF(lbmr_topic_opt_t, flags)
#define L_LBMR_TOPIC_OPT_T (gint) sizeof(lbmr_topic_opt_t)
#define LBMR_TOPIC_OPT_FLAG_IGNORE 0x8000
/* LBMR topic option length */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t total_len;
} lbmr_topic_opt_len_t;
#define O_LBMR_TOPIC_OPT_LEN_T_TYPE OFFSETOF(lbmr_topic_opt_len_t, type)
#define L_LBMR_TOPIC_OPT_LEN_T_TYPE SIZEOF(lbmr_topic_opt_len_t, type)
#define O_LBMR_TOPIC_OPT_LEN_T_LEN OFFSETOF(lbmr_topic_opt_len_t, len)
#define L_LBMR_TOPIC_OPT_LEN_T_LEN SIZEOF(lbmr_topic_opt_len_t, len)
#define O_LBMR_TOPIC_OPT_LEN_T_TOTAL_LEN OFFSETOF(lbmr_topic_opt_len_t, total_len)
#define L_LBMR_TOPIC_OPT_LEN_T_TOTAL_LEN SIZEOF(lbmr_topic_opt_len_t, total_len)
#define L_LBMR_TOPIC_OPT_LEN_T (gint) sizeof(lbmr_topic_opt_len_t)
#define LBMR_TOPIC_OPT_LEN_TYPE 0x00
#define LBMR_TOPIC_OPT_LEN_SZ 4
/* LBMR topic UME option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint16_t store_tcp_port;
lbm_uint16_t src_tcp_port;
lbm_uint32_t store_tcp_addr;
lbm_uint32_t src_tcp_addr;
lbm_uint32_t src_reg_id;
lbm_uint32_t transport_idx;
lbm_uint32_t high_seqnum;
lbm_uint32_t low_seqnum;
} lbmr_topic_opt_ume_t;
#define O_LBMR_TOPIC_OPT_UME_T_TYPE OFFSETOF(lbmr_topic_opt_ume_t, type)
#define L_LBMR_TOPIC_OPT_UME_T_TYPE SIZEOF(lbmr_topic_opt_ume_t, type)
#define O_LBMR_TOPIC_OPT_UME_T_LEN OFFSETOF(lbmr_topic_opt_ume_t, len)
#define L_LBMR_TOPIC_OPT_UME_T_LEN SIZEOF(lbmr_topic_opt_ume_t, len)
#define O_LBMR_TOPIC_OPT_UME_T_FLAGS OFFSETOF(lbmr_topic_opt_ume_t, flags)
#define L_LBMR_TOPIC_OPT_UME_T_FLAGS SIZEOF(lbmr_topic_opt_ume_t, flags)
#define O_LBMR_TOPIC_OPT_UME_T_STORE_TCP_PORT OFFSETOF(lbmr_topic_opt_ume_t, store_tcp_port)
#define L_LBMR_TOPIC_OPT_UME_T_STORE_TCP_PORT SIZEOF(lbmr_topic_opt_ume_t, store_tcp_port)
#define O_LBMR_TOPIC_OPT_UME_T_SRC_TCP_PORT OFFSETOF(lbmr_topic_opt_ume_t, src_tcp_port)
#define L_LBMR_TOPIC_OPT_UME_T_SRC_TCP_PORT SIZEOF(lbmr_topic_opt_ume_t, src_tcp_port)
#define O_LBMR_TOPIC_OPT_UME_T_STORE_TCP_ADDR OFFSETOF(lbmr_topic_opt_ume_t, store_tcp_addr)
#define L_LBMR_TOPIC_OPT_UME_T_STORE_TCP_ADDR SIZEOF(lbmr_topic_opt_ume_t, store_tcp_addr)
#define O_LBMR_TOPIC_OPT_UME_T_SRC_TCP_ADDR OFFSETOF(lbmr_topic_opt_ume_t, src_tcp_addr)
#define L_LBMR_TOPIC_OPT_UME_T_SRC_TCP_ADDR SIZEOF(lbmr_topic_opt_ume_t, src_tcp_addr)
#define O_LBMR_TOPIC_OPT_UME_T_SRC_REG_ID OFFSETOF(lbmr_topic_opt_ume_t, src_reg_id)
#define L_LBMR_TOPIC_OPT_UME_T_SRC_REG_ID SIZEOF(lbmr_topic_opt_ume_t, src_reg_id)
#define O_LBMR_TOPIC_OPT_UME_T_TRANSPORT_IDX OFFSETOF(lbmr_topic_opt_ume_t, transport_idx)
#define L_LBMR_TOPIC_OPT_UME_T_TRANSPORT_IDX SIZEOF(lbmr_topic_opt_ume_t, transport_idx)
#define O_LBMR_TOPIC_OPT_UME_T_HIGH_SEQNUM OFFSETOF(lbmr_topic_opt_ume_t, high_seqnum)
#define L_LBMR_TOPIC_OPT_UME_T_HIGH_SEQNUM SIZEOF(lbmr_topic_opt_ume_t, high_seqnum)
#define O_LBMR_TOPIC_OPT_UME_T_LOW_SEQNUM OFFSETOF(lbmr_topic_opt_ume_t, low_seqnum)
#define L_LBMR_TOPIC_OPT_UME_T_LOW_SEQNUM SIZEOF(lbmr_topic_opt_ume_t, low_seqnum)
#define L_LBMR_TOPIC_OPT_UME_T (gint) sizeof(lbmr_topic_opt_ume_t)
#define LBMR_TOPIC_OPT_UME_TYPE 0x01
#define LBMR_TOPIC_OPT_UME_FLAG_IGNORE 0x8000
#define LBMR_TOPIC_OPT_UME_FLAG_LATEJOIN 0x4000
#define LBMR_TOPIC_OPT_UME_FLAG_STORE 0x2000
#define LBMR_TOPIC_OPT_UME_FLAG_QCCAP 0x1000
#define LBMR_TOPIC_OPT_UME_FLAG_ACKTOSRC 0x800
#define LBMR_TOPIC_OPT_UME_SZ 32
/* LBMR topic UME store option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint8_t flags;
lbm_uint8_t grp_idx;
lbm_uint16_t store_tcp_port;
lbm_uint16_t store_idx;
lbm_uint32_t store_ip_addr;
lbm_uint32_t src_reg_id;
} lbmr_topic_opt_ume_store_t;
#define O_LBMR_TOPIC_OPT_UME_STORE_T_TYPE OFFSETOF(lbmr_topic_opt_ume_store_t, type)
#define L_LBMR_TOPIC_OPT_UME_STORE_T_TYPE SIZEOF(lbmr_topic_opt_ume_store_t, type)
#define O_LBMR_TOPIC_OPT_UME_STORE_T_LEN OFFSETOF(lbmr_topic_opt_ume_store_t, len)
#define L_LBMR_TOPIC_OPT_UME_STORE_T_LEN SIZEOF(lbmr_topic_opt_ume_store_t, len)
#define O_LBMR_TOPIC_OPT_UME_STORE_T_FLAGS OFFSETOF(lbmr_topic_opt_ume_store_t, flags)
#define L_LBMR_TOPIC_OPT_UME_STORE_T_FLAGS SIZEOF(lbmr_topic_opt_ume_store_t, flags)
#define O_LBMR_TOPIC_OPT_UME_STORE_T_GRP_IDX OFFSETOF(lbmr_topic_opt_ume_store_t, grp_idx)
#define L_LBMR_TOPIC_OPT_UME_STORE_T_GRP_IDX SIZEOF(lbmr_topic_opt_ume_store_t, grp_idx)
#define O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_TCP_PORT OFFSETOF(lbmr_topic_opt_ume_store_t, store_tcp_port)
#define L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_TCP_PORT SIZEOF(lbmr_topic_opt_ume_store_t, store_tcp_port)
#define O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IDX OFFSETOF(lbmr_topic_opt_ume_store_t, store_idx)
#define L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IDX SIZEOF(lbmr_topic_opt_ume_store_t, store_idx)
#define O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IP_ADDR OFFSETOF(lbmr_topic_opt_ume_store_t, store_ip_addr)
#define L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IP_ADDR SIZEOF(lbmr_topic_opt_ume_store_t, store_ip_addr)
#define O_LBMR_TOPIC_OPT_UME_STORE_T_SRC_REG_ID OFFSETOF(lbmr_topic_opt_ume_store_t, src_reg_id)
#define L_LBMR_TOPIC_OPT_UME_STORE_T_SRC_REG_ID SIZEOF(lbmr_topic_opt_ume_store_t, src_reg_id)
#define L_LBMR_TOPIC_OPT_UME_STORE_T (gint) sizeof(lbmr_topic_opt_ume_store_t)
#define LBMR_TOPIC_OPT_UME_STORE_TYPE 0x02
#define LBMR_TOPIC_OPT_UME_STORE_FLAG_IGNORE 0x80
#define LBMR_TOPIC_OPT_UME_STORE_SZ 16
/* LBMR topic UME store group option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint8_t flags;
lbm_uint8_t grp_idx;
lbm_uint16_t grp_sz;
lbm_uint16_t reserved;
} lbmr_topic_opt_ume_store_group_t;
#define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_TYPE OFFSETOF(lbmr_topic_opt_ume_store_group_t, type)
#define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_TYPE SIZEOF(lbmr_topic_opt_ume_store_group_t, type)
#define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_LEN OFFSETOF(lbmr_topic_opt_ume_store_group_t, len)
#define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_LEN SIZEOF(lbmr_topic_opt_ume_store_group_t, len)
#define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_FLAGS OFFSETOF(lbmr_topic_opt_ume_store_group_t, flags)
#define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_FLAGS SIZEOF(lbmr_topic_opt_ume_store_group_t, flags)
#define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_IDX OFFSETOF(lbmr_topic_opt_ume_store_group_t, grp_idx)
#define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_IDX SIZEOF(lbmr_topic_opt_ume_store_group_t, grp_idx)
#define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_SZ OFFSETOF(lbmr_topic_opt_ume_store_group_t, grp_sz)
#define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_SZ SIZEOF(lbmr_topic_opt_ume_store_group_t, grp_sz)
#define O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_RESERVED OFFSETOF(lbmr_topic_opt_ume_store_group_t, reserved)
#define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_RESERVED SIZEOF(lbmr_topic_opt_ume_store_group_t, reserved)
#define L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T (gint) sizeof(lbmr_topic_opt_ume_store_group_t)
#define LBMR_TOPIC_OPT_UME_STORE_GROUP_TYPE 0x03
#define LBMR_TOPIC_OPT_UME_STORE_GROUP_FLAG_IGNORE 0x80
#define LBMR_TOPIC_OPT_UME_STORE_GROUP_SZ 8
/* LBMR topic latejoin option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint16_t src_tcp_port;
lbm_uint16_t reserved;
lbm_uint32_t src_ip_addr;
lbm_uint32_t transport_idx;
lbm_uint32_t high_seqnum;
lbm_uint32_t low_seqnum;
} lbmr_topic_opt_latejoin_t;
#define O_LBMR_TOPIC_OPT_LATEJOIN_T_TYPE OFFSETOF(lbmr_topic_opt_latejoin_t, type)
#define L_LBMR_TOPIC_OPT_LATEJOIN_T_TYPE SIZEOF(lbmr_topic_opt_latejoin_t, type)
#define O_LBMR_TOPIC_OPT_LATEJOIN_T_LEN OFFSETOF(lbmr_topic_opt_latejoin_t, len)
#define L_LBMR_TOPIC_OPT_LATEJOIN_T_LEN SIZEOF(lbmr_topic_opt_latejoin_t, len)
#define O_LBMR_TOPIC_OPT_LATEJOIN_T_FLAGS OFFSETOF(lbmr_topic_opt_latejoin_t, flags)
#define L_LBMR_TOPIC_OPT_LATEJOIN_T_FLAGS SIZEOF(lbmr_topic_opt_latejoin_t, flags)
#define O_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_TCP_PORT OFFSETOF(lbmr_topic_opt_latejoin_t, src_tcp_port)
#define L_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_TCP_PORT SIZEOF(lbmr_topic_opt_latejoin_t, src_tcp_port)
#define O_LBMR_TOPIC_OPT_LATEJOIN_T_RESERVED OFFSETOF(lbmr_topic_opt_latejoin_t, reserved)
#define L_LBMR_TOPIC_OPT_LATEJOIN_T_RESERVED SIZEOF(lbmr_topic_opt_latejoin_t, reserved)
#define O_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_IP_ADDR OFFSETOF(lbmr_topic_opt_latejoin_t, src_ip_addr)
#define L_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_IP_ADDR SIZEOF(lbmr_topic_opt_latejoin_t, src_ip_addr)
#define O_LBMR_TOPIC_OPT_LATEJOIN_T_TRANSPORT_IDX OFFSETOF(lbmr_topic_opt_latejoin_t, transport_idx)
#define L_LBMR_TOPIC_OPT_LATEJOIN_T_TRANSPORT_IDX SIZEOF(lbmr_topic_opt_latejoin_t, transport_idx)
#define O_LBMR_TOPIC_OPT_LATEJOIN_T_HIGH_SEQNUM OFFSETOF(lbmr_topic_opt_latejoin_t, high_seqnum)
#define L_LBMR_TOPIC_OPT_LATEJOIN_T_HIGH_SEQNUM SIZEOF(lbmr_topic_opt_latejoin_t, high_seqnum)
#define O_LBMR_TOPIC_OPT_LATEJOIN_T_LOW_SEQNUM OFFSETOF(lbmr_topic_opt_latejoin_t, low_seqnum)
#define L_LBMR_TOPIC_OPT_LATEJOIN_T_LOW_SEQNUM SIZEOF(lbmr_topic_opt_latejoin_t, low_seqnum)
#define L_LBMR_TOPIC_OPT_LATEJOIN_T (gint) sizeof(lbmr_topic_opt_latejoin_t)
#define LBMR_TOPIC_OPT_LATEJOIN_TYPE 0x04
#define LBMR_TOPIC_OPT_LATEJOIN_FLAG_IGNORE 0x8000
#define LBMR_TOPIC_OPT_LATEJOIN_FLAG_ACKTOSRC 0x4000
#define LBMR_TOPIC_OPT_LATEJOIN_SZ 24
/* LBMR topic queue control option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint32_t rcr_idx;
} lbmr_topic_opt_umq_rcridx_t;
#define O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_TYPE OFFSETOF(lbmr_topic_opt_umq_rcridx_t, type)
#define L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_TYPE SIZEOF(lbmr_topic_opt_umq_rcridx_t, type)
#define O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_LEN OFFSETOF(lbmr_topic_opt_umq_rcridx_t, len)
#define L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_LEN SIZEOF(lbmr_topic_opt_umq_rcridx_t, len)
#define O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_FLAGS OFFSETOF(lbmr_topic_opt_umq_rcridx_t, flags)
#define L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_FLAGS SIZEOF(lbmr_topic_opt_umq_rcridx_t, flags)
#define O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_RCR_IDX OFFSETOF(lbmr_topic_opt_umq_rcridx_t, rcr_idx)
#define L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_RCR_IDX SIZEOF(lbmr_topic_opt_umq_rcridx_t, rcr_idx)
#define L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T (gint) sizeof(lbmr_topic_opt_umq_rcridx_t)
#define LBMR_TOPIC_OPT_UMQ_RCRIDX_TYPE 0x05
#define LBMR_TOPIC_OPT_UMQ_RCRIDX_SZ 8
#define LBMR_TOPIC_OPT_UMQ_RCRIDX_FLAG_IGNORE 0x8000
#define LBMR_TOPIC_OPT_UMQ_QINFO_TYPE 0x06
#define LBMR_TOPIC_OPT_UMQ_FLAG_IGNORE 0x8000
#define LBMR_TOPIC_OPT_UMQ_FLAG_QUEUE 0x4000
#define LBMR_TOPIC_OPT_UMQ_FLAG_RCVLISTEN 0x2000
#define LBMR_TOPIC_OPT_UMQ_FLAG_CONTROL 0x1000
#define LBMR_TOPIC_OPT_UMQ_FLAG_SRCRCVLISTEN 0x0800
#define LBMR_TOPIC_OPT_UMQ_FLAG_PARTICIPANTS_ONLY 0x0400
#define LBMR_TOPIC_OPT_UMQ_MAX_QNAME_LEN 252
/* LBMR topic ULB option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint32_t queue_id;
lbm_uint8_t regid[8];
lbm_uint32_t ulb_src_id;
lbm_uint32_t src_ip_addr;
lbm_uint16_t src_tcp_port;
lbm_uint16_t reserved;
} lbmr_topic_opt_ulb_t;
#define O_LBMR_TOPIC_OPT_ULB_T_TYPE OFFSETOF(lbmr_topic_opt_ulb_t, type)
#define L_LBMR_TOPIC_OPT_ULB_T_TYPE SIZEOF(lbmr_topic_opt_ulb_t, type)
#define O_LBMR_TOPIC_OPT_ULB_T_LEN OFFSETOF(lbmr_topic_opt_ulb_t, len)
#define L_LBMR_TOPIC_OPT_ULB_T_LEN SIZEOF(lbmr_topic_opt_ulb_t, len)
#define O_LBMR_TOPIC_OPT_ULB_T_FLAGS OFFSETOF(lbmr_topic_opt_ulb_t, flags)
#define L_LBMR_TOPIC_OPT_ULB_T_FLAGS SIZEOF(lbmr_topic_opt_ulb_t, flags)
#define O_LBMR_TOPIC_OPT_ULB_T_QUEUE_ID OFFSETOF(lbmr_topic_opt_ulb_t, queue_id)
#define L_LBMR_TOPIC_OPT_ULB_T_QUEUE_ID SIZEOF(lbmr_topic_opt_ulb_t, queue_id)
#define O_LBMR_TOPIC_OPT_ULB_T_REGID OFFSETOF(lbmr_topic_opt_ulb_t, regid)
#define L_LBMR_TOPIC_OPT_ULB_T_REGID SIZEOF(lbmr_topic_opt_ulb_t, regid)
#define O_LBMR_TOPIC_OPT_ULB_T_ULB_SRC_ID OFFSETOF(lbmr_topic_opt_ulb_t, ulb_src_id)
#define L_LBMR_TOPIC_OPT_ULB_T_ULB_SRC_ID SIZEOF(lbmr_topic_opt_ulb_t, ulb_src_id)
#define O_LBMR_TOPIC_OPT_ULB_T_SRC_IP_ADDR OFFSETOF(lbmr_topic_opt_ulb_t, src_ip_addr)
#define L_LBMR_TOPIC_OPT_ULB_T_SRC_IP_ADDR SIZEOF(lbmr_topic_opt_ulb_t, src_ip_addr)
#define O_LBMR_TOPIC_OPT_ULB_T_SRC_TCP_PORT OFFSETOF(lbmr_topic_opt_ulb_t, src_tcp_port)
#define L_LBMR_TOPIC_OPT_ULB_T_SRC_TCP_PORT SIZEOF(lbmr_topic_opt_ulb_t, src_tcp_port)
#define O_LBMR_TOPIC_OPT_ULB_T_RESERVED OFFSETOF(lbmr_topic_opt_ulb_t, reserved)
#define L_LBMR_TOPIC_OPT_ULB_T_RESERVED SIZEOF(lbmr_topic_opt_ulb_t, reserved)
#define L_LBMR_TOPIC_OPT_ULB_T (gint) sizeof(lbmr_topic_opt_ulb_t)
#define LBMR_TOPIC_OPT_ULB_TYPE 0x0B
#define LBMR_TOPIC_OPT_ULB_FLAG_IGNORE 0x8000
#define LBMR_TOPIC_OPT_ULB_SZ 28
/* LBMR topic cost option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint8_t flags;
lbm_uint8_t hop_count;
lbm_uint32_t cost;
} lbmr_topic_opt_cost_t;
#define O_LBMR_TOPIC_OPT_COST_T_TYPE OFFSETOF(lbmr_topic_opt_cost_t, type)
#define L_LBMR_TOPIC_OPT_COST_T_TYPE SIZEOF(lbmr_topic_opt_cost_t, type)
#define O_LBMR_TOPIC_OPT_COST_T_LEN OFFSETOF(lbmr_topic_opt_cost_t, len)
#define L_LBMR_TOPIC_OPT_COST_T_LEN SIZEOF(lbmr_topic_opt_cost_t, len)
#define O_LBMR_TOPIC_OPT_COST_T_FLAGS OFFSETOF(lbmr_topic_opt_cost_t, flags)
#define L_LBMR_TOPIC_OPT_COST_T_FLAGS SIZEOF(lbmr_topic_opt_cost_t, flags)
#define O_LBMR_TOPIC_OPT_COST_T_HOP_COUNT OFFSETOF(lbmr_topic_opt_cost_t, hop_count)
#define L_LBMR_TOPIC_OPT_COST_T_HOP_COUNT SIZEOF(lbmr_topic_opt_cost_t, hop_count)
#define O_LBMR_TOPIC_OPT_COST_T_COST OFFSETOF(lbmr_topic_opt_cost_t, cost)
#define L_LBMR_TOPIC_OPT_COST_T_COST SIZEOF(lbmr_topic_opt_cost_t, cost)
#define L_LBMR_TOPIC_OPT_COST_T (gint) sizeof(lbmr_topic_opt_cost_t)
#define LBMR_TOPIC_OPT_COST_TYPE 0x07
#define LBMR_TOPIC_OPT_COST_FLAG_IGNORE 0x80
#define LBMR_TOPIC_OPT_COST_SZ 8
/* LBMR topic originating transport ID option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint8_t originating_transport[LBM_OTID_BLOCK_SZ];
} lbmr_topic_opt_otid_t;
#define O_LBMR_TOPIC_OPT_OTID_T_TYPE OFFSETOF(lbmr_topic_opt_otid_t, type)
#define L_LBMR_TOPIC_OPT_OTID_T_TYPE SIZEOF(lbmr_topic_opt_otid_t, type)
#define O_LBMR_TOPIC_OPT_OTID_T_LEN OFFSETOF(lbmr_topic_opt_otid_t, len)
#define L_LBMR_TOPIC_OPT_OTID_T_LEN SIZEOF(lbmr_topic_opt_otid_t, len)
#define O_LBMR_TOPIC_OPT_OTID_T_FLAGS OFFSETOF(lbmr_topic_opt_otid_t, flags)
#define L_LBMR_TOPIC_OPT_OTID_T_FLAGS SIZEOF(lbmr_topic_opt_otid_t, flags)
#define O_LBMR_TOPIC_OPT_OTID_T_ORIGINATING_TRANSPORT OFFSETOF(lbmr_topic_opt_otid_t, originating_transport)
#define L_LBMR_TOPIC_OPT_OTID_T_ORIGINATING_TRANSPORT SIZEOF(lbmr_topic_opt_otid_t, originating_transport)
#define L_LBMR_TOPIC_OPT_OTID_T (gint) sizeof(lbmr_topic_opt_otid_t)
#define LBMR_TOPIC_OPT_OTID_TYPE 0x08
#define LBMR_TOPIC_OPT_OTID_FLAG_IGNORE 0x8000
#define LBMR_TOPIC_OPT_OTID_SZ 36
/* LBMR topic context instance transport option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint8_t flags;
lbm_uint8_t res;
lbm_uint8_t ctxinst[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
} lbmr_topic_opt_ctxinst_t;
#define O_LBMR_TOPIC_OPT_CTXINST_T_TYPE OFFSETOF(lbmr_topic_opt_ctxinst_t, type)
#define L_LBMR_TOPIC_OPT_CTXINST_T_TYPE SIZEOF(lbmr_topic_opt_ctxinst_t, type)
#define O_LBMR_TOPIC_OPT_CTXINST_T_LEN OFFSETOF(lbmr_topic_opt_ctxinst_t, len)
#define L_LBMR_TOPIC_OPT_CTXINST_T_LEN SIZEOF(lbmr_topic_opt_ctxinst_t, len)
#define O_LBMR_TOPIC_OPT_CTXINST_T_FLAGS OFFSETOF(lbmr_topic_opt_ctxinst_t, flags)
#define L_LBMR_TOPIC_OPT_CTXINST_T_FLAGS SIZEOF(lbmr_topic_opt_ctxinst_t, flags)
#define O_LBMR_TOPIC_OPT_CTXINST_T_RES OFFSETOF(lbmr_topic_opt_ctxinst_t, res)
#define L_LBMR_TOPIC_OPT_CTXINST_T_RES SIZEOF(lbmr_topic_opt_ctxinst_t, res)
#define O_LBMR_TOPIC_OPT_CTXINST_T_CTXINST OFFSETOF(lbmr_topic_opt_ctxinst_t, ctxinst)
#define L_LBMR_TOPIC_OPT_CTXINST_T_CTXINST SIZEOF(lbmr_topic_opt_ctxinst_t, ctxinst)
#define L_LBMR_TOPIC_OPT_CTXINST_T (gint) sizeof(lbmr_topic_opt_ctxinst_t)
#define LBMR_TOPIC_OPT_CTXINST_TYPE 0x09
#define LBMR_TOPIC_OPT_CTXINST_FLAG_IGNORE 0x80
#define LBMR_TOPIC_OPT_CTXINST_SZ 12
/* LBMR topic context instance store transport option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint8_t flags;
lbm_uint8_t idx;
lbm_uint8_t ctxinst[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
} lbmr_topic_opt_ctxinsts_t;
#define O_LBMR_TOPIC_OPT_CTXINSTS_T_TYPE OFFSETOF(lbmr_topic_opt_ctxinsts_t, type)
#define L_LBMR_TOPIC_OPT_CTXINSTS_T_TYPE SIZEOF(lbmr_topic_opt_ctxinsts_t, type)
#define O_LBMR_TOPIC_OPT_CTXINSTS_T_LEN OFFSETOF(lbmr_topic_opt_ctxinsts_t, len)
#define L_LBMR_TOPIC_OPT_CTXINSTS_T_LEN SIZEOF(lbmr_topic_opt_ctxinsts_t, len)
#define O_LBMR_TOPIC_OPT_CTXINSTS_T_FLAGS OFFSETOF(lbmr_topic_opt_ctxinsts_t, flags)
#define L_LBMR_TOPIC_OPT_CTXINSTS_T_FLAGS SIZEOF(lbmr_topic_opt_ctxinsts_t, flags)
#define O_LBMR_TOPIC_OPT_CTXINSTS_T_IDX OFFSETOF(lbmr_topic_opt_ctxinsts_t, idx)
#define L_LBMR_TOPIC_OPT_CTXINSTS_T_IDX SIZEOF(lbmr_topic_opt_ctxinsts_t, idx)
#define O_LBMR_TOPIC_OPT_CTXINSTS_T_CTXINST OFFSETOF(lbmr_topic_opt_ctxinsts_t, ctxinst)
#define L_LBMR_TOPIC_OPT_CTXINSTS_T_CTXINST SIZEOF(lbmr_topic_opt_ctxinsts_t, ctxinst)
#define L_LBMR_TOPIC_OPT_CTXINSTS_T (gint) sizeof(lbmr_topic_opt_ctxinsts_t)
#define LBMR_TOPIC_OPT_CTXINSTS_TYPE 0x0A
#define LBMR_TOPIC_OPT_CTXINSTS_FLAG_IGNORE 0x80
#define LBMR_TOPIC_OPT_CTXINSTS_SZ 12
/* LBMR topic context instance queue transport option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint8_t flags;
lbm_uint8_t idx;
lbm_uint8_t ctxinst[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
} lbmr_topic_opt_ctxinstq_t;
#define O_LBMR_TOPIC_OPT_CTXINSTQ_T_TYPE OFFSETOF(lbmr_topic_opt_ctxinstq_t, type)
#define L_LBMR_TOPIC_OPT_CTXINSTQ_T_TYPE SIZEOF(lbmr_topic_opt_ctxinstq_t, type)
#define O_LBMR_TOPIC_OPT_CTXINSTQ_T_LEN OFFSETOF(lbmr_topic_opt_ctxinstq_t, len)
#define L_LBMR_TOPIC_OPT_CTXINSTQ_T_LEN SIZEOF(lbmr_topic_opt_ctxinstq_t, len)
#define O_LBMR_TOPIC_OPT_CTXINSTQ_T_FLAGS OFFSETOF(lbmr_topic_opt_ctxinstq_t, flags)
#define L_LBMR_TOPIC_OPT_CTXINSTQ_T_FLAGS SIZEOF(lbmr_topic_opt_ctxinstq_t, flags)
#define O_LBMR_TOPIC_OPT_CTXINSTQ_T_IDX OFFSETOF(lbmr_topic_opt_ctxinstq_t, idx)
#define L_LBMR_TOPIC_OPT_CTXINSTQ_T_IDX SIZEOF(lbmr_topic_opt_ctxinstq_t, idx)
#define O_LBMR_TOPIC_OPT_CTXINSTQ_T_CTXINST OFFSETOF(lbmr_topic_opt_ctxinstq_t, ctxinst)
#define L_LBMR_TOPIC_OPT_CTXINSTQ_T_CTXINST SIZEOF(lbmr_topic_opt_ctxinstq_t, ctxinst)
#define L_LBMR_TOPIC_OPT_CTXINSTQ_T (gint) sizeof(lbmr_topic_opt_ctxinstq_t)
#define LBMR_TOPIC_OPT_CTXINSTQ_TYPE 0x0C
#define LBMR_TOPIC_OPT_CTXINSTQ_FLAG_IGNORE 0x80
#define LBMR_TOPIC_OPT_CTXINSTQ_SZ 12
/* LBMR topic domain ID option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint32_t domain_id;
} lbmr_topic_opt_domain_id_t;
#define O_LBMR_TOPIC_OPT_DOMAIN_ID_T_TYPE OFFSETOF(lbmr_topic_opt_domain_id_t, type)
#define L_LBMR_TOPIC_OPT_DOMAIN_ID_T_TYPE SIZEOF(lbmr_topic_opt_domain_id_t, type)
#define O_LBMR_TOPIC_OPT_DOMAIN_ID_T_LEN OFFSETOF(lbmr_topic_opt_domain_id_t, len)
#define L_LBMR_TOPIC_OPT_DOMAIN_ID_T_LEN SIZEOF(lbmr_topic_opt_domain_id_t, len)
#define O_LBMR_TOPIC_OPT_DOMAIN_ID_T_FLAGS OFFSETOF(lbmr_topic_opt_domain_id_t, flags)
#define L_LBMR_TOPIC_OPT_DOMAIN_ID_T_FLAGS SIZEOF(lbmr_topic_opt_domain_id_t, flags)
#define O_LBMR_TOPIC_OPT_DOMAIN_ID_T_DOMAIN_ID OFFSETOF(lbmr_topic_opt_domain_id_t, domain_id)
#define L_LBMR_TOPIC_OPT_DOMAIN_ID_T_DOMAIN_ID SIZEOF(lbmr_topic_opt_domain_id_t, domain_id)
#define L_LBMR_TOPIC_OPT_DOMAIN_ID_T (gint) sizeof(lbmr_topic_opt_domain_id_t)
#define LBMR_TOPIC_OPT_DOMAIN_ID_TYPE 0x0D
#define LBMR_TOPIC_OPT_DOMAIN_ID_FLAG_IGNORE 0x8000
#define LBMR_TOPIC_OPT_DOMAIN_ID_SZ 8
/* LBMR topic extended functionality option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint16_t src_tcp_port;
lbm_uint16_t reserved;
lbm_uint32_t src_ip_addr;
lbm_uint32_t functionality_flags;
} lbmr_topic_opt_exfunc_t;
#define O_LBMR_TOPIC_OPT_EXFUNC_T_TYPE OFFSETOF(lbmr_topic_opt_exfunc_t, type)
#define L_LBMR_TOPIC_OPT_EXFUNC_T_TYPE SIZEOF(lbmr_topic_opt_exfunc_t, type)
#define O_LBMR_TOPIC_OPT_EXFUNC_T_LEN OFFSETOF(lbmr_topic_opt_exfunc_t, len)
#define L_LBMR_TOPIC_OPT_EXFUNC_T_LEN SIZEOF(lbmr_topic_opt_exfunc_t, len)
#define O_LBMR_TOPIC_OPT_EXFUNC_T_FLAGS OFFSETOF(lbmr_topic_opt_exfunc_t, flags)
#define L_LBMR_TOPIC_OPT_EXFUNC_T_FLAGS SIZEOF(lbmr_topic_opt_exfunc_t, flags)
#define O_LBMR_TOPIC_OPT_EXFUNC_T_SRC_TCP_PORT OFFSETOF(lbmr_topic_opt_exfunc_t, src_tcp_port)
#define L_LBMR_TOPIC_OPT_EXFUNC_T_SRC_TCP_PORT SIZEOF(lbmr_topic_opt_exfunc_t, src_tcp_port)
#define O_LBMR_TOPIC_OPT_EXFUNC_T_RESERVED OFFSETOF(lbmr_topic_opt_exfunc_t, reserved)
#define L_LBMR_TOPIC_OPT_EXFUNC_T_RESERVED SIZEOF(lbmr_topic_opt_exfunc_t, reserved)
#define O_LBMR_TOPIC_OPT_EXFUNC_T_SRC_IP_ADDR OFFSETOF(lbmr_topic_opt_exfunc_t, src_ip_addr)
#define L_LBMR_TOPIC_OPT_EXFUNC_T_SRC_IP_ADDR SIZEOF(lbmr_topic_opt_exfunc_t, src_ip_addr)
#define O_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS OFFSETOF(lbmr_topic_opt_exfunc_t, functionality_flags)
#define L_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS SIZEOF(lbmr_topic_opt_exfunc_t, functionality_flags)
#define L_LBMR_TOPIC_OPT_EXFUNC_T (gint) sizeof(lbmr_topic_opt_exfunc_t)
#define LBMR_TOPIC_OPT_EXFUNC_TYPE 0x0E
#define LBMR_TOPIC_OPT_EXFUNC_FLAG_IGNORE 0x8000
#define LBMR_TOPIC_OPT_EXFUNC_SZ 16
/* Transports */
#define LBMR_TRANSPORT_TCP 0x00
#define LBMR_TRANSPORT_LBTRU 0x01
#define LBMR_TRANSPORT_TCP6 0x02
#define LBMR_TRANSPORT_LBTSMX 0x4
#define LBMR_TRANSPORT_LBTRM 0x10
#define LBMR_TRANSPORT_LBTIPC 0x40
#define LBMR_TRANSPORT_LBTRDMA 0x20
#define LBMR_TRANSPORT_PGM 0x11
#define LBMR_TRANSPORT_OPTION_MASK 0x80
/* LBMR context info */
typedef struct
{
lbm_uint8_t ver_type;
lbm_uint8_t ext_type;
lbm_uint8_t len;
lbm_uint8_t hop_count;
lbm_uint16_t flags;
lbm_uint16_t port;
lbm_uint32_t ip;
lbm_uint8_t instance[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
} lbmr_ctxinfo_t;
#define O_LBMR_CTXINFO_T_VER_TYPE OFFSETOF(lbmr_ctxinfo_t, ver_type)
#define L_LBMR_CTXINFO_T_VER_TYPE SIZEOF(lbmr_ctxinfo_t, ver_type)
#define O_LBMR_CTXINFO_T_EXT_TYPE OFFSETOF(lbmr_ctxinfo_t, ext_type)
#define L_LBMR_CTXINFO_T_EXT_TYPE SIZEOF(lbmr_ctxinfo_t, ext_type)
#define O_LBMR_CTXINFO_T_LEN OFFSETOF(lbmr_ctxinfo_t, len)
#define L_LBMR_CTXINFO_T_LEN SIZEOF(lbmr_ctxinfo_t, len)
#define O_LBMR_CTXINFO_T_HOP_COUNT OFFSETOF(lbmr_ctxinfo_t, hop_count)
#define L_LBMR_CTXINFO_T_HOP_COUNT SIZEOF(lbmr_ctxinfo_t, hop_count)
#define O_LBMR_CTXINFO_T_FLAGS OFFSETOF(lbmr_ctxinfo_t, flags)
#define L_LBMR_CTXINFO_T_FLAGS SIZEOF(lbmr_ctxinfo_t, flags)
#define O_LBMR_CTXINFO_T_PORT OFFSETOF(lbmr_ctxinfo_t, port)
#define L_LBMR_CTXINFO_T_PORT SIZEOF(lbmr_ctxinfo_t, port)
#define O_LBMR_CTXINFO_T_IP OFFSETOF(lbmr_ctxinfo_t, ip)
#define L_LBMR_CTXINFO_T_IP SIZEOF(lbmr_ctxinfo_t, ip)
#define O_LBMR_CTXINFO_T_INSTANCE OFFSETOF(lbmr_ctxinfo_t, instance)
#define L_LBMR_CTXINFO_T_INSTANCE SIZEOF(lbmr_ctxinfo_t, instance)
#define L_LBMR_CTXINFO_T (gint) sizeof(lbmr_ctxinfo_t)
#define LBMR_CTXINFO_QUERY_FLAG 0x8000
#define LBMR_CTXINFO_IP_FLAG 0x4000
#define LBMR_CTXINFO_INSTANCE_FLAG 0x2000
#define LBMR_CTXINFO_TNWG_SRC_FLAG 0x1000
#define LBMR_CTXINFO_TNWG_RCV_FLAG 0x0800
#define LBMR_CTXINFO_PROXY_FLAG 0x0400
#define LBMR_CTXINFO_NAME_FLAG 0x0001
/* LBMR topic resolution request */
typedef struct
{
lbm_uint8_t ver_type;
lbm_uint8_t ext_type;
lbm_uint16_t flags;
} lbmr_topic_res_request_t;
#define O_LBMR_TOPIC_RES_REQUEST_T_VER_TYPE OFFSETOF(lbmr_topic_res_request_t, ver_type)
#define L_LBMR_TOPIC_RES_REQUEST_T_VER_TYPE SIZEOF(lbmr_topic_res_request_t, ver_type)
#define O_LBMR_TOPIC_RES_REQUEST_T_EXT_TYPE OFFSETOF(lbmr_topic_res_request_t, ext_type)
#define L_LBMR_TOPIC_RES_REQUEST_T_EXT_TYPE SIZEOF(lbmr_topic_res_request_t, ext_type)
#define O_LBMR_TOPIC_RES_REQUEST_T_FLAGS OFFSETOF(lbmr_topic_res_request_t, flags)
#define L_LBMR_TOPIC_RES_REQUEST_T_FLAGS SIZEOF(lbmr_topic_res_request_t, flags)
#define L_LBMR_TOPIC_RES_REQUEST_T (gint) sizeof(lbmr_topic_res_request_t)
#define LBM_TOPIC_RES_REQUEST_GW_REMOTE_INTEREST 0x40
#define LBM_TOPIC_RES_REQUEST_CONTEXT_QUERY 0x20
#define LBM_TOPIC_RES_REQUEST_CONTEXT_ADVERTISEMENT 0x10
#define LBM_TOPIC_RES_REQUEST_RESERVED1 0x08
#define LBM_TOPIC_RES_REQUEST_ADVERTISEMENT 0x04
#define LBM_TOPIC_RES_REQUEST_QUERY 0x02
#define LBM_TOPIC_RES_REQUEST_WILDCARD_QUERY 0x01
/* LBMR topic management block */
typedef struct
{
lbm_uint16_t len;
lbm_uint16_t tmrs;
} lbmr_tmb_t;
#define O_LBMR_TMB_T_LEN OFFSETOF(lbmr_tmb_t, len)
#define L_LBMR_TMB_T_LEN SIZEOF(lbmr_tmb_t, len)
#define O_LBMR_TMB_T_TMRS OFFSETOF(lbmr_tmb_t, tmrs)
#define L_LBMR_TMB_T_TMRS SIZEOF(lbmr_tmb_t, tmrs)
#define L_LBMR_TMB_T (gint) sizeof(lbmr_tmb_t)
/* LBMR topic management record */
typedef struct
{
lbm_uint16_t len;
lbm_uint8_t type;
lbm_uint8_t flags;
} lbmr_tmr_t;
#define O_LBMR_TMR_T_LEN OFFSETOF(lbmr_tmr_t, len)
#define L_LBMR_TMR_T_LEN SIZEOF(lbmr_tmr_t, len)
#define O_LBMR_TMR_T_TYPE OFFSETOF(lbmr_tmr_t, type)
#define L_LBMR_TMR_T_TYPE SIZEOF(lbmr_tmr_t, type)
#define O_LBMR_TMR_T_FLAGS OFFSETOF(lbmr_tmr_t, flags)
#define L_LBMR_TMR_T_FLAGS SIZEOF(lbmr_tmr_t, flags)
#define L_LBMR_TMR_T (gint) sizeof(lbmr_tmr_t)
#define LBMR_TMR_LEAVE_TOPIC 0x00
#define LBMR_TMR_TOPIC_USE 0x01
#define LBMR_TMR_FLAG_RESPONSE 0x80
#define LBMR_TMR_FLAG_WILDCARD_PCRE 0x40
#define LBMR_TMR_FLAG_WILDCARD_REGEX 0x20
#define LBMR_TMR_FLAG_WILDCARD_MASK (LBMR_TMR_FLAG_WILDCARD_PCRE | LBMR_TMR_FLAG_WILDCARD_REGEX)
/* LBMR queue information record */
typedef struct
{
lbm_uint32_t queue_id;
lbm_uint32_t queue_ver;
lbm_uint32_t queue_prev_ver;
lbm_uint16_t grp_blks;
lbm_uint16_t queue_blks;
} lbmr_qir_t;
#define O_LBMR_QIR_T_QUEUE_ID OFFSETOF(lbmr_qir_t, queue_id)
#define L_LBMR_QIR_T_QUEUE_ID SIZEOF(lbmr_qir_t, queue_id)
#define O_LBMR_QIR_T_QUEUE_VER OFFSETOF(lbmr_qir_t, queue_ver)
#define L_LBMR_QIR_T_QUEUE_VER SIZEOF(lbmr_qir_t, queue_ver)
#define O_LBMR_QIR_T_QUEUE_PREV_VER OFFSETOF(lbmr_qir_t, queue_prev_ver)
#define L_LBMR_QIR_T_QUEUE_PREV_VER SIZEOF(lbmr_qir_t, queue_prev_ver)
#define O_LBMR_QIR_T_GRP_BLKS OFFSETOF(lbmr_qir_t, grp_blks)
#define L_LBMR_QIR_T_GRP_BLKS SIZEOF(lbmr_qir_t, grp_blks)
#define O_LBMR_QIR_T_QUEUE_BLKS OFFSETOF(lbmr_qir_t, queue_blks)
#define L_LBMR_QIR_T_QUEUE_BLKS SIZEOF(lbmr_qir_t, queue_blks)
#define L_LBMR_QIR_T (gint) sizeof(lbmr_qir_t)
#define LBMR_QIR_OPTIONS 0x8000
#define LBMR_QIR_GRP_BLOCKS_MASK 0x7fff
/* LBMR queue group block record */
typedef struct
{
lbm_uint16_t grp_idx;
lbm_uint16_t grp_sz;
} lbmr_qir_grp_blk_t;
#define O_LBMR_QIR_GRP_BLK_T_GRP_IDX OFFSETOF(lbmr_qir_grp_blk_t, grp_idx)
#define L_LBMR_QIR_GRP_BLK_T_GRP_IDX SIZEOF(lbmr_qir_grp_blk_t, grp_idx)
#define O_LBMR_QIR_GRP_BLK_T_GRP_SZ OFFSETOF(lbmr_qir_grp_blk_t, grp_sz)
#define L_LBMR_QIR_GRP_BLK_T_GRP_SZ SIZEOF(lbmr_qir_grp_blk_t, grp_sz)
#define L_LBMR_QIR_GRP_BLK_T (gint) sizeof(lbmr_qir_grp_blk_t)
/* LBMR queue block record */
typedef struct
{
lbm_uint32_t ip;
lbm_uint16_t port;
lbm_uint16_t idx;
lbm_uint16_t grp_idx;
lbm_uint16_t reserved;
} lbmr_qir_queue_blk_t;
#define O_LBMR_QIR_QUEUE_BLK_T_IP OFFSETOF(lbmr_qir_queue_blk_t, ip)
#define L_LBMR_QIR_QUEUE_BLK_T_IP SIZEOF(lbmr_qir_queue_blk_t, ip)
#define O_LBMR_QIR_QUEUE_BLK_T_PORT OFFSETOF(lbmr_qir_queue_blk_t, port)
#define L_LBMR_QIR_QUEUE_BLK_T_PORT SIZEOF(lbmr_qir_queue_blk_t, port)
#define O_LBMR_QIR_QUEUE_BLK_T_IDX OFFSETOF(lbmr_qir_queue_blk_t, idx)
#define L_LBMR_QIR_QUEUE_BLK_T_IDX SIZEOF(lbmr_qir_queue_blk_t, idx)
#define O_LBMR_QIR_QUEUE_BLK_T_GRP_IDX OFFSETOF(lbmr_qir_queue_blk_t, grp_idx)
#define L_LBMR_QIR_QUEUE_BLK_T_GRP_IDX SIZEOF(lbmr_qir_queue_blk_t, grp_idx)
#define O_LBMR_QIR_QUEUE_BLK_T_RESERVED OFFSETOF(lbmr_qir_queue_blk_t, reserved)
#define L_LBMR_QIR_QUEUE_BLK_T_RESERVED SIZEOF(lbmr_qir_queue_blk_t, reserved)
#define L_LBMR_QIR_QUEUE_BLK_T (gint) sizeof(lbmr_qir_queue_blk_t)
#define LBMR_QIR_QUEUE_BLK_FLAG_MASTER 0x8000
/* LBMR packet option header */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
} lbmr_lbmr_opt_hdr_t;
#define O_LBMR_LBMR_OPT_HDR_T_TYPE OFFSETOF(lbmr_lbmr_opt_hdr_t, type)
#define L_LBMR_LBMR_OPT_HDR_T_TYPE SIZEOF(lbmr_lbmr_opt_hdr_t, type)
#define O_LBMR_LBMR_OPT_HDR_T_LEN OFFSETOF(lbmr_lbmr_opt_hdr_t, len)
#define L_LBMR_LBMR_OPT_HDR_T_LEN SIZEOF(lbmr_lbmr_opt_hdr_t, len)
#define O_LBMR_LBMR_OPT_HDR_T_FLAGS OFFSETOF(lbmr_lbmr_opt_hdr_t, flags)
#define L_LBMR_LBMR_OPT_HDR_T_FLAGS SIZEOF(lbmr_lbmr_opt_hdr_t, flags)
#define L_LBMR_LBMR_OPT_HDR_T (gint) sizeof(lbmr_lbmr_opt_hdr_t)
#define LBMR_LBMR_OPT_HDR_FLAG_IGNORE 0x8000
/* LBMR packet option length header */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t total_len;
} lbmr_lbmr_opt_len_t;
#define O_LBMR_LBMR_OPT_LEN_T_TYPE OFFSETOF(lbmr_lbmr_opt_len_t, type)
#define L_LBMR_LBMR_OPT_LEN_T_TYPE SIZEOF(lbmr_lbmr_opt_len_t, type)
#define O_LBMR_LBMR_OPT_LEN_T_LEN OFFSETOF(lbmr_lbmr_opt_len_t, len)
#define L_LBMR_LBMR_OPT_LEN_T_LEN SIZEOF(lbmr_lbmr_opt_len_t, len)
#define O_LBMR_LBMR_OPT_LEN_T_TOTAL_LEN OFFSETOF(lbmr_lbmr_opt_len_t, total_len)
#define L_LBMR_LBMR_OPT_LEN_T_TOTAL_LEN SIZEOF(lbmr_lbmr_opt_len_t, total_len)
#define L_LBMR_LBMR_OPT_LEN_T (gint) sizeof(lbmr_lbmr_opt_len_t)
#define LBMR_LBMR_OPT_LEN_TYPE 0x80
/* LBMR packet option source ID header */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint8_t src_id[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
} lbmr_lbmr_opt_src_id_t;
#define O_LBMR_LBMR_OPT_SRC_ID_T_TYPE OFFSETOF(lbmr_lbmr_opt_src_id_t, type)
#define L_LBMR_LBMR_OPT_SRC_ID_T_TYPE SIZEOF(lbmr_lbmr_opt_src_id_t, type)
#define O_LBMR_LBMR_OPT_SRC_ID_T_LEN OFFSETOF(lbmr_lbmr_opt_src_id_t, len)
#define L_LBMR_LBMR_OPT_SRC_ID_T_LEN SIZEOF(lbmr_lbmr_opt_src_id_t, len)
#define O_LBMR_LBMR_OPT_SRC_ID_T_FLAGS OFFSETOF(lbmr_lbmr_opt_src_id_t, flags)
#define L_LBMR_LBMR_OPT_SRC_ID_T_FLAGS SIZEOF(lbmr_lbmr_opt_src_id_t, flags)
#define O_LBMR_LBMR_OPT_SRC_ID_T_SRC_ID OFFSETOF(lbmr_lbmr_opt_src_id_t, src_id)
#define L_LBMR_LBMR_OPT_SRC_ID_T_SRC_ID SIZEOF(lbmr_lbmr_opt_src_id_t, src_id)
#define L_LBMR_LBMR_OPT_SRC_ID_T (gint) sizeof(lbmr_lbmr_opt_src_id_t)
#define LBMR_LBMR_OPT_SRC_ID_TYPE 0x81
#define LBMR_LBMR_OPT_SRC_ID_FLAG_IGNORE 0x8000
/* LBMR packet option source type header */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint8_t flags;
lbm_uint8_t src_type;
} lbmr_lbmr_opt_src_type_t;
#define O_LBMR_LBMR_OPT_SRC_TYPE_T_TYPE OFFSETOF(lbmr_lbmr_opt_src_type_t, type)
#define L_LBMR_LBMR_OPT_SRC_TYPE_T_TYPE SIZEOF(lbmr_lbmr_opt_src_type_t, type)
#define O_LBMR_LBMR_OPT_SRC_TYPE_T_LEN OFFSETOF(lbmr_lbmr_opt_src_type_t, len)
#define L_LBMR_LBMR_OPT_SRC_TYPE_T_LEN SIZEOF(lbmr_lbmr_opt_src_type_t, len)
#define O_LBMR_LBMR_OPT_SRC_TYPE_T_FLAGS OFFSETOF(lbmr_lbmr_opt_src_type_t, flags)
#define L_LBMR_LBMR_OPT_SRC_TYPE_T_FLAGS SIZEOF(lbmr_lbmr_opt_src_type_t, flags)
#define O_LBMR_LBMR_OPT_SRC_TYPE_T_SRC_TYPE OFFSETOF(lbmr_lbmr_opt_src_type_t, src_type)
#define L_LBMR_LBMR_OPT_SRC_TYPE_T_SRC_TYPE SIZEOF(lbmr_lbmr_opt_src_type_t, src_type)
#define L_LBMR_LBMR_OPT_SRC_TYPE_T (gint) sizeof(lbmr_lbmr_opt_src_type_t)
#define LBMR_LBMR_OPT_SRC_TYPE_TYPE 0x82
#define LBMR_LBMR_OPT_SRC_TYPE_SZ 4
#define LBMR_LBMR_OPT_SRC_TYPE_FLAG_IGNORE 0x80
#define LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_APPLICATION 0
#define LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_TNWGD 1
#define LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_STORE 2
/* LBMR packet option version header */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint32_t version;
} lbmr_lbmr_opt_version_t;
#define O_LBMR_LBMR_OPT_VERSION_T_TYPE OFFSETOF(lbmr_lbmr_opt_version_t, type)
#define L_LBMR_LBMR_OPT_VERSION_T_TYPE SIZEOF(lbmr_lbmr_opt_version_t, type)
#define O_LBMR_LBMR_OPT_VERSION_T_LEN OFFSETOF(lbmr_lbmr_opt_version_t, len)
#define L_LBMR_LBMR_OPT_VERSION_T_LEN SIZEOF(lbmr_lbmr_opt_version_t, len)
#define O_LBMR_LBMR_OPT_VERSION_T_FLAGS OFFSETOF(lbmr_lbmr_opt_version_t, flags)
#define L_LBMR_LBMR_OPT_VERSION_T_FLAGS SIZEOF(lbmr_lbmr_opt_version_t, flags)
#define O_LBMR_LBMR_OPT_VERSION_T_VERSION OFFSETOF(lbmr_lbmr_opt_version_t, version)
#define L_LBMR_LBMR_OPT_VERSION_T_VERSION SIZEOF(lbmr_lbmr_opt_version_t, version)
#define L_LBMR_LBMR_OPT_VERSION_T (gint) sizeof(lbmr_lbmr_opt_version_t)
#define LBMR_LBMR_OPT_VERSION_TYPE 0x83
#define LBMR_LBMR_OPT_VERSIION_SZ 8
#define LBMR_LBMR_OPT_VERSION_FLAG_IGNORE 0x8000
#define LBMR_LBMR_OPT_VERSION_FLAG_UME 0x0001
#define LBMR_LBMR_OPT_VERSION_FLAG_UMQ 0x0002
/* LBMR packet option domain header */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint32_t local_domain_id;
} lbmr_lbmr_opt_local_domain_t;
#define O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_TYPE OFFSETOF(lbmr_lbmr_opt_local_domain_t, type)
#define L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_TYPE SIZEOF(lbmr_lbmr_opt_local_domain_t, type)
#define O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LEN OFFSETOF(lbmr_lbmr_opt_local_domain_t, len)
#define L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LEN SIZEOF(lbmr_lbmr_opt_local_domain_t, len)
#define O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_FLAGS OFFSETOF(lbmr_lbmr_opt_local_domain_t, flags)
#define L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_FLAGS SIZEOF(lbmr_lbmr_opt_local_domain_t, flags)
#define O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LOCAL_DOMAIN_ID OFFSETOF(lbmr_lbmr_opt_local_domain_t, local_domain_id)
#define L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LOCAL_DOMAIN_ID SIZEOF(lbmr_lbmr_opt_local_domain_t, local_domain_id)
#define L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T (gint) sizeof(lbmr_lbmr_opt_local_domain_t)
#define LBMR_LBMR_OPT_LOCAL_DOMAIN_TYPE 0x84
#define LBMR_LBMR_OPT_LOCAL_DOMAIN_SZ 8
#define LBMR_LBMR_OPT_LOCAL_DOMAIN_FLAG_IGNORE 0x8000
/* LBMR (extended) proxy source election record */
typedef struct
{
lbm_uint8_t ver_type;
lbm_uint8_t ext_type;
lbm_uint16_t dep_type;
lbm_uint16_t len;
lbm_uint16_t flags;
lbm_uint32_t source_ip;
lbm_uint32_t store_ip;
lbm_uint32_t transport_idx;
lbm_uint32_t topic_idx;
lbm_uint16_t source_port;
lbm_uint16_t store_port;
} lbmr_pser_t;
#define O_LBMR_PSER_T_VER_TYPE OFFSETOF(lbmr_pser_t, ver_type)
#define L_LBMR_PSER_T_VER_TYPE SIZEOF(lbmr_pser_t, ver_type)
#define O_LBMR_PSER_T_EXT_TYPE OFFSETOF(lbmr_pser_t, ext_type)
#define L_LBMR_PSER_T_EXT_TYPE SIZEOF(lbmr_pser_t, ext_type)
#define O_LBMR_PSER_T_DEP_TYPE OFFSETOF(lbmr_pser_t, dep_type)
#define L_LBMR_PSER_T_DEP_TYPE SIZEOF(lbmr_pser_t, dep_type)
#define O_LBMR_PSER_T_LEN OFFSETOF(lbmr_pser_t, len)
#define L_LBMR_PSER_T_LEN SIZEOF(lbmr_pser_t, len)
#define O_LBMR_PSER_T_FLAGS OFFSETOF(lbmr_pser_t, flags)
#define L_LBMR_PSER_T_FLAGS SIZEOF(lbmr_pser_t, flags)
#define O_LBMR_PSER_T_SOURCE_IP OFFSETOF(lbmr_pser_t, source_ip)
#define L_LBMR_PSER_T_SOURCE_IP SIZEOF(lbmr_pser_t, source_ip)
#define O_LBMR_PSER_T_STORE_IP OFFSETOF(lbmr_pser_t, store_ip)
#define L_LBMR_PSER_T_STORE_IP SIZEOF(lbmr_pser_t, store_ip)
#define O_LBMR_PSER_T_TRANSPORT_IDX OFFSETOF(lbmr_pser_t, transport_idx)
#define L_LBMR_PSER_T_TRANSPORT_IDX SIZEOF(lbmr_pser_t, transport_idx)
#define O_LBMR_PSER_T_TOPIC_IDX OFFSETOF(lbmr_pser_t, topic_idx)
#define L_LBMR_PSER_T_TOPIC_IDX SIZEOF(lbmr_pser_t, topic_idx)
#define O_LBMR_PSER_T_SOURCE_PORT OFFSETOF(lbmr_pser_t, source_port)
#define L_LBMR_PSER_T_SOURCE_PORT SIZEOF(lbmr_pser_t, source_port)
#define O_LBMR_PSER_T_STORE_PORT OFFSETOF(lbmr_pser_t, store_port)
#define L_LBMR_PSER_T_STORE_PORT SIZEOF(lbmr_pser_t, store_port)
#define O_LBMR_PSER_T_TOPIC (O_LBMR_PSER_T_STORE_PORT + L_LBMR_PSER_T_STORE_PORT)
#define L_LBMR_PSER_T (gint) sizeof(lbmr_pser_t)
#define LBMR_PSER_OPT_FLAG 0x8000
#define LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT_DEP_ELECT 0
#define LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT_DEP_REELECT 1
typedef struct
{
lbm_uint16_t type;
lbm_uint16_t optlen;
} lbmr_pser_optlen_t;
#define O_LBMR_PSER_OPTLEN_T_TYPE OFFSETOF(lbmr_pser_optlen_t, type)
#define L_LBMR_PSER_OPTLEN_T_TYPE SIZEOF(lbmr_pser_optlen_t, type)
#define O_LBMR_PSER_OPTLEN_T_OPTLEN OFFSETOF(lbmr_pser_optlen_t, optlen)
#define L_LBMR_PSER_OPTLEN_T_OPTLEN SIZEOF(lbmr_pser_optlen_t, optlen)
#define L_LBMR_PSER_OPTLEN_T (gint) sizeof(lbmr_pser_optlen_t)
typedef struct
{
lbm_uint8_t len;
lbm_uint8_t type;
} lbmr_pser_opt_hdr_t;
#define O_LBMR_PSER_OPT_HDR_T_LEN OFFSETOF(lbmr_pser_opt_hdr_t, len)
#define L_LBMR_PSER_OPT_HDR_T_LEN SIZEOF(lbmr_pser_opt_hdr_t, len)
#define O_LBMR_PSER_OPT_HDR_T_TYPE OFFSETOF(lbmr_pser_opt_hdr_t, type)
#define L_LBMR_PSER_OPT_HDR_T_TYPE SIZEOF(lbmr_pser_opt_hdr_t, type)
#define L_LBMR_PSER_OPT_HDR_T (gint) sizeof(lbmr_pser_opt_hdr_t)
#define LBMR_PSER_OPT_SRC_CTXINST_TYPE 0x00
#define LBMR_PSER_OPT_STORE_CTXINST_TYPE 0x01
typedef struct
{
lbm_uint8_t len;
lbm_uint8_t type;
lbm_uint8_t ctxinst[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
} lbmr_pser_opt_ctxinst_t;
#define O_LBMR_PSER_OPT_CTXINST_T_LEN OFFSETOF(lbmr_pser_opt_ctxinst_t, len)
#define L_LBMR_PSER_OPT_CTXINST_T_LEN SIZEOF(lbmr_pser_opt_ctxinst_t, len)
#define O_LBMR_PSER_OPT_CTXINST_T_TYPE OFFSETOF(lbmr_pser_opt_ctxinst_t, type)
#define L_LBMR_PSER_OPT_CTXINST_T_TYPE SIZEOF(lbmr_pser_opt_ctxinst_t, type)
#define O_LBMR_PSER_OPT_CTXINST_T_CTXINST OFFSETOF(lbmr_pser_opt_ctxinst_t, ctxinst)
#define L_LBMR_PSER_OPT_CTXINST_T_CTXINST SIZEOF(lbmr_pser_opt_ctxinst_t, ctxinst)
#define L_LBMR_PSER_OPT_CTXINST_T (gint) sizeof(lbmr_pser_opt_ctxinst_t)
/* LBMR (extended) gateway message */
typedef struct
{
lbm_uint8_t ver_type;
lbm_uint8_t ext_type;
lbm_uint16_t len;
lbm_uint16_t type;
lbm_uint16_t reserved;
} lbmr_tnwg_t;
#define O_LBMR_TNWG_T_VER_TYPE OFFSETOF(lbmr_tnwg_t, ver_type)
#define L_LBMR_TNWG_T_VER_TYPE SIZEOF(lbmr_tnwg_t, ver_type)
#define O_LBMR_TNWG_T_EXT_TYPE OFFSETOF(lbmr_tnwg_t, ext_type)
#define L_LBMR_TNWG_T_EXT_TYPE SIZEOF(lbmr_tnwg_t, ext_type)
#define O_LBMR_TNWG_T_LEN OFFSETOF(lbmr_tnwg_t, len)
#define L_LBMR_TNWG_T_LEN SIZEOF(lbmr_tnwg_t, len)
#define O_LBMR_TNWG_T_TYPE OFFSETOF(lbmr_tnwg_t, type)
#define L_LBMR_TNWG_T_TYPE SIZEOF(lbmr_tnwg_t, type)
#define O_LBMR_TNWG_T_RESERVED OFFSETOF(lbmr_tnwg_t, reserved)
#define L_LBMR_TNWG_T_RESERVED SIZEOF(lbmr_tnwg_t, reserved)
#define L_LBMR_TNWG_T (gint) sizeof(lbmr_tnwg_t)
#define LBMR_TNWG_TYPE_INTEREST 0x0000
#define LBMR_TNWG_TYPE_CTXINFO 0x0001
#define LBMR_TNWG_TYPE_TRREQ 0x0002
/* LBMR (extended) gateway message - interest header */
typedef struct
{
lbm_uint16_t len;
lbm_uint16_t count;
} lbmr_tnwg_interest_t;
#define O_LBMR_TNWG_INTEREST_T_LEN OFFSETOF(lbmr_tnwg_interest_t, len)
#define L_LBMR_TNWG_INTEREST_T_LEN SIZEOF(lbmr_tnwg_interest_t, len)
#define O_LBMR_TNWG_INTEREST_T_COUNT OFFSETOF(lbmr_tnwg_interest_t, count)
#define L_LBMR_TNWG_INTEREST_T_COUNT SIZEOF(lbmr_tnwg_interest_t, count)
#define L_LBMR_TNWG_INTEREST_T (gint) sizeof(lbmr_tnwg_interest_t)
/* LBMR (extended) gateway message - interest record */
typedef struct
{
lbm_uint16_t len;
lbm_uint8_t flags;
lbm_uint8_t pattype;
lbm_uint32_t domain_id;
} lbmr_tnwg_interest_rec_t;
#define O_LBMR_TNWG_INTEREST_REC_T_LEN OFFSETOF(lbmr_tnwg_interest_rec_t, len)
#define L_LBMR_TNWG_INTEREST_REC_T_LEN SIZEOF(lbmr_tnwg_interest_rec_t, len)
#define O_LBMR_TNWG_INTEREST_REC_T_FLAGS OFFSETOF(lbmr_tnwg_interest_rec_t, flags)
#define L_LBMR_TNWG_INTEREST_REC_T_FLAGS SIZEOF(lbmr_tnwg_interest_rec_t, flags)
#define O_LBMR_TNWG_INTEREST_REC_T_PATTYPE OFFSETOF(lbmr_tnwg_interest_rec_t, pattype)
#define L_LBMR_TNWG_INTEREST_REC_T_PATTYPE SIZEOF(lbmr_tnwg_interest_rec_t, pattype)
#define O_LBMR_TNWG_INTEREST_REC_T_DOMAIN_ID OFFSETOF(lbmr_tnwg_interest_rec_t, domain_id)
#define L_LBMR_TNWG_INTEREST_REC_T_DOMAIN_ID SIZEOF(lbmr_tnwg_interest_rec_t, domain_id)
#define L_LBMR_TNWG_INTEREST_REC_T (gint) sizeof(lbmr_tnwg_interest_rec_t)
#define LBMR_TNWG_INTEREST_REC_PATTERN_FLAG 0x80
#define LBMR_TNWG_INTEREST_REC_CANCEL_FLAG 0x40
#define LBMR_TNWG_INTEREST_REC_REFRESH_FLAG 0x20
/* LBMR (extended) gateway message - ctxinfo header */
typedef struct
{
lbm_uint16_t len;
lbm_uint8_t hop_count;
lbm_uint8_t reserved;
lbm_uint32_t flags1;
lbm_uint32_t flags2;
} lbmr_tnwg_ctxinfo_t;
#define O_LBMR_TNWG_CTXINFO_T_LEN OFFSETOF(lbmr_tnwg_ctxinfo_t, len)
#define L_LBMR_TNWG_CTXINFO_T_LEN SIZEOF(lbmr_tnwg_ctxinfo_t, len)
#define O_LBMR_TNWG_CTXINFO_T_HOP_COUNT OFFSETOF(lbmr_tnwg_ctxinfo_t, hop_count)
#define L_LBMR_TNWG_CTXINFO_T_HOP_COUNT SIZEOF(lbmr_tnwg_ctxinfo_t, hop_count)
#define O_LBMR_TNWG_CTXINFO_T_RESERVED OFFSETOF(lbmr_tnwg_ctxinfo_t, reserved)
#define L_LBMR_TNWG_CTXINFO_T_RESERVED SIZEOF(lbmr_tnwg_ctxinfo_t, reserved)
#define O_LBMR_TNWG_CTXINFO_T_FLAGS1 OFFSETOF(lbmr_tnwg_ctxinfo_t, flags1)
#define L_LBMR_TNWG_CTXINFO_T_FLAGS1 SIZEOF(lbmr_tnwg_ctxinfo_t, flags1)
#define O_LBMR_TNWG_CTXINFO_T_FLAGS2 OFFSETOF(lbmr_tnwg_ctxinfo_t, flags2)
#define L_LBMR_TNWG_CTXINFO_T_FLAGS2 SIZEOF(lbmr_tnwg_ctxinfo_t, flags2)
#define L_LBMR_TNWG_CTXINFO_T (gint) sizeof(lbmr_tnwg_ctxinfo_t)
#define LBMR_TNWG_CTXINFO_QUERY_FLAG 0x80000000
#define LBMR_TNWG_CTXINFO_TNWG_SRC_FLAG 0x40000000
#define LBMR_TNWG_CTXINFO_TNWG_RCV_FLAG 0x20000000
#define LBMR_TNWG_CTXINFO_PROXY_FLAG 0x10000000
/* LBMR (extended) gateway message - topic res request header */
typedef struct
{
lbm_uint16_t len;
} lbmr_tnwg_trreq_t;
#define O_LBMR_TNWG_TRREQ_T_LEN OFFSETOF(lbmr_tnwg_trreq_t, len)
#define L_LBMR_TNWG_TRREQ_T_LEN SIZEOF(lbmr_tnwg_trreq_t, len)
#define L_LBMR_TNWG_TRREQ_T (gint) sizeof(lbmr_tnwg_trreq_t)
/* LBMR (extended) gateway message - basic option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
} lbmr_tnwg_opt_t;
#define O_LBMR_TNWG_OPT_T_TYPE OFFSETOF(lbmr_tnwg_opt_t, type)
#define L_LBMR_TNWG_OPT_T_TYPE SIZEOF(lbmr_tnwg_opt_t, type)
#define O_LBMR_TNWG_OPT_T_LEN OFFSETOF(lbmr_tnwg_opt_t, len)
#define L_LBMR_TNWG_OPT_T_LEN SIZEOF(lbmr_tnwg_opt_t, len)
#define O_LBMR_TNWG_OPT_T_FLAGS OFFSETOF(lbmr_tnwg_opt_t, flags)
#define L_LBMR_TNWG_OPT_T_FLAGS SIZEOF(lbmr_tnwg_opt_t, flags)
#define L_LBMR_TNWG_OPT_T (gint) sizeof(lbmr_tnwg_opt_t)
#define LBMR_TNWG_OPT_IGNORE_FLAG 0x8000
/* LBMR (extended) gateway message - ctxinst option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint8_t instance[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
} lbmr_tnwg_opt_ctxinst_t;
#define O_LBMR_TNWG_OPT_CTXINST_T_TYPE OFFSETOF(lbmr_tnwg_opt_ctxinst_t, type)
#define L_LBMR_TNWG_OPT_CTXINST_T_TYPE SIZEOF(lbmr_tnwg_opt_ctxinst_t, type)
#define O_LBMR_TNWG_OPT_CTXINST_T_LEN OFFSETOF(lbmr_tnwg_opt_ctxinst_t, len)
#define L_LBMR_TNWG_OPT_CTXINST_T_LEN SIZEOF(lbmr_tnwg_opt_ctxinst_t, len)
#define O_LBMR_TNWG_OPT_CTXINST_T_FLAGS OFFSETOF(lbmr_tnwg_opt_ctxinst_t, flags)
#define L_LBMR_TNWG_OPT_CTXINST_T_FLAGS SIZEOF(lbmr_tnwg_opt_ctxinst_t, flags)
#define O_LBMR_TNWG_OPT_CTXINST_T_INSTANCE OFFSETOF(lbmr_tnwg_opt_ctxinst_t, instance)
#define L_LBMR_TNWG_OPT_CTXINST_T_INSTANCE SIZEOF(lbmr_tnwg_opt_ctxinst_t, instance)
#define L_LBMR_TNWG_OPT_CTXINST_T (gint) sizeof(lbmr_tnwg_opt_ctxinst_t)
#define LBMR_TNWG_OPT_CTXINST_TYPE 0x00
/* LBMR (extended) gateway message - address option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint16_t port;
lbm_uint16_t res;
lbm_uint32_t ip;
} lbmr_tnwg_opt_address_t;
#define O_LBMR_TNWG_OPT_ADDRESS_T_TYPE OFFSETOF(lbmr_tnwg_opt_address_t, type)
#define L_LBMR_TNWG_OPT_ADDRESS_T_TYPE SIZEOF(lbmr_tnwg_opt_address_t, type)
#define O_LBMR_TNWG_OPT_ADDRESS_T_LEN OFFSETOF(lbmr_tnwg_opt_address_t, len)
#define L_LBMR_TNWG_OPT_ADDRESS_T_LEN SIZEOF(lbmr_tnwg_opt_address_t, len)
#define O_LBMR_TNWG_OPT_ADDRESS_T_FLAGS OFFSETOF(lbmr_tnwg_opt_address_t, flags)
#define L_LBMR_TNWG_OPT_ADDRESS_T_FLAGS SIZEOF(lbmr_tnwg_opt_address_t, flags)
#define O_LBMR_TNWG_OPT_ADDRESS_T_PORT OFFSETOF(lbmr_tnwg_opt_address_t, port)
#define L_LBMR_TNWG_OPT_ADDRESS_T_PORT SIZEOF(lbmr_tnwg_opt_address_t, port)
#define O_LBMR_TNWG_OPT_ADDRESS_T_RES OFFSETOF(lbmr_tnwg_opt_address_t, res)
#define L_LBMR_TNWG_OPT_ADDRESS_T_RES SIZEOF(lbmr_tnwg_opt_address_t, res)
#define O_LBMR_TNWG_OPT_ADDRESS_T_IP OFFSETOF(lbmr_tnwg_opt_address_t, ip)
#define L_LBMR_TNWG_OPT_ADDRESS_T_IP SIZEOF(lbmr_tnwg_opt_address_t, ip)
#define L_LBMR_TNWG_OPT_ADDRESS_T (gint) sizeof(lbmr_tnwg_opt_address_t)
#define LBMR_TNWG_OPT_ADDRESS_TYPE 0x01
/* LBMR (extended) gateway message - domain option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint32_t domain_id;
} lbmr_tnwg_opt_domain_t;
#define O_LBMR_TNWG_OPT_DOMAIN_T_TYPE OFFSETOF(lbmr_tnwg_opt_domain_t, type)
#define L_LBMR_TNWG_OPT_DOMAIN_T_TYPE SIZEOF(lbmr_tnwg_opt_domain_t, type)
#define O_LBMR_TNWG_OPT_DOMAIN_T_LEN OFFSETOF(lbmr_tnwg_opt_domain_t, len)
#define L_LBMR_TNWG_OPT_DOMAIN_T_LEN SIZEOF(lbmr_tnwg_opt_domain_t, len)
#define O_LBMR_TNWG_OPT_DOMAIN_T_FLAGS OFFSETOF(lbmr_tnwg_opt_domain_t, flags)
#define L_LBMR_TNWG_OPT_DOMAIN_T_FLAGS SIZEOF(lbmr_tnwg_opt_domain_t, flags)
#define O_LBMR_TNWG_OPT_DOMAIN_T_DOMAIN_ID OFFSETOF(lbmr_tnwg_opt_domain_t, domain_id)
#define L_LBMR_TNWG_OPT_DOMAIN_T_DOMAIN_ID SIZEOF(lbmr_tnwg_opt_domain_t, domain_id)
#define L_LBMR_TNWG_OPT_DOMAIN_T (gint) sizeof(lbmr_tnwg_opt_domain_t)
#define LBMR_TNWG_OPT_DOMAIN_TYPE 0x02
/* LBMR (extended) gateway message - name option (a base option) */
#define LBMR_TNWG_OPT_NAME_TYPE 0x03
/* LBMR (extended) remote domain route message */
typedef struct
{
lbm_uint8_t ver_type;
lbm_uint8_t ext_type;
lbm_uint16_t num_domains;
lbm_uint32_t ip;
lbm_uint16_t port;
lbm_uint16_t reserved;
lbm_uint32_t length;
/* lbm_uint32_t domains[num_domains]; */
} lbmr_remote_domain_route_hdr_t;
#define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_VER_TYPE OFFSETOF(lbmr_remote_domain_route_hdr_t, ver_type)
#define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_VER_TYPE SIZEOF(lbmr_remote_domain_route_hdr_t, ver_type)
#define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_EXT_TYPE OFFSETOF(lbmr_remote_domain_route_hdr_t, ext_type)
#define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_EXT_TYPE SIZEOF(lbmr_remote_domain_route_hdr_t, ext_type)
#define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_NUM_DOMAINS OFFSETOF(lbmr_remote_domain_route_hdr_t, num_domains)
#define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_NUM_DOMAINS SIZEOF(lbmr_remote_domain_route_hdr_t, num_domains)
#define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_IP OFFSETOF(lbmr_remote_domain_route_hdr_t, ip)
#define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_IP SIZEOF(lbmr_remote_domain_route_hdr_t, ip)
#define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_PORT OFFSETOF(lbmr_remote_domain_route_hdr_t, port)
#define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_PORT SIZEOF(lbmr_remote_domain_route_hdr_t, port)
#define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_RESERVED OFFSETOF(lbmr_remote_domain_route_hdr_t, reserved)
#define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_RESERVED SIZEOF(lbmr_remote_domain_route_hdr_t, reserved)
#define O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_LENGTH OFFSETOF(lbmr_remote_domain_route_hdr_t, length)
#define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_LENGTH SIZEOF(lbmr_remote_domain_route_hdr_t, length)
#define L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T (gint) sizeof(lbmr_remote_domain_route_hdr_t)
/* LBMR (extended) remote context information message */
typedef struct
{
lbm_uint8_t ver_type;
lbm_uint8_t ext_type;
lbm_uint16_t len;
lbm_uint16_t num_recs;
lbm_uint16_t reserved;
} lbmr_rctxinfo_t;
#define O_LBMR_RCTXINFO_T_VER_TYPE OFFSETOF(lbmr_rctxinfo_t, ver_type)
#define L_LBMR_RCTXINFO_T_VER_TYPE SIZEOF(lbmr_rctxinfo_t, ver_type)
#define O_LBMR_RCTXINFO_T_EXT_TYPE OFFSETOF(lbmr_rctxinfo_t, ext_type)
#define L_LBMR_RCTXINFO_T_EXT_TYPE SIZEOF(lbmr_rctxinfo_t, ext_type)
#define O_LBMR_RCTXINFO_T_LEN OFFSETOF(lbmr_rctxinfo_t, len)
#define L_LBMR_RCTXINFO_T_LEN SIZEOF(lbmr_rctxinfo_t, len)
#define O_LBMR_RCTXINFO_T_NUM_RECS OFFSETOF(lbmr_rctxinfo_t, num_recs)
#define L_LBMR_RCTXINFO_T_NUM_RECS SIZEOF(lbmr_rctxinfo_t, num_recs)
#define O_LBMR_RCTXINFO_T_RESERVED OFFSETOF(lbmr_rctxinfo_t, reserved)
#define L_LBMR_RCTXINFO_T_RESERVED SIZEOF(lbmr_rctxinfo_t, reserved)
#define L_LBMR_RCTXINFO_T (gint) sizeof(lbmr_rctxinfo_t)
/* LBMR (extended) remote context information record */
typedef struct
{
lbm_uint16_t len;
lbm_uint16_t flags;
} lbmr_rctxinfo_rec_t;
#define O_LBMR_RCTXINFO_REC_T_LEN OFFSETOF(lbmr_rctxinfo_rec_t, len)
#define L_LBMR_RCTXINFO_REC_T_LEN SIZEOF(lbmr_rctxinfo_rec_t, len)
#define O_LBMR_RCTXINFO_REC_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_t, flags)
#define L_LBMR_RCTXINFO_REC_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_t, flags)
#define L_LBMR_RCTXINFO_REC_T (gint) sizeof(lbmr_rctxinfo_rec_t)
#define LBMR_RCTXINFO_REC_FLAG_QUERY 0x8000
/* LBMR (extended) remote context information record option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
} lbmr_rctxinfo_rec_opt_t;
#define O_LBMR_RCTXINFO_REC_OPT_T_TYPE OFFSETOF(lbmr_rctxinfo_rec_opt_t, type)
#define L_LBMR_RCTXINFO_REC_OPT_T_TYPE SIZEOF(lbmr_rctxinfo_rec_opt_t, type)
#define O_LBMR_RCTXINFO_REC_OPT_T_LEN OFFSETOF(lbmr_rctxinfo_rec_opt_t, len)
#define L_LBMR_RCTXINFO_REC_OPT_T_LEN SIZEOF(lbmr_rctxinfo_rec_opt_t, len)
#define O_LBMR_RCTXINFO_REC_OPT_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_opt_t, flags)
#define L_LBMR_RCTXINFO_REC_OPT_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_opt_t, flags)
#define L_LBMR_RCTXINFO_REC_OPT_T (gint) sizeof(lbmr_rctxinfo_rec_opt_t)
/* LBMR (extended) remote context information record address option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint32_t domain_id;
lbm_uint32_t ip;
lbm_uint16_t port;
lbm_uint16_t res;
} lbmr_rctxinfo_rec_address_opt_t;
#define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_TYPE OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, type)
#define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_TYPE SIZEOF(lbmr_rctxinfo_rec_address_opt_t, type)
#define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_LEN OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, len)
#define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_LEN SIZEOF(lbmr_rctxinfo_rec_address_opt_t, len)
#define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, flags)
#define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_address_opt_t, flags)
#define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_DOMAIN_ID OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, domain_id)
#define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_DOMAIN_ID SIZEOF(lbmr_rctxinfo_rec_address_opt_t, domain_id)
#define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_IP OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, ip)
#define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_IP SIZEOF(lbmr_rctxinfo_rec_address_opt_t, ip)
#define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_PORT OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, port)
#define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_PORT SIZEOF(lbmr_rctxinfo_rec_address_opt_t, port)
#define O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_RES OFFSETOF(lbmr_rctxinfo_rec_address_opt_t, res)
#define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_RES SIZEOF(lbmr_rctxinfo_rec_address_opt_t, res)
#define L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T (gint) sizeof(lbmr_rctxinfo_rec_address_opt_t)
#define LBMR_RCTXINFO_OPT_ADDRESS_TYPE 0x01
/* LBMR (extended) remote context information record instance option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint8_t instance[LBM_CONTEXT_INSTANCE_BLOCK_SZ];
} lbmr_rctxinfo_rec_instance_opt_t;
#define O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_TYPE OFFSETOF(lbmr_rctxinfo_rec_instance_opt_t, type)
#define L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_TYPE SIZEOF(lbmr_rctxinfo_rec_instance_opt_t, type)
#define O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_LEN OFFSETOF(lbmr_rctxinfo_rec_instance_opt_t, len)
#define L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_LEN SIZEOF(lbmr_rctxinfo_rec_instance_opt_t, len)
#define O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_instance_opt_t, flags)
#define L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_instance_opt_t, flags)
#define O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_INSTANCE OFFSETOF(lbmr_rctxinfo_rec_instance_opt_t, instance)
#define L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_INSTANCE SIZEOF(lbmr_rctxinfo_rec_instance_opt_t, instance)
#define L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T (gint) sizeof(lbmr_rctxinfo_rec_instance_opt_t)
#define LBMR_RCTXINFO_OPT_INSTANCE_TYPE 0x02
/* LBMR (extended) remote context information record odomain option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
lbm_uint32_t domain_id;
} lbmr_rctxinfo_rec_odomain_opt_t;
#define O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_TYPE OFFSETOF(lbmr_rctxinfo_rec_odomain_opt_t, type)
#define L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_TYPE SIZEOF(lbmr_rctxinfo_rec_odomain_opt_t, type)
#define O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_LEN OFFSETOF(lbmr_rctxinfo_rec_odomain_opt_t, len)
#define L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_LEN SIZEOF(lbmr_rctxinfo_rec_odomain_opt_t, len)
#define O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_odomain_opt_t, flags)
#define L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_odomain_opt_t, flags)
#define O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_DOMAIN_ID OFFSETOF(lbmr_rctxinfo_rec_odomain_opt_t, domain_id)
#define L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_DOMAIN_ID SIZEOF(lbmr_rctxinfo_rec_odomain_opt_t, domain_id)
#define L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T (gint) sizeof(lbmr_rctxinfo_rec_odomain_opt_t)
#define LBMR_RCTXINFO_OPT_ODOMAIN_TYPE 0x03
/* LBMR (extended) remote context information record name option */
typedef struct
{
lbm_uint8_t type;
lbm_uint8_t len;
lbm_uint16_t flags;
} lbmr_rctxinfo_rec_name_opt_t;
#define O_LBMR_RCTXINFO_REC_NAME_OPT_T_TYPE OFFSETOF(lbmr_rctxinfo_rec_name_opt_t, type)
#define L_LBMR_RCTXINFO_REC_NAME_OPT_T_TYPE SIZEOF(lbmr_rctxinfo_rec_name_opt_t, type)
#define O_LBMR_RCTXINFO_REC_NAME_OPT_T_LEN OFFSETOF(lbmr_rctxinfo_rec_name_opt_t, len)
#define L_LBMR_RCTXINFO_REC_NAME_OPT_T_LEN SIZEOF(lbmr_rctxinfo_rec_name_opt_t, len)
#define O_LBMR_RCTXINFO_REC_NAME_OPT_T_FLAGS OFFSETOF(lbmr_rctxinfo_rec_name_opt_t, flags)
#define L_LBMR_RCTXINFO_REC_NAME_OPT_T_FLAGS SIZEOF(lbmr_rctxinfo_rec_name_opt_t, flags)
#define L_LBMR_RCTXINFO_REC_NAME_OPT_T (gint) sizeof(lbmr_rctxinfo_rec_name_opt_t)
#define LBMR_RCTXINFO_OPT_NAME_TYPE 0x04
/* Queue management headers (may appear in LBMR or LBMC packets) */
typedef struct
{
lbm_uint8_t ver_type;
lbm_uint8_t ext_type;
} lbmr_umq_qmgmt_hdr_t;
#define O_LBMR_UMQ_QMGMT_HDR_T_VER_TYPE OFFSETOF(lbmr_umq_qmgmt_hdr_t, ver_type)
#define L_LBMR_UMQ_QMGMT_HDR_T_VER_TYPE SIZEOF(lbmr_umq_qmgmt_hdr_t, ver_type)
#define O_LBMR_UMQ_QMGMT_HDR_T_EXT_TYPE OFFSETOF(lbmr_umq_qmgmt_hdr_t, ext_type)
#define L_LBMR_UMQ_QMGMT_HDR_T_EXT_TYPE SIZEOF(lbmr_umq_qmgmt_hdr_t, ext_type)
#define L_LBMR_UMQ_QMGMT_HDR_T (gint) sizeof(lbmr_umq_qmgmt_hdr_t)
typedef struct
{
lbm_uint8_t filler1;
lbm_uint8_t filler2;
lbm_uint8_t flags;
lbm_uint8_t pckt_type;
lbm_uint8_t cfgsig[20];
lbm_uint32_t queue_id;
lbm_uint32_t queue_ver;
lbm_uint32_t ip;
lbm_uint16_t port;
lbm_uint16_t inst_idx;
lbm_uint16_t grp_idx;
lbm_uint16_t pckt_type_dep16;
} umq_qmgmt_hdr_t;
#define O_UMQ_QMGMT_HDR_T_FLAGS OFFSETOF(umq_qmgmt_hdr_t, flags)
#define L_UMQ_QMGMT_HDR_T_FLAGS SIZEOF(umq_qmgmt_hdr_t, flags)
#define O_UMQ_QMGMT_HDR_T_PCKT_TYPE OFFSETOF(umq_qmgmt_hdr_t, pckt_type)
#define L_UMQ_QMGMT_HDR_T_PCKT_TYPE SIZEOF(umq_qmgmt_hdr_t, pckt_type)
#define O_UMQ_QMGMT_HDR_T_CFGSIG OFFSETOF(umq_qmgmt_hdr_t, cfgsig)
#define L_UMQ_QMGMT_HDR_T_CFGSIG SIZEOF(umq_qmgmt_hdr_t, cfgsig)
#define O_UMQ_QMGMT_HDR_T_QUEUE_ID OFFSETOF(umq_qmgmt_hdr_t, queue_id)
#define L_UMQ_QMGMT_HDR_T_QUEUE_ID SIZEOF(umq_qmgmt_hdr_t, queue_id)
#define O_UMQ_QMGMT_HDR_T_QUEUE_VER OFFSETOF(umq_qmgmt_hdr_t, queue_ver)
#define L_UMQ_QMGMT_HDR_T_QUEUE_VER SIZEOF(umq_qmgmt_hdr_t, queue_ver)
#define O_UMQ_QMGMT_HDR_T_IP OFFSETOF(umq_qmgmt_hdr_t, ip)
#define L_UMQ_QMGMT_HDR_T_IP SIZEOF(umq_qmgmt_hdr_t, ip)
#define O_UMQ_QMGMT_HDR_T_PORT OFFSETOF(umq_qmgmt_hdr_t, port)
#define L_UMQ_QMGMT_HDR_T_PORT SIZEOF(umq_qmgmt_hdr_t, port)
#define O_UMQ_QMGMT_HDR_T_INST_IDX OFFSETOF(umq_qmgmt_hdr_t, inst_idx)
#define L_UMQ_QMGMT_HDR_T_INST_IDX SIZEOF(umq_qmgmt_hdr_t, inst_idx)
#define O_UMQ_QMGMT_HDR_T_GRP_IDX OFFSETOF(umq_qmgmt_hdr_t, grp_idx)
#define L_UMQ_QMGMT_HDR_T_GRP_IDX SIZEOF(umq_qmgmt_hdr_t, grp_idx)
#define O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16 OFFSETOF(umq_qmgmt_hdr_t, pckt_type_dep16)
#define L_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16 SIZEOF(umq_qmgmt_hdr_t, pckt_type_dep16)
#define L_UMQ_QMGMT_HDR_T (gint) sizeof(umq_qmgmt_hdr_t)
#define UMQ_QMGMT_HDR_I_FLAG 0x80
#define UMQ_QMGMT_HDR_N_FLAG 0x40
#define UMQ_QMGMT_HDR_IL_L_FLAG 0x20
#define UMQ_QMGMT_HDR_IL_K_FLAG 0x10
typedef struct
{
lbm_uint32_t highest_rcr_tsp;
} umq_qmgmt_il_hdr_t;
#define O_UMQ_QMGMT_IL_HDR_T_HIGHEST_RCR_TSP OFFSETOF(umq_qmgmt_il_hdr_t, highest_rcr_tsp)
#define L_UMQ_QMGMT_IL_HDR_T_HIGHEST_RCR_TSP SIZEOF(umq_qmgmt_il_hdr_t, highest_rcr_tsp)
#define L_UMQ_QMGMT_IL_HDR_T (gint) sizeof(umq_qmgmt_il_hdr_t)
typedef struct
{
lbm_uint32_t ip;
lbm_uint16_t port;
lbm_uint16_t inst_idx;
lbm_uint16_t grp_idx;
lbm_uint16_t flags;
} umq_qmgmt_il_inst_hdr_t;
#define O_UMQ_QMGMT_IL_INST_HDR_T_IP OFFSETOF(umq_qmgmt_il_inst_hdr_t, ip)
#define L_UMQ_QMGMT_IL_INST_HDR_T_IP SIZEOF(umq_qmgmt_il_inst_hdr_t, ip)
#define O_UMQ_QMGMT_IL_INST_HDR_T_PORT OFFSETOF(umq_qmgmt_il_inst_hdr_t, port)
#define L_UMQ_QMGMT_IL_INST_HDR_T_PORT SIZEOF(umq_qmgmt_il_inst_hdr_t, port)
#define O_UMQ_QMGMT_IL_INST_HDR_T_INST_IDX OFFSETOF(umq_qmgmt_il_inst_hdr_t, inst_idx)
#define L_UMQ_QMGMT_IL_INST_HDR_T_INST_IDX SIZEOF(umq_qmgmt_il_inst_hdr_t, inst_idx)
#define O_UMQ_QMGMT_IL_INST_HDR_T_GRP_IDX OFFSETOF(umq_qmgmt_il_inst_hdr_t, grp_idx)
#define L_UMQ_QMGMT_IL_INST_HDR_T_GRP_IDX SIZEOF(umq_qmgmt_il_inst_hdr_t, grp_idx)
#define O_UMQ_QMGMT_IL_INST_HDR_T_FLAGS OFFSETOF(umq_qmgmt_il_inst_hdr_t, flags)
#define L_UMQ_QMGMT_IL_INST_HDR_T_FLAGS SIZEOF(umq_qmgmt_il_inst_hdr_t, flags)
#define L_UMQ_QMGMT_IL_INST_HDR_T (gint) sizeof(umq_qmgmt_il_inst_hdr_t)
#define UMQ_QMGMT_HDR_IL_INST_M_FLAG 0x8000
#define UMQ_QMGMT_HDR_IL_INST_Q_FLAG 0x4000
#define UMQ_QMGMT_HDR_IL_INST_P_FLAG 0x2000
typedef struct
{
lbm_uint32_t queue_new_ver;
} umq_qmgmt_ec_hdr_t;
#define O_UMQ_QMGMT_EC_HDR_T_QUEUE_NEW_VER OFFSETOF(umq_qmgmt_ec_hdr_t, queue_new_ver)
#define L_UMQ_QMGMT_EC_HDR_T_QUEUE_NEW_VER SIZEOF(umq_qmgmt_ec_hdr_t, queue_new_ver)
#define L_UMQ_QMGMT_EC_HDR_T (gint) sizeof(umq_qmgmt_ec_hdr_t)
typedef struct
{
lbm_uint32_t highest_rcr_tsp;
lbm_uint32_t age;
} umq_qmgmt_ev_hdr_t;
#define O_UMQ_QMGMT_EV_HDR_T_HIGHEST_RCR_TSP OFFSETOF(umq_qmgmt_ev_hdr_t, highest_rcr_tsp)
#define L_UMQ_QMGMT_EV_HDR_T_HIGHEST_RCR_TSP SIZEOF(umq_qmgmt_ev_hdr_t, highest_rcr_tsp)
#define O_UMQ_QMGMT_EV_HDR_T_AGE OFFSETOF(umq_qmgmt_ev_hdr_t, age)
#define L_UMQ_QMGMT_EV_HDR_T_AGE SIZEOF(umq_qmgmt_ev_hdr_t, age)
#define L_UMQ_QMGMT_EV_HDR_T (gint) sizeof(umq_qmgmt_ev_hdr_t)
typedef struct
{
lbm_uint32_t highest_rcr_tsp;
} umq_qmgmt_qro_hdr_t;
#define O_UMQ_QMGMT_QRO_HDR_T_HIGHEST_RCR_TSP OFFSETOF(umq_qmgmt_qro_hdr_t, highest_rcr_tsp)
#define L_UMQ_QMGMT_QRO_HDR_T_HIGHEST_RCR_TSP SIZEOF(umq_qmgmt_qro_hdr_t, highest_rcr_tsp)
#define L_UMQ_QMGMT_QRO_HDR_T (gint) sizeof(umq_qmgmt_qro_hdr_t)
#define UMQ_QMGMT_HDR_PCKT_TYPE_IL 0x1
#define UMQ_QMGMT_HDR_PCKT_TYPE_JR 0x2
#define UMQ_QMGMT_HDR_PCKT_TYPE_JREJ 0x3
#define UMQ_QMGMT_HDR_PCKT_TYPE_IKA 0x4
#define UMQ_QMGMT_HDR_PCKT_TYPE_EC 0x5
#define UMQ_QMGMT_HDR_PCKT_TYPE_EV 0x6
#define UMQ_QMGMT_HDR_PCKT_TYPE_CNIL 0x7
#define UMQ_QMGMT_HDR_PCKT_TYPE_QRO 0x8
#define LBMR_VERSION_0 0x00
#define LBMR_VERSION_1 0x01
#define LBMR_VERSION_GATEWAY LBMR_VERSION_1
#define LBMR_VERSION LBMR_VERSION_0
/*----------------------------------------------------------------------------*/
/* Value translation tables. */
/*----------------------------------------------------------------------------*/
static const value_string lbmr_packet_type[] =
{
{ LBMR_HDR_TYPE_NORMAL, "NORMAL" },
{ LBMR_HDR_TYPE_WC_TQRS, "WC-TQR" },
{ LBMR_HDR_TYPE_UCAST_RCV_ALIVE, "Rcv Alive" },
{ LBMR_HDR_TYPE_UCAST_SRC_ALIVE, "Src Alive" },
{ LBMR_HDR_TYPE_TOPIC_MGMT, "Topic Mgmt" },
{ LBMR_HDR_TYPE_QUEUE_RES, "UMQ" },
{ LBMR_HDR_TYPE_EXT, "Extended" },
{ 0x0, NULL }
};
static const value_string lbmr_ext_packet_type[] =
{
{ LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT, "Proxy Source Election" },
{ LBMR_HDR_EXT_TYPE_UMQ_QUEUE_MGMT, "Queue Management" },
{ LBMR_HDR_EXT_TYPE_CONTEXT_INFO, "Context Information" },
{ LBMR_HDR_EXT_TYPE_TOPIC_RES_REQUEST, "Topic Resolution Request" },
{ LBMR_HDR_EXT_TYPE_TNWG_MSG, "Gateway Message" },
{ LBMR_HDR_EXT_TYPE_REMOTE_DOMAIN_ROUTE, "Remote Domain Route" },
{ LBMR_HDR_EXT_TYPE_REMOTE_CONTEXT_INFO, "Remote Context Information" },
{ 0x0, NULL }
};
static const value_string lbmr_transport_type[] =
{
{ LBMR_TRANSPORT_TCP, "TCP" },
{ LBMR_TRANSPORT_LBTSMX, "LBT-SMX" },
{ LBMR_TRANSPORT_LBTRU, "LBT-RU" },
{ LBMR_TRANSPORT_LBTRM, "LBT-RM" },
{ LBMR_TRANSPORT_LBTIPC, "LBT-IPC" },
{ LBMR_TRANSPORT_LBTRDMA, "LBT-RDMA" },
{ 0x0, NULL }
};
static const value_string lbmr_tmr_type[] =
{
{ LBMR_TMR_LEAVE_TOPIC, "Leave Topic" },
{ LBMR_TMR_TOPIC_USE, "Topic Use" },
{ 0x0, NULL }
};
static const value_string lbmr_topic_option_type[] =
{
{ LBMR_TOPIC_OPT_LEN_TYPE, "Option Length" },
{ LBMR_TOPIC_OPT_UME_TYPE, "UME" },
{ LBMR_TOPIC_OPT_UME_STORE_TYPE, "UME Store" },
{ LBMR_TOPIC_OPT_UME_STORE_GROUP_TYPE, "UME Store Group" },
{ LBMR_TOPIC_OPT_LATEJOIN_TYPE, "Late Join" },
{ LBMR_TOPIC_OPT_UMQ_RCRIDX_TYPE, "UMQ Receiver Control Record Index" },
{ LBMR_TOPIC_OPT_UMQ_QINFO_TYPE, "UMQ Queue Info" },
{ LBMR_TOPIC_OPT_COST_TYPE, "Cost" },
{ LBMR_TOPIC_OPT_OTID_TYPE, "Originating Transport" },
{ LBMR_TOPIC_OPT_CTXINST_TYPE, "Context Instance" },
{ LBMR_TOPIC_OPT_CTXINSTS_TYPE, "Store Context Instance" },
{ LBMR_TOPIC_OPT_ULB_TYPE, "UMQ ULB" },
{ LBMR_TOPIC_OPT_CTXINSTQ_TYPE, "Queue Context Instance" },
{ LBMR_TOPIC_OPT_DOMAIN_ID_TYPE, "Domain ID" },
{ LBMR_TOPIC_OPT_EXFUNC_TYPE, "Extended Functionality" },
{ 0x0, NULL }
};
static const value_string lbmr_pser_dependent_type[] =
{
{ LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT_DEP_ELECT, "Election" },
{ LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT_DEP_REELECT, "Re-election" },
{ 0x0, NULL }
};
static const value_string lbmr_option_type[] =
{
{ LBMR_LBMR_OPT_LEN_TYPE, "Option length" },
{ LBMR_LBMR_OPT_SRC_ID_TYPE, "Source ID" },
{ LBMR_LBMR_OPT_SRC_TYPE_TYPE, "Source type" },
{ LBMR_LBMR_OPT_VERSION_TYPE, "Version" },
{ LBMR_LBMR_OPT_LOCAL_DOMAIN_TYPE, "Local Domain" },
{ 0x0, NULL }
};
static const value_string lbmr_pser_option_type[] =
{
{ LBMR_PSER_OPT_SRC_CTXINST_TYPE, "Source context instance" },
{ LBMR_PSER_OPT_STORE_CTXINST_TYPE, "Store context instance" },
{ 0x0, NULL }
};
static const value_string lbmr_option_source_type[] =
{
{ LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_APPLICATION, "Application" },
{ LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_TNWGD, "Gateway" },
{ LBMR_LBMR_OPT_SRC_TYPE_SRC_TYPE_STORE, "Store" },
{ 0x0, NULL }
};
static const value_string lbmr_tnwg_function_type[] =
{
{ LBMR_TNWG_TYPE_INTEREST, "Interest" },
{ LBMR_TNWG_TYPE_CTXINFO, "Context information" },
{ LBMR_TNWG_TYPE_TRREQ, "Topic res request" },
{ 0x0, NULL }
};
static const value_string lbmr_tnwg_option_type[] =
{
{ LBMR_TNWG_OPT_CTXINST_TYPE, "Context instance" },
{ LBMR_TNWG_OPT_ADDRESS_TYPE, "Address" },
{ LBMR_TNWG_OPT_DOMAIN_TYPE, "Domain" },
{ LBMR_TNWG_OPT_NAME_TYPE, "Name" },
{ 0x0, NULL }
};
static const value_string umq_qmgmt_packet_type[] =
{
{ UMQ_QMGMT_HDR_PCKT_TYPE_IL, "Instance List" },
{ UMQ_QMGMT_HDR_PCKT_TYPE_JR, "Join Request" },
{ UMQ_QMGMT_HDR_PCKT_TYPE_JREJ, "Join Request Rejection" },
{ UMQ_QMGMT_HDR_PCKT_TYPE_IKA, "Instance Keepalive" },
{ UMQ_QMGMT_HDR_PCKT_TYPE_EC, "Election Call" },
{ UMQ_QMGMT_HDR_PCKT_TYPE_EV, "Election Vote" },
{ UMQ_QMGMT_HDR_PCKT_TYPE_CNIL, "Confirm New Instance List" },
{ UMQ_QMGMT_HDR_PCKT_TYPE_QRO, "Queue resume operation" },
{ 0x0, NULL }
};
static const value_string lbmr_rctxinfo_option_type[] =
{
{ LBMR_RCTXINFO_OPT_ADDRESS_TYPE, "Address" },
{ LBMR_RCTXINFO_OPT_INSTANCE_TYPE, "Instance" },
{ LBMR_RCTXINFO_OPT_ODOMAIN_TYPE, "Originating Domain" },
{ LBMR_RCTXINFO_OPT_NAME_TYPE, "Name" },
{ 0x0, NULL }
};
/*----------------------------------------------------------------------------*/
/* Preferences. */
/*----------------------------------------------------------------------------*/
/* Preferences default values. */
#define LBMR_DEFAULT_MC_INCOMING_UDP_PORT 12965
#define LBMR_DEFAULT_MC_INCOMING_UDP_PORT_STRING MAKESTRING(LBMR_DEFAULT_MC_INCOMING_UDP_PORT)
#define LBMR_DEFAULT_MC_OUTGOING_UDP_PORT 12965
#define LBMR_DEFAULT_MC_OUTGOING_UDP_PORT_STRING MAKESTRING(LBMR_DEFAULT_MC_OUTGOING_UDP_PORT)
#define LBMR_DEFAULT_MC_INCOMING_ADDRESS "224.9.10.11"
#define LBMR_DEFAULT_MC_OUTGOING_ADDRESS "224.9.10.11"
#define LBMR_DEFAULT_UC_PORT_HIGH 14406
#define LBMR_DEFAULT_UC_PORT_HIGH_STRING MAKESTRING(LBMR_DEFAULT_UC_PORT_HIGH)
#define LBMR_DEFAULT_UC_PORT_LOW 14402
#define LBMR_DEFAULT_UC_PORT_LOW_STRING MAKESTRING(LBMR_DEFAULT_UC_PORT_LOW)
#define LBMR_DEFAULT_UC_DEST_PORT 15380
#define LBMR_DEFAULT_UC_DEST_PORT_STRING MAKESTRING(LBMR_DEFAULT_UC_DEST_PORT)
#define LBMR_DEFAULT_UC_ADDRESS "0.0.0.0"
/* Global preferences variables (altered by the preferences dialog). */
static guint32 global_lbmr_mc_incoming_udp_port = LBMR_DEFAULT_MC_INCOMING_UDP_PORT;
static guint32 global_lbmr_mc_outgoing_udp_port = LBMR_DEFAULT_MC_OUTGOING_UDP_PORT;
static const char * global_lbmr_mc_incoming_address = LBMR_DEFAULT_MC_INCOMING_ADDRESS;
static const char * global_lbmr_mc_outgoing_address = LBMR_DEFAULT_MC_OUTGOING_ADDRESS;
static guint32 global_lbmr_uc_port_high = LBMR_DEFAULT_UC_PORT_HIGH;
static guint32 global_lbmr_uc_port_low = LBMR_DEFAULT_UC_PORT_LOW;
static guint32 global_lbmr_uc_dest_port = LBMR_DEFAULT_UC_DEST_PORT;
static const char * global_lbmr_uc_address = LBMR_DEFAULT_UC_ADDRESS;
static gboolean global_lbmr_use_tag = FALSE;
/* Local preferences variables (used by the dissector). */
static guint32 lbmr_mc_incoming_udp_port = LBMR_DEFAULT_MC_INCOMING_UDP_PORT;
static guint32 lbmr_mc_outgoing_udp_port = LBMR_DEFAULT_MC_OUTGOING_UDP_PORT;
static guint32 lbmr_mc_incoming_address_host = 0;
static guint32 lbmr_mc_outgoing_address_host = 0;
static guint32 lbmr_uc_port_high = LBMR_DEFAULT_UC_PORT_HIGH;
static guint32 lbmr_uc_port_low = LBMR_DEFAULT_UC_PORT_LOW;
static guint32 lbmr_uc_dest_port = LBMR_DEFAULT_UC_DEST_PORT;
static guint32 lbmr_uc_address_host = 0;
static gboolean lbmr_use_tag = FALSE;
typedef struct
{
char * name;
guint32 mc_outgoing_udp_port;
guint32 mc_incoming_udp_port;
char * mc_incoming_address;
guint32 mc_incoming_address_val_h;
char * mc_outgoing_address;
guint32 mc_outgoing_address_val_h;
guint32 uc_port_high;
guint32 uc_port_low;
guint32 uc_dest_port;
char * uc_address;
guint32 uc_address_val_h;
} lbmr_tag_entry_t;
static lbmr_tag_entry_t * lbmr_tag_entry = NULL;
static guint lbmr_tag_count = 0;
UAT_CSTRING_CB_DEF(lbmr_tag, name, lbmr_tag_entry_t)
UAT_DEC_CB_DEF(lbmr_tag, mc_outgoing_udp_port, lbmr_tag_entry_t)
UAT_DEC_CB_DEF(lbmr_tag, mc_incoming_udp_port, lbmr_tag_entry_t)
UAT_IPV4_MC_CB_DEF(lbmr_tag, mc_incoming_address, lbmr_tag_entry_t)
UAT_IPV4_MC_CB_DEF(lbmr_tag, mc_outgoing_address, lbmr_tag_entry_t)
UAT_DEC_CB_DEF(lbmr_tag, uc_port_high, lbmr_tag_entry_t)
UAT_DEC_CB_DEF(lbmr_tag, uc_port_low, lbmr_tag_entry_t)
UAT_DEC_CB_DEF(lbmr_tag, uc_dest_port, lbmr_tag_entry_t)
UAT_IPV4_CB_DEF(lbmr_tag, uc_address, lbmr_tag_entry_t)
static uat_field_t lbmr_tag_array[] =
{
UAT_FLD_CSTRING(lbmr_tag, name, "Tag name", "Tag name"),
UAT_FLD_DEC(lbmr_tag, mc_incoming_udp_port, "Incoming multicast UDP port", "Incoming UDP port"),
UAT_FLD_IPV4_MC(lbmr_tag, mc_incoming_address, "Incoming multicast address", "Incoming multicast address"),
UAT_FLD_DEC(lbmr_tag, mc_outgoing_udp_port, "Outgoing UDP port", "Outgoing UDP port"),
UAT_FLD_IPV4_MC(lbmr_tag, mc_outgoing_address, "Outgoing multicast address", "Outgoing multicast address"),
UAT_FLD_DEC(lbmr_tag, uc_port_low, "Unicast UDP port low", "Unicast UDP port low"),
UAT_FLD_DEC(lbmr_tag, uc_port_high, "Unicast UDP port high", "Unicast UDP port high"),
UAT_FLD_DEC(lbmr_tag, uc_dest_port, "Unicast UDP destination port", "Unicast UDP destination port"),
UAT_FLD_IPV4(lbmr_tag, uc_address, "Unicast resolver address", "Unicast resolver address"),
UAT_END_FIELDS
};
/*----------------------------------------------------------------------------*/
/* UAT callback functions. */
/*----------------------------------------------------------------------------*/
static gboolean lbmr_tag_update_cb(void * record, char * * error_string)
{
lbmr_tag_entry_t * tag = (lbmr_tag_entry_t *)record;
if (tag->name == NULL)
{
*error_string = g_strdup_printf("Tag name can't be empty");
return FALSE;
}
else
{
g_strstrip(tag->name);
if (tag->name[0] == 0)
{
*error_string = g_strdup_printf("Tag name can't be empty");
return FALSE;
}
}
return TRUE;
}
static void * lbmr_tag_copy_cb(void * destination, const void * source, size_t length _U_)
{
const lbmr_tag_entry_t * src = (const lbmr_tag_entry_t *)source;
lbmr_tag_entry_t * dest = (lbmr_tag_entry_t *)destination;
dest->name = g_strdup(src->name);
dest->mc_outgoing_udp_port = src->mc_outgoing_udp_port;
dest->mc_incoming_udp_port = src->mc_incoming_udp_port;
dest->mc_incoming_address = g_strdup(src->mc_incoming_address);
dest->mc_incoming_address_val_h = src->mc_incoming_address_val_h;
dest->mc_outgoing_address = g_strdup(src->mc_outgoing_address);
dest->mc_outgoing_address_val_h = src->mc_outgoing_address_val_h;
dest->uc_port_high = src->uc_port_high;
dest->uc_port_low = src->uc_port_low;
dest->uc_dest_port = src->uc_dest_port;
dest->uc_address = g_strdup(src->uc_address);
dest->uc_address_val_h = src->uc_address_val_h;
return (dest);
}
static void lbmr_tag_free_cb(void * record)
{
lbmr_tag_entry_t * tag = (lbmr_tag_entry_t *)record;
if (tag->name != NULL)
{
g_free(tag->name);
tag->name = NULL;
}
if (tag->mc_incoming_address != NULL)
{
g_free(tag->mc_incoming_address);
tag->mc_incoming_address = NULL;
}
if (tag->mc_outgoing_address != NULL)
{
g_free(tag->mc_outgoing_address);
tag->mc_outgoing_address = NULL;
}
if (tag->uc_address != NULL)
{
g_free(tag->uc_address);
tag->uc_address = NULL;
}
}
static gboolean lbmr_match_packet(packet_info * pinfo, const lbmr_tag_entry_t * entry)
{
guint32 dest_addr_h;
guint32 src_addr_h;
if ((pinfo->dst.type != AT_IPv4) || (pinfo->dst.len != 4) ||
(pinfo->src.type != AT_IPv4) || (pinfo->src.len != 4))
return (FALSE);
dest_addr_h = pntoh32(pinfo->dst.data);
src_addr_h = pntoh32(pinfo->src.data);
if (IN_MULTICAST(dest_addr_h))
{
/* Check multicast topic resolution values. */
if ((dest_addr_h != entry->mc_incoming_address_val_h) && (dest_addr_h != entry->mc_outgoing_address_val_h))
{
/* No match. */
return (FALSE);
}
/* Check for the correct port. */
if ((dest_addr_h == entry->mc_incoming_address_val_h) && (pinfo->destport != entry->mc_incoming_udp_port))
{
/* Wrong incoming port. */
return (FALSE);
}
if ((dest_addr_h == entry->mc_outgoing_address_val_h) && (pinfo->destport != entry->mc_outgoing_udp_port))
{
/* Wrong outgoing port. */
return (FALSE);
}
/* Must be one of ours. */
return (TRUE);
}
else
{
/* Check unicast topic resolution values. */
/* Address should be either not specified, or match the src or dest address of the packet. */
if ((entry->uc_address_val_h == 0) || (entry->uc_address_val_h == dest_addr_h) || (entry->uc_address_val_h == src_addr_h))
{
if (((pinfo->destport == entry->uc_dest_port) || (pinfo->srcport == entry->uc_dest_port))
&& (((pinfo->destport <= entry->uc_port_high) && (pinfo->destport >= entry->uc_port_low))
|| ((pinfo->srcport <= entry->uc_port_high) && (pinfo->srcport >= entry->uc_port_low))))
{
/* One of ours, so handle it. */
return (TRUE);
}
}
}
return (FALSE);
}
static char * lbmr_tag_find(packet_info * pinfo)
{
guint idx;
lbmr_tag_entry_t * tag = NULL;
if (!lbmr_use_tag)
{
return (NULL);
}
for (idx = 0; idx < lbmr_tag_count; ++idx)
{
tag = &(lbmr_tag_entry[idx]);
if (lbmr_match_packet(pinfo, tag))
{
return tag->name;
}
}
return (NULL);
}
/*----------------------------------------------------------------------------*/
/* Handles of all types. */
/*----------------------------------------------------------------------------*/
/* Protocol handle */
static int proto_lbmr = -1;
/* Dissector handle */
static dissector_handle_t lbmr_dissector_handle;
/* Dissector tree handles */
static gint ett_lbmr = -1;
static gint ett_lbmr_hdr = -1;
static gint ett_lbmr_tqrs = -1;
static gint ett_lbmr_tqr = -1;
static gint ett_lbmr_tirs = -1;
static gint ett_lbmr_tir = -1;
static gint ett_lbmr_tir_tcp = -1;
static gint ett_lbmr_tir_lbtrm = -1;
static gint ett_lbmr_tir_lbtru = -1;
static gint ett_lbmr_tir_lbtipc = -1;
static gint ett_lbmr_tir_lbtrdma = -1;
static gint ett_lbmr_tir_lbtsmx = -1;
static gint ett_lbmr_topts = -1;
static gint ett_lbmr_topt_len = -1;
static gint ett_lbmr_topt_ume = -1;
static gint ett_lbmr_topt_ume_flags = -1;
static gint ett_lbmr_topt_ume_store = -1;
static gint ett_lbmr_topt_ume_store_flags = -1;
static gint ett_lbmr_topt_ume_store_group = -1;
static gint ett_lbmr_topt_ume_store_group_flags = -1;
static gint ett_lbmr_topt_latejoin = -1;
static gint ett_lbmr_topt_latejoin_flags = -1;
static gint ett_lbmr_topt_umq_rcridx = -1;
static gint ett_lbmr_topt_umq_rcridx_flags = -1;
static gint ett_lbmr_topt_umq_qinfo = -1;
static gint ett_lbmr_topt_umq_qinfo_flags = -1;
static gint ett_lbmr_topt_cost = -1;
static gint ett_lbmr_topt_cost_flags = -1;
static gint ett_lbmr_topt_otid = -1;
static gint ett_lbmr_topt_otid_flags = -1;
static gint ett_lbmr_topt_ctxinst = -1;
static gint ett_lbmr_topt_ctxinst_flags = -1;
static gint ett_lbmr_topt_ctxinsts = -1;
static gint ett_lbmr_topt_ctxinsts_flags = -1;
static gint ett_lbmr_topt_ulb = -1;
static gint ett_lbmr_topt_ulb_flags = -1;
static gint ett_lbmr_topt_ctxinstq = -1;
static gint ett_lbmr_topt_ctxinstq_flags = -1;
static gint ett_lbmr_topt_domain_id = -1;
static gint ett_lbmr_topt_domain_id_flags = -1;
static gint ett_lbmr_topt_exfunc = -1;
static gint ett_lbmr_topt_exfunc_flags = -1;
static gint ett_lbmr_topt_exfunc_functionality_flags = -1;
static gint ett_lbmr_topt_unknown = -1;
static gint ett_lbmr_tmb = -1;
static gint ett_lbmr_tmrs = -1;
static gint ett_lbmr_tmr = -1;
static gint ett_lbmr_tmr_flags = -1;
static gint ett_lbmr_pser_flags = -1;
static gint ett_lbmr_pser_opts = -1;
static gint ett_lbmr_pser_opt_len = -1;
static gint ett_lbmr_pser_opt_ctxinst = -1;
static gint ett_lbmr_qqrs = -1;
static gint ett_lbmr_qirs = -1;
static gint ett_lbmr_qir = -1;
static gint ett_lbmr_qir_options = -1;
static gint ett_lbmr_qir_grp_blk = -1;
static gint ett_lbmr_qir_queue_blk = -1;
static gint ett_lbmr_qir_grp = -1;
static gint ett_lbmr_qir_queue = -1;
static gint ett_lbmr_topic_res_request_flags = -1;
static gint ett_lbmr_ctxinfo_flags = -1;
static gint ett_lbmr_tnwg = -1;
static gint ett_lbmr_tnwg_interest = -1;
static gint ett_lbmr_tnwg_interest_rec = -1;
static gint ett_lbmr_tnwg_interest_rec_flags = -1;
static gint ett_lbmr_tnwg_ctxinfo = -1;
static gint ett_lbmr_tnwg_ctxinfo_flags1 = -1;
static gint ett_lbmr_tnwg_trreq = -1;
static gint ett_lbmr_tnwg_ctxinst_opt = -1;
static gint ett_lbmr_tnwg_ctxinst_opt_flags = -1;
static gint ett_lbmr_tnwg_address_opt = -1;
static gint ett_lbmr_tnwg_address_opt_flags = -1;
static gint ett_lbmr_tnwg_domain_opt = -1;
static gint ett_lbmr_tnwg_domain_opt_flags = -1;
static gint ett_lbmr_tnwg_name_opt = -1;
static gint ett_lbmr_tnwg_name_opt_flags = -1;
static gint ett_lbmr_tnwg_unknown_opt = -1;
static gint ett_lbmr_tnwg_unknown_opt_flags = -1;
static gint ett_lbmr_remote_domain_route_hdr = -1;
static gint ett_lbmr_rctxinfo = -1;
static gint ett_lbmr_rctxinfo_rec = -1;
static gint ett_lbmr_rctxinfo_rec_flags = -1;
static gint ett_lbmr_rctxinfo_rec_address = -1;
static gint ett_lbmr_rctxinfo_rec_instance = -1;
static gint ett_lbmr_rctxinfo_rec_odomain = -1;
static gint ett_lbmr_rctxinfo_rec_name = -1;
static gint ett_lbmr_rctxinfo_rec_unknown = -1;
static gint ett_qmgmt_flags = -1;
static gint ett_qmgmt_il = -1;
static gint ett_qmgmt_il_inst = -1;
static gint ett_qmgmt_il_inst_flags = -1;
static gint ett_qmgmt_ec = -1;
static gint ett_qmgmt_ev = -1;
static gint ett_qmgmt_qro = -1;
static gint ett_lbmr_opts = -1;
static gint ett_lbmr_opt_src_id = -1;
static gint ett_lbmr_opt_src_id_flags = -1;
static gint ett_lbmr_opt_len = -1;
static gint ett_lbmr_opt_src_type = -1;
static gint ett_lbmr_opt_src_type_flags = -1;
static gint ett_lbmr_opt_version = -1;
static gint ett_lbmr_opt_version_flags = -1;
static gint ett_lbmr_opt_local_domain = -1;
static gint ett_lbmr_opt_local_domain_flags = -1;
static gint ett_lbmr_opt_unknown = -1;
/* Dissector field handles */
static int hf_lbmr_tag = -1;
static int hf_lbmr_hdr = -1;
static int hf_lbmr_hdr_ver = -1;
static int hf_lbmr_hdr_opt = -1;
static int hf_lbmr_hdr_type = -1;
static int hf_lbmr_hdr_tqrs = -1;
static int hf_lbmr_hdr_tirs = -1;
static int hf_lbmr_hdr_qqrs = -1;
static int hf_lbmr_hdr_qirs = -1;
static int hf_lbmr_hdr_ext_type = -1;
static int hf_lbmr_tqrs = -1;
static int hf_lbmr_tqr = -1;
static int hf_lbmr_tqr_pattern_type = -1;
static int hf_lbmr_tqr_pattern = -1;
static int hf_lbmr_tqr_name = -1;
static int hf_lbmr_tirs = -1;
static int hf_lbmr_tir = -1;
static int hf_lbmr_tir_transport_opts = -1;
static int hf_lbmr_tir_transport_type = -1;
static int hf_lbmr_tir_tlen = -1;
static int hf_lbmr_tir_ttl = -1;
static int hf_lbmr_tir_index = -1;
static int hf_lbmr_tir_name = -1;
static int hf_lbmr_tir_tcp = -1;
static int hf_lbmr_tir_tcp_ip = -1;
static int hf_lbmr_tir_tcp_session_id = -1;
static int hf_lbmr_tir_tcp_port = -1;
static int hf_lbmr_tir_lbtrm = -1;
static int hf_lbmr_tir_lbtrm_src_addr = -1;
static int hf_lbmr_tir_lbtrm_mcast_addr = -1;
static int hf_lbmr_tir_lbtrm_session_id = -1;
static int hf_lbmr_tir_lbtrm_udp_dest_port = -1;
static int hf_lbmr_tir_lbtrm_src_ucast_port = -1;
static int hf_lbmr_tir_lbtru = -1;
static int hf_lbmr_tir_lbtru_ip = -1;
static int hf_lbmr_tir_lbtru_port = -1;
static int hf_lbmr_tir_lbtru_session_id = -1;
static int hf_lbmr_tir_lbtipc = -1;
static int hf_lbmr_tir_lbtipc_host_id = -1;
static int hf_lbmr_tir_lbtipc_session_id = -1;
static int hf_lbmr_tir_lbtipc_xport_id = -1;
static int hf_lbmr_tir_lbtrdma = -1;
static int hf_lbmr_tir_lbtrdma_ip = -1;
static int hf_lbmr_tir_lbtrdma_session_id = -1;
static int hf_lbmr_tir_lbtrdma_port = -1;
static int hf_lbmr_tir_lbtsmx = -1;
static int hf_lbmr_tir_lbtsmx_host_id = -1;
static int hf_lbmr_tir_lbtsmx_session_id = -1;
static int hf_lbmr_tir_lbtsmx_xport_id = -1;
static int hf_lbmr_tir_channel = -1;
static int hf_lbmr_tir_unknown_transport = -1;
static int hf_lbmr_topts = -1;
static int hf_lbmr_topt_len = -1;
static int hf_lbmr_topt_len_type = -1;
static int hf_lbmr_topt_len_len = -1;
static int hf_lbmr_topt_len_total_len = -1;
static int hf_lbmr_topt_ume = -1;
static int hf_lbmr_topt_ume_type = -1;
static int hf_lbmr_topt_ume_len = -1;
static int hf_lbmr_topt_ume_flags = -1;
static int hf_lbmr_topt_ume_flags_ignore = -1;
static int hf_lbmr_topt_ume_flags_latejoin = -1;
static int hf_lbmr_topt_ume_flags_store = -1;
static int hf_lbmr_topt_ume_flags_qccap = -1;
static int hf_lbmr_topt_ume_flags_acktosrc = -1;
static int hf_lbmr_topt_ume_store_tcp_port = -1;
static int hf_lbmr_topt_ume_src_tcp_port = -1;
static int hf_lbmr_topt_ume_store_tcp_addr = -1;
static int hf_lbmr_topt_ume_src_tcp_addr = -1;
static int hf_lbmr_topt_ume_src_reg_id = -1;
static int hf_lbmr_topt_ume_transport_idx = -1;
static int hf_lbmr_topt_ume_high_seqnum = -1;
static int hf_lbmr_topt_ume_low_seqnum = -1;
static int hf_lbmr_topt_ume_store = -1;
static int hf_lbmr_topt_ume_store_type = -1;
static int hf_lbmr_topt_ume_store_len = -1;
static int hf_lbmr_topt_ume_store_flags = -1;
static int hf_lbmr_topt_ume_store_flags_ignore = -1;
static int hf_lbmr_topt_ume_store_grp_idx = -1;
static int hf_lbmr_topt_ume_store_store_tcp_port = -1;
static int hf_lbmr_topt_ume_store_store_idx = -1;
static int hf_lbmr_topt_ume_store_store_ip_addr = -1;
static int hf_lbmr_topt_ume_store_src_reg_id = -1;
static int hf_lbmr_topt_ume_store_group = -1;
static int hf_lbmr_topt_ume_store_group_type = -1;
static int hf_lbmr_topt_ume_store_group_len = -1;
static int hf_lbmr_topt_ume_store_group_flags = -1;
static int hf_lbmr_topt_ume_store_group_flags_ignore = -1;
static int hf_lbmr_topt_ume_store_group_grp_idx = -1;
static int hf_lbmr_topt_ume_store_group_grp_sz = -1;
static int hf_lbmr_topt_ume_store_group_reserved = -1;
static int hf_lbmr_topt_latejoin = -1;
static int hf_lbmr_topt_latejoin_type = -1;
static int hf_lbmr_topt_latejoin_len = -1;
static int hf_lbmr_topt_latejoin_flags = -1;
static int hf_lbmr_topt_latejoin_flags_ignore = -1;
static int hf_lbmr_topt_latejoin_flags_acktosrc = -1;
static int hf_lbmr_topt_latejoin_src_tcp_port = -1;
static int hf_lbmr_topt_latejoin_reserved = -1;
static int hf_lbmr_topt_latejoin_src_ip_addr = -1;
static int hf_lbmr_topt_latejoin_transport_idx = -1;
static int hf_lbmr_topt_latejoin_high_seqnum = -1;
static int hf_lbmr_topt_latejoin_low_seqnum = -1;
static int hf_lbmr_topt_umq_rcridx = -1;
static int hf_lbmr_topt_umq_rcridx_type = -1;
static int hf_lbmr_topt_umq_rcridx_len = -1;
static int hf_lbmr_topt_umq_rcridx_flags = -1;
static int hf_lbmr_topt_umq_rcridx_flags_ignore = -1;
static int hf_lbmr_topt_umq_rcridx_rcr_idx = -1;
static int hf_lbmr_topt_umq_qinfo = -1;
static int hf_lbmr_topt_umq_qinfo_type = -1;
static int hf_lbmr_topt_umq_qinfo_len = -1;
static int hf_lbmr_topt_umq_qinfo_flags = -1;
static int hf_lbmr_topt_umq_qinfo_flags_ignore = -1;
static int hf_lbmr_topt_umq_qinfo_flags_queue = -1;
static int hf_lbmr_topt_umq_qinfo_flags_rcvlisten = -1;
static int hf_lbmr_topt_umq_qinfo_flags_control = -1;
static int hf_lbmr_topt_umq_qinfo_flags_srcrcvlisten = -1;
static int hf_lbmr_topt_umq_qinfo_flags_participants_only = -1;
static int hf_lbmr_topt_umq_qinfo_queue = -1;
static int hf_lbmr_topt_cost = -1;
static int hf_lbmr_topt_cost_type = -1;
static int hf_lbmr_topt_cost_len = -1;
static int hf_lbmr_topt_cost_flags = -1;
static int hf_lbmr_topt_cost_flags_ignore = -1;
static int hf_lbmr_topt_cost_hop_count = -1;
static int hf_lbmr_topt_cost_cost = -1;
static int hf_lbmr_topt_otid = -1;
static int hf_lbmr_topt_otid_type = -1;
static int hf_lbmr_topt_otid_len = -1;
static int hf_lbmr_topt_otid_flags = -1;
static int hf_lbmr_topt_otid_flags_ignore = -1;
static int hf_lbmr_topt_otid_originating_transport = -1;
static int hf_lbmr_topt_ctxinst = -1;
static int hf_lbmr_topt_ctxinst_type = -1;
static int hf_lbmr_topt_ctxinst_len = -1;
static int hf_lbmr_topt_ctxinst_flags = -1;
static int hf_lbmr_topt_ctxinst_flags_ignore = -1;
static int hf_lbmr_topt_ctxinst_res = -1;
static int hf_lbmr_topt_ctxinst_ctxinst = -1;
static int hf_lbmr_topt_ctxinsts = -1;
static int hf_lbmr_topt_ctxinsts_type = -1;
static int hf_lbmr_topt_ctxinsts_len = -1;
static int hf_lbmr_topt_ctxinsts_flags = -1;
static int hf_lbmr_topt_ctxinsts_flags_ignore = -1;
static int hf_lbmr_topt_ctxinsts_idx = -1;
static int hf_lbmr_topt_ctxinsts_ctxinst = -1;
static int hf_lbmr_topt_ulb = -1;
static int hf_lbmr_topt_ulb_type = -1;
static int hf_lbmr_topt_ulb_len = -1;
static int hf_lbmr_topt_ulb_flags = -1;
static int hf_lbmr_topt_ulb_flags_ignore = -1;
static int hf_lbmr_topt_ulb_queue_id = -1;
static int hf_lbmr_topt_ulb_regid = -1;
static int hf_lbmr_topt_ulb_ulb_src_id = -1;
static int hf_lbmr_topt_ulb_src_ip_addr = -1;
static int hf_lbmr_topt_ulb_src_tcp_port = -1;
static int hf_lbmr_topt_ulb_reserved = -1;
static int hf_lbmr_topt_ctxinstq = -1;
static int hf_lbmr_topt_ctxinstq_type = -1;
static int hf_lbmr_topt_ctxinstq_len = -1;
static int hf_lbmr_topt_ctxinstq_flags = -1;
static int hf_lbmr_topt_ctxinstq_flags_ignore = -1;
static int hf_lbmr_topt_ctxinstq_idx = -1;
static int hf_lbmr_topt_ctxinstq_ctxinst = -1;
static int hf_lbmr_topt_domain_id = -1;
static int hf_lbmr_topt_domain_id_type = -1;
static int hf_lbmr_topt_domain_id_len = -1;
static int hf_lbmr_topt_domain_id_flags = -1;
static int hf_lbmr_topt_domain_id_flags_ignore = -1;
static int hf_lbmr_topt_domain_id_domain_id = -1;
static int hf_lbmr_topt_exfunc = -1;
static int hf_lbmr_topt_exfunc_type = -1;
static int hf_lbmr_topt_exfunc_len = -1;
static int hf_lbmr_topt_exfunc_flags = -1;
static int hf_lbmr_topt_exfunc_flags_ignore = -1;
static int hf_lbmr_topt_exfunc_src_tcp_port = -1;
static int hf_lbmr_topt_exfunc_reserved = -1;
static int hf_lbmr_topt_exfunc_src_ip_addr = -1;
static int hf_lbmr_topt_exfunc_functionality_flags = -1;
static int hf_lbmr_topt_exfunc_functionality_flags_lj = -1;
static int hf_lbmr_topt_exfunc_functionality_flags_ume = -1;
static int hf_lbmr_topt_exfunc_functionality_flags_umq = -1;
static int hf_lbmr_topt_exfunc_functionality_flags_ulb = -1;
static int hf_lbmr_topt_unknown = -1;
static int hf_lbmr_topt_unknown_type = -1;
static int hf_lbmr_topt_unknown_len = -1;
static int hf_lbmr_topt_unknown_flags = -1;
static int hf_lbmr_topt_unknown_data = -1;
static int hf_lbmr_qqr = -1;
static int hf_lbmr_qqr_name = -1;
static int hf_lbmr_qirs = -1;
static int hf_lbmr_qir = -1;
static int hf_lbmr_qir_queue_name = -1;
static int hf_lbmr_qir_topic_name = -1;
static int hf_lbmr_qir_queue_id = -1;
static int hf_lbmr_qir_queue_ver = -1;
static int hf_lbmr_qir_queue_prev_ver = -1;
static int hf_lbmr_qir_option_flag = -1;
static int hf_lbmr_qir_grp_blks = -1;
static int hf_lbmr_qir_queue_blks = -1;
static int hf_lbmr_qir_grps = -1;
static int hf_lbmr_qir_grp_blk = -1;
static int hf_lbmr_qir_grp_blk_grp_idx = -1;
static int hf_lbmr_qir_grp_blk_grp_sz = -1;
static int hf_lbmr_qir_queues = -1;
static int hf_lbmr_qir_queue_blk = -1;
static int hf_lbmr_qir_queue_blk_ip = -1;
static int hf_lbmr_qir_queue_blk_port = -1;
static int hf_lbmr_qir_queue_blk_idx = -1;
static int hf_lbmr_qir_queue_blk_grp_idx = -1;
static int hf_lbmr_qir_queue_blk_reserved = -1;
static int hf_lbmr_tmb = -1;
static int hf_lbmr_tmb_len = -1;
static int hf_lbmr_tmb_tmrs = -1;
static int hf_lbmr_tmb_tmr_list = -1;
static int hf_lbmr_tmr = -1;
static int hf_lbmr_tmr_len = -1;
static int hf_lbmr_tmr_type = -1;
static int hf_lbmr_tmr_flags = -1;
static int hf_lbmr_tmr_flags_response = -1;
static int hf_lbmr_tmr_flags_wildcard_pcre = -1;
static int hf_lbmr_tmr_flags_wildcard_regex = -1;
static int hf_lbmr_tmr_name = -1;
static int hf_lbmr_pser_dep_type = -1;
static int hf_lbmr_pser_len = -1;
static int hf_lbmr_pser_flags = -1;
static int hf_lbmr_pser_flags_option = -1;
static int hf_lbmr_pser_source_ip = -1;
static int hf_lbmr_pser_store_ip = -1;
static int hf_lbmr_pser_transport_idx = -1;
static int hf_lbmr_pser_topic_idx = -1;
static int hf_lbmr_pser_source_port = -1;
static int hf_lbmr_pser_store_port = -1;
static int hf_lbmr_pser_topic = -1;
static int hf_lbmr_pser_opts = -1;
static int hf_lbmr_pser_optlen = -1;
static int hf_lbmr_pser_optlen_type = -1;
static int hf_lbmr_pser_optlen_optlen = -1;
static int hf_lbmr_pser_opt_ctxinst = -1;
static int hf_lbmr_pser_opt_ctxinst_len = -1;
static int hf_lbmr_pser_opt_ctxinst_type = -1;
static int hf_lbmr_pser_opt_ctxinst_ctxinst = -1;
static int hf_lbmr_opts = -1;
static int hf_lbmr_opt_len = -1;
static int hf_lbmr_opt_len_type = -1;
static int hf_lbmr_opt_len_len = -1;
static int hf_lbmr_opt_len_total_len = -1;
static int hf_lbmr_opt_src_id = -1;
static int hf_lbmr_opt_src_id_type = -1;
static int hf_lbmr_opt_src_id_len = -1;
static int hf_lbmr_opt_src_id_flags = -1;
static int hf_lbmr_opt_src_id_flags_ignore = -1;
static int hf_lbmr_opt_src_id_src_id = -1;
static int hf_lbmr_opt_src_type = -1;
static int hf_lbmr_opt_src_type_type = -1;
static int hf_lbmr_opt_src_type_len = -1;
static int hf_lbmr_opt_src_type_flags = -1;
static int hf_lbmr_opt_src_type_flags_ignore = -1;
static int hf_lbmr_opt_src_type_src_type = -1;
static int hf_lbmr_opt_version = -1;
static int hf_lbmr_opt_version_type = -1;
static int hf_lbmr_opt_version_len = -1;
static int hf_lbmr_opt_version_flags = -1;
static int hf_lbmr_opt_version_flags_ignore = -1;
static int hf_lbmr_opt_version_flags_ume = -1;
static int hf_lbmr_opt_version_flags_umq = -1;
static int hf_lbmr_opt_version_version = -1;
static int hf_lbmr_opt_local_domain = -1;
static int hf_lbmr_opt_local_domain_type = -1;
static int hf_lbmr_opt_local_domain_len = -1;
static int hf_lbmr_opt_local_domain_flags = -1;
static int hf_lbmr_opt_local_domain_flags_ignore = -1;
static int hf_lbmr_opt_local_domain_local_domain_id = -1;
static int hf_lbmr_opt_unknown = -1;
static int hf_lbmr_opt_unknown_type = -1;
static int hf_lbmr_opt_unknown_len = -1;
static int hf_lbmr_opt_unknown_flags = -1;
static int hf_lbmr_opt_unknown_data = -1;
static int hf_lbmr_topic_res_request_flags = -1;
static int hf_lbmr_topic_res_request_flags_gw_remote_interest = -1;
static int hf_lbmr_topic_res_request_flags_context_query = -1;
static int hf_lbmr_topic_res_request_flags_context_advertisement = -1;
static int hf_lbmr_topic_res_request_flags_gateway_meta = -1;
static int hf_lbmr_topic_res_request_flags_advertisement = -1;
static int hf_lbmr_topic_res_request_flags_query = -1;
static int hf_lbmr_topic_res_request_flags_wildcard_query = -1;
static int hf_lbmr_ctxinfo_len = -1;
static int hf_lbmr_ctxinfo_hop_count = -1;
static int hf_lbmr_ctxinfo_flags = -1;
static int hf_lbmr_ctxinfo_flags_query = -1;
static int hf_lbmr_ctxinfo_flags_ip = -1;
static int hf_lbmr_ctxinfo_flags_instance = -1;
static int hf_lbmr_ctxinfo_flags_tnwg_src = -1;
static int hf_lbmr_ctxinfo_flags_tnwg_rcv = -1;
static int hf_lbmr_ctxinfo_flags_proxy = -1;
static int hf_lbmr_ctxinfo_flags_name = -1;
static int hf_lbmr_ctxinfo_port = -1;
static int hf_lbmr_ctxinfo_ip = -1;
static int hf_lbmr_ctxinfo_instance = -1;
static int hf_lbmr_ctxinfo_name = -1;
static int hf_lbmr_tnwg_len = -1;
static int hf_lbmr_tnwg_type = -1;
static int hf_lbmr_tnwg_reserved = -1;
static int hf_lbmr_tnwg_interest = -1;
static int hf_lbmr_tnwg_interest_len = -1;
static int hf_lbmr_tnwg_interest_count = -1;
static int hf_lbmr_tnwg_interest_rec = -1;
static int hf_lbmr_tnwg_interest_rec_len = -1;
static int hf_lbmr_tnwg_interest_rec_flags = -1;
static int hf_lbmr_tnwg_interest_rec_flags_pattern = -1;
static int hf_lbmr_tnwg_interest_rec_flags_cancel = -1;
static int hf_lbmr_tnwg_interest_rec_flags_refresh = -1;
static int hf_lbmr_tnwg_interest_rec_pattype = -1;
static int hf_lbmr_tnwg_interest_rec_domain_id = -1;
static int hf_lbmr_tnwg_interest_rec_symbol = -1;
static int hf_lbmr_tnwg_ctxinfo = -1;
static int hf_lbmr_tnwg_ctxinfo_len = -1;
static int hf_lbmr_tnwg_ctxinfo_hop_count = -1;
static int hf_lbmr_tnwg_ctxinfo_reserved = -1;
static int hf_lbmr_tnwg_ctxinfo_flags1 = -1;
static int hf_lbmr_tnwg_ctxinfo_flags1_query = -1;
static int hf_lbmr_tnwg_ctxinfo_flags1_tnwg_src = -1;
static int hf_lbmr_tnwg_ctxinfo_flags1_tnwg_rcv = -1;
static int hf_lbmr_tnwg_ctxinfo_flags1_proxy = -1;
static int hf_lbmr_tnwg_ctxinfo_flags2 = -1;
static int hf_lbmr_tnwg_trreq = -1;
static int hf_lbmr_tnwg_trreq_len = -1;
static int hf_lbmr_tnwg_opt = -1;
static int hf_lbmr_tnwg_opt_type = -1;
static int hf_lbmr_tnwg_opt_len = -1;
static int hf_lbmr_tnwg_opt_flags = -1;
static int hf_lbmr_tnwg_opt_flags_ignore = -1;
static int hf_lbmr_tnwg_opt_data = -1;
static int hf_lbmr_tnwg_opt_ctxinst = -1;
static int hf_lbmr_tnwg_opt_ctxinst_type = -1;
static int hf_lbmr_tnwg_opt_ctxinst_len = -1;
static int hf_lbmr_tnwg_opt_ctxinst_flags = -1;
static int hf_lbmr_tnwg_opt_ctxinst_flags_ignore = -1;
static int hf_lbmr_tnwg_opt_ctxinst_instance = -1;
static int hf_lbmr_tnwg_opt_address = -1;
static int hf_lbmr_tnwg_opt_address_type = -1;
static int hf_lbmr_tnwg_opt_address_len = -1;
static int hf_lbmr_tnwg_opt_address_flags = -1;
static int hf_lbmr_tnwg_opt_address_flags_ignore = -1;
static int hf_lbmr_tnwg_opt_address_port = -1;
static int hf_lbmr_tnwg_opt_address_res = -1;
static int hf_lbmr_tnwg_opt_address_ip = -1;
static int hf_lbmr_tnwg_opt_domain = -1;
static int hf_lbmr_tnwg_opt_domain_type = -1;
static int hf_lbmr_tnwg_opt_domain_len = -1;
static int hf_lbmr_tnwg_opt_domain_flags = -1;
static int hf_lbmr_tnwg_opt_domain_flags_ignore = -1;
static int hf_lbmr_tnwg_opt_domain_domain_id = -1;
static int hf_lbmr_tnwg_opt_name = -1;
static int hf_lbmr_tnwg_opt_name_type = -1;
static int hf_lbmr_tnwg_opt_name_len = -1;
static int hf_lbmr_tnwg_opt_name_flags = -1;
static int hf_lbmr_tnwg_opt_name_flags_ignore = -1;
static int hf_lbmr_tnwg_opt_name_name = -1;
static int hf_lbmr_remote_domain_route_hdr_num_domains = -1;
static int hf_lbmr_remote_domain_route_hdr_ip = -1;
static int hf_lbmr_remote_domain_route_hdr_port = -1;
static int hf_lbmr_remote_domain_route_hdr_reserved = -1;
static int hf_lbmr_remote_domain_route_hdr_length = -1;
static int hf_lbmr_remote_domain_route_hdr_domain = -1;
static int hf_lbmr_rctxinfo_len = -1;
static int hf_lbmr_rctxinfo_num_recs = -1;
static int hf_lbmr_rctxinfo_reserved = -1;
static int hf_lbmr_rctxinfo_rec = -1;
static int hf_lbmr_rctxinfo_rec_len = -1;
static int hf_lbmr_rctxinfo_rec_flags = -1;
static int hf_lbmr_rctxinfo_rec_flags_query = -1;
static int hf_lbmr_rctxinfo_rec_address = -1;
static int hf_lbmr_rctxinfo_rec_address_type = -1;
static int hf_lbmr_rctxinfo_rec_address_len = -1;
static int hf_lbmr_rctxinfo_rec_address_flags = -1;
static int hf_lbmr_rctxinfo_rec_address_domain_id = -1;
static int hf_lbmr_rctxinfo_rec_address_ip = -1;
static int hf_lbmr_rctxinfo_rec_address_port = -1;
static int hf_lbmr_rctxinfo_rec_address_res = -1;
static int hf_lbmr_rctxinfo_rec_instance = -1;
static int hf_lbmr_rctxinfo_rec_instance_type = -1;
static int hf_lbmr_rctxinfo_rec_instance_len = -1;
static int hf_lbmr_rctxinfo_rec_instance_flags = -1;
static int hf_lbmr_rctxinfo_rec_instance_instance = -1;
static int hf_lbmr_rctxinfo_rec_odomain = -1;
static int hf_lbmr_rctxinfo_rec_odomain_type = -1;
static int hf_lbmr_rctxinfo_rec_odomain_len = -1;
static int hf_lbmr_rctxinfo_rec_odomain_flags = -1;
static int hf_lbmr_rctxinfo_rec_odomain_domain_id = -1;
static int hf_lbmr_rctxinfo_rec_name = -1;
static int hf_lbmr_rctxinfo_rec_name_type = -1;
static int hf_lbmr_rctxinfo_rec_name_len = -1;
static int hf_lbmr_rctxinfo_rec_name_flags = -1;
static int hf_lbmr_rctxinfo_rec_name_name = -1;
static int hf_lbmr_rctxinfo_rec_unknown = -1;
static int hf_lbmr_rctxinfo_rec_unknown_type = -1;
static int hf_lbmr_rctxinfo_rec_unknown_len = -1;
static int hf_lbmr_rctxinfo_rec_unknown_flags = -1;
static int hf_lbmr_rctxinfo_rec_unknown_data = -1;
static int hf_qmgmt_flags = -1;
static int hf_qmgmt_flags_i_flag = -1;
static int hf_qmgmt_flags_n_flag = -1;
static int hf_qmgmt_flags_il_l_flag = -1;
static int hf_qmgmt_flags_il_k_flag = -1;
static int hf_qmgmt_pckt_type = -1;
static int hf_qmgmt_cfgsig = -1;
static int hf_qmgmt_queue_id = -1;
static int hf_qmgmt_queue_ver = -1;
static int hf_qmgmt_ip = -1;
static int hf_qmgmt_port = -1;
static int hf_qmgmt_inst_idx = -1;
static int hf_qmgmt_grp_idx = -1;
static int hf_qmgmt_pckt_type_dep16 = -1;
static int hf_qmgmt_il_num_insts = -1;
static int hf_qmgmt_jrej_code = -1;
static int hf_qmgmt_ev_bias = -1;
static int hf_qmgmt_il = -1;
static int hf_qmgmt_il_highest_rcr_tsp = -1;
static int hf_qmgmt_il_inst = -1;
static int hf_qmgmt_il_inst_ip = -1;
static int hf_qmgmt_il_inst_port = -1;
static int hf_qmgmt_il_inst_inst_idx = -1;
static int hf_qmgmt_il_inst_grp_idx = -1;
static int hf_qmgmt_il_inst_flags = -1;
static int hf_qmgmt_il_inst_flags_m_flag = -1;
static int hf_qmgmt_il_inst_flags_q_flag = -1;
static int hf_qmgmt_il_inst_flags_p_flag = -1;
static int hf_qmgmt_ec = -1;
static int hf_qmgmt_ec_queue_new_ver = -1;
static int hf_qmgmt_ev = -1;
static int hf_qmgmt_ev_highest_rcr_tsp = -1;
static int hf_qmgmt_ev_age = -1;
static int hf_qmgmt_qro = -1;
static int hf_qmgmt_qro_highest_rcr_tsp = -1;
static int hf_qmgmt_qname = -1;
/* Expert info handles */
static expert_field ei_lbmr_analysis_length_incorrect = EI_INIT;
static expert_field ei_lbmr_analysis_invalid_value = EI_INIT;
static expert_field ei_lbmr_analysis_zero_len_option = EI_INIT;
/* Tap handles */
static int lbmr_topic_advertisement_tap_handle = -1;
static int lbmr_topic_query_tap_handle = -1;
static int lbmr_pattern_query_tap_handle = -1;
static int lbmr_queue_advertisement_tap_handle = -1;
static int lbmr_queue_query_tap_handle = -1;
#define LBMR_TOPIC_ADVERTISEMENT_TAP_STRING "lbm_lbmr_topic_advertisement"
#define LBMR_TOPIC_QUERY_TAP_STRING "lbm_lbmr_topic_query"
#define LBMR_PATTERN_QUERY_TAP_STRING "lbm_lbmr_pattern_query"
#define LBMR_QUEUE_ADVERTISEMENT_TAP_STRING "lbm_lbmr_queue_advertisement"
#define LBMR_QUEUE_QUERY_TAP_STRING "lbm_lbmr_queue_query"
/*----------------------------------------------------------------------------*/
/* Statistics. */
/*----------------------------------------------------------------------------*/
/* Statistics structures */
struct tqr_node_t_stct;
struct tqr_node_t_stct
{
char * topic;
struct tqr_node_t_stct * next;
};
typedef struct tqr_node_t_stct tqr_node_t;
struct wctqr_node_t_stct;
struct wctqr_node_t_stct
{
guint8 type;
char * pattern;
struct wctqr_node_t_stct * next;
};
typedef struct wctqr_node_t_stct wctqr_node_t;
struct tir_node_t_stct;
struct tir_node_t_stct
{
char * topic;
char * source_string;
guint32 index;
struct tir_node_t_stct * next;
};
typedef struct tir_node_t_stct tir_node_t;
typedef struct
{
gint tqr_count;
tqr_node_t * tqr;
gint tir_count;
tir_node_t * tir;
gint wctqr_count;
wctqr_node_t * wctqr;
} lbmr_topic_contents_t;
struct qqr_node_t_stct;
struct qqr_node_t_stct
{
char * queue;
struct qqr_node_t_stct * next;
};
typedef struct qqr_node_t_stct qqr_node_t;
struct qir_node_t_stct;
struct qir_node_t_stct
{
char * queue;
char * topic;
guint16 port;
struct qir_node_t_stct * next;
};
typedef struct qir_node_t_stct qir_node_t;
typedef struct
{
gint qqr_count;
qqr_node_t * qqr;
gint qir_count;
qir_node_t * qir;
} lbmr_queue_contents_t;
typedef struct
{
gint type;
union
{
lbmr_topic_contents_t topic;
lbmr_queue_contents_t queue;
} contents;
} lbmr_contents_t;
#define LBMR_CONTENTS_TOPIC 0
#define LBMR_CONTENTS_QUEUE 1
/* Statistics titles */
static const gchar * lbmr_stat_tree_name_topic_ads_topic = "29West/Topics/Advertisements by Topic";
static const gchar * lbmr_stat_tree_name_topic_ads_source = "29West/Topics/Advertisements by Source";
static const gchar * lbmr_stat_tree_name_topic_ads_transport = "29West/Topics/Advertisements by Transport";
static const gchar * lbmr_stat_tree_name_topic_queries_topic = "29West/Topics/Queries by Topic";
static const gchar * lbmr_stat_tree_name_topic_queries_receiver = "29West/Topics/Queries by Receiver";
static const gchar * lbmr_stat_tree_name_topic_queries_pattern = "29West/Topics/Wildcard Queries by Pattern";
static const gchar * lbmr_stat_tree_name_topic_queries_pattern_receiver = "29West/Topics/Wildcard Queries by Receiver";
static const gchar * lbmr_stat_tree_name_queue_ads_queue = "29West/Queues/Advertisements by Queue";
static const gchar * lbmr_stat_tree_name_queue_ads_source = "29West/Queues/Advertisements by Source";
static const gchar * lbmr_stat_tree_name_queue_queries_queue = "29West/Queues/Queries by Queue";
static const gchar * lbmr_stat_tree_name_queue_queries_receiver = "29West/Queues/Queries by Receiver";
/* Statistics handles */
static int lbmr_stats_tree_handle_topic_ads_topic = -1;
static int lbmr_stats_tree_handle_topic_ads_source = -1;
static int lbmr_stats_tree_handle_topic_ads_transport = -1;
static int lbmr_stats_tree_handle_topic_queries_topic = -1;
static int lbmr_stats_tree_handle_topic_queries_receiver = -1;
static int lbmr_stats_tree_handle_topic_queries_pattern = -1;
static int lbmr_stats_tree_handle_topic_queries_pattern_receiver = -1;
static int lbmr_stats_tree_handle_queue_ads_queue = -1;
static int lbmr_stats_tree_handle_queue_ads_source = -1;
static int lbmr_stats_tree_handle_queue_queries_queue = -1;
static int lbmr_stats_tree_handle_queue_queries_receiver = -1;
/*----------------------------------------------------------------------------*/
/* Statistics tree utility functions. */
/*----------------------------------------------------------------------------*/
static void add_contents_tqr(lbmr_contents_t * contents, const char * topic)
{
tqr_node_t * node = NULL;
node = wmem_new(wmem_packet_scope(), tqr_node_t);
node->topic = wmem_strdup(wmem_packet_scope(), topic);
node->next = contents->contents.topic.tqr;
contents->contents.topic.tqr = node;
contents->contents.topic.tqr_count++;
}
static void add_contents_wctqr(lbmr_contents_t * contents, unsigned char type, const char * pattern)
{
wctqr_node_t * node = NULL;
node = wmem_new(wmem_packet_scope(), wctqr_node_t);
node->type = type;
node->pattern = wmem_strdup(wmem_packet_scope(), pattern);
node->next = contents->contents.topic.wctqr;
contents->contents.topic.wctqr = node;
contents->contents.topic.wctqr_count++;
}
static void add_contents_tir(lbmr_contents_t * contents, const char * topic, char * source, guint32 topic_index)
{
tir_node_t * node = NULL;
node = wmem_new(wmem_packet_scope(), tir_node_t);
node->topic = wmem_strdup(wmem_packet_scope(), topic);
node->source_string = source;
node->index = topic_index;
node->next = contents->contents.topic.tir;
contents->contents.topic.tir = node;
contents->contents.topic.tir_count++;
}
static void add_contents_qqr(lbmr_contents_t * contents, const char * queue)
{
qqr_node_t * node = NULL;
node = wmem_new(wmem_packet_scope(), qqr_node_t);
node->queue = wmem_strdup(wmem_packet_scope(), queue);
node->next = contents->contents.queue.qqr;
contents->contents.queue.qqr = node;
contents->contents.queue.qqr_count++;
}
static void add_contents_qir(lbmr_contents_t * contents, const char * queue, const char * topic, guint16 port)
{
qir_node_t * node = NULL;
node = wmem_new(wmem_packet_scope(), qir_node_t);
node->queue = wmem_strdup(wmem_packet_scope(), queue);
node->topic = wmem_strdup(wmem_packet_scope(), topic);
node->port = port;
node->next = contents->contents.queue.qir;
contents->contents.queue.qir = node;
contents->contents.queue.qir_count++;
}
/*----------------------------------------------------------------------------*/
/* Topic advertisements by Topic: */
/* Topic name */
/* - Source address */
/* - Source string (including topic index) */
/*----------------------------------------------------------------------------*/
static void lbmr_topic_ads_topic_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_topic_ads_topic = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_ads_topic, 0, TRUE);
}
static int lbmr_topic_ads_topic_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_topic_advertisement_tap_info_t * info = (const lbm_lbmr_topic_advertisement_tap_info_t *) data;
int topic_node;
int source_node;
gchar * full_source_string;
tick_stat_node(tree, lbmr_stat_tree_name_topic_ads_topic, 0, FALSE);
topic_node = tick_stat_node(tree, info->topic, lbmr_stats_tree_handle_topic_ads_topic, TRUE);
source_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), topic_node, TRUE);
full_source_string = wmem_strdup_printf(wmem_packet_scope(), "%s[%" G_GUINT32_FORMAT "]", info->source, info->topic_index);
tick_stat_node(tree, full_source_string, source_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Topic advertisements by Source: */
/* Source address */
/* - Topic name */
/* - Source string (including topic index) */
/*----------------------------------------------------------------------------*/
static void lbmr_topic_ads_source_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_topic_ads_source = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_ads_source, 0, TRUE);
}
static int lbmr_topic_ads_source_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_topic_advertisement_tap_info_t * info = (const lbm_lbmr_topic_advertisement_tap_info_t *) data;
int source_node;
int topic_node;
gchar * full_source_string;
tick_stat_node(tree, lbmr_stat_tree_name_topic_ads_source, 0, FALSE);
source_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_topic_ads_source, TRUE);
topic_node = tick_stat_node(tree, info->topic, source_node, TRUE);
full_source_string = wmem_strdup_printf(wmem_packet_scope(), "%s[%" G_GUINT32_FORMAT "]", info->source, info->topic_index);
tick_stat_node(tree, full_source_string, topic_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Topic advertisements by Transport: */
/* Source string */
/* - Topic name (including topic index) */
/*----------------------------------------------------------------------------*/
static void lbmr_topic_ads_transport_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_topic_ads_transport = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_ads_transport, 0, TRUE);
}
static int lbmr_topic_ads_transport_stats_tree_packet(stats_tree * tree, packet_info * pinfo _U_, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_topic_advertisement_tap_info_t * info = (const lbm_lbmr_topic_advertisement_tap_info_t *) data;
int transport_node;
gchar * full_source_string;
tick_stat_node(tree, lbmr_stat_tree_name_topic_ads_transport, 0, FALSE);
transport_node = tick_stat_node(tree, info->source, lbmr_stats_tree_handle_topic_ads_transport, TRUE);
full_source_string = wmem_strdup_printf(wmem_packet_scope(), "%s [%" G_GUINT32_FORMAT "]", info->topic, info->topic_index);
tick_stat_node(tree, full_source_string, transport_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Topic queries by Topic: */
/* Topic name */
/* - Receiver address */
/*----------------------------------------------------------------------------*/
static void lbmr_topic_queries_topic_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_topic_queries_topic = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_topic, 0, TRUE);
}
static int lbmr_topic_queries_topic_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_topic_query_tap_info_t * info = (const lbm_lbmr_topic_query_tap_info_t *) data;
int topic_node;
tick_stat_node(tree, lbmr_stat_tree_name_topic_queries_topic, 0, FALSE);
topic_node = tick_stat_node(tree, info->topic, lbmr_stats_tree_handle_topic_queries_topic, TRUE);
tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), topic_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Topic queries by Receiver: */
/* Receiver address */
/* - Topic name */
/*----------------------------------------------------------------------------*/
static void lbmr_topic_queries_receiver_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_topic_queries_receiver = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_receiver, 0, TRUE);
}
static int lbmr_topic_queries_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_topic_query_tap_info_t * info = (const lbm_lbmr_topic_query_tap_info_t *) data;
int receiver_node;
tick_stat_node(tree, lbmr_stat_tree_name_topic_queries_receiver, 0, FALSE);
receiver_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_topic_queries_receiver, TRUE);
tick_stat_node(tree, info->topic, receiver_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Topic queries by Pattern: */
/* Pattern */
/* - Receiver address */
/*----------------------------------------------------------------------------*/
static void lbmr_topic_queries_pattern_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_topic_queries_pattern = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_pattern, 0, TRUE);
}
static int lbmr_topic_queries_pattern_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_pattern_query_tap_info_t * info = (const lbm_lbmr_pattern_query_tap_info_t *) data;
int pattern_node;
char * pattern_str;
tick_stat_node(tree, lbmr_stat_tree_name_topic_queries_pattern, 0, FALSE);
pattern_str = wmem_strdup_printf(wmem_packet_scope(), "%s (%s)",
info->pattern,
val_to_str(info->type, lbm_wildcard_pattern_type_short, "UNKN[0x%02x]"));
pattern_node = tick_stat_node(tree, pattern_str, lbmr_stats_tree_handle_topic_queries_pattern, TRUE);
tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), pattern_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Topic queries by Pattern: */
/* Receiver address */
/* - Patternme */
/*----------------------------------------------------------------------------*/
static void lbmr_topic_queries_pattern_receiver_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_topic_queries_pattern_receiver = stats_tree_create_node(tree, lbmr_stat_tree_name_topic_queries_pattern_receiver, 0, TRUE);
}
static int lbmr_topic_queries_pattern_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_pattern_query_tap_info_t * info = (const lbm_lbmr_pattern_query_tap_info_t *) data;
int receiver_node;
char * pattern_str;
tick_stat_node(tree, lbmr_stat_tree_name_topic_queries_pattern_receiver, 0, FALSE);
receiver_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_topic_queries_pattern_receiver, TRUE);
pattern_str = wmem_strdup_printf(wmem_packet_scope(), "%s (%s)",
info->pattern,
val_to_str(info->type, lbm_wildcard_pattern_type_short, "UNKN[0x%02x]"));
tick_stat_node(tree, pattern_str, receiver_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Queue advertisements by Queue: */
/* Queue name */
/* - Source address and port */
/*----------------------------------------------------------------------------*/
static void lbmr_queue_ads_queue_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_queue_ads_queue = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_ads_queue, 0, TRUE);
}
static int lbmr_queue_ads_queue_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_queue_advertisement_tap_info_t * info = (const lbm_lbmr_queue_advertisement_tap_info_t *) data;
int queue_node;
gchar * str;
tick_stat_node(tree, lbmr_stat_tree_name_queue_ads_queue, 0, FALSE);
queue_node = tick_stat_node(tree, info->queue, lbmr_stats_tree_handle_queue_ads_queue, TRUE);
str = wmem_strdup_printf(wmem_packet_scope(), "%s:%" G_GUINT16_FORMAT, address_to_str(wmem_packet_scope(), &pinfo->net_src), info->port);
tick_stat_node(tree, str, queue_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Queue advertisements by Source: */
/* Source address */
/* - Queue name and port */
/*----------------------------------------------------------------------------*/
static void lbmr_queue_ads_source_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_queue_ads_source = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_ads_source, 0, TRUE);
}
static int lbmr_queue_ads_source_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_queue_advertisement_tap_info_t * info = (const lbm_lbmr_queue_advertisement_tap_info_t *) data;
int source_node;
gchar * str;
tick_stat_node(tree, lbmr_stat_tree_name_queue_ads_source, 0, FALSE);
source_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_queue_ads_source, TRUE);
str = wmem_strdup_printf(wmem_packet_scope(), "%s:%" G_GUINT16_FORMAT, info->queue, info->port);
tick_stat_node(tree, str, source_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Queue queries by Queue: */
/* Queue name */
/* - Receiver address */
/*----------------------------------------------------------------------------*/
static void lbmr_queue_queries_queue_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_queue_queries_queue = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_queries_queue, 0, TRUE);
}
static int lbmr_queue_queries_queue_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_queue_query_tap_info_t * info = (const lbm_lbmr_queue_query_tap_info_t *) data;
int queue_node = 0;
tick_stat_node(tree, lbmr_stat_tree_name_queue_queries_queue, 0, FALSE);
queue_node = tick_stat_node(tree, info->queue, lbmr_stats_tree_handle_queue_queries_queue, TRUE);
tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), queue_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Queue queries by Receiver: */
/* Receiver address */
/* - Queue name */
/*----------------------------------------------------------------------------*/
static void lbmr_queue_queries_receiver_stats_tree_init(stats_tree * tree)
{
lbmr_stats_tree_handle_queue_queries_receiver = stats_tree_create_node(tree, lbmr_stat_tree_name_queue_queries_receiver, 0, TRUE);
}
static int lbmr_queue_queries_receiver_stats_tree_packet(stats_tree * tree, packet_info * pinfo, epan_dissect_t * edt _U_, const void * data)
{
const lbm_lbmr_queue_query_tap_info_t * info = (const lbm_lbmr_queue_query_tap_info_t *) data;
int receiver_node;
tick_stat_node(tree, lbmr_stat_tree_name_queue_queries_receiver, 0, FALSE);
receiver_node = tick_stat_node(tree, address_to_str(wmem_packet_scope(), &pinfo->net_src), lbmr_stats_tree_handle_queue_queries_receiver, TRUE);
tick_stat_node(tree, info->queue, receiver_node, TRUE);
return (1);
}
/*----------------------------------------------------------------------------*/
/* Dissector functions. */
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
/* LBMR TNWG option dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_tnwg_ctxinst_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * opt_tree = NULL;
proto_item * opt_item = NULL;
guint8 opt_len = 0;
static const int * flags[] =
{
&hf_lbmr_tnwg_opt_ctxinst_flags_ignore,
NULL
};
opt_len = tvb_get_guint8(tvb, offset + O_LBMR_TNWG_OPT_CTXINST_T_LEN);
opt_item = proto_tree_add_item(tree, hf_lbmr_tnwg_opt_ctxinst, tvb, offset, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_tnwg_ctxinst_opt);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_ctxinst_type, tvb, offset + O_LBMR_TNWG_OPT_CTXINST_T_TYPE, L_LBMR_TNWG_OPT_CTXINST_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_ctxinst_len, tvb, offset + O_LBMR_TNWG_OPT_CTXINST_T_LEN, L_LBMR_TNWG_OPT_CTXINST_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, offset + O_LBMR_TNWG_OPT_CTXINST_T_FLAGS, hf_lbmr_tnwg_opt_ctxinst_flags, ett_lbmr_tnwg_ctxinst_opt_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_ctxinst_instance, tvb, offset + O_LBMR_TNWG_OPT_CTXINST_T_INSTANCE, L_LBMR_TNWG_OPT_CTXINST_T_INSTANCE, ENC_NA);
return ((int) opt_len);
}
static int dissect_lbmr_tnwg_address_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * opt_tree = NULL;
proto_item * opt_item = NULL;
guint8 opt_len = 0;
static const int * flags[] =
{
&hf_lbmr_tnwg_opt_address_flags_ignore,
NULL
};
opt_len = tvb_get_guint8(tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_LEN);
opt_item = proto_tree_add_item(tree, hf_lbmr_tnwg_opt_address, tvb, offset, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_tnwg_address_opt);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_address_type, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_TYPE, L_LBMR_TNWG_OPT_ADDRESS_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_address_len, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_LEN, L_LBMR_TNWG_OPT_ADDRESS_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_FLAGS, hf_lbmr_tnwg_opt_address_flags, ett_lbmr_tnwg_address_opt_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_address_port, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_PORT, L_LBMR_TNWG_OPT_ADDRESS_T_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_address_res, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_RES, L_LBMR_TNWG_OPT_ADDRESS_T_RES, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_address_ip, tvb, offset + O_LBMR_TNWG_OPT_ADDRESS_T_IP, L_LBMR_TNWG_OPT_ADDRESS_T_IP, ENC_BIG_ENDIAN);
return ((int)opt_len);
}
static int dissect_lbmr_tnwg_domain_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * opt_tree = NULL;
proto_item * opt_item = NULL;
guint8 opt_len = 0;
static const int * flags[] =
{
&hf_lbmr_tnwg_opt_domain_flags_ignore,
NULL
};
opt_len = tvb_get_guint8(tvb, offset + O_LBMR_TNWG_OPT_DOMAIN_T_LEN);
opt_item = proto_tree_add_item(tree, hf_lbmr_tnwg_opt_domain, tvb, offset, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_tnwg_domain_opt);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_domain_type, tvb, offset + O_LBMR_TNWG_OPT_DOMAIN_T_TYPE, L_LBMR_TNWG_OPT_DOMAIN_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_domain_len, tvb, offset + O_LBMR_TNWG_OPT_DOMAIN_T_LEN, L_LBMR_TNWG_OPT_DOMAIN_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, offset + O_LBMR_TNWG_OPT_DOMAIN_T_FLAGS, hf_lbmr_tnwg_opt_domain_flags, ett_lbmr_tnwg_domain_opt_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_domain_domain_id, tvb, offset + O_LBMR_TNWG_OPT_DOMAIN_T_DOMAIN_ID, L_LBMR_TNWG_OPT_DOMAIN_T_DOMAIN_ID, ENC_BIG_ENDIAN);
return ((int)opt_len);
}
static int dissect_lbmr_tnwg_name_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * opt_tree = NULL;
proto_item * opt_item = NULL;
guint8 opt_len = 0;
static const int * flags[] =
{
&hf_lbmr_tnwg_opt_name_flags_ignore,
NULL
};
guint32 name_len = 0;
opt_len = tvb_get_guint8(tvb, offset + O_LBMR_TNWG_OPT_T_LEN);
name_len = opt_len - L_LBMR_TNWG_OPT_T;
opt_item = proto_tree_add_item(tree, hf_lbmr_tnwg_opt_name, tvb, offset, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_tnwg_name_opt);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_name_type, tvb, offset + O_LBMR_TNWG_OPT_T_TYPE, L_LBMR_TNWG_OPT_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_name_len, tvb, offset + O_LBMR_TNWG_OPT_T_LEN, L_LBMR_TNWG_OPT_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, offset + O_LBMR_TNWG_OPT_T_FLAGS, hf_lbmr_tnwg_opt_name_flags, ett_lbmr_tnwg_name_opt_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_name_name, tvb, offset + L_LBMR_TNWG_OPT_T, name_len, ENC_ASCII|ENC_NA);
return ((int)opt_len);
}
static int dissect_lbmr_tnwg_unknown_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * opt_tree = NULL;
proto_item * opt_item = NULL;
guint8 opt_len = 0;
static const int * flags[] =
{
&hf_lbmr_tnwg_opt_flags_ignore,
NULL
};
guint32 data_len = 0;
opt_len = tvb_get_guint8(tvb, offset + O_LBMR_TNWG_OPT_T_LEN);
data_len = opt_len - L_LBMR_TNWG_OPT_T;
opt_item = proto_tree_add_item(tree, hf_lbmr_tnwg_opt, tvb, offset, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_tnwg_unknown_opt);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_type, tvb, offset + O_LBMR_TNWG_OPT_T_TYPE, L_LBMR_TNWG_OPT_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_len, tvb, offset + O_LBMR_TNWG_OPT_T_LEN, L_LBMR_TNWG_OPT_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, offset + O_LBMR_TNWG_OPT_T_FLAGS, hf_lbmr_tnwg_opt_flags, ett_lbmr_tnwg_unknown_opt_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_tnwg_opt_data, tvb, offset + L_LBMR_TNWG_OPT_T, data_len, ENC_NA);
return ((int)opt_len);
}
static int dissect_lbmr_tnwg_opts(tvbuff_t * tvb, int offset, int length, packet_info * pinfo, proto_tree * tree)
{
int len_remaining = length;
int curr_offset = offset;
int dissected_len = 0;
guint8 type = 0;
int len_used = 0;
while (len_remaining >= L_LBMR_TNWG_OPT_T)
{
type = tvb_get_guint8(tvb, curr_offset);
switch (type)
{
case LBMR_TNWG_OPT_CTXINST_TYPE:
dissected_len += dissect_lbmr_tnwg_ctxinst_opt(tvb, curr_offset, pinfo, tree);
break;
case LBMR_TNWG_OPT_ADDRESS_TYPE:
dissected_len += dissect_lbmr_tnwg_address_opt(tvb, curr_offset, pinfo, tree);
break;
case LBMR_TNWG_OPT_DOMAIN_TYPE:
dissected_len += dissect_lbmr_tnwg_domain_opt(tvb, curr_offset, pinfo, tree);
break;
case LBMR_TNWG_OPT_NAME_TYPE:
dissected_len += dissect_lbmr_tnwg_name_opt(tvb, curr_offset, pinfo, tree);
break;
default:
dissected_len += dissect_lbmr_tnwg_unknown_opt(tvb, curr_offset, pinfo, tree);
break;
}
len_remaining -= dissected_len;
len_used += dissected_len;
curr_offset += dissected_len;
}
return (len_used);
}
/*----------------------------------------------------------------------------*/
/* LBMR TNWG Interest dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_tnwg_interest_rec(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * rec_tree = NULL;
proto_item * rec_item = NULL;
guint16 rec_len = 0;
gint string_len = 0;
static const int * flags[] =
{
&hf_lbmr_tnwg_interest_rec_flags_pattern,
&hf_lbmr_tnwg_interest_rec_flags_cancel,
&hf_lbmr_tnwg_interest_rec_flags_refresh,
NULL
};
rec_len = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_INTEREST_REC_T_LEN);
string_len = rec_len - L_LBMR_TNWG_INTEREST_REC_T;
rec_item = proto_tree_add_item(tree, hf_lbmr_tnwg_interest_rec, tvb, offset, rec_len, ENC_NA);
rec_tree = proto_item_add_subtree(rec_item, ett_lbmr_tnwg_interest_rec);
proto_tree_add_item(rec_tree, hf_lbmr_tnwg_interest_rec_len, tvb, offset + O_LBMR_TNWG_INTEREST_REC_T_LEN, L_LBMR_TNWG_INTEREST_REC_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(rec_tree, tvb, offset + O_LBMR_TNWG_INTEREST_REC_T_FLAGS, hf_lbmr_tnwg_interest_rec_flags, ett_lbmr_tnwg_interest_rec_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(rec_tree, hf_lbmr_tnwg_interest_rec_pattype, tvb, offset + O_LBMR_TNWG_INTEREST_REC_T_PATTYPE, L_LBMR_TNWG_INTEREST_REC_T_PATTYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(rec_tree, hf_lbmr_tnwg_interest_rec_domain_id, tvb, offset + O_LBMR_TNWG_INTEREST_REC_T_DOMAIN_ID, L_LBMR_TNWG_INTEREST_REC_T_DOMAIN_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(rec_tree, hf_lbmr_tnwg_interest_rec_symbol, tvb, offset + L_LBMR_TNWG_INTEREST_REC_T, string_len, ENC_ASCII|ENC_NA);
return ((int)rec_len);
}
static int dissect_lbmr_tnwg_interest(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
proto_tree * int_tree = NULL;
proto_item * int_item = NULL;
guint16 rec_count = 0;
int curr_offset = 0;
int len = 0;
int len_remaining = 0;
int len_dissected = 0;
len_remaining = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_INTEREST_T_LEN);
rec_count = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_INTEREST_T_COUNT);
int_item = proto_tree_add_item(tree, hf_lbmr_tnwg_interest, tvb, offset, len_remaining, ENC_NA);
int_tree = proto_item_add_subtree(int_item, ett_lbmr_tnwg_interest);
proto_tree_add_item(int_tree, hf_lbmr_tnwg_interest_len, tvb, offset + O_LBMR_TNWG_INTEREST_T_LEN, L_LBMR_TNWG_INTEREST_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(int_tree, hf_lbmr_tnwg_interest_count, tvb, offset + O_LBMR_TNWG_INTEREST_T_COUNT, L_LBMR_TNWG_INTEREST_T_COUNT, ENC_BIG_ENDIAN);
curr_offset = offset + L_LBMR_TNWG_INTEREST_T;
len = L_LBMR_TNWG_INTEREST_T;
while (rec_count > 0)
{
len_dissected = dissect_lbmr_tnwg_interest_rec(tvb, curr_offset, pinfo, int_tree);
curr_offset += len_dissected;
len += len_dissected;
rec_count--;
}
return (len);
}
/*----------------------------------------------------------------------------*/
/* LBMR TNWG ContextInfo dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_tnwg_ctxinfo(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
proto_tree * ctxinfo_tree = NULL;
proto_item * ctxinfo_item = NULL;
static const int * flags1[] =
{
&hf_lbmr_tnwg_ctxinfo_flags1_query,
&hf_lbmr_tnwg_ctxinfo_flags1_tnwg_src,
&hf_lbmr_tnwg_ctxinfo_flags1_tnwg_rcv,
&hf_lbmr_tnwg_ctxinfo_flags1_proxy,
NULL
};
guint16 reclen = 0;
guint16 len_remaining = 0;
int len_used = 0;
reclen = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_CTXINFO_T_LEN);
len_remaining = reclen;
ctxinfo_item = proto_tree_add_item(tree, hf_lbmr_tnwg_ctxinfo, tvb, offset, (gint)reclen, ENC_NA);
ctxinfo_tree = proto_item_add_subtree(ctxinfo_item, ett_lbmr_tnwg_ctxinfo);
proto_tree_add_item(ctxinfo_tree, hf_lbmr_tnwg_ctxinfo_len, tvb, offset + O_LBMR_TNWG_CTXINFO_T_LEN, L_LBMR_TNWG_CTXINFO_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(ctxinfo_tree, hf_lbmr_tnwg_ctxinfo_hop_count, tvb, offset + O_LBMR_TNWG_CTXINFO_T_HOP_COUNT, L_LBMR_TNWG_CTXINFO_T_HOP_COUNT, ENC_BIG_ENDIAN);
proto_tree_add_item(ctxinfo_tree, hf_lbmr_tnwg_ctxinfo_reserved, tvb, offset + O_LBMR_TNWG_CTXINFO_T_RESERVED, L_LBMR_TNWG_CTXINFO_T_RESERVED, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(ctxinfo_tree, tvb, offset + O_LBMR_TNWG_CTXINFO_T_FLAGS1, hf_lbmr_tnwg_ctxinfo_flags1, ett_lbmr_tnwg_ctxinfo_flags1, flags1, ENC_BIG_ENDIAN);
proto_tree_add_item(ctxinfo_tree, hf_lbmr_tnwg_ctxinfo_flags2, tvb, offset + O_LBMR_TNWG_CTXINFO_T_FLAGS2, L_LBMR_TNWG_CTXINFO_T_FLAGS2, ENC_BIG_ENDIAN);
offset += L_LBMR_TNWG_CTXINFO_T;
len_remaining -= L_LBMR_TNWG_CTXINFO_T;
len_used = L_LBMR_TNWG_CTXINFO_T;
if (len_remaining >= L_LBMR_TNWG_OPT_T)
{
len_used += dissect_lbmr_tnwg_opts(tvb, offset, len_remaining, pinfo, ctxinfo_tree);
}
return (len_used);
}
/*----------------------------------------------------------------------------*/
/* LBMR TNWG TopicRes Request dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_tnwg_trreq(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
proto_tree * trreq_tree = NULL;
proto_item * trreq_item = NULL;
guint16 reclen = 0;
guint16 len_remaining = 0;
int len_used = 0;
reclen = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_TRREQ_T_LEN);
len_remaining = reclen;
trreq_item = proto_tree_add_item(tree, hf_lbmr_tnwg_trreq, tvb, offset, (gint)reclen, ENC_NA);
trreq_tree = proto_item_add_subtree(trreq_item, ett_lbmr_tnwg_trreq);
proto_tree_add_item(trreq_tree, hf_lbmr_tnwg_trreq_len, tvb, offset + O_LBMR_TNWG_TRREQ_T_LEN, L_LBMR_TNWG_TRREQ_T_LEN, ENC_BIG_ENDIAN);
offset += L_LBMR_TNWG_TRREQ_T;
len_remaining -= L_LBMR_TNWG_TRREQ_T;
len_used = L_LBMR_TNWG_TRREQ_T;
if (len_remaining >= L_LBMR_TNWG_OPT_T)
{
len_used += dissect_lbmr_tnwg_opts(tvb, offset, len_remaining, pinfo, trreq_tree);
}
return (len_used);
}
/*----------------------------------------------------------------------------*/
/* LBMR TNWG dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_tnwg(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
guint16 type = 0;
int curr_offset = 0;
int len_dissected = 0;
proto_item * type_item = NULL;
type = tvb_get_ntohs(tvb, offset + O_LBMR_TNWG_T_TYPE);
proto_tree_add_item(tree, hf_lbmr_tnwg_len, tvb, offset + O_LBMR_TNWG_T_LEN, L_LBMR_TNWG_T_LEN, ENC_BIG_ENDIAN);
type_item = proto_tree_add_item(tree, hf_lbmr_tnwg_type, tvb, offset + O_LBMR_TNWG_T_TYPE, L_LBMR_TNWG_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_tnwg_reserved, tvb, offset + O_LBMR_TNWG_T_RESERVED, L_LBMR_TNWG_T_RESERVED, ENC_BIG_ENDIAN);
len_dissected = L_LBMR_TNWG_T;
curr_offset = offset + L_LBMR_TNWG_T;
switch (type)
{
case LBMR_TNWG_TYPE_INTEREST:
len_dissected += dissect_lbmr_tnwg_interest(tvb, curr_offset, pinfo, tree);
break;
case LBMR_TNWG_TYPE_CTXINFO:
len_dissected += dissect_lbmr_tnwg_ctxinfo(tvb, curr_offset, pinfo, tree);
break;
case LBMR_TNWG_TYPE_TRREQ:
len_dissected += dissect_lbmr_tnwg_trreq(tvb, curr_offset, pinfo, tree);
break;
default:
expert_add_info_format(pinfo, type_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR TNWG type 0x%04x", type);
break;
}
return ((int)len_dissected);
}
/*----------------------------------------------------------------------------*/
/* LBMR Topic Management dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_tmr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
gint namelen = 0;
int name_offset = 0;
char * name = NULL;
proto_item * ti = NULL;
proto_tree * tinfo_tree = NULL;
static const int * flags[] =
{
&hf_lbmr_tmr_flags_response,
&hf_lbmr_tmr_flags_wildcard_pcre,
&hf_lbmr_tmr_flags_wildcard_regex,
NULL
};
guint16 tmr_len;
guint8 tmr_type;
guint8 tmr_flags;
const char * info_string = "";
tmr_len = tvb_get_ntohs(tvb, offset + O_LBMR_TMR_T_LEN);
tmr_type = tvb_get_guint8(tvb, offset + O_LBMR_TMR_T_TYPE);
tmr_flags = tvb_get_guint8(tvb, offset + O_LBMR_TMR_T_FLAGS);
name_offset = offset + L_LBMR_TMR_T;
name = tvb_get_stringz_enc(wmem_packet_scope(), tvb, name_offset, &namelen, ENC_ASCII);
switch (tmr_type)
{
case LBMR_TMR_LEAVE_TOPIC:
default:
break;
case LBMR_TMR_TOPIC_USE:
if (tmr_flags & LBMR_TMR_FLAG_RESPONSE)
{
info_string = " Response";
}
else
{
info_string = " Query";
}
break;
}
ti = proto_tree_add_none_format(tree, hf_lbmr_tmr, tvb, offset, tmr_len, "%s: %s%s, Length %" G_GUINT16_FORMAT,
name, val_to_str(tmr_type, lbmr_tmr_type, "Unknown (0x%02x)"), info_string, tmr_len);
tinfo_tree = proto_item_add_subtree(ti, ett_lbmr_tmr);
proto_tree_add_item(tinfo_tree, hf_lbmr_tmr_len, tvb, offset + O_LBMR_TMR_T_LEN, L_LBMR_TMR_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(tinfo_tree, hf_lbmr_tmr_type, tvb, offset + O_LBMR_TMR_T_TYPE, L_LBMR_TMR_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(tinfo_tree, tvb, offset + O_LBMR_TMR_T_FLAGS, hf_lbmr_tmr_flags, ett_lbmr_tmr_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(tinfo_tree, hf_lbmr_tmr_name, tvb, name_offset, namelen, ENC_ASCII|ENC_NA);
return ((int) tmr_len);
}
static int dissect_lbmr_tmb(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
int tmr_len = 0;
proto_tree * tmb_tree = NULL;
proto_item * ti = NULL;
proto_tree * tmr_tree = NULL;
proto_item * tmr_ti = NULL;
int tmr_count = 0;
guint16 tmrs;
int len_dissected;
tmrs = tvb_get_ntohs(tvb, offset + O_LBMR_TMB_T_TMRS);
ti = proto_tree_add_item(tree, hf_lbmr_tmb, tvb, offset, -1, ENC_NA);
tmb_tree = proto_item_add_subtree(ti, ett_lbmr_tmb);
proto_tree_add_item(tmb_tree, hf_lbmr_tmb_len, tvb, offset + O_LBMR_TMB_T_LEN, L_LBMR_TMB_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(tmb_tree, hf_lbmr_tmb_tmrs, tvb, offset + O_LBMR_TMB_T_TMRS, L_LBMR_TMB_T_TMRS, ENC_BIG_ENDIAN);
tmr_ti = proto_tree_add_item(tmb_tree, hf_lbmr_tmb_tmr_list, tvb, offset + L_LBMR_TMB_T, -1, ENC_NA);
tmr_tree = proto_item_add_subtree(tmr_ti, ett_lbmr_tmrs);
offset += L_LBMR_TMB_T;
len_dissected = L_LBMR_TMB_T;
while (tmr_count < tmrs)
{
tmr_len = dissect_lbmr_tmr(tvb, offset, pinfo, tmr_tree);
len_dissected += tmr_len;
offset += tmr_len;
tmr_count++;
}
return (len_dissected);
}
/*----------------------------------------------------------------------------*/
/* LBMR Topic Query Record dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_tqr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, gboolean wildcard_tqr, lbmr_contents_t * contents)
{
gint namelen = 0;
guint reclen = 0;
char * name = NULL;
guint8 pattern_type;
proto_item * tqr_item = NULL;
proto_tree * tqr_tree = NULL;
gint name_offset = offset;
if (wildcard_tqr)
{
pattern_type = tvb_get_guint8(tvb, offset);
name_offset++;
reclen++;
}
name = tvb_get_stringz_enc(wmem_packet_scope(), tvb, name_offset, &namelen, ENC_ASCII);
reclen += namelen;
if (wildcard_tqr)
{
tqr_item = proto_tree_add_none_format(tree, hf_lbmr_tqr, tvb, offset, reclen, "Wildcard TQR: %s", name);
}
else
{
tqr_item = proto_tree_add_none_format(tree, hf_lbmr_tqr, tvb, offset, reclen, "TQR: %s", name);
}
tqr_tree = proto_item_add_subtree(tqr_item, ett_lbmr_tqr);
if (wildcard_tqr)
{
proto_tree_add_item(tqr_tree, hf_lbmr_tqr_pattern_type, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tqr_tree, hf_lbmr_tqr_pattern, tvb, offset, namelen, ENC_ASCII|ENC_NA);
add_contents_wctqr(contents, pattern_type, name);
}
else
{
proto_tree_add_item(tqr_tree, hf_lbmr_tqr_name, tvb, offset, namelen, ENC_ASCII|ENC_NA);
add_contents_tqr(contents, name);
}
return (reclen);
}
static int dissect_lbmr_tqrs(tvbuff_t * tvb, int offset, guint8 tqr_count, packet_info * pinfo, proto_tree * tree,
gboolean wildcard_tqr, lbmr_contents_t * contents)
{
int start_offset = 0;
int tqr_len = 0;
proto_tree * tqrs_tree = NULL;
proto_item * ti = NULL;
int len = 0;
start_offset = offset;
if (wildcard_tqr)
{
ti = proto_tree_add_none_format(tree, hf_lbmr_tqrs, tvb, start_offset, -1, "Wildcard TQRs");
}
else
{
ti = proto_tree_add_none_format(tree, hf_lbmr_tqrs, tvb, start_offset, -1, "TQRs");
}
tqrs_tree = proto_item_add_subtree(ti, ett_lbmr_tqrs);
while (tqr_count-- > 0)
{
tqr_len = dissect_lbmr_tqr(tvb, offset, pinfo, tqrs_tree, wildcard_tqr, contents);
len += tqr_len;
offset += tqr_len;
}
proto_item_set_len(ti, len);
return (len);
}
/*----------------------------------------------------------------------------*/
/* LBMR Topic Information Record dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_tir_options(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
guint8 opt_type = 0;
guint8 opt_len = 0;
int opt_total_len = 0;
int opt_remaining_len = 0;
int curr_offset = offset;
proto_item * oi = NULL;
proto_tree * otree = NULL;
proto_item * optlen_item = NULL;
proto_tree * optlen_tree = NULL;
static const int * opt_ume_flags[] =
{
&hf_lbmr_topt_ume_flags_ignore,
&hf_lbmr_topt_ume_flags_latejoin,
&hf_lbmr_topt_ume_flags_store,
&hf_lbmr_topt_ume_flags_qccap,
&hf_lbmr_topt_ume_flags_acktosrc,
NULL
};
static const int * opt_ume_store_flags[] =
{
&hf_lbmr_topt_ume_store_flags_ignore,
NULL
};
static const int * opt_ume_store_group_flags[] =
{
&hf_lbmr_topt_ume_store_group_flags_ignore,
NULL
};
static const int * opt_latejoin_flags[] =
{
&hf_lbmr_topt_latejoin_flags_ignore,
&hf_lbmr_topt_latejoin_flags_acktosrc,
NULL
};
static const int * opt_umq_rcridx_flags[] =
{
&hf_lbmr_topt_umq_rcridx_flags_ignore,
NULL
};
static const int * opt_umq_qinfo_flags[] =
{
&hf_lbmr_topt_umq_qinfo_flags_ignore,
&hf_lbmr_topt_umq_qinfo_flags_queue,
&hf_lbmr_topt_umq_qinfo_flags_rcvlisten,
&hf_lbmr_topt_umq_qinfo_flags_control,
&hf_lbmr_topt_umq_qinfo_flags_srcrcvlisten,
&hf_lbmr_topt_umq_qinfo_flags_participants_only,
NULL
};
static const int * opt_cost_flags[] =
{
&hf_lbmr_topt_cost_flags_ignore,
NULL
};
static const int * opt_otid_flags[] =
{
&hf_lbmr_topt_otid_flags_ignore,
NULL
};
static const int * opt_ctxinst_flags[] =
{
&hf_lbmr_topt_ctxinst_flags_ignore,
NULL
};
static const int * opt_ctxinsts_flags[] =
{
&hf_lbmr_topt_ctxinsts_flags_ignore,
NULL
};
static const int * opt_ulb_flags[] =
{
&hf_lbmr_topt_ulb_flags_ignore,
NULL
};
static const int * opt_ctxinstq_flags[] =
{
&hf_lbmr_topt_ctxinstq_flags_ignore,
NULL
};
static const int * opt_domain_id_flags[] =
{
&hf_lbmr_topt_domain_id_flags_ignore,
NULL
};
static const int * opt_exfunc_flags[] =
{
&hf_lbmr_topt_exfunc_flags_ignore,
NULL
};
static const int * opt_exfunc_functionality_flags[] =
{
&hf_lbmr_topt_exfunc_functionality_flags_ulb,
&hf_lbmr_topt_exfunc_functionality_flags_umq,
&hf_lbmr_topt_exfunc_functionality_flags_ume,
&hf_lbmr_topt_exfunc_functionality_flags_lj,
NULL
};
int len = 0;
opt_total_len = (int)tvb_get_ntohs(tvb, curr_offset + O_LBMR_TOPIC_OPT_LEN_T_TOTAL_LEN);
opt_remaining_len = opt_total_len;
oi = proto_tree_add_none_format(tree, hf_lbmr_topts, tvb, curr_offset, opt_total_len, "Options: %d bytes", opt_total_len);
otree = proto_item_add_subtree(oi, ett_lbmr_topts);
optlen_item = proto_tree_add_item(otree, hf_lbmr_topt_len, tvb, curr_offset, L_LBMR_TOPIC_OPT_LEN_T, ENC_NA);
optlen_tree = proto_item_add_subtree(optlen_item, ett_lbmr_topt_len);
proto_tree_add_item(optlen_tree, hf_lbmr_topt_len_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_LEN_T_TYPE, L_LBMR_TOPIC_OPT_LEN_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(optlen_tree, hf_lbmr_topt_len_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_LEN_T_LEN, L_LBMR_TOPIC_OPT_LEN_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(optlen_tree, hf_lbmr_topt_len_total_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_LEN_T_TOTAL_LEN, L_LBMR_TOPIC_OPT_LEN_T_TOTAL_LEN, ENC_BIG_ENDIAN);
len = L_LBMR_TOPIC_OPT_LEN_T;
curr_offset += L_LBMR_TOPIC_OPT_LEN_T;
opt_remaining_len -= L_LBMR_TOPIC_OPT_LEN_T;
while (opt_remaining_len > 0)
{
proto_item * opt_item = NULL;
proto_tree * opt_tree = NULL;
proto_item * ei_item = NULL;
int qname_len;
opt_type = tvb_get_guint8(tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE);
opt_len = tvb_get_guint8(tvb, curr_offset + O_LBMR_TOPIC_OPT_T_LEN);
if (opt_len == 0)
{
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_unknown, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_unknown);
proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, L_LBMR_TOPIC_OPT_T_TYPE, ENC_BIG_ENDIAN);
ei_item = proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_LEN, L_LBMR_TOPIC_OPT_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_flags, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_FLAGS, L_LBMR_TOPIC_OPT_T_FLAGS, ENC_BIG_ENDIAN);
if (((int) opt_len) > L_LBMR_TOPIC_OPT_T)
{
proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_data, tvb, curr_offset + L_LBMR_TOPIC_OPT_T, ((int) opt_len) - L_LBMR_TOPIC_OPT_T, ENC_NA);
}
expert_add_info_format(pinfo, ei_item, &ei_lbmr_analysis_zero_len_option, "Zero-length LBMR option");
return (len);
}
switch (opt_type)
{
case LBMR_TOPIC_OPT_UME_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ume, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ume);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_TYPE, L_LBMR_TOPIC_OPT_UME_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_LEN, L_LBMR_TOPIC_OPT_UME_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_FLAGS, hf_lbmr_topt_ume_flags, ett_lbmr_topt_ume_flags, opt_ume_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_STORE_TCP_PORT, L_LBMR_TOPIC_OPT_UME_T_STORE_TCP_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_src_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_SRC_TCP_PORT, L_LBMR_TOPIC_OPT_UME_T_SRC_TCP_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_tcp_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_STORE_TCP_ADDR, L_LBMR_TOPIC_OPT_UME_T_STORE_TCP_ADDR, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_src_tcp_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_SRC_TCP_ADDR, L_LBMR_TOPIC_OPT_UME_T_SRC_TCP_ADDR, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_src_reg_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_SRC_REG_ID, L_LBMR_TOPIC_OPT_UME_T_SRC_REG_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_transport_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_TRANSPORT_IDX, L_LBMR_TOPIC_OPT_UME_T_TRANSPORT_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_high_seqnum, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_HIGH_SEQNUM, L_LBMR_TOPIC_OPT_UME_T_HIGH_SEQNUM, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_low_seqnum, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_T_LOW_SEQNUM, L_LBMR_TOPIC_OPT_UME_T_LOW_SEQNUM, ENC_BIG_ENDIAN);
break;
case LBMR_TOPIC_OPT_UME_STORE_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ume_store, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ume_store);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_TYPE, L_LBMR_TOPIC_OPT_UME_STORE_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_LEN, L_LBMR_TOPIC_OPT_UME_STORE_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_FLAGS, hf_lbmr_topt_ume_store_flags, ett_lbmr_topt_ume_store_flags, opt_ume_store_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_grp_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_GRP_IDX, L_LBMR_TOPIC_OPT_UME_STORE_T_GRP_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_store_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_TCP_PORT, L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_TCP_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_store_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IDX, L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_store_ip_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IP_ADDR, L_LBMR_TOPIC_OPT_UME_STORE_T_STORE_IP_ADDR, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_src_reg_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_T_SRC_REG_ID, L_LBMR_TOPIC_OPT_UME_STORE_T_SRC_REG_ID, ENC_BIG_ENDIAN);
break;
case LBMR_TOPIC_OPT_UME_STORE_GROUP_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ume_store_group, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ume_store_group);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_group_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_TYPE, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_group_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_LEN, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_FLAGS, hf_lbmr_topt_ume_store_group_flags, ett_lbmr_topt_ume_store_group_flags, opt_ume_store_group_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_group_grp_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_IDX, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_group_grp_sz, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_SZ, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_GRP_SZ, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ume_store_group_reserved, tvb, curr_offset + O_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_RESERVED, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_RESERVED, ENC_BIG_ENDIAN);
break;
case LBMR_TOPIC_OPT_LATEJOIN_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_latejoin, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_latejoin);
proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_TYPE, L_LBMR_TOPIC_OPT_LATEJOIN_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_LEN, L_LBMR_TOPIC_OPT_LATEJOIN_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_FLAGS, hf_lbmr_topt_latejoin_flags, ett_lbmr_topt_latejoin_flags, opt_latejoin_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_src_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_TCP_PORT, L_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_TCP_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_reserved, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_RESERVED, L_LBMR_TOPIC_OPT_LATEJOIN_T_RESERVED, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_src_ip_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_IP_ADDR, L_LBMR_TOPIC_OPT_LATEJOIN_T_SRC_IP_ADDR, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_transport_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_TRANSPORT_IDX, L_LBMR_TOPIC_OPT_LATEJOIN_T_TRANSPORT_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_high_seqnum, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_HIGH_SEQNUM, L_LBMR_TOPIC_OPT_LATEJOIN_T_HIGH_SEQNUM, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_latejoin_low_seqnum, tvb, curr_offset + O_LBMR_TOPIC_OPT_LATEJOIN_T_LOW_SEQNUM, L_LBMR_TOPIC_OPT_LATEJOIN_T_LOW_SEQNUM, ENC_BIG_ENDIAN);
break;
case LBMR_TOPIC_OPT_UMQ_RCRIDX_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_umq_rcridx, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_umq_rcridx);
proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_rcridx_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_TYPE, L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_rcridx_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_LEN, L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_FLAGS, hf_lbmr_topt_umq_rcridx_flags, ett_lbmr_topt_umq_rcridx_flags, opt_umq_rcridx_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_rcridx_rcr_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_RCR_IDX, L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_RCR_IDX, ENC_BIG_ENDIAN);
break;
case LBMR_TOPIC_OPT_UMQ_QINFO_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_umq_qinfo, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_umq_qinfo);
proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_qinfo_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, L_LBMR_TOPIC_OPT_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_qinfo_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_LEN, L_LBMR_TOPIC_OPT_T_LEN, ENC_BIG_ENDIAN);
qname_len = opt_len - L_LBMR_TOPIC_OPT_T;
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_FLAGS, hf_lbmr_topt_umq_qinfo_flags, ett_lbmr_topt_umq_qinfo_flags, opt_umq_qinfo_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_umq_qinfo_queue, tvb, curr_offset + L_LBMR_TOPIC_OPT_T, qname_len, ENC_ASCII|ENC_NA);
break;
case LBMR_TOPIC_OPT_COST_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_cost, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_cost);
proto_tree_add_item(opt_tree, hf_lbmr_topt_cost_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_COST_T_TYPE, L_LBMR_TOPIC_OPT_COST_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_cost_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_COST_T_LEN, L_LBMR_TOPIC_OPT_COST_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_COST_T_FLAGS, hf_lbmr_topt_cost_flags, ett_lbmr_topt_cost_flags, opt_cost_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_cost_hop_count, tvb, curr_offset + O_LBMR_TOPIC_OPT_COST_T_HOP_COUNT, L_LBMR_TOPIC_OPT_COST_T_HOP_COUNT, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_cost_cost, tvb, curr_offset + O_LBMR_TOPIC_OPT_COST_T_COST, L_LBMR_TOPIC_OPT_COST_T_COST, ENC_BIG_ENDIAN);
break;
case LBMR_TOPIC_OPT_OTID_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_otid, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_otid);
proto_tree_add_item(opt_tree, hf_lbmr_topt_otid_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_OTID_T_TYPE, L_LBMR_TOPIC_OPT_OTID_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_otid_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_OTID_T_LEN, L_LBMR_TOPIC_OPT_OTID_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_OTID_T_FLAGS, hf_lbmr_topt_otid_flags, ett_lbmr_topt_otid_flags, opt_otid_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_otid_originating_transport, tvb, curr_offset + O_LBMR_TOPIC_OPT_OTID_T_ORIGINATING_TRANSPORT, L_LBMR_TOPIC_OPT_OTID_T_ORIGINATING_TRANSPORT, ENC_NA);
break;
case LBMR_TOPIC_OPT_CTXINST_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ctxinst, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ctxinst);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinst_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINST_T_TYPE, L_LBMR_TOPIC_OPT_CTXINST_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinst_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINST_T_LEN, L_LBMR_TOPIC_OPT_CTXINST_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINST_T_FLAGS, hf_lbmr_topt_ctxinst_flags, ett_lbmr_topt_ctxinst_flags, opt_ctxinst_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinst_res, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINST_T_RES, L_LBMR_TOPIC_OPT_CTXINST_T_RES, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinst_ctxinst, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINST_T_CTXINST, L_LBMR_TOPIC_OPT_CTXINST_T_CTXINST, ENC_NA);
break;
case LBMR_TOPIC_OPT_CTXINSTS_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ctxinsts, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ctxinsts);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinsts_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTS_T_TYPE, L_LBMR_TOPIC_OPT_CTXINSTS_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinsts_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTS_T_LEN, L_LBMR_TOPIC_OPT_CTXINSTS_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTS_T_FLAGS, hf_lbmr_topt_ctxinsts_flags, ett_lbmr_topt_ctxinsts_flags, opt_ctxinsts_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinsts_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTS_T_IDX, L_LBMR_TOPIC_OPT_CTXINSTS_T_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinsts_ctxinst, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTS_T_CTXINST, L_LBMR_TOPIC_OPT_CTXINSTS_T_CTXINST, ENC_NA);
break;
case LBMR_TOPIC_OPT_ULB_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ulb, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ulb);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_TYPE, L_LBMR_TOPIC_OPT_ULB_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_LEN, L_LBMR_TOPIC_OPT_ULB_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_FLAGS, hf_lbmr_topt_ulb_flags, ett_lbmr_topt_ulb_flags, opt_ulb_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_queue_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_QUEUE_ID, L_LBMR_TOPIC_OPT_ULB_T_QUEUE_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_regid, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_REGID, L_LBMR_TOPIC_OPT_ULB_T_REGID, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_ulb_src_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_ULB_SRC_ID, L_LBMR_TOPIC_OPT_ULB_T_ULB_SRC_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_src_ip_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_SRC_IP_ADDR, L_LBMR_TOPIC_OPT_ULB_T_SRC_IP_ADDR, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_src_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_SRC_TCP_PORT, L_LBMR_TOPIC_OPT_ULB_T_SRC_TCP_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ulb_reserved, tvb, curr_offset + O_LBMR_TOPIC_OPT_ULB_T_RESERVED, L_LBMR_TOPIC_OPT_ULB_T_RESERVED, ENC_BIG_ENDIAN);
break;
case LBMR_TOPIC_OPT_CTXINSTQ_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_ctxinstq, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_ctxinstq);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinstq_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTQ_T_TYPE, L_LBMR_TOPIC_OPT_CTXINSTQ_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinstq_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTQ_T_LEN, L_LBMR_TOPIC_OPT_CTXINSTQ_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTQ_T_FLAGS, hf_lbmr_topt_ctxinstq_flags, ett_lbmr_topt_ctxinstq_flags, opt_ctxinstq_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinstq_idx, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTQ_T_IDX, L_LBMR_TOPIC_OPT_CTXINSTQ_T_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_ctxinstq_ctxinst, tvb, curr_offset + O_LBMR_TOPIC_OPT_CTXINSTQ_T_CTXINST, L_LBMR_TOPIC_OPT_CTXINSTQ_T_CTXINST, ENC_NA);
break;
case LBMR_TOPIC_OPT_DOMAIN_ID_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_domain_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_domain_id);
proto_tree_add_item(opt_tree, hf_lbmr_topt_domain_id_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_DOMAIN_ID_T_TYPE, L_LBMR_TOPIC_OPT_DOMAIN_ID_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_domain_id_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_DOMAIN_ID_T_LEN, L_LBMR_TOPIC_OPT_DOMAIN_ID_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_DOMAIN_ID_T_FLAGS, hf_lbmr_topt_domain_id_flags, ett_lbmr_topt_domain_id_flags, opt_domain_id_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_domain_id_domain_id, tvb, curr_offset + O_LBMR_TOPIC_OPT_DOMAIN_ID_T_DOMAIN_ID, L_LBMR_TOPIC_OPT_DOMAIN_ID_T_DOMAIN_ID, ENC_BIG_ENDIAN);
break;
case LBMR_TOPIC_OPT_EXFUNC_TYPE:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_exfunc, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_exfunc);
proto_tree_add_item(opt_tree, hf_lbmr_topt_exfunc_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_TYPE, L_LBMR_TOPIC_OPT_EXFUNC_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_exfunc_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_LEN, L_LBMR_TOPIC_OPT_EXFUNC_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_FLAGS, hf_lbmr_topt_exfunc_flags, ett_lbmr_topt_exfunc_flags, opt_exfunc_flags, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_exfunc_src_tcp_port, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_SRC_TCP_PORT, L_LBMR_TOPIC_OPT_EXFUNC_T_SRC_TCP_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_exfunc_reserved, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_RESERVED, L_LBMR_TOPIC_OPT_EXFUNC_T_RESERVED, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_exfunc_src_ip_addr, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_SRC_IP_ADDR, L_LBMR_TOPIC_OPT_EXFUNC_T_SRC_IP_ADDR, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(opt_tree, tvb, curr_offset + O_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS, hf_lbmr_topt_exfunc_functionality_flags, ett_lbmr_topt_exfunc_functionality_flags, opt_exfunc_functionality_flags, ENC_BIG_ENDIAN);
break;
default:
opt_item = proto_tree_add_item(otree, hf_lbmr_topt_unknown, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, opt_len, ENC_NA);
opt_tree = proto_item_add_subtree(opt_item, ett_lbmr_topt_unknown);
ei_item = proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_type, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_TYPE, L_LBMR_TOPIC_OPT_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_len, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_LEN, L_LBMR_TOPIC_OPT_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_flags, tvb, curr_offset + O_LBMR_TOPIC_OPT_T_FLAGS, L_LBMR_TOPIC_OPT_T_FLAGS, ENC_BIG_ENDIAN);
if (((int) opt_len) > L_LBMR_TOPIC_OPT_T)
{
proto_tree_add_item(opt_tree, hf_lbmr_topt_unknown_data, tvb, curr_offset + L_LBMR_TOPIC_OPT_T, ((int) opt_len) - L_LBMR_TOPIC_OPT_T, ENC_NA);
}
expert_add_info_format(pinfo, ei_item, &ei_lbmr_analysis_invalid_value, "Unknown option 0x%02x", opt_type);
break;
}
len += opt_len;
curr_offset += opt_len;
opt_remaining_len -= opt_len;
}
return (opt_total_len);
}
static int dissect_lbmr_tir_transport(tvbuff_t * tvb, int offset, lbm_uint8_t transport, lbm_uint8_t transport_len, const char * topic_name,
guint32 topic_index, packet_info * pinfo, proto_tree * tree, lbmr_contents_t * contents, proto_item * transport_len_item)
{
int len = 0;
guint64 channel;
proto_item * channel_item = NULL;
proto_item * ei_item = NULL;
switch (transport)
{
case LBMR_TRANSPORT_TCP:
{
guint16 port = 0;
guint32 session_id = 0;
proto_item * tcp_item = NULL;
proto_tree * tcp_tree = NULL;
lbttcp_transport_t * lbttcp_transport = NULL;
tcp_item = proto_tree_add_item(tree, hf_lbmr_tir_tcp, tvb, offset, (gint) transport_len, ENC_NA);
tcp_tree = proto_item_add_subtree(tcp_item, ett_lbmr_tir_tcp);
if ((transport_len != L_LBMR_TIR_TCP_T) && (transport_len != L_LBMR_TIR_TCP_WITH_SID_T))
{
expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR TCP info");
return (0);
}
if (transport_len == L_LBMR_TIR_TCP_WITH_SID_T)
{
session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_TCP_WITH_SID_T_SESSION_ID);
port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_TCP_WITH_SID_T_PORT);
proto_tree_add_item(tcp_tree, hf_lbmr_tir_tcp_ip, tvb, offset + O_LBMR_TIR_TCP_WITH_SID_T_IP, L_LBMR_TIR_TCP_WITH_SID_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(tcp_tree, hf_lbmr_tir_tcp_session_id, tvb, offset + O_LBMR_TIR_TCP_WITH_SID_T_SESSION_ID, L_LBMR_TIR_TCP_WITH_SID_T_SESSION_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(tcp_tree, hf_lbmr_tir_tcp_port, tvb, offset + O_LBMR_TIR_TCP_WITH_SID_T_PORT, L_LBMR_TIR_TCP_WITH_SID_T_PORT, ENC_BIG_ENDIAN);
len += L_LBMR_TIR_TCP_WITH_SID_T;
}
else
{
port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_TCP_T_PORT);
proto_tree_add_item(tcp_tree, hf_lbmr_tir_tcp_ip, tvb, offset + O_LBMR_TIR_TCP_T_IP, L_LBMR_TIR_TCP_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(tcp_tree, hf_lbmr_tir_tcp_port, tvb, offset + O_LBMR_TIR_TCP_T_PORT, L_LBMR_TIR_TCP_T_PORT, ENC_BIG_ENDIAN);
session_id = 0;
len += L_LBMR_TIR_TCP_T;
}
lbttcp_transport = lbttcp_transport_add(&(pinfo->src), port, session_id, pinfo->fd->num);
channel = lbttcp_transport->channel;
add_contents_tir(contents, topic_name, lbttcp_transport_source_string(&(pinfo->src), port, session_id), topic_index);
}
break;
case LBMR_TRANSPORT_LBTRM:
{
guint16 src_ucast_port = 0;
guint16 udp_dest_port = 0;
guint32 session_id = 0;
proto_item * lbtrm_item = NULL;
proto_tree * lbtrm_tree = NULL;
lbtrm_transport_t * lbtrm_transport = NULL;
address multicast_group;
lbtrm_item = proto_tree_add_item(tree, hf_lbmr_tir_lbtrm, tvb, offset, (gint)transport_len, ENC_NA);
lbtrm_tree = proto_item_add_subtree(lbtrm_item, ett_lbmr_tir_lbtrm);
TVB_SET_ADDRESS(&multicast_group, AT_IPv4, tvb, offset + O_LBMR_TIR_LBTRM_T_MCAST_ADDR, L_LBMR_TIR_LBTRM_T_MCAST_ADDR);
session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTRM_T_SESSION_ID);
udp_dest_port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTRM_T_UDP_DEST_PORT);
src_ucast_port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTRM_T_SRC_UCAST_PORT);
proto_tree_add_item(lbtrm_tree, hf_lbmr_tir_lbtrm_src_addr, tvb, offset + O_LBMR_TIR_LBTRM_T_SRC_ADDR, L_LBMR_TIR_LBTRM_T_SRC_ADDR, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtrm_tree, hf_lbmr_tir_lbtrm_mcast_addr, tvb, offset + O_LBMR_TIR_LBTRM_T_MCAST_ADDR, L_LBMR_TIR_LBTRM_T_MCAST_ADDR, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtrm_tree, hf_lbmr_tir_lbtrm_session_id, tvb, offset + O_LBMR_TIR_LBTRM_T_SESSION_ID, L_LBMR_TIR_LBTRM_T_SESSION_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtrm_tree, hf_lbmr_tir_lbtrm_udp_dest_port, tvb, offset + O_LBMR_TIR_LBTRM_T_UDP_DEST_PORT, L_LBMR_TIR_LBTRM_T_UDP_DEST_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtrm_tree, hf_lbmr_tir_lbtrm_src_ucast_port, tvb, offset + O_LBMR_TIR_LBTRM_T_SRC_UCAST_PORT, L_LBMR_TIR_LBTRM_T_SRC_UCAST_PORT, ENC_BIG_ENDIAN);
lbtrm_transport = lbtrm_transport_add(&(pinfo->src), src_ucast_port, session_id, &multicast_group, udp_dest_port, pinfo->fd->num);
channel = lbtrm_transport->channel;
add_contents_tir(contents, topic_name, lbtrm_transport_source_string(&(pinfo->src), src_ucast_port, session_id, &multicast_group, udp_dest_port), topic_index);
len += L_LBMR_TIR_LBTRM_T;
if (transport_len != L_LBMR_TIR_LBTRM_T)
{
expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR LBTRM info");
}
}
break;
case LBMR_TRANSPORT_LBTRU:
{
guint32 session_id;
guint16 port;
proto_item * lbtru_item = NULL;
proto_tree * lbtru_tree = NULL;
lbtru_transport_t * lbtru_transport = NULL;
lbtru_item = proto_tree_add_item(tree, hf_lbmr_tir_lbtru, tvb, offset, (gint)transport_len, ENC_NA);
lbtru_tree = proto_item_add_subtree(lbtru_item, ett_lbmr_tir_lbtru);
if ((transport_len != L_LBMR_TIR_LBTRU_T) && (transport_len != L_LBMR_TIR_LBTRU_WITH_SID_T))
{
expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR LBTRU info");
return (0);
}
if (transport_len == L_LBMR_TIR_LBTRU_WITH_SID_T)
{
session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTRU_WITH_SID_T_SESSION_ID);
port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTRU_WITH_SID_T_PORT);
proto_tree_add_item(lbtru_tree, hf_lbmr_tir_lbtru_ip, tvb, offset + O_LBMR_TIR_LBTRU_WITH_SID_T_IP, L_LBMR_TIR_LBTRU_WITH_SID_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtru_tree, hf_lbmr_tir_lbtru_session_id, tvb, offset + O_LBMR_TIR_LBTRU_WITH_SID_T_SESSION_ID, L_LBMR_TIR_LBTRU_WITH_SID_T_SESSION_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtru_tree, hf_lbmr_tir_lbtru_port, tvb, offset + O_LBMR_TIR_LBTRU_WITH_SID_T_PORT, L_LBMR_TIR_LBTRU_WITH_SID_T_PORT, ENC_BIG_ENDIAN);
len += L_LBMR_TIR_LBTRU_WITH_SID_T;
}
else
{
session_id = 0;
port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTRU_T_PORT);
proto_tree_add_item(lbtru_tree, hf_lbmr_tir_lbtru_ip, tvb, offset + O_LBMR_TIR_LBTRU_T_IP, L_LBMR_TIR_LBTRU_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtru_tree, hf_lbmr_tir_lbtru_port, tvb, offset + O_LBMR_TIR_LBTRU_T_PORT, L_LBMR_TIR_LBTRU_T_PORT, ENC_BIG_ENDIAN);
len += L_LBMR_TIR_LBTRU_T;
}
lbtru_transport = lbtru_transport_add(&(pinfo->src), port, session_id, pinfo->fd->num);
channel = lbtru_transport->channel;
add_contents_tir(contents, topic_name, lbtru_transport_source_string(&(pinfo->src), port, session_id), topic_index);
}
break;
case LBMR_TRANSPORT_LBTIPC:
{
guint32 host_id;
guint32 session_id;
guint16 xport_id;
proto_item * lbtipc_item = NULL;
proto_tree * lbtipc_tree = NULL;
lbtipc_transport_t * lbtipc_transport = NULL;
lbtipc_item = proto_tree_add_item(tree, hf_lbmr_tir_lbtipc, tvb, offset, (gint)transport_len, ENC_NA);
lbtipc_tree = proto_item_add_subtree(lbtipc_item, ett_lbmr_tir_lbtipc);
if (transport_len != L_LBMR_TIR_LBTIPC_T)
{
expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR LBTIPC info");
return (0);
}
host_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTIPC_T_HOST_ID);
session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTIPC_T_SESSION_ID);
xport_id = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTIPC_T_XPORT_ID);
proto_tree_add_item(lbtipc_tree, hf_lbmr_tir_lbtipc_host_id, tvb, offset + O_LBMR_TIR_LBTIPC_T_HOST_ID, L_LBMR_TIR_LBTIPC_T_HOST_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtipc_tree, hf_lbmr_tir_lbtipc_session_id, tvb, offset + O_LBMR_TIR_LBTIPC_T_SESSION_ID, L_LBMR_TIR_LBTIPC_T_SESSION_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtipc_tree, hf_lbmr_tir_lbtipc_xport_id, tvb, offset + O_LBMR_TIR_LBTIPC_T_XPORT_ID, L_LBMR_TIR_LBTIPC_T_XPORT_ID, ENC_BIG_ENDIAN);
lbtipc_transport = lbtipc_transport_add(host_id, session_id, xport_id);
channel = lbtipc_transport->channel;
add_contents_tir(contents, topic_name, lbtipc_transport_source_string(host_id, session_id, xport_id), topic_index);
len += L_LBMR_TIR_LBTIPC_T;
}
break;
case LBMR_TRANSPORT_LBTRDMA:
{
guint32 session_id;
guint16 port;
proto_item * lbtrdma_item = NULL;
proto_tree * lbtrdma_tree = NULL;
lbtrdma_transport_t * lbtrdma_transport = NULL;
address source_addr;
lbtrdma_item = proto_tree_add_item(tree, hf_lbmr_tir_lbtrdma, tvb, offset, (gint)transport_len, ENC_NA);
lbtrdma_tree = proto_item_add_subtree(lbtrdma_item, ett_lbmr_tir_lbtrdma);
if (transport_len != L_LBMR_TIR_LBTRDMA_T)
{
expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR LBTRDMA info");
return (0);
}
TVB_SET_ADDRESS(&source_addr, AT_IPv4, tvb, offset + O_LBMR_TIR_LBTRDMA_T_IP, L_LBMR_TIR_LBTRDMA_T_IP);
session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTRDMA_T_SESSION_ID);
port = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTRDMA_T_PORT);
proto_tree_add_item(lbtrdma_tree, hf_lbmr_tir_lbtrdma_ip, tvb, offset + O_LBMR_TIR_LBTRDMA_T_IP, L_LBMR_TIR_LBTRDMA_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtrdma_tree, hf_lbmr_tir_lbtrdma_session_id, tvb, offset + O_LBMR_TIR_LBTRDMA_T_SESSION_ID, L_LBMR_TIR_LBTRDMA_T_SESSION_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtrdma_tree, hf_lbmr_tir_lbtrdma_port, tvb, offset + O_LBMR_TIR_LBTRDMA_T_PORT, L_LBMR_TIR_LBTRDMA_T_PORT, ENC_BIG_ENDIAN);
lbtrdma_transport = lbtrdma_transport_add(&source_addr, port, session_id);
channel = lbtrdma_transport->channel;
add_contents_tir(contents, topic_name, lbtrdma_transport_source_string(&source_addr, port, session_id), topic_index);
len += L_LBMR_TIR_LBTRDMA_T;
}
break;
case LBMR_TRANSPORT_LBTSMX:
{
guint32 host_id;
guint32 session_id;
guint16 xport_id;
proto_item * lbtsmx_item = NULL;
proto_tree * lbtsmx_tree = NULL;
lbtsmx_transport_t * lbtsmx_transport = NULL;
lbtsmx_item = proto_tree_add_item(tree, hf_lbmr_tir_lbtsmx, tvb, offset, (gint)transport_len, ENC_NA);
lbtsmx_tree = proto_item_add_subtree(lbtsmx_item, ett_lbmr_tir_lbtsmx);
if (transport_len != L_LBMR_TIR_LBTSMX_T)
{
expert_add_info_format(pinfo, transport_len_item, &ei_lbmr_analysis_length_incorrect, "Wrong transport length for LBMR TIR LBTSMX info");
}
host_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTSMX_T_HOST_ID);
session_id = tvb_get_ntohl(tvb, offset + O_LBMR_TIR_LBTSMX_T_SESSION_ID);
xport_id = tvb_get_ntohs(tvb, offset + O_LBMR_TIR_LBTSMX_T_XPORT_ID);
proto_tree_add_item(lbtsmx_tree, hf_lbmr_tir_lbtsmx_host_id, tvb, offset + O_LBMR_TIR_LBTSMX_T_HOST_ID, L_LBMR_TIR_LBTSMX_T_HOST_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtsmx_tree, hf_lbmr_tir_lbtsmx_session_id, tvb, offset + O_LBMR_TIR_LBTSMX_T_SESSION_ID, L_LBMR_TIR_LBTSMX_T_SESSION_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(lbtsmx_tree, hf_lbmr_tir_lbtsmx_xport_id, tvb, offset + O_LBMR_TIR_LBTSMX_T_XPORT_ID, L_LBMR_TIR_LBTSMX_T_XPORT_ID, ENC_BIG_ENDIAN);
lbtsmx_transport = lbtsmx_transport_add(host_id, session_id, xport_id);
channel = lbtsmx_transport->channel;
add_contents_tir(contents, topic_name, lbtsmx_transport_source_string(host_id, session_id, xport_id), topic_index);
len += L_LBMR_TIR_LBTSMX_T;
}
break;
default:
ei_item = proto_tree_add_item(tree, hf_lbmr_tir_unknown_transport, tvb, offset, transport_len, ENC_NA);
expert_add_info_format(pinfo, ei_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR TIR transport 0x%02x", transport);
len = transport_len;
channel = LBM_CHANNEL_NO_CHANNEL;
break;
}
if (channel != LBM_CHANNEL_NO_CHANNEL)
{
lbm_topic_add(channel, topic_index, topic_name);
channel_item = proto_tree_add_uint64(tree, hf_lbmr_tir_channel, tvb, 0, 0, channel);
PROTO_ITEM_SET_GENERATED(channel_item);
}
return (len);
}
static int dissect_lbmr_tir_entry(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, lbmr_contents_t * contents)
{
gint namelen = 0;
gint reclen = 0;
int dissect_len = 0;
int tinfo_offset = 0;
char * name = NULL;
proto_item * ti = NULL;
proto_tree * tinfo_tree = NULL;
guint8 transport;
guint8 tlen;
guint16 ttl;
guint32 idx;
int curr_offset;
proto_item * transport_len_item = NULL;
name = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &namelen, ENC_ASCII);
reclen += namelen;
curr_offset = offset + namelen;
tinfo_offset = curr_offset;
transport = tvb_get_guint8(tvb, curr_offset + O_LBMR_TIR_T_TRANSPORT);
tlen = tvb_get_guint8(tvb, curr_offset + O_LBMR_TIR_T_TLEN);
ttl = tvb_get_ntohs(tvb, curr_offset + O_LBMR_TIR_T_TTL);
idx = tvb_get_ntohl(tvb, curr_offset + O_LBMR_TIR_T_INDEX);
reclen += L_LBMR_TIR_T;
curr_offset += L_LBMR_TIR_T;
ti = proto_tree_add_none_format(tree, hf_lbmr_tir, tvb, offset, reclen, "%s: %s, Length %u, Index %" G_GUINT32_FORMAT ", TTL %" G_GUINT16_FORMAT,
name, val_to_str((transport & LBMR_TIR_TRANSPORT), lbmr_transport_type, "Unknown (0x%02x)"), tlen, idx, ttl);
tinfo_tree = proto_item_add_subtree(ti, ett_lbmr_tir);
proto_tree_add_item(tinfo_tree, hf_lbmr_tir_name, tvb, offset, namelen, ENC_ASCII|ENC_NA);
proto_tree_add_item(tinfo_tree, hf_lbmr_tir_transport_opts, tvb, tinfo_offset + O_LBMR_TIR_T_TRANSPORT, L_LBMR_TIR_T_TRANSPORT, ENC_BIG_ENDIAN);
proto_tree_add_item(tinfo_tree, hf_lbmr_tir_transport_type, tvb, tinfo_offset + O_LBMR_TIR_T_TRANSPORT, L_LBMR_TIR_T_TRANSPORT, ENC_BIG_ENDIAN);
transport_len_item = proto_tree_add_item(tinfo_tree, hf_lbmr_tir_tlen, tvb, tinfo_offset + O_LBMR_TIR_T_TLEN, L_LBMR_TIR_T_TLEN, ENC_BIG_ENDIAN);
proto_tree_add_item(tinfo_tree, hf_lbmr_tir_ttl, tvb, tinfo_offset + O_LBMR_TIR_T_TTL, L_LBMR_TIR_T_TTL, ENC_BIG_ENDIAN);
proto_tree_add_item(tinfo_tree, hf_lbmr_tir_index, tvb, tinfo_offset + O_LBMR_TIR_T_INDEX, L_LBMR_TIR_T_INDEX, ENC_BIG_ENDIAN);
if ((transport & LBMR_TIR_OPTIONS) != 0)
{
dissect_len = dissect_lbmr_tir_options(tvb, curr_offset, pinfo, tinfo_tree);
reclen += dissect_len;
curr_offset += dissect_len;
}
reclen += dissect_lbmr_tir_transport(tvb, curr_offset, (lbm_uint8_t)(transport & LBMR_TIR_TRANSPORT), tlen, name, idx, pinfo, tinfo_tree, contents, transport_len_item);
proto_item_set_len(ti, reclen);
return (reclen);
}
static int dissect_lbmr_tirs(tvbuff_t * tvb, int offset, guint16 tir_count, packet_info * pinfo, proto_tree * tree,
const char * name, lbmr_contents_t * contents)
{
int start_offset;
int tir_len;
proto_tree * tirs_tree = NULL;
proto_item * ti = NULL;
int len = 0;
start_offset = offset;
ti = proto_tree_add_none_format(tree, hf_lbmr_tirs, tvb, start_offset, -1, "%s", name);
tirs_tree = proto_item_add_subtree(ti, ett_lbmr_tirs);
while (tir_count-- > 0)
{
tir_len = dissect_lbmr_tir_entry(tvb, offset, pinfo, tirs_tree, contents);
offset += tir_len;
len += tir_len;
}
proto_item_set_len(ti, len);
return (len);
}
/*----------------------------------------------------------------------------*/
/* LBMR Queue Query Record dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_qqr(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, lbmr_contents_t * contents)
{
gint namelen = 0;
guint reclen = 0;
char * name = NULL;
name = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &namelen, ENC_ASCII);
reclen += namelen;
add_contents_qqr(contents, name);
proto_tree_add_item(tree, hf_lbmr_qqr_name, tvb, offset, namelen, ENC_ASCII|ENC_NA);
return (reclen);
}
static int dissect_lbmr_qqrs(tvbuff_t * tvb, int offset, guint8 qqr_count, packet_info * pinfo, proto_tree * tree, lbmr_contents_t * contents)
{
int start_offset;
int qqr_len;
proto_tree * qqrs_tree = NULL;
proto_item * qqrs_ti = NULL;
int total_len = 0;
start_offset = offset;
qqrs_ti = proto_tree_add_item(tree, hf_lbmr_qqr, tvb, start_offset, -1, ENC_NA);
qqrs_tree = proto_item_add_subtree(qqrs_ti, ett_lbmr_qqrs);
while (qqr_count-- > 0)
{
qqr_len = dissect_lbmr_qqr(tvb, offset, pinfo, qqrs_tree, contents);
total_len += qqr_len;
offset += qqr_len;
}
proto_item_set_len(qqrs_ti, total_len);
return (total_len);
}
/*----------------------------------------------------------------------------*/
/* LBMR Queue Information Record dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_qir_queue_blk(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, const char * queue_name,
const char * topic_name, lbmr_contents_t * contents)
{
guint16 port = 0;
proto_item * ti = NULL;
proto_tree * blk_tree = NULL;
port = tvb_get_ntohs(tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_PORT);
ti = proto_tree_add_item(tree, hf_lbmr_qir_queue_blk, tvb, offset, L_LBMR_QIR_QUEUE_BLK_T, ENC_NA);
blk_tree = proto_item_add_subtree(ti, ett_lbmr_qir_queue_blk);
proto_tree_add_item(blk_tree, hf_lbmr_qir_queue_blk_ip, tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_IP, L_LBMR_QIR_QUEUE_BLK_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(blk_tree, hf_lbmr_qir_queue_blk_port, tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_PORT, L_LBMR_QIR_QUEUE_BLK_T_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(blk_tree, hf_lbmr_qir_queue_blk_idx, tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_IDX, L_LBMR_QIR_QUEUE_BLK_T_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(blk_tree, hf_lbmr_qir_queue_blk_grp_idx, tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_GRP_IDX, L_LBMR_QIR_QUEUE_BLK_T_GRP_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(blk_tree, hf_lbmr_qir_queue_blk_reserved, tvb, offset + O_LBMR_QIR_QUEUE_BLK_T_RESERVED, L_LBMR_QIR_QUEUE_BLK_T_RESERVED, ENC_BIG_ENDIAN);
add_contents_qir(contents, queue_name, topic_name, port);
return ((int)L_LBMR_QIR_QUEUE_BLK_T);
}
static int dissect_lbmr_qir_grp_blk(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree, lbmr_contents_t * contents _U_)
{
proto_item * ti = NULL;
proto_tree * blk_tree = NULL;
guint16 idx = 0;
guint16 sz = 0;
idx = tvb_get_ntohs(tvb, offset + O_LBMR_QIR_GRP_BLK_T_GRP_IDX);
sz = tvb_get_ntohs(tvb, offset + O_LBMR_QIR_GRP_BLK_T_GRP_SZ);
ti = proto_tree_add_none_format(tree, hf_lbmr_qir_grp_blk, tvb, offset, L_LBMR_QIR_GRP_BLK_T, "Group block, Index %" G_GUINT16_FORMAT ", Size %" G_GUINT16_FORMAT, idx, sz);
blk_tree = proto_item_add_subtree(ti, ett_lbmr_qir_grp_blk);
proto_tree_add_item(blk_tree, hf_lbmr_qir_grp_blk_grp_idx, tvb, offset + O_LBMR_QIR_GRP_BLK_T_GRP_IDX, L_LBMR_QIR_GRP_BLK_T_GRP_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(blk_tree, hf_lbmr_qir_grp_blk_grp_sz, tvb, offset + O_LBMR_QIR_GRP_BLK_T_GRP_SZ, L_LBMR_QIR_GRP_BLK_T_GRP_SZ, ENC_BIG_ENDIAN);
return ((int)L_LBMR_QIR_GRP_BLK_T);
}
static int dissect_lbmr_qir_entry(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree, lbmr_contents_t * contents)
{
gint qnamelen = 0;
gint qnameoffset = 0;
char * qname = NULL;
gint tnamelen = 0;
gint tnameoffset = 0;
char * tname = NULL;
gint reclen = 0;
int curr_offset = 0;
proto_item * qirti = NULL;
proto_tree * qirtree = NULL;
proto_item * grpti = NULL;
proto_tree * grptree = NULL;
int grplen = 0;
proto_item * queueti = NULL;
proto_item * queuetree = NULL;
int queuelen = 0;
guint32 queue_id = 0;
guint16 grp_blks = 0;
guint16 queue_blks = 0;
guint16 have_options = 0;
int optlen = 0;
/*
queue name (null-terminated)
topic name (null-terminated)
lbmr_qir_t
if qir.grp_blks & LBMR_QIR_OPTIONS
parse options (normal topic options - though there shouldn't be any) can use dissect_lbmr_tir_options
endif
group blocks (lbmr_qir_grp_blk_t)
queue blocks (lbmr_qir_queue_blk_t)
*/
curr_offset = offset;
qnameoffset = curr_offset;
qname = tvb_get_stringz_enc(wmem_packet_scope(), tvb, qnameoffset, &qnamelen, ENC_ASCII);
curr_offset += qnamelen;
reclen += qnamelen;
tnameoffset = curr_offset;
tname = tvb_get_stringz_enc(wmem_packet_scope(), tvb, tnameoffset, &tnamelen, ENC_ASCII);
curr_offset += tnamelen;
reclen += tnamelen;
queue_id = tvb_get_ntohl(tvb, curr_offset + O_LBMR_QIR_T_QUEUE_ID);
have_options = tvb_get_ntohs(tvb, curr_offset + O_LBMR_QIR_T_GRP_BLKS);
grp_blks = have_options & LBMR_QIR_GRP_BLOCKS_MASK;
have_options &= LBMR_QIR_OPTIONS;
queue_blks = tvb_get_ntohs(tvb, curr_offset + O_LBMR_QIR_T_QUEUE_BLKS);
qirti = proto_tree_add_none_format(tree, hf_lbmr_qir, tvb, offset, reclen, "%s: %s, ID %" G_GUINT32_FORMAT, qname, tname, queue_id);
qirtree = proto_item_add_subtree(qirti, ett_lbmr_qir);
proto_tree_add_item(qirtree, hf_lbmr_qir_queue_name, tvb, qnameoffset, qnamelen, ENC_ASCII|ENC_NA);
proto_tree_add_item(qirtree, hf_lbmr_qir_topic_name, tvb, tnameoffset, tnamelen, ENC_ASCII|ENC_NA);
proto_tree_add_item(qirtree, hf_lbmr_qir_queue_id, tvb, curr_offset + O_LBMR_QIR_T_QUEUE_ID, L_LBMR_QIR_T_QUEUE_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(qirtree, hf_lbmr_qir_queue_ver, tvb, curr_offset + O_LBMR_QIR_T_QUEUE_VER, L_LBMR_QIR_T_QUEUE_VER, ENC_BIG_ENDIAN);
proto_tree_add_item(qirtree, hf_lbmr_qir_queue_prev_ver, tvb, curr_offset + O_LBMR_QIR_T_QUEUE_PREV_VER, L_LBMR_QIR_T_QUEUE_PREV_VER, ENC_BIG_ENDIAN);
proto_tree_add_item(qirtree, hf_lbmr_qir_option_flag, tvb, curr_offset + O_LBMR_QIR_T_GRP_BLKS, L_LBMR_QIR_T_GRP_BLKS, ENC_BIG_ENDIAN);
proto_tree_add_item(qirtree, hf_lbmr_qir_grp_blks, tvb, curr_offset + O_LBMR_QIR_T_GRP_BLKS, L_LBMR_QIR_T_GRP_BLKS, ENC_BIG_ENDIAN);
proto_tree_add_item(qirtree, hf_lbmr_qir_queue_blks, tvb, curr_offset + O_LBMR_QIR_T_QUEUE_BLKS, L_LBMR_QIR_T_QUEUE_BLKS, ENC_BIG_ENDIAN);
curr_offset += L_LBMR_QIR_T;
reclen += L_LBMR_QIR_T;
if (have_options)
{
optlen = dissect_lbmr_tir_options(tvb, curr_offset, pinfo, tree);
curr_offset += optlen;
reclen += optlen;
}
if (grp_blks > 0)
{
grpti = proto_tree_add_item(qirtree, hf_lbmr_qir_grps, tvb, curr_offset, 1, ENC_NA);
grptree = proto_item_add_subtree(grpti, ett_lbmr_qir_grp);
grplen = 0;
while (grp_blks-- > 0)
{
optlen = dissect_lbmr_qir_grp_blk(tvb, curr_offset, pinfo, grptree, contents);
curr_offset += optlen;
reclen += optlen;
grplen += optlen;
}
proto_item_set_len(grpti, grplen);
}
if (queue_blks > 0)
{
queueti = proto_tree_add_item(qirtree, hf_lbmr_qir_queues, tvb, curr_offset, 1, ENC_NA);
queuetree = proto_item_add_subtree(queueti, ett_lbmr_qir_queue);
queuelen = 0;
while (queue_blks-- > 0)
{
optlen = dissect_lbmr_qir_queue_blk(tvb, curr_offset, pinfo, queuetree, qname, tname, contents);
curr_offset += optlen;
reclen += optlen;
queuelen += optlen;
}
proto_item_set_len(queueti, queuelen);
}
proto_item_set_len(qirti, reclen);
return (reclen);
}
static int dissect_lbmr_qirs(tvbuff_t * tvb, int offset, guint16 qirs, packet_info * pinfo, proto_tree * tree, lbmr_contents_t * contents)
{
int start_offset;
int qir_len;
proto_tree * qirs_tree = NULL;
proto_item * qirs_ti = NULL;
int len = 0;
start_offset = offset;
qirs_ti = proto_tree_add_item(tree, hf_lbmr_qirs, tvb, start_offset, -1, ENC_NA);
qirs_tree = proto_item_add_subtree(qirs_ti, ett_lbmr_qirs);
while (qirs-- > 0)
{
qir_len = dissect_lbmr_qir_entry(tvb, offset, pinfo, qirs_tree, contents);
len += qir_len;
offset += qir_len;
}
proto_item_set_len(qirs_ti, len);
return (len);
}
/*----------------------------------------------------------------------------*/
/* LBMR Proxy Source Election Record dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_pser(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
int hdr_len = 0;
int len = 0;
int topic_len = 0;
static const int * flags[] =
{
&hf_lbmr_pser_flags_option,
NULL
};
int curr_offset = offset;
guint16 flags_val = 0;
hdr_len = (int)tvb_get_ntohs(tvb, curr_offset + O_LBMR_PSER_T_LEN);
flags_val = tvb_get_ntohs(tvb, curr_offset + O_LBMR_PSER_T_FLAGS);
topic_len = hdr_len - L_LBMR_PSER_T;
proto_tree_add_item(tree, hf_lbmr_pser_dep_type, tvb, offset + O_LBMR_PSER_T_DEP_TYPE, L_LBMR_PSER_T_DEP_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_pser_len, tvb, offset + O_LBMR_PSER_T_LEN, L_LBMR_PSER_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(tree, tvb, offset + O_LBMR_PSER_T_FLAGS, hf_lbmr_pser_flags, ett_lbmr_pser_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_pser_source_ip, tvb, offset + O_LBMR_PSER_T_SOURCE_IP, L_LBMR_PSER_T_SOURCE_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_pser_store_ip, tvb, offset + O_LBMR_PSER_T_STORE_IP, L_LBMR_PSER_T_STORE_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_pser_transport_idx, tvb, offset + O_LBMR_PSER_T_TRANSPORT_IDX, L_LBMR_PSER_T_TRANSPORT_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_pser_topic_idx, tvb, offset + O_LBMR_PSER_T_TOPIC_IDX, L_LBMR_PSER_T_TOPIC_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_pser_source_port, tvb, offset + O_LBMR_PSER_T_SOURCE_PORT, L_LBMR_PSER_T_SOURCE_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_pser_store_port, tvb, offset + O_LBMR_PSER_T_STORE_PORT, L_LBMR_PSER_T_STORE_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_pser_topic, tvb, offset + O_LBMR_PSER_T_TOPIC, topic_len, ENC_ASCII|ENC_NA);
curr_offset += hdr_len;
len = hdr_len;
if ((flags_val & LBMR_PSER_OPT_FLAG) != 0)
{
proto_tree * opts_tree = NULL;
proto_item * opts_item = NULL;
proto_tree * optlen_tree = NULL;
proto_tree * optlen_item = NULL;
guint16 opt_len = 0;
opt_len = tvb_get_ntohs(tvb, curr_offset + O_LBMR_PSER_OPTLEN_T_OPTLEN);
opts_item = proto_tree_add_item(tree, hf_lbmr_pser_opts, tvb, curr_offset, -1, ENC_NA);
opts_tree = proto_item_add_subtree(opts_item, ett_lbmr_pser_opts);
optlen_item = proto_tree_add_item(opts_tree, hf_lbmr_pser_optlen, tvb, curr_offset, L_LBMR_PSER_OPTLEN_T, ENC_NA);
optlen_tree = proto_item_add_subtree(optlen_item, ett_lbmr_pser_opt_len);
proto_tree_add_item(optlen_tree, hf_lbmr_pser_optlen_type, tvb, curr_offset + O_LBMR_PSER_OPTLEN_T_TYPE, L_LBMR_PSER_OPTLEN_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(optlen_tree, hf_lbmr_pser_optlen_optlen, tvb, curr_offset + O_LBMR_PSER_OPTLEN_T_OPTLEN, L_LBMR_PSER_OPTLEN_T_OPTLEN, ENC_BIG_ENDIAN);
proto_item_set_len(opts_item, opt_len);
len += L_LBMR_PSER_OPTLEN_T;
curr_offset += L_LBMR_PSER_OPTLEN_T;
opt_len -= L_LBMR_PSER_OPTLEN_T;
while (opt_len > 0)
{
proto_tree * ctxinst_tree = NULL;
proto_item * ctxinst_item = NULL;
guint8 opt_type = tvb_get_guint8(tvb, curr_offset + O_LBMR_PSER_OPT_HDR_T_TYPE);
guint8 option_len = tvb_get_guint8(tvb, curr_offset + O_LBMR_PSER_OPT_HDR_T_LEN);
switch (opt_type)
{
case LBMR_PSER_OPT_SRC_CTXINST_TYPE:
case LBMR_PSER_OPT_STORE_CTXINST_TYPE:
ctxinst_item = proto_tree_add_item(opts_tree, hf_lbmr_pser_opt_ctxinst, tvb, curr_offset, L_LBMR_PSER_OPT_CTXINST_T, ENC_NA);
ctxinst_tree = proto_item_add_subtree(ctxinst_item, ett_lbmr_pser_opt_ctxinst);
proto_tree_add_item(ctxinst_tree, hf_lbmr_pser_opt_ctxinst_len, tvb, curr_offset + O_LBMR_PSER_OPT_CTXINST_T_LEN, L_LBMR_PSER_OPT_CTXINST_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(ctxinst_tree, hf_lbmr_pser_opt_ctxinst_type, tvb, curr_offset + O_LBMR_PSER_OPT_CTXINST_T_TYPE, L_LBMR_PSER_OPT_CTXINST_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(ctxinst_tree, hf_lbmr_pser_opt_ctxinst_ctxinst, tvb, curr_offset + O_LBMR_PSER_OPT_CTXINST_T_CTXINST, L_LBMR_PSER_OPT_CTXINST_T_CTXINST, ENC_NA);
len += L_LBMR_PSER_OPT_CTXINST_T;
curr_offset += L_LBMR_PSER_OPT_CTXINST_T;
opt_len -= L_LBMR_PSER_OPT_CTXINST_T;
break;
default:
len += option_len;
curr_offset += option_len;
opt_len -= option_len;
expert_add_info_format(pinfo, NULL, &ei_lbmr_analysis_invalid_value, "Unknown LBMR PSER option 0x%02x", opt_type);
if (option_len == 0) {
return (len);
}
break;
}
}
}
return (len);
}
/*----------------------------------------------------------------------------*/
/* LBMR Queue Management dissection functions. */
/*----------------------------------------------------------------------------*/
int lbmr_dissect_umq_qmgmt(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
guint8 pckt_type = 0;
int curr_offset = 0;
guint16 dep16;
guint16 idx;
guint8 flags_val = 0;
int len_dissected = 0;
static const int * flags[] =
{
&hf_qmgmt_flags_i_flag,
&hf_qmgmt_flags_n_flag,
NULL
};
static const int * il_flags[] =
{
&hf_qmgmt_flags_i_flag,
&hf_qmgmt_flags_n_flag,
&hf_qmgmt_flags_il_l_flag,
&hf_qmgmt_flags_il_k_flag,
NULL
};
flags_val = tvb_get_guint8(tvb, offset + O_UMQ_QMGMT_HDR_T_FLAGS);
pckt_type = tvb_get_guint8(tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE);
dep16 = tvb_get_ntohs(tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16);
if (pckt_type == UMQ_QMGMT_HDR_PCKT_TYPE_IL)
{
proto_tree_add_bitmask(tree, tvb, offset + O_UMQ_QMGMT_HDR_T_FLAGS, hf_qmgmt_flags, ett_qmgmt_flags, il_flags, ENC_BIG_ENDIAN);
}
else
{
proto_tree_add_bitmask(tree, tvb, offset + O_UMQ_QMGMT_HDR_T_FLAGS, hf_qmgmt_flags, ett_qmgmt_flags, flags, ENC_BIG_ENDIAN);
}
proto_tree_add_item(tree, hf_qmgmt_pckt_type, tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE, L_UMQ_QMGMT_HDR_T_PCKT_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_qmgmt_cfgsig, tvb, offset + O_UMQ_QMGMT_HDR_T_CFGSIG, L_UMQ_QMGMT_HDR_T_CFGSIG, ENC_NA);
proto_tree_add_item(tree, hf_qmgmt_queue_id, tvb, offset + O_UMQ_QMGMT_HDR_T_QUEUE_ID, L_UMQ_QMGMT_HDR_T_QUEUE_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_qmgmt_queue_ver, tvb, offset + O_UMQ_QMGMT_HDR_T_QUEUE_VER, L_UMQ_QMGMT_HDR_T_QUEUE_VER, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_qmgmt_ip, tvb, offset + O_UMQ_QMGMT_HDR_T_IP, L_UMQ_QMGMT_HDR_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_qmgmt_port, tvb, offset + O_UMQ_QMGMT_HDR_T_PORT, L_UMQ_QMGMT_HDR_T_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_qmgmt_inst_idx, tvb, offset + O_UMQ_QMGMT_HDR_T_INST_IDX, L_UMQ_QMGMT_HDR_T_INST_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_qmgmt_grp_idx, tvb, offset + O_UMQ_QMGMT_HDR_T_GRP_IDX, L_UMQ_QMGMT_HDR_T_GRP_IDX, ENC_BIG_ENDIAN);
switch (pckt_type)
{
case UMQ_QMGMT_HDR_PCKT_TYPE_IL:
proto_tree_add_item(tree, hf_qmgmt_il_num_insts, tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, L_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, ENC_BIG_ENDIAN);
break;
case UMQ_QMGMT_HDR_PCKT_TYPE_JREJ:
proto_tree_add_item(tree, hf_qmgmt_jrej_code, tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, L_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, ENC_BIG_ENDIAN);
break;
case UMQ_QMGMT_HDR_PCKT_TYPE_EV:
proto_tree_add_item(tree, hf_qmgmt_ev_bias, tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, L_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(tree, hf_qmgmt_pckt_type_dep16, tvb, offset + O_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, L_UMQ_QMGMT_HDR_T_PCKT_TYPE_DEP16, ENC_BIG_ENDIAN);
break;
}
len_dissected = L_UMQ_QMGMT_HDR_T;
curr_offset = offset + L_UMQ_QMGMT_HDR_T;
switch (pckt_type)
{
case UMQ_QMGMT_HDR_PCKT_TYPE_IL:
{
proto_item * il_subtree_item = NULL;
proto_tree * il_subtree = NULL;
static const int * il_inst_flags[] =
{
&hf_qmgmt_il_inst_flags_m_flag,
&hf_qmgmt_il_inst_flags_q_flag,
&hf_qmgmt_il_inst_flags_p_flag,
NULL
};
il_subtree_item = proto_tree_add_item(tree, hf_qmgmt_il, tvb, curr_offset, L_UMQ_QMGMT_IL_HDR_T, ENC_NA);
il_subtree = proto_item_add_subtree(il_subtree_item, ett_qmgmt_il);
proto_tree_add_item(il_subtree, hf_qmgmt_il_highest_rcr_tsp, tvb, curr_offset + O_UMQ_QMGMT_IL_HDR_T_HIGHEST_RCR_TSP, L_UMQ_QMGMT_IL_HDR_T_HIGHEST_RCR_TSP, ENC_BIG_ENDIAN);
len_dissected += L_UMQ_QMGMT_IL_HDR_T;
curr_offset += L_UMQ_QMGMT_IL_HDR_T;
for (idx = 0; idx < dep16; ++idx)
{
proto_item * il_inst_subtree_item = NULL;
proto_tree * il_inst_subtree = NULL;
il_inst_subtree_item = proto_tree_add_item(tree, hf_qmgmt_il_inst, tvb, curr_offset, L_UMQ_QMGMT_IL_INST_HDR_T, ENC_NA);
il_inst_subtree = proto_item_add_subtree(il_inst_subtree_item, ett_qmgmt_il_inst);
proto_tree_add_item(il_inst_subtree, hf_qmgmt_il_inst_ip, tvb, curr_offset + O_UMQ_QMGMT_IL_INST_HDR_T_IP, L_UMQ_QMGMT_IL_INST_HDR_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(il_inst_subtree, hf_qmgmt_il_inst_port, tvb, curr_offset + O_UMQ_QMGMT_IL_INST_HDR_T_PORT, L_UMQ_QMGMT_IL_INST_HDR_T_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(il_inst_subtree, hf_qmgmt_il_inst_inst_idx, tvb, curr_offset + O_UMQ_QMGMT_IL_INST_HDR_T_INST_IDX, L_UMQ_QMGMT_IL_INST_HDR_T_INST_IDX, ENC_BIG_ENDIAN);
proto_tree_add_item(il_inst_subtree, hf_qmgmt_il_inst_grp_idx, tvb, curr_offset + O_UMQ_QMGMT_IL_INST_HDR_T_GRP_IDX, L_UMQ_QMGMT_IL_INST_HDR_T_GRP_IDX, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(il_inst_subtree, tvb, curr_offset + O_UMQ_QMGMT_IL_INST_HDR_T_FLAGS, hf_qmgmt_il_inst_flags, ett_qmgmt_il_inst_flags, il_inst_flags, ENC_BIG_ENDIAN);
len_dissected += L_UMQ_QMGMT_IL_INST_HDR_T;
curr_offset += L_UMQ_QMGMT_IL_INST_HDR_T;
}
}
break;
case UMQ_QMGMT_HDR_PCKT_TYPE_JR:
/* Nothing to do */
break;
case UMQ_QMGMT_HDR_PCKT_TYPE_JREJ:
/* Nothing to do */
break;
case UMQ_QMGMT_HDR_PCKT_TYPE_IKA:
/* Nothing to do */
break;
case UMQ_QMGMT_HDR_PCKT_TYPE_EC:
{
proto_item * ec_subtree_item = NULL;
proto_tree * ec_subtree = NULL;
ec_subtree_item = proto_tree_add_item(tree, hf_qmgmt_ec, tvb, curr_offset, L_UMQ_QMGMT_EC_HDR_T, ENC_NA);
ec_subtree = proto_item_add_subtree(ec_subtree_item, ett_qmgmt_ec);
proto_tree_add_item(ec_subtree, hf_qmgmt_ec_queue_new_ver, tvb, curr_offset + O_UMQ_QMGMT_EC_HDR_T_QUEUE_NEW_VER, L_UMQ_QMGMT_EC_HDR_T_QUEUE_NEW_VER, ENC_BIG_ENDIAN);
len_dissected += L_UMQ_QMGMT_EC_HDR_T;
curr_offset += L_UMQ_QMGMT_EC_HDR_T;
}
break;
case UMQ_QMGMT_HDR_PCKT_TYPE_EV:
{
proto_item * ev_subtree_item = NULL;
proto_tree * ev_subtree = NULL;
ev_subtree_item = proto_tree_add_item(tree, hf_qmgmt_ev, tvb, curr_offset, L_UMQ_QMGMT_EV_HDR_T, ENC_NA);
ev_subtree = proto_item_add_subtree(ev_subtree_item, ett_qmgmt_ev);
proto_tree_add_item(ev_subtree, hf_qmgmt_ev_highest_rcr_tsp, tvb, curr_offset + O_UMQ_QMGMT_EV_HDR_T_HIGHEST_RCR_TSP, L_UMQ_QMGMT_EV_HDR_T_HIGHEST_RCR_TSP, ENC_BIG_ENDIAN);
proto_tree_add_item(ev_subtree, hf_qmgmt_ev_age, tvb, curr_offset + O_UMQ_QMGMT_EV_HDR_T_AGE, L_UMQ_QMGMT_EV_HDR_T_AGE, ENC_BIG_ENDIAN);
len_dissected += L_UMQ_QMGMT_EV_HDR_T;
curr_offset += L_UMQ_QMGMT_EV_HDR_T;
}
break;
case UMQ_QMGMT_HDR_PCKT_TYPE_CNIL:
/* Nothing to do */
break;
case UMQ_QMGMT_HDR_PCKT_TYPE_QRO:
{
proto_item * qro_subtree_item = NULL;
proto_tree * qro_subtree = NULL;
qro_subtree_item = proto_tree_add_item(tree, hf_qmgmt_qro, tvb, curr_offset, L_UMQ_QMGMT_QRO_HDR_T, ENC_NA);
qro_subtree = proto_item_add_subtree(qro_subtree_item, ett_qmgmt_qro);
proto_tree_add_item(qro_subtree, hf_qmgmt_qro_highest_rcr_tsp, tvb, curr_offset + O_UMQ_QMGMT_QRO_HDR_T_HIGHEST_RCR_TSP, L_UMQ_QMGMT_QRO_HDR_T_HIGHEST_RCR_TSP, ENC_BIG_ENDIAN);
len_dissected += L_UMQ_QMGMT_QRO_HDR_T;
curr_offset += L_UMQ_QMGMT_QRO_HDR_T;
}
break;
default:
expert_add_info_format(pinfo, NULL, &ei_lbmr_analysis_invalid_value, "Unknown LBMR QMGMT packet type 0x%02x", pckt_type);
break;
}
if ((flags_val & UMQ_QMGMT_HDR_N_FLAG) != 0)
{
int qnamelen = tvb_reported_length_remaining(tvb, curr_offset);
if (qnamelen > 1)
{
proto_tree_add_item(tree, hf_qmgmt_qname, tvb, curr_offset, qnamelen, ENC_ASCII|ENC_NA);
}
len_dissected += qnamelen;
}
return (len_dissected);
}
/*----------------------------------------------------------------------------*/
/* LBMR ContextInfo dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_ctxinfo(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
guint8 reclen = 0;
int name_offset = -1;
int name_len = 0;
static const int * flags[] =
{
&hf_lbmr_ctxinfo_flags_query,
&hf_lbmr_ctxinfo_flags_ip,
&hf_lbmr_ctxinfo_flags_instance,
&hf_lbmr_ctxinfo_flags_tnwg_src,
&hf_lbmr_ctxinfo_flags_tnwg_rcv,
&hf_lbmr_ctxinfo_flags_proxy,
&hf_lbmr_ctxinfo_flags_name,
NULL
};
reclen = tvb_get_guint8(tvb, offset + O_LBMR_CTXINFO_T_LEN);
proto_tree_add_item(tree, hf_lbmr_ctxinfo_len, tvb, offset + O_LBMR_CTXINFO_T_LEN, L_LBMR_CTXINFO_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_ctxinfo_hop_count, tvb, offset + O_LBMR_CTXINFO_T_HOP_COUNT, L_LBMR_CTXINFO_T_HOP_COUNT, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(tree, tvb, offset + O_LBMR_CTXINFO_T_FLAGS, hf_lbmr_ctxinfo_flags, ett_lbmr_ctxinfo_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_ctxinfo_port, tvb, offset + O_LBMR_CTXINFO_T_PORT, L_LBMR_CTXINFO_T_FLAGS, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_ctxinfo_ip, tvb, offset + O_LBMR_CTXINFO_T_IP, L_LBMR_CTXINFO_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_ctxinfo_instance, tvb, offset + O_LBMR_CTXINFO_T_INSTANCE, L_LBMR_CTXINFO_T_INSTANCE, ENC_NA);
if (name_offset != -1)
{
proto_tree_add_item(tree, hf_lbmr_ctxinfo_name, tvb, name_offset, name_len, ENC_ASCII|ENC_NA);
}
return ((int)reclen);
}
/*----------------------------------------------------------------------------*/
/* LBMR Topic Res Request dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_topic_res_request(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
static const int * flags[] =
{
&hf_lbmr_topic_res_request_flags_gw_remote_interest,
&hf_lbmr_topic_res_request_flags_context_query,
&hf_lbmr_topic_res_request_flags_context_advertisement,
&hf_lbmr_topic_res_request_flags_gateway_meta,
&hf_lbmr_topic_res_request_flags_advertisement,
&hf_lbmr_topic_res_request_flags_query,
&hf_lbmr_topic_res_request_flags_wildcard_query,
NULL
};
proto_tree_add_bitmask(tree, tvb, offset + O_LBMR_TOPIC_RES_REQUEST_T_FLAGS, hf_lbmr_topic_res_request_flags, ett_lbmr_topic_res_request_flags, flags, ENC_BIG_ENDIAN);
return (L_LBMR_TOPIC_RES_REQUEST_T);
}
/*----------------------------------------------------------------------------*/
/* LBMR Remote Domain Route dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_remote_domain_route(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
guint16 num_domains;
int len_dissected = 0;
int ofs = 0;
guint16 idx;
num_domains = tvb_get_ntohs(tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_NUM_DOMAINS);
proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_num_domains, tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_NUM_DOMAINS, L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_NUM_DOMAINS, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_ip, tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_IP, L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_port, tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_PORT, L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_reserved, tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_RESERVED, L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_RESERVED, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_length, tvb, offset + O_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_LENGTH, L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T_LENGTH, ENC_BIG_ENDIAN);
len_dissected = L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T;
ofs = offset + L_LBMR_REMOTE_DOMAIN_ROUTE_HDR_T;
for (idx = 0; idx < num_domains; ++idx)
{
proto_tree_add_item(tree, hf_lbmr_remote_domain_route_hdr_domain, tvb, ofs, sizeof(lbm_uint32_t), ENC_BIG_ENDIAN);
len_dissected += (int)sizeof(lbm_uint32_t);
ofs += (int)sizeof(lbm_uint32_t);
}
return (len_dissected);
}
/*----------------------------------------------------------------------------*/
/* LBMR Remote ContextInfo option dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_rctxinfo_rec_address_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec_address, tvb, offset, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec_address);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_type, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_TYPE, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_len, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_LEN, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_flags, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_FLAGS, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_FLAGS, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_domain_id, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_DOMAIN_ID, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_DOMAIN_ID, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_ip, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_IP, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_IP, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_port, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_PORT, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_PORT, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_address_res, tvb, offset + O_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_RES, L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T_RES, ENC_BIG_ENDIAN);
return ((int)L_LBMR_RCTXINFO_REC_ADDRESS_OPT_T);
}
static int dissect_lbmr_rctxinfo_rec_instance_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
guint8 len = 0;
len = tvb_get_guint8(tvb, offset + O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_LEN);
subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec_instance, tvb, offset, (int)len, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec_instance);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_instance_type, tvb, offset + O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_TYPE, L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_instance_len, tvb, offset + O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_LEN, L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_instance_flags, tvb, offset + O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_FLAGS, L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_FLAGS, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_instance_instance, tvb, offset + O_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_INSTANCE, L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T_INSTANCE, ENC_NA);
return ((int)L_LBMR_RCTXINFO_REC_INSTANCE_OPT_T);
}
static int dissect_lbmr_rctxinfo_rec_odomain_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
guint8 len = 0;
len = tvb_get_guint8(tvb, offset + O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_LEN);
subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec_odomain, tvb, offset, (int)len, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec_odomain);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_odomain_type, tvb, offset + O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_TYPE, L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_odomain_len, tvb, offset + O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_LEN, L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_odomain_flags, tvb, offset + O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_FLAGS, L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_FLAGS, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_odomain_domain_id, tvb, offset + O_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_DOMAIN_ID, L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T_DOMAIN_ID, ENC_BIG_ENDIAN);
return ((int)L_LBMR_RCTXINFO_REC_ODOMAIN_OPT_T);
}
static int dissect_lbmr_rctxinfo_rec_name_opt(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
guint8 len = 0;
int name_len = 0;
len = tvb_get_guint8(tvb, offset + O_LBMR_RCTXINFO_REC_NAME_OPT_T_LEN);
subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec_name, tvb, offset, (int)len, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec_name);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_name_type, tvb, offset + O_LBMR_RCTXINFO_REC_NAME_OPT_T_TYPE, L_LBMR_RCTXINFO_REC_NAME_OPT_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_name_len, tvb, offset + O_LBMR_RCTXINFO_REC_NAME_OPT_T_LEN, L_LBMR_RCTXINFO_REC_NAME_OPT_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_name_flags, tvb, offset + O_LBMR_RCTXINFO_REC_NAME_OPT_T_FLAGS, L_LBMR_RCTXINFO_REC_NAME_OPT_T_FLAGS, ENC_BIG_ENDIAN);
name_len = ((int)len) - L_LBMR_RCTXINFO_REC_NAME_OPT_T;
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_name_name, tvb, offset + L_LBMR_RCTXINFO_REC_NAME_OPT_T, name_len, ENC_ASCII|ENC_NA);
return ((int)len);
}
static int dissect_lbmr_rctxinfo_rec_unknown_opt(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
guint8 len = 0;
int data_len = 0;
guint8 opt_type;
opt_type = tvb_get_guint8(tvb, offset + O_LBMR_RCTXINFO_REC_OPT_T_TYPE);
len = tvb_get_guint8(tvb, offset + O_LBMR_RCTXINFO_REC_OPT_T_LEN);
subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec_unknown, tvb, offset, (int)len, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec_unknown);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_unknown_type, tvb, offset + O_LBMR_RCTXINFO_REC_OPT_T_TYPE, L_LBMR_RCTXINFO_REC_OPT_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_unknown_len, tvb, offset + O_LBMR_RCTXINFO_REC_OPT_T_LEN, L_LBMR_RCTXINFO_REC_OPT_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_unknown_flags, tvb, offset + O_LBMR_RCTXINFO_REC_OPT_T_FLAGS, L_LBMR_RCTXINFO_REC_OPT_T_FLAGS, ENC_BIG_ENDIAN);
data_len = ((int) len) - L_LBMR_RCTXINFO_REC_OPT_T;
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_unknown_data, tvb, offset + L_LBMR_RCTXINFO_REC_OPT_T, data_len, ENC_NA);
expert_add_info_format(pinfo, subtree_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR RCTXINFO option 0x%02x", opt_type);
return ((int) len);
}
/*----------------------------------------------------------------------------*/
/* LBMR Remote ContextInfo dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_rctxinfo_rec(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
guint8 opt_type = 0;
static const int * flags[] =
{
&hf_lbmr_rctxinfo_rec_flags_query,
NULL
};
guint16 len = 0;
int rec_len_remaining = 0;
int ofs = 0;
int opt_len_dissected = 0;
int len_dissected = 0;
len = tvb_get_ntohs(tvb, offset + O_LBMR_RCTXINFO_REC_T_LEN);
subtree_item = proto_tree_add_item(tree, hf_lbmr_rctxinfo_rec, tvb, offset, -1, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_rctxinfo_rec);
proto_tree_add_item(subtree, hf_lbmr_rctxinfo_rec_len, tvb, offset + O_LBMR_RCTXINFO_REC_T_LEN, L_LBMR_RCTXINFO_REC_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(subtree, tvb, offset + O_LBMR_RCTXINFO_REC_T_FLAGS, hf_lbmr_rctxinfo_rec_flags, ett_lbmr_rctxinfo_rec_flags, flags, ENC_BIG_ENDIAN);
ofs = offset + L_LBMR_RCTXINFO_REC_T;
rec_len_remaining = len - L_LBMR_RCTXINFO_REC_T;
len_dissected = L_LBMR_RCTXINFO_REC_T;
while (rec_len_remaining > 0)
{
opt_type = tvb_get_guint8(tvb, ofs + O_LBMR_RCTXINFO_REC_OPT_T_TYPE);
switch (opt_type)
{
case LBMR_RCTXINFO_OPT_ADDRESS_TYPE:
opt_len_dissected = dissect_lbmr_rctxinfo_rec_address_opt(tvb, ofs, pinfo, subtree);
break;
case LBMR_RCTXINFO_OPT_INSTANCE_TYPE:
opt_len_dissected = dissect_lbmr_rctxinfo_rec_instance_opt(tvb, ofs, pinfo, subtree);
break;
case LBMR_RCTXINFO_OPT_ODOMAIN_TYPE:
opt_len_dissected = dissect_lbmr_rctxinfo_rec_odomain_opt(tvb, ofs, pinfo, subtree);
break;
case LBMR_RCTXINFO_OPT_NAME_TYPE:
opt_len_dissected = dissect_lbmr_rctxinfo_rec_name_opt(tvb, ofs, pinfo, subtree);
break;
default:
opt_len_dissected = dissect_lbmr_rctxinfo_rec_unknown_opt(tvb, ofs, pinfo, subtree);
break;
}
len_dissected += opt_len_dissected;
rec_len_remaining -= opt_len_dissected;
ofs += opt_len_dissected;
}
proto_item_set_len(subtree_item, len_dissected);
return (len_dissected);
}
static int dissect_lbmr_rctxinfo(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
guint16 num_recs = 0;
int ofs = 0;
int len_dissected = 0;
int rec_len_dissected = 0;
num_recs = tvb_get_ntohs(tvb, offset + O_LBMR_RCTXINFO_T_NUM_RECS);
proto_tree_add_item(tree, hf_lbmr_rctxinfo_len, tvb, offset + O_LBMR_RCTXINFO_T_LEN, L_LBMR_RCTXINFO_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_rctxinfo_num_recs, tvb, offset + O_LBMR_RCTXINFO_T_NUM_RECS, L_LBMR_RCTXINFO_T_NUM_RECS, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_rctxinfo_reserved, tvb, offset + O_LBMR_RCTXINFO_T_RESERVED, L_LBMR_RCTXINFO_T_RESERVED, ENC_BIG_ENDIAN);
len_dissected = L_LBMR_RCTXINFO_T;
ofs = offset + L_LBMR_RCTXINFO_T;
while (num_recs > 0)
{
rec_len_dissected = dissect_lbmr_rctxinfo_rec(tvb, ofs, pinfo, tree);
ofs += rec_len_dissected;
len_dissected += rec_len_dissected;
num_recs--;
}
return (len_dissected);
}
static proto_item * format_ver_type(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_item * type_item = NULL;
proto_tree_add_item(tree, hf_lbmr_hdr_ver, tvb, offset + O_LBMR_HDR_T_VER_TYPE, L_LBMR_HDR_T_VER_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_lbmr_hdr_opt, tvb, offset + O_LBMR_HDR_T_VER_TYPE, L_LBMR_HDR_T_VER_TYPE, ENC_BIG_ENDIAN);
type_item = proto_tree_add_item(tree, hf_lbmr_hdr_type, tvb, offset + O_LBMR_HDR_T_VER_TYPE, L_LBMR_HDR_T_VER_TYPE, ENC_BIG_ENDIAN);
return (type_item);
}
/*----------------------------------------------------------------------------*/
/* LBMR Option dissection functions. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr_opt_len(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
int len = 0;
subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_len, tvb, offset, L_LBMR_LBMR_OPT_SRC_ID_T, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_len);
proto_tree_add_item(subtree, hf_lbmr_opt_len_type, tvb, offset + O_LBMR_LBMR_OPT_LEN_T_TYPE, L_LBMR_LBMR_OPT_LEN_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_len_len, tvb, offset + O_LBMR_LBMR_OPT_LEN_T_LEN, L_LBMR_LBMR_OPT_LEN_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_len_total_len, tvb, offset + O_LBMR_LBMR_OPT_LEN_T_TOTAL_LEN, L_LBMR_LBMR_OPT_LEN_T_TOTAL_LEN, ENC_BIG_ENDIAN);
len = L_LBMR_LBMR_OPT_LEN_T;
return (len);
}
static int dissect_lbmr_opt_src_id(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
static const int * flags[] =
{
&hf_lbmr_opt_src_id_flags_ignore,
NULL
};
subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_src_id, tvb, offset, L_LBMR_LBMR_OPT_SRC_ID_T, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_src_id);
proto_tree_add_item(subtree, hf_lbmr_opt_src_id_type, tvb, offset + O_LBMR_LBMR_OPT_SRC_ID_T_TYPE, L_LBMR_LBMR_OPT_SRC_ID_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_src_id_len, tvb, offset + O_LBMR_LBMR_OPT_SRC_ID_T_LEN, L_LBMR_LBMR_OPT_SRC_ID_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(subtree, tvb, offset + O_LBMR_LBMR_OPT_SRC_ID_T_FLAGS, hf_lbmr_opt_src_id_flags, ett_lbmr_opt_src_id_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_src_id_src_id, tvb, offset + O_LBMR_LBMR_OPT_SRC_ID_T_SRC_ID, L_LBMR_LBMR_OPT_SRC_ID_T_SRC_ID, ENC_NA);
return (L_LBMR_LBMR_OPT_SRC_ID_T);
}
static int dissect_lbmr_opt_src_type(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
static const int * flags[] =
{
&hf_lbmr_opt_src_type_flags_ignore,
NULL
};
subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_src_type, tvb, offset, L_LBMR_LBMR_OPT_SRC_TYPE_T, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_src_type);
proto_tree_add_item(subtree, hf_lbmr_opt_src_type_type, tvb, offset + O_LBMR_LBMR_OPT_SRC_TYPE_T_TYPE, L_LBMR_LBMR_OPT_SRC_TYPE_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_src_type_len, tvb, offset + O_LBMR_LBMR_OPT_SRC_TYPE_T_LEN, L_LBMR_LBMR_OPT_SRC_TYPE_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(subtree, tvb, offset + O_LBMR_LBMR_OPT_SRC_TYPE_T_FLAGS, hf_lbmr_opt_src_type_flags, ett_lbmr_opt_src_type_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_src_type_src_type, tvb, offset + O_LBMR_LBMR_OPT_SRC_TYPE_T_SRC_TYPE, L_LBMR_LBMR_OPT_SRC_TYPE_T_SRC_TYPE, ENC_BIG_ENDIAN);
return (L_LBMR_LBMR_OPT_SRC_TYPE_T);
}
static int dissect_lbmr_opt_version(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
static const int * flags[] =
{
&hf_lbmr_opt_version_flags_ignore,
&hf_lbmr_opt_version_flags_ume,
&hf_lbmr_opt_version_flags_umq,
NULL
};
subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_version, tvb, offset, L_LBMR_LBMR_OPT_VERSION_T, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_version);
proto_tree_add_item(subtree, hf_lbmr_opt_version_type, tvb, offset + O_LBMR_LBMR_OPT_VERSION_T_TYPE, L_LBMR_LBMR_OPT_VERSION_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_version_len, tvb, offset + O_LBMR_LBMR_OPT_VERSION_T_LEN, L_LBMR_LBMR_OPT_VERSION_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(subtree, tvb, offset + O_LBMR_LBMR_OPT_VERSION_T_FLAGS, hf_lbmr_opt_version_flags, ett_lbmr_opt_version_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_version_version, tvb, offset + O_LBMR_LBMR_OPT_VERSION_T_VERSION, L_LBMR_LBMR_OPT_VERSION_T_VERSION, ENC_BIG_ENDIAN);
return (L_LBMR_LBMR_OPT_VERSION_T);
}
static int dissect_lbmr_opt_local_domain(tvbuff_t * tvb, int offset, packet_info * pinfo _U_, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
static const int * flags[] =
{
&hf_lbmr_opt_local_domain_flags_ignore,
NULL
};
subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_local_domain, tvb, offset, L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_local_domain);
proto_tree_add_item(subtree, hf_lbmr_opt_local_domain_type, tvb, offset + O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_TYPE, L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_TYPE, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_local_domain_len, tvb, offset + O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LEN, L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_bitmask(subtree, tvb, offset + O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_FLAGS, hf_lbmr_opt_local_domain_flags, ett_lbmr_opt_local_domain_flags, flags, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_local_domain_local_domain_id, tvb, offset + O_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LOCAL_DOMAIN_ID, L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_LOCAL_DOMAIN_ID, ENC_BIG_ENDIAN);
return (L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T);
}
static int dissect_lbmr_opt_unknown(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
proto_tree * subtree = NULL;
proto_item * subtree_item = NULL;
guint8 len = 0;
proto_item * type_item = NULL;
guint8 opt_type = 0;
subtree_item = proto_tree_add_item(tree, hf_lbmr_opt_unknown, tvb, offset, -1, ENC_NA);
subtree = proto_item_add_subtree(subtree_item, ett_lbmr_opt_unknown);
opt_type = tvb_get_guint8(tvb, offset + O_LBMR_LBMR_OPT_HDR_T_TYPE);
type_item = proto_tree_add_item(subtree, hf_lbmr_opt_unknown_type, tvb, offset + O_LBMR_LBMR_OPT_HDR_T_TYPE, L_LBMR_LBMR_OPT_HDR_T_TYPE, ENC_BIG_ENDIAN);
len = tvb_get_guint8(tvb, offset + O_LBMR_LBMR_OPT_HDR_T_LEN);
proto_tree_add_item(subtree, hf_lbmr_opt_unknown_len, tvb, offset + O_LBMR_LBMR_OPT_HDR_T_LEN, L_LBMR_LBMR_OPT_HDR_T_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_lbmr_opt_unknown_flags, tvb, offset + O_LBMR_LBMR_OPT_HDR_T_FLAGS, L_LBMR_LBMR_OPT_HDR_T_FLAGS, ENC_NA);
proto_tree_add_item(subtree, hf_lbmr_opt_unknown_data, tvb, offset + L_LBMR_LBMR_OPT_HDR_T, (int) len - L_LBMR_LBMR_OPT_HDR_T, ENC_NA);
proto_item_set_len(subtree_item, (int) len);
expert_add_info_format(pinfo, type_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR option type 0x%02x", opt_type);
return ((int) len);
}
static int dissect_lbmr_options(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tree)
{
proto_tree * opt_tree = NULL;
proto_item * ti = NULL;
int curr_offset = offset;
int len = 0;
ti = proto_tree_add_item(tree, hf_lbmr_opts, tvb, curr_offset, -1, ENC_NA);
opt_tree = proto_item_add_subtree(ti, ett_lbmr_opts);
while (tvb_reported_length_remaining(tvb, curr_offset) > 0)
{
int opt_len;
guint8 opt_type;
opt_type = tvb_get_guint8(tvb, curr_offset + O_LBMR_LBMR_OPT_HDR_T_TYPE);
switch (opt_type)
{
case LBMR_LBMR_OPT_LEN_TYPE:
opt_len = dissect_lbmr_opt_len(tvb, curr_offset, pinfo, opt_tree);
break;
case LBMR_LBMR_OPT_SRC_ID_TYPE:
opt_len = dissect_lbmr_opt_src_id(tvb, curr_offset, pinfo, opt_tree);
break;
case LBMR_LBMR_OPT_SRC_TYPE_TYPE:
opt_len = dissect_lbmr_opt_src_type(tvb, curr_offset, pinfo, opt_tree);
break;
case LBMR_LBMR_OPT_VERSION_TYPE:
opt_len = dissect_lbmr_opt_version(tvb, curr_offset, pinfo, opt_tree);
break;
case LBMR_LBMR_OPT_LOCAL_DOMAIN_TYPE:
opt_len = dissect_lbmr_opt_local_domain(tvb, curr_offset, pinfo, opt_tree);
break;
default:
opt_len = dissect_lbmr_opt_unknown(tvb, curr_offset, pinfo, opt_tree);
break;
}
len += opt_len;
curr_offset += opt_len;
}
return (len);
}
static void lbmr_tap_queue_packet(packet_info * pinfo, const lbmr_contents_t * contents)
{
const lbmr_topic_contents_t * topic;
const lbmr_queue_contents_t * queue;
switch (contents->type)
{
case LBMR_CONTENTS_TOPIC:
topic = &(contents->contents.topic);
if (topic->tqr_count > 0)
{
tqr_node_t * tqr = topic->tqr;
while (tqr != NULL)
{
lbm_lbmr_topic_query_tap_info_t * tqr_tap = wmem_new0(wmem_packet_scope(), lbm_lbmr_topic_query_tap_info_t);
tqr_tap->size = (guint16) sizeof(lbm_lbmr_topic_query_tap_info_t);
tqr_tap->topic_length = (guint8)strlen(tqr->topic);
memcpy(tqr_tap->topic, tqr->topic, tqr_tap->topic_length);
tap_queue_packet(lbmr_topic_query_tap_handle, pinfo, (void *) tqr_tap);
tqr = tqr->next;
}
}
if (topic->tir_count > 0)
{
tir_node_t * tir = topic->tir;
while (tir != NULL)
{
lbm_lbmr_topic_advertisement_tap_info_t * tir_tap = wmem_new0(wmem_packet_scope(), lbm_lbmr_topic_advertisement_tap_info_t);
tir_tap->size = (guint16) sizeof(lbm_lbmr_topic_advertisement_tap_info_t);
tir_tap->topic_length = (guint8)strlen(tir->topic);
tir_tap->source_length = (guint8)strlen(tir->source_string);
tir_tap->topic_index = tir->index;
memcpy(tir_tap->topic, tir->topic, tir_tap->topic_length);
memcpy(tir_tap->source, tir->source_string, tir_tap->source_length);
tap_queue_packet(lbmr_topic_advertisement_tap_handle, pinfo, (void *) tir_tap);
tir = tir->next;
}
}
if (topic->wctqr_count > 0)
{
wctqr_node_t * wctqr = topic->wctqr;
while (wctqr != NULL)
{
lbm_lbmr_pattern_query_tap_info_t * wctqr_tap = wmem_new0(wmem_packet_scope(), lbm_lbmr_pattern_query_tap_info_t);
wctqr_tap->size = (guint16) sizeof(lbm_lbmr_pattern_query_tap_info_t);
wctqr_tap->type = wctqr->type;
wctqr_tap->pattern_length = (guint8)strlen(wctqr->pattern);
memcpy(wctqr_tap->pattern, wctqr->pattern, wctqr_tap->pattern_length);
tap_queue_packet(lbmr_pattern_query_tap_handle, pinfo, (void *) wctqr_tap);
wctqr = wctqr->next;
}
}
break;
case LBMR_CONTENTS_QUEUE:
queue = &(contents->contents.queue);
if (queue->qqr_count > 0)
{
qqr_node_t * qqr = queue->qqr;
while (qqr != NULL)
{
lbm_lbmr_queue_query_tap_info_t * qqr_tap = wmem_new0(wmem_packet_scope(), lbm_lbmr_queue_query_tap_info_t);
qqr_tap->size = (guint16) sizeof(lbm_lbmr_queue_query_tap_info_t);
qqr_tap->queue_length = (guint8)strlen(qqr->queue);
memcpy(qqr_tap->queue, qqr->queue, qqr_tap->queue_length);
tap_queue_packet(lbmr_queue_advertisement_tap_handle, pinfo, (void *) qqr_tap);
qqr = qqr->next;
}
}
if (queue->qir_count > 0)
{
qir_node_t * qir = queue->qir;
while (qir != NULL)
{
lbm_lbmr_queue_advertisement_tap_info_t * qir_tap = wmem_new0(wmem_packet_scope(), lbm_lbmr_queue_advertisement_tap_info_t);
qir_tap->size = (guint16) sizeof(lbm_lbmr_queue_advertisement_tap_info_t);
qir_tap->port = qir->port;
qir_tap->queue_length = (guint8)strlen(qir->queue);
qir_tap->topic_length = (guint8)strlen(qir->topic);
memcpy(qir_tap->queue, qir->queue, qir_tap->queue_length);
memcpy(qir_tap->topic, qir->topic, qir_tap->topic_length);
tap_queue_packet(lbmr_queue_query_tap_handle, pinfo, (void *) qir_tap);
qir = qir->next;
}
}
break;
default:
break;
}
}
/*----------------------------------------------------------------------------*/
/* dissect_lbmr - The dissector for LBM Topic Resolution protocol. */
/*----------------------------------------------------------------------------*/
static int dissect_lbmr(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * user_data _U_)
{
proto_tree * lbmr_tree = NULL;
proto_item * ti = NULL;
int offset = 0;
guint8 ver_type;
guint8 ver;
guint8 type;
lbmr_contents_t * contents = NULL;
char * tag_name = NULL;
int total_len_dissected = 0;
int len_dissected = 0;
tvbuff_t * packet_tvb = NULL;
proto_item * lbmr_hdr_item = NULL;
proto_tree * lbmr_hdr_tree = NULL;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LBMR");
if (lbmr_use_tag)
{
tag_name = lbmr_tag_find(pinfo);
}
col_clear(pinfo->cinfo, COL_INFO);
if (tag_name != NULL)
{
col_add_fstr(pinfo->cinfo, COL_INFO, "[Tag: %s]", tag_name);
}
col_set_fence(pinfo->cinfo, COL_INFO);
ver_type = tvb_get_guint8(tvb, O_LBMR_HDR_T_VER_TYPE);
ver = LBMR_HDR_VER(ver_type);
type = LBMR_HDR_TYPE(ver_type);
offset = 0;
total_len_dissected = 0;
packet_tvb = tvb;
if ((ver_type & LBMR_HDR_TYPE_OPTS_MASK) != 0)
{
guint8 opt_type;
guint8 opt_len;
opt_type = tvb_get_guint8(tvb, -L_LBMR_LBMR_OPT_LEN_T + O_LBMR_LBMR_OPT_LEN_T_TYPE);
opt_len = tvb_get_guint8(tvb, -L_LBMR_LBMR_OPT_LEN_T + O_LBMR_LBMR_OPT_LEN_T_LEN);
if ((opt_type == LBMR_LBMR_OPT_LEN_TYPE) && (((gint)opt_len) == L_LBMR_LBMR_OPT_LEN_T))
{
gint opt_total_len = 0;
gint packet_len;
packet_len = tvb_reported_length_remaining(tvb, 0);
opt_total_len = (gint)tvb_get_ntohs(tvb, -L_LBMR_LBMR_OPT_LEN_T + O_LBMR_LBMR_OPT_LEN_T_TOTAL_LEN);
if (packet_len > opt_total_len)
{
gint tvb_len = packet_len - opt_total_len;
packet_tvb = tvb_new_subset_length(tvb, 0, tvb_len);
}
}
}
if (type == LBMR_HDR_TYPE_EXT)
{
guint8 ext_type = 0;
const gchar * ext_string;
proto_item * ext_type_item = NULL;
ext_type = tvb_get_guint8(tvb, O_LBMR_HDR_EXT_TYPE_T_EXT_TYPE);
ext_string = val_to_str(ext_type, lbmr_ext_packet_type, "Unknown(0x%02x)");
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "ExtType %s", ext_string);
if (tag_name != NULL)
{
ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_EXT_TYPE_T_VER_TYPE, -1, "LBM Topic Resolution Protocol (Tag: %s): Version %u, Type 0x%x (%s), ExtType %s",
tag_name, ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), ext_string);
}
else
{
ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_EXT_TYPE_T_VER_TYPE, -1, "LBM Topic Resolution Protocol: Version %u, Type 0x%x (%s), ExtType %s",
ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), ext_string);
}
lbmr_tree = proto_item_add_subtree(ti, ett_lbmr);
if (tag_name != NULL)
{
proto_item * item = NULL;
item = proto_tree_add_string(lbmr_tree, hf_lbmr_tag, tvb, 0, 0, tag_name);
PROTO_ITEM_SET_GENERATED(item);
}
lbmr_hdr_item = proto_tree_add_item(lbmr_tree, hf_lbmr_hdr, tvb, 0, -1, ENC_NA);
lbmr_hdr_tree = proto_item_add_subtree(lbmr_hdr_item, ett_lbmr_hdr);
(void) format_ver_type(tvb, 0, pinfo, lbmr_hdr_tree);
ext_type_item = proto_tree_add_item(lbmr_hdr_tree, hf_lbmr_hdr_ext_type, tvb, O_LBMR_HDR_EXT_TYPE_T_EXT_TYPE, L_LBMR_HDR_EXT_TYPE_T_EXT_TYPE, ENC_BIG_ENDIAN);
/* ver_type and ext_type have already been processed. But their dissected length is included in the individual type dissections below. */
switch (ext_type)
{
case LBMR_HDR_EXT_TYPE_UME_PROXY_SRC_ELECT:
len_dissected = dissect_lbmr_pser(packet_tvb, offset, pinfo, lbmr_tree);
break;
case LBMR_HDR_EXT_TYPE_UMQ_QUEUE_MGMT:
offset += L_LBMR_UMQ_QMGMT_HDR_T_VER_TYPE + L_LBMR_UMQ_QMGMT_HDR_T_EXT_TYPE;
total_len_dissected += L_LBMR_UMQ_QMGMT_HDR_T_VER_TYPE + L_LBMR_UMQ_QMGMT_HDR_T_EXT_TYPE;
len_dissected = lbmr_dissect_umq_qmgmt(packet_tvb, offset - 2, pinfo, lbmr_tree);
break;
case LBMR_HDR_EXT_TYPE_CONTEXT_INFO:
len_dissected = dissect_lbmr_ctxinfo(packet_tvb, offset, pinfo, lbmr_tree);
break;
case LBMR_HDR_EXT_TYPE_TOPIC_RES_REQUEST:
len_dissected = dissect_lbmr_topic_res_request(packet_tvb, offset, pinfo, lbmr_tree);
break;
case LBMR_HDR_EXT_TYPE_TNWG_MSG:
len_dissected = dissect_lbmr_tnwg(packet_tvb, offset, pinfo, lbmr_tree);
break;
case LBMR_HDR_EXT_TYPE_REMOTE_DOMAIN_ROUTE:
len_dissected = dissect_lbmr_remote_domain_route(packet_tvb, offset, pinfo, lbmr_tree);
break;
case LBMR_HDR_EXT_TYPE_REMOTE_CONTEXT_INFO:
len_dissected = dissect_lbmr_rctxinfo(packet_tvb, offset, pinfo, lbmr_tree);
break;
default:
len_dissected = L_LBMR_HDR_EXT_TYPE_T_VER_TYPE + L_LBMR_HDR_EXT_TYPE_T_EXT_TYPE;
expert_add_info_format(pinfo, ext_type_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR extended type 0x%02x", ext_type);
break;
}
offset += len_dissected;
total_len_dissected += len_dissected;
}
else
{
guint8 tqrs = 0;
guint16 tirs = 0;
gboolean rd_keepalive = FALSE;
gboolean topic_mgmt = FALSE;
gboolean client_rd_keepalive = FALSE;
gboolean zero_tirs_tqrs = FALSE;
proto_item * type_item = NULL;
tqrs = tvb_get_guint8(tvb, O_LBMR_HDR_T_TQRS);
tirs = tvb_get_ntohs(tvb, O_LBMR_HDR_T_TIRS);
if ((tqrs == 0) && (tirs == 0))
{
zero_tirs_tqrs = TRUE;
}
if ((type == LBMR_HDR_TYPE_NORMAL) && zero_tirs_tqrs)
{
rd_keepalive = TRUE;
}
else if (zero_tirs_tqrs && ((type == LBMR_HDR_TYPE_UCAST_RCV_ALIVE) || (type == LBMR_HDR_TYPE_UCAST_SRC_ALIVE)))
{
client_rd_keepalive = TRUE;
}
else if (type == LBMR_HDR_TYPE_TOPIC_MGMT)
{
topic_mgmt = TRUE;
}
switch (type)
{
case LBMR_HDR_TYPE_QUEUE_RES:
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "QQRs %u QIRs %" G_GUINT16_FORMAT, tqrs, tirs);
break;
default:
if (rd_keepalive)
{
col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Unicast Resolver Keepalive");
}
else if (client_rd_keepalive)
{
if (type == LBMR_HDR_TYPE_UCAST_RCV_ALIVE)
{
col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Receiver Alive");
}
else
{
col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Source Alive");
}
}
else if (topic_mgmt)
{
col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "Topic Management");
}
else
{
col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "TQRs %u TIRs %" G_GUINT16_FORMAT, tqrs, tirs);
}
break;
}
switch (type)
{
case LBMR_HDR_TYPE_QUEUE_RES:
if (tag_name != NULL)
{
ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol (Tag: %s): Version %u, Type 0x%x (%s) QQRs %u, QIRs %" G_GUINT16_FORMAT,
tag_name, ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), tqrs, tirs);
}
else
{
ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol: Version %u, Type 0x%x (%s) QQRs %u, QIRs %" G_GUINT16_FORMAT,
ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), tqrs, tirs);
}
break;
default:
if (tag_name != NULL)
{
if (rd_keepalive)
{
ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol (Tag: %s): Version %u, Type 0x%x (%s) Unicast Resolver Keepalive",
tag_name, ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"));
}
else if (topic_mgmt)
{
ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol (Tag: %s): Version %u, Type 0x%x (%s) Topic Management",
tag_name, ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"));
}
else
{
ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol (Tag: %s): Version %u, Type 0x%x (%s) TQRs %u, TIRs %" G_GUINT16_FORMAT,
tag_name, ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), tqrs, tirs);
}
}
else
{
if (rd_keepalive)
{
ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol: Version %u, Type 0x%x (%s) Unicast Resolver Keepalive",
ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"));
}
else if (topic_mgmt)
{
ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol: Version %u, Type 0x%x (%s) Topic Management",
ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"));
}
else
{
ti = proto_tree_add_protocol_format(tree, proto_lbmr, tvb, O_LBMR_HDR_T_VER_TYPE, -1, "LBM Topic Resolution Protocol: Version %u, Type 0x%x (%s) TQRs %u, TIRs %" G_GUINT16_FORMAT,
ver, type, val_to_str(type, lbmr_packet_type, "Unknown(0x%02x)"), tqrs, tirs);
}
}
break;
}
lbmr_tree = proto_item_add_subtree(ti, ett_lbmr);
if (tag_name != NULL)
{
proto_item * item;
item = proto_tree_add_string(lbmr_tree, hf_lbmr_tag, tvb, 0, 0, tag_name);
PROTO_ITEM_SET_GENERATED(item);
}
lbmr_hdr_item = proto_tree_add_item(lbmr_tree, hf_lbmr_hdr, tvb, 0, -1, ENC_NA);
lbmr_hdr_tree = proto_item_add_subtree(lbmr_hdr_item, ett_lbmr_hdr);
type_item = format_ver_type(tvb, 0, pinfo, lbmr_hdr_tree);
switch (type)
{
case LBMR_HDR_TYPE_QUEUE_RES:
proto_tree_add_item(lbmr_hdr_tree, hf_lbmr_hdr_qqrs, tvb, O_LBMR_HDR_T_TQRS, L_LBMR_HDR_T_TQRS, ENC_BIG_ENDIAN);
proto_tree_add_item(lbmr_hdr_tree, hf_lbmr_hdr_qirs, tvb, O_LBMR_HDR_T_TIRS, L_LBMR_HDR_T_TIRS, ENC_BIG_ENDIAN);
break;
default:
proto_tree_add_item(lbmr_hdr_tree, hf_lbmr_hdr_tqrs, tvb, O_LBMR_HDR_T_TQRS, L_LBMR_HDR_T_TQRS, ENC_BIG_ENDIAN);
proto_tree_add_item(lbmr_hdr_tree, hf_lbmr_hdr_tirs, tvb, O_LBMR_HDR_T_TIRS, L_LBMR_HDR_T_TIRS, ENC_BIG_ENDIAN);
break;
}
offset = L_LBMR_HDR_T;
total_len_dissected = L_LBMR_HDR_T;
contents = wmem_new0(wmem_packet_scope(), lbmr_contents_t);
switch (type)
{
case LBMR_HDR_TYPE_QUEUE_RES:
contents->type = LBMR_CONTENTS_QUEUE;
if (tqrs > 0)
{
len_dissected = dissect_lbmr_qqrs(packet_tvb, offset, tqrs, pinfo, lbmr_tree, contents);
total_len_dissected += len_dissected;
offset += len_dissected;
}
if (tirs > 0)
{
len_dissected = dissect_lbmr_qirs(packet_tvb, offset, tirs, pinfo, lbmr_tree, contents);
total_len_dissected += len_dissected;
offset += len_dissected;
}
lbmr_tap_queue_packet(pinfo, contents);
break;
case LBMR_HDR_TYPE_NORMAL:
case LBMR_HDR_TYPE_WC_TQRS:
if (!rd_keepalive)
{
contents->type = LBMR_CONTENTS_TOPIC;
if (tqrs > 0)
{
gboolean wc_tqrs = FALSE;
if (type == LBMR_HDR_TYPE_WC_TQRS)
{
wc_tqrs = TRUE;
}
len_dissected = dissect_lbmr_tqrs(packet_tvb, offset, tqrs, pinfo, lbmr_tree, wc_tqrs, contents);
total_len_dissected += len_dissected;
offset += len_dissected;
}
if (tirs > 0)
{
len_dissected = dissect_lbmr_tirs(packet_tvb, offset, tirs, pinfo, lbmr_tree, "TIRs", contents);
total_len_dissected += len_dissected;
offset += len_dissected;
}
lbmr_tap_queue_packet(pinfo, contents);
}
break;
case LBMR_HDR_TYPE_TOPIC_MGMT:
len_dissected = dissect_lbmr_tmb(packet_tvb, offset, pinfo, lbmr_tree);
total_len_dissected += len_dissected;
offset += len_dissected;
break;
case LBMR_HDR_TYPE_UCAST_RCV_ALIVE:
case LBMR_HDR_TYPE_UCAST_SRC_ALIVE:
break;
default:
expert_add_info_format(pinfo, type_item, &ei_lbmr_analysis_invalid_value, "Unknown LBMR type 0x%02x", type);
break;
}
}
if ((tvb_reported_length_remaining(tvb, offset) > 0) && ((ver_type & LBMR_HDR_TYPE_OPTS_MASK) != 0))
{
/* Process LBMR packet options. */
len_dissected = dissect_lbmr_options(tvb, offset, pinfo, lbmr_tree);
total_len_dissected += len_dissected;
}
return (total_len_dissected);
}
static gboolean test_lbmr_packet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * user_data _U_)
{
lbmr_tag_entry_t entry;
gboolean valid_packet = FALSE;
/* Must be a UDP packet. */
if (pinfo->ptype != PT_UDP)
{
return (FALSE);
}
/* Destination address must be IPV4 and 4 bytes in length. */
if ((pinfo->dst.type != AT_IPv4) || (pinfo->dst.len != 4))
{
return (FALSE);
}
if (lbmr_use_tag)
{
if (lbmr_tag_find(pinfo) != NULL)
{
valid_packet = TRUE;
}
}
else
{
entry.name = NULL;
entry.mc_outgoing_udp_port = lbmr_mc_outgoing_udp_port;
entry.mc_incoming_udp_port = lbmr_mc_incoming_udp_port;
entry.mc_incoming_address = NULL;
entry.mc_incoming_address_val_h = lbmr_mc_incoming_address_host;
entry.mc_outgoing_address = NULL;
entry.mc_outgoing_address_val_h = lbmr_mc_outgoing_address_host;
entry.uc_port_high = lbmr_uc_port_high;
entry.uc_port_low = lbmr_uc_port_low;
entry.uc_dest_port = lbmr_uc_dest_port;
entry.uc_address = NULL;
entry.uc_address_val_h = lbmr_uc_address_host;
valid_packet = lbmr_match_packet(pinfo, &entry);
}
if (valid_packet)
{
dissect_lbmr(tvb, pinfo, tree, NULL);
return (TRUE);
}
return (FALSE);
}
/* Register all the bits needed with the filtering engine */
void proto_register_lbmr(void)
{
static hf_register_info hf[] =
{
{ &hf_lbmr_tag,
{ "Tag", "lbmr.tag", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_hdr,
{ "Header", "lbmr.hdr", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_hdr_ver,
{ "Version", "lbmr.hdr.ver", FT_UINT8, BASE_DEC, NULL, LBMR_HDR_VER_VER_MASK, NULL, HFILL } },
{ &hf_lbmr_hdr_opt,
{ "Options", "lbmr.hdr.opts", FT_BOOLEAN, 8, TFS(&tfs_present_not_present), LBMR_HDR_TYPE_OPTS_MASK, "Set if LBMR options are present", HFILL } },
{ &hf_lbmr_hdr_type,
{ "Type", "lbmr.hdr.type", FT_UINT8, BASE_HEX, VALS(lbmr_packet_type), LBMR_HDR_VER_TYPE_MASK, NULL, HFILL } },
{ &hf_lbmr_hdr_tqrs,
{ "Topic Query Records", "lbmr.hdr.tqrs", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_hdr_tirs,
{ "Topic Information Records", "lbmr.hdr.tirs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_hdr_qqrs,
{ "Queue Query Records", "lbmr.hdr.qqrs", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_hdr_qirs,
{ "Queue Information Records", "lbmr.hdr.qirs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_hdr_ext_type,
{ "Extended Type", "lbmr.hdr.ext_type", FT_UINT8, BASE_HEX, VALS(lbmr_ext_packet_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_tqrs,
{ "TQRs", "lbmr.tqrs", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tqr,
{ "TQR", "lbmr.tqr", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tqr_pattern_type,
{ "Pattern Type", "lbmr.tqr.pattern_type", FT_UINT8, BASE_DEC, VALS(lbm_wildcard_pattern_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_tqr_pattern,
{ "Pattern", "lbmr.tqr.pattern", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tqr_name,
{ "Topic Name", "lbmr.tqr.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tirs,
{ "TIRs", "lbmr.tirs", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir,
{ "TIR", "lbmr.tir", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_name,
{ "Topic Name", "lbmr.tir.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_transport_opts,
{ "Transport Options Present", "lbmr.tir.transport_opts", FT_BOOLEAN, L_LBMR_TIR_T_TRANSPORT * 8, TFS(&tfs_set_notset), LBMR_TIR_OPTIONS, "Set if transport options are present", HFILL } },
{ &hf_lbmr_tir_transport_type,
{ "Transport Type", "lbmr.tir.transport_type", FT_UINT8, BASE_HEX, VALS(lbmr_transport_type), LBMR_TIR_TRANSPORT, NULL, HFILL } },
{ &hf_lbmr_tir_tlen,
{ "Transport Info Length", "lbmr.tir.tlen", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_ttl,
{ "TTL", "lbmr.tir.ttl", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_index,
{ "Index", "lbmr.tir.index", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_tcp,
{ "TCP Transport", "lbmr.tir.tcp", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_tcp_ip,
{ "Source IP", "lbmr.tir.tcp.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_tcp_session_id,
{ "Session ID", "lbmr.tir.tcp.session_id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_tcp_port,
{ "Source Port", "lbmr.tir.tcp.port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtrm,
{ "LBTRM Transport", "lbmr.tir.lbtrm", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtrm_src_addr,
{ "Source IP", "lbmr.tir.lbtrm.srcip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtrm_mcast_addr,
{ "Multicast IP", "lbmr.tir.lbtrm.mcastip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtrm_session_id,
{ "Session ID", "lbmr.tir.lbtrm.sessid", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtrm_udp_dest_port,
{ "Destination Port", "lbmr.tir.lbtrm.dport", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtrm_src_ucast_port,
{ "Source Port", "lbmr.tir.lbtrm.sport", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtru,
{ "LBTRU Transport", "lbmr.tir.lbtru", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtru_ip,
{ "Source IP", "lbmr.tir.lbtru.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtru_port,
{ "Source Port", "lbmr.tir.lbtru.port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtru_session_id,
{ "Session ID", "lbmr.tir.lbtru.session_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtipc,
{ "LBTIPC Transport", "lbmr.tir.lbtipc", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtipc_host_id,
{ "Host ID", "lbmr.tir.lbtipc.host_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtipc_session_id,
{ "Session ID", "lbmr.tir.lbtipc.session_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtipc_xport_id,
{ "Transport ID", "lbmr.tir.lbtipc.xport_id", FT_UINT16, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtrdma,
{ "LBTRDMA Transport", "lbmr.tir.lbtrdma", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtrdma_ip,
{ "Source IP", "lbmr.tir.lbtrdma.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtrdma_session_id,
{ "Session ID", "lbmr.tir.lbtrdma.session_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtrdma_port,
{ "Port", "lbmr.tir.lbtrdma.port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtsmx,
{ "LBTSMX Transport", "lbmr.tir.lbtsmx", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtsmx_host_id,
{ "Host ID", "lbmr.tir.lbtsmx.host_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtsmx_session_id,
{ "Session ID", "lbmr.tir.lbtsmx.session_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_lbtsmx_xport_id,
{ "Transport ID", "lbmr.tir.lbtsmx.xport_id", FT_UINT16, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_channel,
{ "Channel", "lbmr.tir.channel", FT_UINT64, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tir_unknown_transport,
{ "Unknown Transport", "lbmr.tir.unknown_transport", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topts,
{ "Options", "lbmr.topts", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_len,
{ "Length Option", "lbmr.topt.len", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_len_type,
{ "Type", "lbmr.topt.len.type", FT_UINT8, BASE_DEC, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_len_len,
{ "Length", "lbmr.topt.len.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_len_total_len,
{ "Total Length", "lbmr.topt.len.total_len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume,
{ "UME Option", "lbmr.topt.ume", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_type,
{ "Type", "lbmr.topt.ume.type", FT_UINT8, BASE_DEC, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_len,
{ "Length", "lbmr.topt.ume.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_flags,
{ "Flags", "lbmr.topt.ume.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_flags_ignore,
{ "Ignore", "lbmr.topt.ume.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_UME_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_ume_flags_latejoin,
{ "Late Join", "lbmr.topt.ume.flags.latejoin", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UME_FLAG_LATEJOIN, "If set, the source provides late join", HFILL } },
{ &hf_lbmr_topt_ume_flags_store,
{ "Store", "lbmr.topt.ume.flags.store", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UME_FLAG_STORE, "If set, one or more stores are specified", HFILL } },
{ &hf_lbmr_topt_ume_flags_qccap,
{ "Q/C Capable", "lbmr.topt.ume.flags.qccap", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UME_FLAG_QCCAP, "If set, the source supports quorun/consensus", HFILL } },
{ &hf_lbmr_topt_ume_flags_acktosrc,
{ "Send ACKs to Source", "lbmr.topt.ume.flags.acktosrc", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UME_FLAG_ACKTOSRC, "If set, receivers send ACKs to the source", HFILL } },
{ &hf_lbmr_topt_ume_store_tcp_port,
{ "Store TCP Port", "lbmr.topt.ume.store_tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_src_tcp_port,
{ "Source TCP Port", "lbmr.topt.ume.src_tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_tcp_addr,
{ "Store TCP Address", "lbmr.topt.ume.store_tcp_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_src_tcp_addr,
{ "Source TCP Address", "lbmr.topt.ume.src_tcp_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_src_reg_id,
{ "Source Registration ID", "lbmr.topt.ume.src_reg_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_transport_idx,
{ "Transport Index", "lbmr.topt.ume.transport_idx", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_high_seqnum,
{ "High Sequence Number", "lbmr.topt.ume.high_seqnum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_low_seqnum,
{ "Low Sequence Number", "lbmr.topt.ume.low_seqnum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store,
{ "UME Store Option", "lbmr.topt.ume_store", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_type,
{ "Type", "lbmr.topt.ume_store.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_len,
{ "Length", "lbmr.topt.ume_store.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_flags,
{ "Flags", "lbmr.topt.ume_store.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_flags_ignore,
{ "Ignore", "lbmr.topt.ume_store.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_STORE_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_UME_STORE_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_grp_idx,
{ "Group Index", "lbmr.topt.ume_store.grp_idx", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_store_tcp_port,
{ "Store TCP Port", "lbmr.topt.ume_store.store_tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_store_idx,
{ "Store Index", "lbmr.topt.ume_store.store_idx", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_store_ip_addr,
{ "Store IP Address", "lbmr.topt.ume_store.store_ip_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_src_reg_id,
{ "Source Registration ID", "lbmr.topt.ume_store.src_reg_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_group,
{ "UME Store Group Option", "lbmr.topt.ume_store_group", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_group_type,
{ "Type", "lbmr.topt.ume_store_group.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_group_len,
{ "Length", "lbmr.topt.ume_store_group.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_group_flags,
{ "Flags", "lbmr.topt.ume_store_group.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_group_flags_ignore,
{ "Ignore", "lbmr.topt.ume_store_group.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UME_STORE_GROUP_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_UME_STORE_GROUP_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_group_grp_idx,
{ "Group Index", "lbmr.topt.ume_store_group.grp_idx", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_group_grp_sz,
{ "Group Size", "lbmr.topt.ume_store_group.grp_sz", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ume_store_group_reserved,
{ "Reserved", "lbmr.topt.ume_store_group.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin,
{ "Late Join Option", "lbmr.topt.latejoin", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin_type,
{ "Type", "lbmr.topt.latejoin.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin_len,
{ "Length", "lbmr.topt.latejoin.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin_flags,
{ "Flags", "lbmr.topt.latejoin.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin_flags_ignore,
{ "Ignore", "lbmr.topt.latejoin.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_LATEJOIN_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_LATEJOIN_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin_flags_acktosrc,
{ "Send ACKs to Source", "lbmr.topt.latejoin.flags.acktosrc", FT_BOOLEAN, L_LBMR_TOPIC_OPT_LATEJOIN_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_LATEJOIN_FLAG_ACKTOSRC, "If set, ACKs are sent to source", HFILL } },
{ &hf_lbmr_topt_latejoin_src_tcp_port,
{ "Source TCP Port", "lbmr.topt.latejoin.src_tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin_reserved,
{ "Reserved", "lbmr.topt.latejoin.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin_src_ip_addr,
{ "Source IP Address", "lbmr.topt.latejoin.src_ip_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin_transport_idx,
{ "Transport Index", "lbmr.topt.latejoin.transport_idx", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin_high_seqnum,
{ "High Sequence Number", "lbmr.topt.latejoin.high_seqnum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_latejoin_low_seqnum,
{ "Low Sequence Number", "lbmr.topt.latejoin.low_seqnum", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_umq_rcridx,
{ "Receiver Control Record Index Option", "lbmr.topt.umq_rcridx", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_umq_rcridx_type,
{ "Type", "lbmr.topt.umq_rcridx.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_umq_rcridx_len,
{ "Length", "lbmr.topt.umq_rcridx.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_umq_rcridx_flags,
{ "Flags", "lbmr.topt.umq_rcridx.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_umq_rcridx_flags_ignore,
{ "Ignore", "lbmr.topt.umq_rcridx.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_UMQ_RCRIDX_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_UMQ_RCRIDX_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_umq_rcridx_rcr_idx,
{ "Receiver Control Record Index", "lbmr.topt.umq_rcridx.rcr_idx", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo,
{ "Queue Info Option", "lbmr.topt.umq_qinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo_type,
{ "Type", "lbmr.topt.umq_qinfo.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo_len,
{ "Length", "lbmr.topt.umq_qinfo.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo_flags,
{ "Flags", "lbmr.topt.umq_qinfo.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo_flags_ignore,
{ "Ignore", "lbmr.topt.umq_qinfo.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_UMQ_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo_flags_queue,
{ "Queue", "lbmr.topt.umq_qinfo.flags.queue", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UMQ_FLAG_QUEUE, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo_flags_rcvlisten,
{ "Receiver Listen", "lbmr.topt.umq_qinfo.flags.rcvlisten", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UMQ_FLAG_RCVLISTEN, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo_flags_control,
{ "Control", "lbmr.topt.umq_qinfo.flags.control", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UMQ_FLAG_CONTROL, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo_flags_srcrcvlisten,
{ "Source Receiver Listen", "lbmr.topt.umq_qinfo.flags.srcrcvlisten", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UMQ_FLAG_SRCRCVLISTEN, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo_flags_participants_only,
{ "Participants Only", "lbmr.topt.umq_qinfo.flags.participants_only", FT_BOOLEAN, L_LBMR_TOPIC_OPT_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TOPIC_OPT_UMQ_FLAG_PARTICIPANTS_ONLY, NULL, HFILL } },
{ &hf_lbmr_topt_umq_qinfo_queue,
{ "Queue", "lbmr.topt.ume_qinfo.queue", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_cost,
{ "Cost Option", "lbmr.topt.cost", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_cost_type,
{ "Type", "lbmr.topt.cost.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_cost_len,
{ "Length", "lbmr.topt.cost.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_cost_flags,
{ "Flags", "lbmr.topt.cost.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_cost_flags_ignore,
{ "Ignore", "lbmr.topt.cost.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_COST_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_COST_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_cost_hop_count,
{ "Hop count", "lbmr.topt.cost.hop_count", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_cost_cost,
{ "Cost", "lbmr.topt.cost.cost", FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_otid,
{ "Originating Transport ID Option", "lbmr.topt.otid", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_otid_type,
{ "Type", "lbmr.topt.otid.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_otid_len,
{ "Length", "lbmr.topt.otid.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_otid_flags,
{ "Flags", "lbmr.topt.otid.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_otid_flags_ignore,
{ "Ignore", "lbmr.topt.otid.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_OTID_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_OTID_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_otid_originating_transport,
{ "Originating Transport ID", "lbmr.topt.otid.originating_transport", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinst,
{ "Context Instance Option", "lbmr.topt.ctxinst", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinst_type,
{ "Type", "lbmr.topt.ctxinst.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinst_len,
{ "Length", "lbmr.topt.ctxinst.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinst_flags,
{ "Flags", "lbmr.topt.ctxinst.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinst_flags_ignore,
{ "Ignore", "lbmr.topt.ctxinst.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_CTXINST_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_CTXINST_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinst_res,
{ "Reserved", "lbmr.topt.ctxinst.res", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinst_ctxinst,
{ "Context Instance", "lbmr.topt.ctxinst.ctxinst", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinsts,
{ "Store Context Instance Option", "lbmr.topt.ctxinsts", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinsts_type,
{ "Type", "lbmr.topt.ctxinsts.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinsts_len,
{ "Length", "lbmr.topt.ctxinsts.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinsts_flags,
{ "Flags", "lbmr.topt.ctxinsts.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinsts_flags_ignore,
{ "Ignore", "lbmr.topt.ctxinsts.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_CTXINSTS_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_CTXINSTS_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinsts_idx,
{ "Index", "lbmr.topt.ctxinsts.idx", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinsts_ctxinst,
{ "Store Context Instance", "lbmr.topt.ctxinsts.ctxinsts", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ulb,
{ "ULB Option", "lbmr.topt.ulb", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ulb_type,
{ "Type", "lbmr.topt.ulb.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ulb_len,
{ "Length", "lbmr.topt.ulb.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ulb_flags,
{ "Flags", "lbmr.topt.ulb.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ulb_flags_ignore,
{ "Ignore", "lbmr.topt.ulb.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_ULB_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_ULB_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_ulb_queue_id,
{ "Queue ID", "lbmr.topt.ulb.queue_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ulb_regid,
{ "Registration ID", "lbmr.topt.ulb.regid", FT_UINT64, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ulb_ulb_src_id,
{ "ULB Source ID", "lbmr.topt.ulb.ulb_src_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ulb_src_ip_addr,
{ "Source IP Address", "lbmr.topt.ulb.src_ip_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ulb_src_tcp_port,
{ "Source TCP Port", "lbmr.topt.ulb.src_tcp_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ulb_reserved,
{ "Reserved", "lbmr.topt.ulb.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinstq,
{ "Queue Context Instance Option", "lbmr.topt.ctxinstq", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinstq_type,
{ "Type", "lbmr.topt.ctxinstq.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinstq_len,
{ "Length", "lbmr.topt.ctxinstq.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinstq_flags,
{ "Flags", "lbmr.topt.ctxinstq.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinstq_flags_ignore,
{ "Ignore", "lbmr.topt.ctxinstq.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_CTXINSTQ_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_CTXINSTQ_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinstq_idx,
{ "Index", "lbmr.topt.ctxinstq.idx", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_ctxinstq_ctxinst,
{ "Store Context Instance", "lbmr.topt.ctxinstq.ctxinstq", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_domain_id,
{ "Domain ID Option", "lbmr.topt.domain_id", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_domain_id_type,
{ "Type", "lbmr.topt.domain_id.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_domain_id_len,
{ "Length", "lbmr.topt.domain_id.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_domain_id_flags,
{ "Flags", "lbmr.topt.domain_id.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_domain_id_flags_ignore,
{ "Ignore", "lbmr.topt.domain_id.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_DOMAIN_ID_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_DOMAIN_ID_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_domain_id_domain_id,
{ "Domain ID", "lbmr.topt.domain_id.domain_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_exfunc,
{ "Extended Functionality Option", "lbmr.topt.exfunc", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_exfunc_type,
{ "Type", "lbmr.topt.exfunc.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_exfunc_len,
{ "Length", "lbmr.topt.exfunc.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_exfunc_flags,
{ "Flags", "lbmr.topt.exfunc.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_exfunc_flags_ignore,
{ "Ignore", "lbmr.topt.exfunc.flags.ignore", FT_BOOLEAN, L_LBMR_TOPIC_OPT_EXFUNC_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TOPIC_OPT_EXFUNC_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_topt_exfunc_src_tcp_port,
{ "Source TCP Port", "lbmr.topt.exfunc.src_tcp_port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_exfunc_reserved,
{ "Reserved", "lbmr.topt.exfunc.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_exfunc_src_ip_addr,
{ "Source IP Address", "lbmr.topt.exfunc.src_ip_addr", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_exfunc_functionality_flags,
{ "Functionality Flags", "lbmr.topt.exfunc.functionality_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_exfunc_functionality_flags_ulb,
{ "ULB", "lbmr.topt.exfunc.functionality_flags.ulb", FT_BOOLEAN, L_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS * 8, TFS(&tfs_capable_not_capable), LBM_TOPIC_OPT_EXFUNC_FFLAG_ULB, "Set if ULB supported", HFILL } },
{ &hf_lbmr_topt_exfunc_functionality_flags_umq,
{ "UMQ", "lbmr.topt.exfunc.functionality_flags.umq", FT_BOOLEAN, L_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS * 8, TFS(&tfs_capable_not_capable), LBM_TOPIC_OPT_EXFUNC_FFLAG_UMQ, "Set if UMQ supported", HFILL } },
{ &hf_lbmr_topt_exfunc_functionality_flags_ume,
{ "UME", "lbmr.topt.exfunc.functionality_flags.ume", FT_BOOLEAN, L_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS * 8, TFS(&tfs_capable_not_capable), LBM_TOPIC_OPT_EXFUNC_FFLAG_UME, "Set if UME supported", HFILL } },
{ &hf_lbmr_topt_exfunc_functionality_flags_lj,
{ "Late Join", "lbmr.topt.exfunc.functionality_flags.lj", FT_BOOLEAN, L_LBMR_TOPIC_OPT_EXFUNC_T_FUNCTIONALITY_FLAGS * 8, TFS(&tfs_capable_not_capable), LBM_TOPIC_OPT_EXFUNC_FFLAG_LJ, "Set if late join supported", HFILL } },
{ &hf_lbmr_topt_unknown,
{ "Unknown Option", "lbmr.topt.unknown", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_unknown_type,
{ "Type", "lbmr.topt.unknown.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_topic_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_unknown_len,
{ "Length", "lbmr.topt.unknown.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_unknown_flags,
{ "Flags", "lbmr.topt.unknown.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topt_unknown_data,
{ "Data", "lbmr.topt.unknown.data", FT_BYTES, FT_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tmb,
{ "Topic Management Block", "lbmr.tmb", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tmb_len,
{ "Length", "lbmr.tmb.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tmb_tmrs,
{ "Topic Management Record Count", "lbmr.tmb.tmrs", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tmb_tmr_list,
{ "Topic Management Records", "lbmr.tmb.tmr_list", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tmr,
{ "Topic Management Record", "lbmr.tmb.tmr", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tmr_len,
{ "Length", "lbmr.tmb.tmr.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tmr_type,
{ "TMR Type", "lbmr.tmb.tmr.type", FT_UINT8, BASE_DEC, VALS(lbmr_tmr_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_tmr_flags,
{ "Flags", "lbmr.tmb.tmr.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tmr_flags_response,
{ "Response", "lbmr.tmb.tmr.flags.response", FT_BOOLEAN, L_LBMR_TMR_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TMR_FLAG_RESPONSE, "Set if this is a response", HFILL } },
{ &hf_lbmr_tmr_flags_wildcard_pcre,
{ "PCRE pattern", "lbmr.tmb.tmr.flags.wildcard_pcre", FT_BOOLEAN, L_LBMR_TMR_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TMR_FLAG_WILDCARD_PCRE, "Set if topic is a PCRE pattern", HFILL } },
{ &hf_lbmr_tmr_flags_wildcard_regex,
{ "Regex pattern", "lbmr.tmb.tmr.flags.wildcard_regex", FT_BOOLEAN, L_LBMR_TMR_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TMR_FLAG_WILDCARD_REGEX, "Set if topic is a Regex pattern", HFILL } },
{ &hf_lbmr_tmr_name,
{ "Topic Name", "lbmr.tmb.tmr.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_dep_type,
{ "Dependent Type", "lbmr.pser.dep_type", FT_UINT16, BASE_DEC_HEX, VALS(lbmr_pser_dependent_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_len,
{ "Length", "lbmr.pser.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_flags,
{ "Flags", "lbmr.pser.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_flags_option,
{ "Option", "lbmr.pser.flags.option", FT_BOOLEAN, L_LBMR_PSER_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_PSER_OPT_FLAG, NULL, HFILL } },
{ &hf_lbmr_pser_source_ip,
{ "Source IP", "lbmr.pser.source_ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_store_ip,
{ "Store IP", "lbmr.pser.store_ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_transport_idx,
{ "Transport Index", "lbmr.pser.transport_idx", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_topic_idx,
{ "Topic Index", "lbmr.pser.topic_idx", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_source_port,
{ "Source Port", "lbmr.pser.source_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_store_port,
{ "Store Port", "lbmr.pser.store_port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_topic,
{ "Topic", "lbmr.pser.topic", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_opts,
{ "Options", "lbmr.pser.opts", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_optlen,
{ "Option Length", "lbmr.pser.opt.optlen", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_optlen_type,
{ "Type", "lbmr.pser.opt.optlen.type", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_optlen_optlen,
{ "Options Length", "lbmr.pser.opt.optlen.optlen", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_opt_ctxinst,
{ "Context Instance Option", "lbmr.pser.opt.ctxinst", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_opt_ctxinst_len,
{ "Length", "lbmr.pser.opt.ctxinst.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_opt_ctxinst_type,
{ "Type", "lbmr.pser.opt.ctxinst.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_pser_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_pser_opt_ctxinst_ctxinst,
{ "Context Instance", "lbmr.pser.opt.ctxinst.ctxinst", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qqr,
{ "QQRs", "lbmr.qqr", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qqr_name,
{ "Queue name", "lbmr.qqr.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qirs,
{ "QIRs", "lbmr.qirs", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir,
{ "QIR", "lbmr.qir", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queue_name,
{ "Queue name", "lbmr.qir.qname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_topic_name,
{ "Topic name", "lbmr.qir.tname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queue_id,
{ "Queue ID", "lbmr.qir.queue_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queue_ver,
{ "Queue Version", "lbmr.qir.queue_ver", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queue_prev_ver,
{ "Queue Previous Version", "lbmr.qir.queue_prev_ver", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_option_flag,
{ "QIR Options Present", "lbmr.qir.opts", FT_BOOLEAN, L_LBMR_QIR_T_GRP_BLKS * 8, TFS(&tfs_set_notset), LBMR_QIR_OPTIONS, NULL, HFILL } },
{ &hf_lbmr_qir_grp_blks,
{ "Group Block Count", "lbmr.qir.grp_blks", FT_UINT16, BASE_DEC_HEX, NULL, LBMR_QIR_GRP_BLOCKS_MASK, NULL, HFILL } },
{ &hf_lbmr_qir_queue_blks,
{ "Queue Blocks", "lbmr.qir.queue_blks", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_grps,
{ "Groups", "lbmr.qir.grps", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_grp_blk,
{ "Group Block", "lbmr.qir.grp", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_grp_blk_grp_idx,
{ "Group Index", "lbmr.qir.grp.grp_idx", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_grp_blk_grp_sz,
{ "Group Size", "lbmr.qir.grp.grp_sz", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queues,
{ "Queues", "lbmr.qir.queues", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queue_blk,
{ "Queue Block", "lbmr.qir.queue", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queue_blk_ip,
{ "IP Address", "lbmr.qir.queue.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queue_blk_port,
{ "Port", "lbmr.qir.queue.port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queue_blk_idx,
{ "Index", "lbmr.qir.queue.idx", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queue_blk_grp_idx,
{ "Group Index", "lbmr.qir.queue.grp_idx", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_qir_queue_blk_reserved,
{ "Reserved", "lbmr.qir.queue.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opts,
{ "Options", "lbmr.opt", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_len,
{ "Length Option", "lbmr.opt.len", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_len_type,
{ "Type", "lbmr.opt.len.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_len_len,
{ "Length", "lbmr.opt.len.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_len_total_len,
{ "Total Length", "lbmr.opt.len.total_len", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_src_id,
{ "Source ID Option", "lbmr.opt.src_id", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_src_id_type,
{ "Type", "lbmr.opt.src_id.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_src_id_len,
{ "Length", "lbmr.opt.src_id.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_src_id_flags,
{ "Flags", "lbmr.opt.src_id.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_src_id_flags_ignore,
{ "Ignore", "lbmr.opt.src_id.flags.ignore", FT_BOOLEAN, L_LBMR_LBMR_OPT_SRC_ID_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_LBMR_OPT_SRC_ID_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_opt_src_id_src_id,
{ "Source ID", "lbmr.opt.src_id.src_id", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_src_type,
{ "Source Type Option", "lbmr.opt.src_type", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_src_type_type,
{ "Type", "lbmr.opt.src_type.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_src_type_len,
{ "Length", "lbmr.opt.src_type.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_src_type_flags,
{ "Flags", "lbmr.opt.src_type.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_src_type_flags_ignore,
{ "Ignore", "lbmr.opt.src_type.flags.ignore", FT_BOOLEAN, L_LBMR_LBMR_OPT_SRC_TYPE_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_LBMR_OPT_SRC_TYPE_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_opt_src_type_src_type,
{ "Source Type", "lbmr.opt.src_type.src_type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_option_source_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_version,
{ "Version Option", "lbmr.opt.version", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_version_type,
{ "Type", "lbmr.opt.version.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_version_len,
{ "Length", "lbmr.opt.version.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_version_flags,
{ "Flags", "lbmr.opt.version.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_version_flags_ignore,
{ "Ignore", "lbmr.opt.version.flags.ignore", FT_BOOLEAN, L_LBMR_LBMR_OPT_VERSION_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_LBMR_OPT_VERSION_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_opt_version_flags_ume,
{ "UME Capable", "lbmr.opt.version.flags.ume", FT_BOOLEAN, L_LBMR_LBMR_OPT_VERSION_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_LBMR_OPT_VERSION_FLAG_UME, "Set if UME capable", HFILL } },
{ &hf_lbmr_opt_version_flags_umq,
{ "UMQ Capable", "lbmr.opt.version.flags.umq", FT_BOOLEAN, L_LBMR_LBMR_OPT_VERSION_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_LBMR_OPT_VERSION_FLAG_UMQ, "Set if UMQ capable", HFILL } },
{ &hf_lbmr_opt_version_version,
{ "Version", "lbmr.opt.version.version", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_local_domain,
{ "Local Domain Option", "lbmr.opt.local_domain", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_local_domain_type,
{ "Type", "lbmr.opt.local_domain.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_local_domain_len,
{ "Length", "lbmr.opt.local_domain.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_local_domain_flags,
{ "Flags", "lbmr.opt.local_domain.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_local_domain_flags_ignore,
{ "Ignore", "lbmr.opt.local_domain.flags.ignore", FT_BOOLEAN, L_LBMR_LBMR_OPT_LOCAL_DOMAIN_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_LBMR_OPT_VERSION_FLAG_IGNORE, NULL, HFILL } },
{ &hf_lbmr_opt_local_domain_local_domain_id,
{ "Local Domain ID", "lbmr.opt.local_domain.local_domain_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_unknown,
{ "Unknown ID Option", "lbmr.opt.unknown", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_unknown_type,
{ "Type", "lbmr.opt.unknown.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_unknown_len,
{ "Length", "lbmr.opt.unknown.len", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_unknown_flags,
{ "Flags", "lbmr.opt.unknown.flags", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_opt_unknown_data,
{ "Data", "lbmr.opt.unknown.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topic_res_request_flags,
{ "Flags", "lbmr.topic_res_request.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_topic_res_request_flags_gw_remote_interest,
{ "Gateway Remote Interest", "lbmr.topic_res_request.flags.gw_remote_interest", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_GW_REMOTE_INTEREST, "Set if gateway remote interest is requested", HFILL } },
{ &hf_lbmr_topic_res_request_flags_context_query,
{ "Context Queries", "lbmr.topic_res_request.flags.context_query", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_CONTEXT_QUERY, "Set if context queries are requested", HFILL } },
{ &hf_lbmr_topic_res_request_flags_context_advertisement,
{ "Context Advertisements", "lbmr.topic_res_request.flags.context_advertisement", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_CONTEXT_ADVERTISEMENT, "Set if context advertisements are requested", HFILL } },
{ &hf_lbmr_topic_res_request_flags_gateway_meta,
{ "Gateway Meta Flag", "lbmr.topic_res_request.flags.gateway_meta", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_RESERVED1, NULL, HFILL } },
{ &hf_lbmr_topic_res_request_flags_advertisement,
{ "Advertisements", "lbmr.topic_res_request.flags.advertisement", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_ADVERTISEMENT, "Set if advertisements are requested", HFILL } },
{ &hf_lbmr_topic_res_request_flags_query,
{ "Queries", "lbmr.topic_res_request.flags.query", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_QUERY, "Set if queries are requested", HFILL } },
{ &hf_lbmr_topic_res_request_flags_wildcard_query,
{ "Wildcard Queries", "lbmr.topic_res_request.flags.wildcard_query", FT_BOOLEAN, 8 * L_LBMR_TOPIC_RES_REQUEST_T_FLAGS, TFS(&tfs_set_notset), LBM_TOPIC_RES_REQUEST_WILDCARD_QUERY, "Set if wildcard queries are requested", HFILL } },
{ &hf_lbmr_ctxinfo_len,
{ "Length", "lbmr.ctxinfo.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_ctxinfo_hop_count,
{ "Hop Count", "lbmr.ctxinfo.hop_count", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_ctxinfo_flags,
{ "Flags", "lbmr.ctxinfo.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_ctxinfo_flags_query,
{ "Query", "lbmr.ctxinfo.flags.query", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LBMR_CTXINFO_QUERY_FLAG, "Set if query, clear if response", HFILL } },
{ &hf_lbmr_ctxinfo_flags_ip,
{ "IP Address", "lbmr.ctxinfo.flags.ip", FT_BOOLEAN, 16, TFS(&tfs_present_not_present), LBMR_CTXINFO_IP_FLAG, "Set if IP address is included", HFILL } },
{ &hf_lbmr_ctxinfo_flags_instance,
{ "Instance", "lbmr.ctxinfo.flags.instance", FT_BOOLEAN, 16, TFS(&tfs_present_not_present), LBMR_CTXINFO_INSTANCE_FLAG, "Set if context instance is included", HFILL } },
{ &hf_lbmr_ctxinfo_flags_tnwg_src,
{ "Gateway Source", "lbmr.ctxinfo.flags.tnwg_src", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LBMR_CTXINFO_TNWG_SRC_FLAG, "Set if a gateway source", HFILL } },
{ &hf_lbmr_ctxinfo_flags_tnwg_rcv,
{ "Gateway Receiver", "lbmr.ctxinfo.flags.tnwg_rcv", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LBMR_CTXINFO_TNWG_RCV_FLAG, "Set if a gateway receiver", HFILL } },
{ &hf_lbmr_ctxinfo_flags_proxy,
{ "Proxy", "lbmr.ctxinfo.flags.proxy", FT_BOOLEAN, 16, TFS(&tfs_set_notset), LBMR_CTXINFO_PROXY_FLAG, "Set if a proxy for another context", HFILL } },
{ &hf_lbmr_ctxinfo_flags_name,
{ "Name", "lbmr.ctxinfo.flags.name", FT_BOOLEAN, 16, TFS(&tfs_present_not_present), LBMR_CTXINFO_NAME_FLAG, "Set if context name is included", HFILL } },
{ &hf_lbmr_ctxinfo_port,
{ "Port", "lbmr.ctxinfo.port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_ctxinfo_ip,
{ "IP Address", "lbmr.ctxinfo.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_ctxinfo_instance,
{ "Instance", "lbmr.ctxinfo.instance", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_ctxinfo_name,
{ "Name", "lbmr.ctxinfo.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_len,
{ "Length", "lbmr.tnwg.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_type,
{ "Type", "lbmr.tnwg.type", FT_UINT16, BASE_DEC_HEX, VALS(lbmr_tnwg_function_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_reserved,
{ "Reserved", "lbmr.tnwg.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_interest,
{ "Interest", "lbmr.tnwg.interest", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_interest_len,
{ "Length", "lbmr.tnwg.interest.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_interest_count,
{ "Record Count", "lbmr.tnwg.interest.count", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_interest_rec,
{ "Interest Record", "lbmr.tnwg.interest_rec", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_interest_rec_len,
{ "Length", "lbmr.tnwg.interest_rec.len", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_interest_rec_flags,
{ "Flags", "lbmr.tnwg.interest_rec.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_interest_rec_flags_pattern,
{ "Pattern", "lbmr.tnwg.interest_rec.flags.pattern", FT_BOOLEAN, L_LBMR_TNWG_INTEREST_REC_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TNWG_INTEREST_REC_PATTERN_FLAG, "Set if interest is for a pattern", HFILL } },
{ &hf_lbmr_tnwg_interest_rec_flags_cancel,
{ "Cancel", "lbmr.tnwg.interest_rec.flags.cancel", FT_BOOLEAN, L_LBMR_TNWG_INTEREST_REC_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TNWG_INTEREST_REC_CANCEL_FLAG, "Set if interest is being cancelled", HFILL } },
{ &hf_lbmr_tnwg_interest_rec_flags_refresh,
{ "Refresh", "lbmr.tnwg.interest_rec.flags.refresh", FT_BOOLEAN, L_LBMR_TNWG_INTEREST_REC_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_TNWG_INTEREST_REC_REFRESH_FLAG, "Set if interest is being refreshed", HFILL } },
{ &hf_lbmr_tnwg_interest_rec_pattype,
{ "Pattern Type", "lbmr.tnwg.interest_rec.pattype", FT_UINT8, BASE_DEC_HEX, VALS(lbm_wildcard_pattern_type_short), 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_interest_rec_domain_id,
{ "Domain ID", "lbmr.tnwg.interest_rec.domain_id", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_interest_rec_symbol,
{ "Symbol", "lbmr.tnwg.interest_rec.symbol", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_ctxinfo,
{ "Context Information", "lbmr.tnwg.ctxinfo", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_ctxinfo_len,
{ "Length", "lbmr.tnwg.ctxinfo.len", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_ctxinfo_hop_count,
{ "Hop Count", "lbmr.tnwg.ctxinfo.hop_count", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_ctxinfo_reserved,
{ "Reserved", "lbmr.tnwg.ctxinfo.reserved", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_ctxinfo_flags1,
{ "Flags1", "lbmr.tnwg.ctxinfo.flags1", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_ctxinfo_flags1_query,
{ "Query", "lbmr.tnwg.ctxinfo.flags1.query", FT_BOOLEAN, L_LBMR_TNWG_CTXINFO_T_FLAGS1 * 8, TFS(&tfs_set_notset), LBMR_TNWG_CTXINFO_QUERY_FLAG, "Set if a query, clear if a response", HFILL } },
{ &hf_lbmr_tnwg_ctxinfo_flags1_tnwg_src,
{ "TNWG Source", "lbmr.tnwg.ctxinfo.flags1.tnwg_src", FT_BOOLEAN, L_LBMR_TNWG_CTXINFO_T_FLAGS1 * 8, TFS(&tfs_set_notset), LBMR_TNWG_CTXINFO_TNWG_SRC_FLAG, "Set if a gateway source", HFILL } },
{ &hf_lbmr_tnwg_ctxinfo_flags1_tnwg_rcv,
{ "TNWG Receiver", "lbmr.tnwg.ctxinfo.flags1.tnwg_rcv", FT_BOOLEAN, L_LBMR_TNWG_CTXINFO_T_FLAGS1 * 8, TFS(&tfs_set_notset), LBMR_TNWG_CTXINFO_TNWG_RCV_FLAG, "Set if a gateway receiver", HFILL } },
{ &hf_lbmr_tnwg_ctxinfo_flags1_proxy,
{ "Proxy", "lbmr.tnwg.ctxinfo.flags1.proxy", FT_BOOLEAN, L_LBMR_TNWG_CTXINFO_T_FLAGS1 * 8, TFS(&tfs_set_notset), LBMR_TNWG_CTXINFO_PROXY_FLAG, "Set if a proxy for another context", HFILL } },
{ &hf_lbmr_tnwg_ctxinfo_flags2,
{ "Flags2", "lbmr.tnwg.ctxinfo.flags2", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_trreq,
{ "Topic Res Request", "lbmr.tnwg.trreq", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_trreq_len,
{ "Length", "lbmr.tnwg.trreq.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt,
{ "Unknown Option", "lbmr.tnwg.opt", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_type,
{ "Type", "lbmr.tnwg.opt.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_tnwg_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_len,
{ "Length", "lbmr.tnwg.opt.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_flags,
{ "Flags", "lbmr.tnwg.opt.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_flags_ignore,
{ "Ignore", "lbmr.tnwg.opt.flags.ignore", FT_BOOLEAN, L_LBMR_TNWG_OPT_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TNWG_OPT_IGNORE_FLAG, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_data,
{ "Data", "lbmr.tnwg.opt.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_ctxinst,
{ "Context Instance Option", "lbmr.tnwg.opt_ctxinst", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_ctxinst_type,
{ "Type", "lbmr.tnwg.opt_ctxinst.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_tnwg_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_ctxinst_len,
{ "Length", "lbmr.tnwg.opt_ctxinst.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_ctxinst_flags,
{ "Flags", "lbmr.tnwg.opt_ctxinst.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_ctxinst_flags_ignore,
{ "Ignore", "lbmr.tnwg.opt_ctxinst.flags.ignore", FT_BOOLEAN, L_LBMR_TNWG_OPT_CTXINST_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TNWG_OPT_IGNORE_FLAG, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_ctxinst_instance,
{ "Context Instance", "lbmr.tnwg.opt_ctxinst.instance", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_address,
{ "Address Option", "lbmr.tnwg.opt_address", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_address_type,
{ "Type", "lbmr.tnwg.opt_address.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_tnwg_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_address_len,
{ "Length", "lbmr.tnwg.opt_address.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_address_flags,
{ "Flags", "lbmr.tnwg.opt_address.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_address_flags_ignore,
{ "Ignore", "lbmr.tnwg.opt_address.flags.ignore", FT_BOOLEAN, L_LBMR_TNWG_OPT_ADDRESS_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TNWG_OPT_IGNORE_FLAG, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_address_port,
{ "Port", "lbmr.tnwg.opt_address.port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_address_res,
{ "Reserved", "lbmr.tnwg.opt_address.res", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_address_ip,
{ "IP Address", "lbmr.tnwg.opt_address.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_domain,
{ "Domain Option", "lbmr.tnwg.opt_domain", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_domain_type,
{ "Type", "lbmr.tnwg.opt_domain.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_tnwg_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_domain_len,
{ "Length", "lbmr.tnwg.opt_domain.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_domain_flags,
{ "Flags", "lbmr.tnwg.opt_domain.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_domain_flags_ignore,
{ "Ignore", "lbmr.tnwg.opt_domain.flags.ignore", FT_BOOLEAN, L_LBMR_TNWG_OPT_DOMAIN_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TNWG_OPT_IGNORE_FLAG, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_domain_domain_id,
{ "Domain ID", "lbmr.tnwg.opt_domain.domain_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_name,
{ "Name Option", "lbmr.tnwg.opt_name", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_name_type,
{ "Type", "lbmr.tnwg.opt_name.type", FT_UINT8, BASE_HEX_DEC, VALS(lbmr_tnwg_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_name_len,
{ "Length", "lbmr.tnwg.opt_name.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_name_flags,
{ "Flags", "lbmr.tnwg.opt_name.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_name_flags_ignore,
{ "Ignore", "lbmr.tnwg.opt_name.flags.ignore", FT_BOOLEAN, L_LBMR_TNWG_OPT_T_FLAGS * 8, TFS(&lbm_ignore_flag), LBMR_TNWG_OPT_IGNORE_FLAG, NULL, HFILL } },
{ &hf_lbmr_tnwg_opt_name_name,
{ "Name", "lbmr.tnwg.opt_name.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_remote_domain_route_hdr_num_domains,
{ "Number of Domains", "lbmr.remote_domain_route.num_domains", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_remote_domain_route_hdr_ip,
{ "IP Address", "lbmr.remote_domain_route.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_remote_domain_route_hdr_port,
{ "Port", "lbmr.remote_domain_route.port", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_remote_domain_route_hdr_reserved,
{ "Reserved", "lbmr.remote_domain_route.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_remote_domain_route_hdr_length,
{ "Length", "lbmr.remote_domain_route.length", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_remote_domain_route_hdr_domain,
{ "Domain", "lbmr.remote_domain_route.domain", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_len,
{ "Length", "lbmr.rctxinfo.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_num_recs,
{ "Number of Records", "lbmr.rctxinfo.num_recs", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_reserved,
{ "Reserved", "lbmr.rctxinfo.reserved", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec,
{ "Remote Context Information Record", "lbmr.rctxinfo.rec", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_len,
{ "Length", "lbmr.rctxinfo.rec.len", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_flags,
{ "Flags", "lbmr.rctxinfo.rec.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_flags_query,
{ "Query", "lbmr.rctxinfo.rec.flags.query", FT_BOOLEAN, L_LBMR_RCTXINFO_REC_T_FLAGS * 8, TFS(&tfs_set_notset), LBMR_RCTXINFO_REC_FLAG_QUERY, "Set if a query, clear if a response", HFILL } },
{ &hf_lbmr_rctxinfo_rec_address,
{ "Address Option", "lbmr.rctxinfo.rec.address", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_address_type,
{ "Type", "lbmr.rctxinfo.rec.address.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_rctxinfo_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_address_len,
{ "Length", "lbmr.rctxinfo.rec.address.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_address_flags,
{ "Flags", "lbmr.rctxinfo.rec.address.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_address_domain_id,
{ "Domain ID", "lbmr.rctxinfo.rec.address.domain_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_address_ip,
{ "Address", "lbmr.rctxinfo.rec.address.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_address_port,
{ "Port", "lbmr.rctxinfo.rec.address.port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_address_res,
{ "Reserved", "lbmr.rctxinfo.rec.address.res", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_instance,
{ "Instance Option", "lbmr.rctxinfo.rec.instance", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_instance_type,
{ "Type", "lbmr.rctxinfo.rec.instance.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_rctxinfo_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_instance_len,
{ "Length", "lbmr.rctxinfo.rec.instance.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_instance_flags,
{ "Flags", "lbmr.rctxinfo.rec.instance.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_instance_instance,
{ "Instance", "lbmr.rctxinfo.rec.instance.instance", FT_BYTES, FT_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_odomain,
{ "Originating Domain Option", "lbmr.rctxinfo.rec.odomain", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_odomain_type,
{ "Type", "lbmr.rctxinfo.rec.odomain.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_rctxinfo_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_odomain_len,
{ "Length", "lbmr.rctxinfo.rec.odomain.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_odomain_flags,
{ "Flags", "lbmr.rctxinfo.rec.odomain.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_odomain_domain_id,
{ "Domain ID", "lbmr.rctxinfo.rec.odomain.domain_id", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_name,
{ "Name Option", "lbmr.rctxinfo.rec.name", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_name_type,
{ "Type", "lbmr.rctxinfo.rec.name.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_rctxinfo_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_name_len,
{ "Length", "lbmr.rctxinfo.rec.name.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_name_flags,
{ "Flags", "lbmr.rctxinfo.rec.name.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_name_name,
{ "Name", "lbmr.rctxinfo.rec.name.name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_unknown,
{ "Unknown Option", "lbmr.rctxinfo.rec.unknown", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_unknown_type,
{ "Type", "lbmr.rctxinfo.rec.unknown.type", FT_UINT8, BASE_DEC_HEX, VALS(lbmr_rctxinfo_option_type), 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_unknown_len,
{ "Length", "lbmr.rctxinfo.rec.unknown.len", FT_UINT8, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_unknown_flags,
{ "Flags", "lbmr.rctxinfo.rec.unknown.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_lbmr_rctxinfo_rec_unknown_data,
{ "Data", "lbmr.rctxinfo.rec.unknown.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_flags,
{ "Flags", "lbmr.qmgmt.flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_flags_i_flag,
{ "Ignore", "lbmr.qmgmt.flags.i_flag", FT_BOOLEAN, L_UMQ_QMGMT_HDR_T_FLAGS * 8, TFS(&lbm_ignore_flag), UMQ_QMGMT_HDR_I_FLAG, NULL, HFILL } },
{ &hf_qmgmt_flags_n_flag,
{ "Queue Name", "lbmr.qmgmt.flags.n_flag", FT_BOOLEAN, L_UMQ_QMGMT_HDR_T_FLAGS * 8, TFS(&tfs_present_not_present), UMQ_QMGMT_HDR_N_FLAG, "Set if queue name is present", HFILL } },
{ &hf_qmgmt_flags_il_l_flag,
{ "New Instance List", "lbmr.qmgmt.flags.il_l_flag", FT_BOOLEAN, L_UMQ_QMGMT_HDR_T_FLAGS * 8, TFS(&tfs_set_notset), UMQ_QMGMT_HDR_IL_L_FLAG, "Set if contains a new instance list", HFILL } },
{ &hf_qmgmt_flags_il_k_flag,
{ "Keepalive Requested", "lbmr.qmgmt.flags.il_k_flag", FT_BOOLEAN, L_UMQ_QMGMT_HDR_T_FLAGS * 8, TFS(&tfs_set_notset), UMQ_QMGMT_HDR_IL_K_FLAG, "Set if a keepalive requester", HFILL } },
{ &hf_qmgmt_pckt_type,
{ "Packet Type", "lbmr.qmgmt.pckt_type", FT_UINT8, BASE_HEX_DEC, VALS(umq_qmgmt_packet_type), 0x0, NULL, HFILL } },
{ &hf_qmgmt_cfgsig,
{ "Configuration Signature", "lbmr.qmgmt.cfg_sig", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_queue_id,
{ "Queue ID", "lbmr.qmgmt.queue_id", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_queue_ver,
{ "Queue Version", "lbmr.qmgmt.queue_ver", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_ip,
{ "IP Address", "lbmr.qmgmt.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_port,
{ "Port", "lbmr.qmgmt.port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_inst_idx,
{ "Instance Index", "lbmr.qmgmt.inst_idx", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_grp_idx,
{ "Group Index", "lbmr.qmgmt.grp_idx", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_pckt_type_dep16,
{ "Packet-Type Dependent Data", "lbmr.qmgmt.pckt_type_dep16", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_il_num_insts,
{ "Number of IL Instances", "lbmr.qmgmt.il_num_insts", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_jrej_code,
{ "Join Rejection Code", "lbmr.qmgmt.jrej_code", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_ev_bias,
{ "EV Bias", "lbmr.qmgmt.ev_bias", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_il,
{ "Instance List Header", "lbmr.qmgmt.il", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_il_highest_rcr_tsp,
{ "Highest RCR TSP", "lbmr.qmgmt.il.highest_rcr_tsp", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_il_inst,
{ "Instance Header", "lbmr.qmgmt.il_inst", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_il_inst_ip,
{ "IP", "lbmr.qmgmt.il_inst.ip", FT_IPv4, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_il_inst_port,
{ "Port", "lbmr.qmgmt.il_inst.port", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_il_inst_inst_idx,
{ "Instance Index", "lbmr.qmgmt.il_inst.inst_idx", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_il_inst_grp_idx,
{ "Group Index", "lbmr.qmgmt.il_inst.grp_idx", FT_UINT16, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_il_inst_flags,
{ "Flags", "lbmr.qmgmt.il_inst.flags", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_il_inst_flags_m_flag,
{ "Master", "lbmr.qmgmt.il_inst.flags.m_flag", FT_BOOLEAN, L_UMQ_QMGMT_IL_INST_HDR_T_FLAGS * 8, TFS(&tfs_set_notset), UMQ_QMGMT_HDR_IL_INST_M_FLAG, "Set if the master queue", HFILL } },
{ &hf_qmgmt_il_inst_flags_q_flag,
{ "Queue Election Master", "lbmr.qmgmt.il_inst.flags.q_flag", FT_BOOLEAN, L_UMQ_QMGMT_IL_INST_HDR_T_FLAGS * 8, TFS(&tfs_set_notset), UMQ_QMGMT_HDR_IL_INST_Q_FLAG, "Set if a queue election master", HFILL } },
{ &hf_qmgmt_il_inst_flags_p_flag,
{ "Post Election Master", "lbmr.qmgmt.il_inst.flags.p_flag", FT_BOOLEAN, L_UMQ_QMGMT_IL_INST_HDR_T_FLAGS * 8, TFS(&tfs_set_notset), UMQ_QMGMT_HDR_IL_INST_P_FLAG, "Set if a post election master", HFILL } },
{ &hf_qmgmt_ec,
{ "Election Call Header", "lbmr.qmgmt.ec", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_ec_queue_new_ver,
{ "Queue New Version", "lbmr.qmgmt.ec.queue_new_ver", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_ev,
{ "Election Vote Header", "lbmr.qmgmt.ev", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_ev_highest_rcr_tsp,
{ "Highest RCR TSP", "lbmr.qmgmt.ev.highest_rcr_tsp", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_ev_age,
{ "Age", "lbmr.qmgmt.ev.age", FT_UINT32, BASE_DEC_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_qro,
{ "Queue Resume Operation Header", "lbmr.qmgmt.qro", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_qro_highest_rcr_tsp,
{ "Highest RCR TSP", "lbmr.qmgmt.qro.highest_rcr_tsp", FT_UINT32, BASE_HEX_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_qmgmt_qname,
{ "Queue Name", "lbmr.qmgmt.qname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } }
};
static gint * ett[] =
{
&ett_lbmr,
&ett_lbmr_hdr,
&ett_lbmr_opts,
&ett_lbmr_opt_src_id,
&ett_lbmr_opt_src_id_flags,
&ett_lbmr_opt_len,
&ett_lbmr_opt_src_type,
&ett_lbmr_opt_src_type_flags,
&ett_lbmr_opt_version,
&ett_lbmr_opt_version_flags,
&ett_lbmr_opt_local_domain,
&ett_lbmr_opt_local_domain_flags,
&ett_lbmr_opt_unknown,
&ett_lbmr_tqrs,
&ett_lbmr_tqr,
&ett_lbmr_tirs,
&ett_lbmr_tir,
&ett_lbmr_tir_tcp,
&ett_lbmr_tir_lbtrm,
&ett_lbmr_tir_lbtru,
&ett_lbmr_tir_lbtipc,
&ett_lbmr_tir_lbtrdma,
&ett_lbmr_tir_lbtsmx,
&ett_lbmr_topts,
&ett_lbmr_topt_len,
&ett_lbmr_topt_ume,
&ett_lbmr_topt_ume_flags,
&ett_lbmr_topt_ume_store,
&ett_lbmr_topt_ume_store_flags,
&ett_lbmr_topt_ume_store_group,
&ett_lbmr_topt_ume_store_group_flags,
&ett_lbmr_topt_latejoin,
&ett_lbmr_topt_latejoin_flags,
&ett_lbmr_topt_umq_rcridx,
&ett_lbmr_topt_umq_rcridx_flags,
&ett_lbmr_topt_umq_qinfo,
&ett_lbmr_topt_umq_qinfo_flags,
&ett_lbmr_topt_cost,
&ett_lbmr_topt_cost_flags,
&ett_lbmr_topt_otid,
&ett_lbmr_topt_otid_flags,
&ett_lbmr_topt_ctxinst,
&ett_lbmr_topt_ctxinst_flags,
&ett_lbmr_topt_ctxinsts,
&ett_lbmr_topt_ctxinsts_flags,
&ett_lbmr_topt_ulb,
&ett_lbmr_topt_ulb_flags,
&ett_lbmr_topt_ctxinstq,
&ett_lbmr_topt_ctxinstq_flags,
&ett_lbmr_topt_domain_id,
&ett_lbmr_topt_domain_id_flags,
&ett_lbmr_topt_exfunc,
&ett_lbmr_topt_exfunc_flags,
&ett_lbmr_topt_exfunc_functionality_flags,
&ett_lbmr_topt_unknown,
&ett_lbmr_tmb,
&ett_lbmr_tmrs,
&ett_lbmr_tmr,
&ett_lbmr_tmr_flags,
&ett_lbmr_pser_flags,
&ett_lbmr_pser_opts,
&ett_lbmr_pser_opt_len,
&ett_lbmr_pser_opt_ctxinst,
&ett_lbmr_qqrs,
&ett_lbmr_qirs,
&ett_lbmr_qir,
&ett_lbmr_qir_options,
&ett_lbmr_qir_grp_blk,
&ett_lbmr_qir_queue_blk,
&ett_lbmr_qir_grp,
&ett_lbmr_qir_queue,
&ett_lbmr_topic_res_request_flags,
&ett_lbmr_ctxinfo_flags,
&ett_lbmr_tnwg,
&ett_lbmr_tnwg_interest,
&ett_lbmr_tnwg_interest_rec,
&ett_lbmr_tnwg_interest_rec_flags,
&ett_lbmr_tnwg_ctxinfo,
&ett_lbmr_tnwg_ctxinfo_flags1,
&ett_lbmr_tnwg_trreq,
&ett_lbmr_tnwg_ctxinst_opt,
&ett_lbmr_tnwg_ctxinst_opt_flags,
&ett_lbmr_tnwg_address_opt,
&ett_lbmr_tnwg_address_opt_flags,
&ett_lbmr_tnwg_domain_opt,
&ett_lbmr_tnwg_domain_opt_flags,
&ett_lbmr_tnwg_name_opt,
&ett_lbmr_tnwg_name_opt_flags,
&ett_lbmr_tnwg_unknown_opt,
&ett_lbmr_tnwg_unknown_opt_flags,
&ett_lbmr_remote_domain_route_hdr,
&ett_lbmr_rctxinfo,
&ett_lbmr_rctxinfo_rec,
&ett_lbmr_rctxinfo_rec_flags,
&ett_lbmr_rctxinfo_rec_address,
&ett_lbmr_rctxinfo_rec_instance,
&ett_lbmr_rctxinfo_rec_odomain,
&ett_lbmr_rctxinfo_rec_name,
&ett_lbmr_rctxinfo_rec_unknown,
&ett_qmgmt_flags,
&ett_qmgmt_il,
&ett_qmgmt_il_inst,
&ett_qmgmt_il_inst_flags,
&ett_qmgmt_ec,
&ett_qmgmt_ev,
&ett_qmgmt_qro
};
static ei_register_info ei[] =
{
{ &ei_lbmr_analysis_length_incorrect, { "lbmr.analysis.length_incorrect", PI_MALFORMED, PI_ERROR, "Header length incorrect", EXPFILL } },
{ &ei_lbmr_analysis_invalid_value, { "lbmr.analysis.invalid_value", PI_UNDECODED, PI_WARN, "Invalid value", EXPFILL } },
{ &ei_lbmr_analysis_zero_len_option, { "lbmr.analysis.zero_len_option", PI_MALFORMED, PI_ERROR, "Zero-length LBMR option", EXPFILL } },
};
module_t * lbmr_module;
struct in_addr addr;
uat_t * tag_uat;
expert_module_t * expert_lbmr;
proto_lbmr = proto_register_protocol("LBM Topic Resolution Protocol",
"LBMR", "lbmr");
proto_register_field_array(proto_lbmr, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
expert_lbmr = expert_register_protocol(proto_lbmr);
expert_register_field_array(expert_lbmr, ei, array_length(ei));
lbmr_module = prefs_register_protocol_subtree("29West", proto_lbmr, proto_reg_handoff_lbmr);
prefs_register_uint_preference(lbmr_module,
"mc_incoming_port",
"Incoming multicast UDP port (default " LBMR_DEFAULT_MC_INCOMING_UDP_PORT_STRING ")",
"Set the UDP port for incoming multicast topic resolution (context resolver_multicast_incoming_port)",
10,
&global_lbmr_mc_incoming_udp_port);
inet_aton(LBMR_DEFAULT_MC_INCOMING_ADDRESS, &addr);
lbmr_mc_incoming_address_host = g_ntohl(addr.s_addr);
prefs_register_string_preference(lbmr_module,
"mc_incoming_address",
"Incoming multicast address (default " LBMR_DEFAULT_MC_INCOMING_ADDRESS ")",
"Set the multicast address for incoming multicast topic resolution (context resolver_multicast_incoming_address)",
&global_lbmr_mc_incoming_address);
prefs_register_uint_preference(lbmr_module,
"mc_outgoing_port",
"Outgoing multicast UDP port (default " LBMR_DEFAULT_MC_OUTGOING_UDP_PORT_STRING ")",
"Set the UDP port for outgoing multicast topic resolution (context resolver_multicast_outgoing_port)",
10,
&global_lbmr_mc_outgoing_udp_port);
inet_aton(LBMR_DEFAULT_MC_OUTGOING_ADDRESS, &addr);
lbmr_mc_outgoing_address_host = g_ntohl(addr.s_addr);
prefs_register_string_preference(lbmr_module,
"mc_outgoing_address",
"Outgoing multicast address (default " LBMR_DEFAULT_MC_OUTGOING_ADDRESS ")",
"Set the multicast address for outgoing multicast topic resolution (context resolver_multicast_outgoing_address)",
&global_lbmr_mc_outgoing_address);
prefs_register_uint_preference(lbmr_module,
"uc_port_low",
"Unicast UDP port low (default " LBMR_DEFAULT_UC_PORT_LOW_STRING ")",
"Set the low UDP port for unicast topic resolution (context resolver_unicast_port_low)",
10,
&global_lbmr_uc_port_low);
prefs_register_uint_preference(lbmr_module,
"uc_port_high",
"Unicast UDP port high (default " LBMR_DEFAULT_UC_PORT_HIGH_STRING ")",
"Set the high UDP port for unicast topic resolution (context resolver_unicast_port_high)",
10,
&global_lbmr_uc_port_high);
prefs_register_uint_preference(lbmr_module,
"uc_dest_port",
"Unicast UDP destination port (default " LBMR_DEFAULT_UC_DEST_PORT_STRING ")",
"Set the destination port for unicast topic resolution (context resolver_unicast_destination_port)",
10,
&global_lbmr_uc_dest_port);
inet_aton(LBMR_DEFAULT_UC_ADDRESS, &addr);
lbmr_uc_address_host = g_ntohl(addr.s_addr);
prefs_register_string_preference(lbmr_module,
"uc_address",
"Unicast resolver address (default " LBMR_DEFAULT_UC_ADDRESS ")",
"Set the address of the unicast resolver daemon (context resolver_unicast_address)",
&global_lbmr_uc_address);
prefs_register_bool_preference(lbmr_module,
"use_lbmr_domain",
"Use LBMR tag table",
"Use table of LBMR tags to decode the packet instead of above values",
&global_lbmr_use_tag);
tag_uat = uat_new("LBMR tag definitions",
sizeof(lbmr_tag_entry_t),
"lbmr_domains",
TRUE,
(void * *)&lbmr_tag_entry,
&lbmr_tag_count,
UAT_AFFECTS_DISSECTION,
NULL,
lbmr_tag_copy_cb,
lbmr_tag_update_cb,
lbmr_tag_free_cb,
NULL,
lbmr_tag_array);
prefs_register_uat_preference(lbmr_module,
"tnw_lbmr_tags",
"LBMR Tags",
"A table to define LBMR tags",
tag_uat);
lbmr_topic_advertisement_tap_handle = register_tap(LBMR_TOPIC_ADVERTISEMENT_TAP_STRING);
lbmr_topic_query_tap_handle = register_tap(LBMR_TOPIC_QUERY_TAP_STRING);
lbmr_pattern_query_tap_handle = register_tap(LBMR_PATTERN_QUERY_TAP_STRING);
lbmr_queue_advertisement_tap_handle = register_tap(LBMR_QUEUE_ADVERTISEMENT_TAP_STRING);
lbmr_queue_query_tap_handle = register_tap(LBMR_QUEUE_QUERY_TAP_STRING);
stats_tree_register(LBMR_TOPIC_ADVERTISEMENT_TAP_STRING,
"lbmr_topic_ads_topic",
lbmr_stat_tree_name_topic_ads_topic,
0,
lbmr_topic_ads_topic_stats_tree_packet,
lbmr_topic_ads_topic_stats_tree_init,
NULL);
stats_tree_register(LBMR_TOPIC_ADVERTISEMENT_TAP_STRING,
"lbmr_topic_ads_source",
lbmr_stat_tree_name_topic_ads_source,
0,
lbmr_topic_ads_source_stats_tree_packet,
lbmr_topic_ads_source_stats_tree_init,
NULL);
stats_tree_register(LBMR_TOPIC_ADVERTISEMENT_TAP_STRING,
"lbmr_topic_ads_transport",
lbmr_stat_tree_name_topic_ads_transport,
0,
lbmr_topic_ads_transport_stats_tree_packet,
lbmr_topic_ads_transport_stats_tree_init,
NULL);
stats_tree_register(LBMR_TOPIC_QUERY_TAP_STRING,
"lbmr_topic_queries_topic",
lbmr_stat_tree_name_topic_queries_topic,
0,
lbmr_topic_queries_topic_stats_tree_packet,
lbmr_topic_queries_topic_stats_tree_init,
NULL);
stats_tree_register(LBMR_TOPIC_QUERY_TAP_STRING,
"lbmr_topic_queries_receiver",
lbmr_stat_tree_name_topic_queries_receiver,
0,
lbmr_topic_queries_receiver_stats_tree_packet,
lbmr_topic_queries_receiver_stats_tree_init,
NULL);
stats_tree_register(LBMR_PATTERN_QUERY_TAP_STRING,
"lbmr_topic_queries_pattern",
lbmr_stat_tree_name_topic_queries_pattern,
0,
lbmr_topic_queries_pattern_stats_tree_packet,
lbmr_topic_queries_pattern_stats_tree_init,
NULL);
stats_tree_register(LBMR_PATTERN_QUERY_TAP_STRING,
"lbmr_topic_queries_pattern_receiver",
lbmr_stat_tree_name_topic_queries_pattern_receiver,
0,
lbmr_topic_queries_pattern_receiver_stats_tree_packet,
lbmr_topic_queries_pattern_receiver_stats_tree_init,
NULL);
stats_tree_register(LBMR_QUEUE_ADVERTISEMENT_TAP_STRING,
"lbmr_queue_ads_queue",
lbmr_stat_tree_name_queue_ads_queue,
0,
lbmr_queue_ads_queue_stats_tree_packet,
lbmr_queue_ads_queue_stats_tree_init,
NULL);
stats_tree_register(LBMR_QUEUE_ADVERTISEMENT_TAP_STRING,
"lbmr_queue_ads_source",
lbmr_stat_tree_name_queue_ads_source,
0,
lbmr_queue_ads_source_stats_tree_packet,
lbmr_queue_ads_source_stats_tree_init,
NULL);
stats_tree_register(LBMR_QUEUE_QUERY_TAP_STRING,
"lbmr_queue_queries_queue",
lbmr_stat_tree_name_queue_queries_queue,
0,
lbmr_queue_queries_queue_stats_tree_packet,
lbmr_queue_queries_queue_stats_tree_init,
NULL);
stats_tree_register(LBMR_QUEUE_QUERY_TAP_STRING,
"lbmr_queue_queries_receiver",
lbmr_stat_tree_name_queue_queries_receiver,
0,
lbmr_queue_queries_receiver_stats_tree_packet,
lbmr_queue_queries_receiver_stats_tree_init,
NULL);
lbm_topic_init();
lbtsmx_transport_init();
lbtipc_transport_init();
lbtrdma_transport_init();
}
/* The registration hand-off routine */
void proto_reg_handoff_lbmr(void)
{
static gboolean already_registered = FALSE;
struct in_addr addr;
if (!already_registered)
{
lbmr_dissector_handle = new_create_dissector_handle(dissect_lbmr, proto_lbmr);
dissector_add_for_decode_as("udp.port", lbmr_dissector_handle);
heur_dissector_add("udp", test_lbmr_packet, "LBM Topic Resolution over UDP", "lbmr_udp", proto_lbmr, HEURISTIC_ENABLE);
}
lbmr_mc_incoming_udp_port = global_lbmr_mc_incoming_udp_port;
lbmr_mc_outgoing_udp_port = global_lbmr_mc_outgoing_udp_port;
inet_aton(global_lbmr_mc_incoming_address, &addr);
lbmr_mc_incoming_address_host = g_ntohl(addr.s_addr);
inet_aton(global_lbmr_mc_outgoing_address, &addr);
lbmr_mc_outgoing_address_host = g_ntohl(addr.s_addr);
/* Make sure the low port is <= the high port. If not, don't change them. */
if (global_lbmr_uc_port_low <= global_lbmr_uc_port_high)
{
lbmr_uc_port_high = global_lbmr_uc_port_high;
lbmr_uc_port_low = global_lbmr_uc_port_low;
}
lbmr_uc_dest_port = global_lbmr_uc_dest_port;
inet_aton(global_lbmr_uc_address, &addr);
lbmr_uc_address_host = g_ntohl(addr.s_addr);
lbmr_use_tag = global_lbmr_use_tag;
already_registered = TRUE;
}
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
* tab-width: 4
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=4 expandtab:
* :indentSize=4:tabSize=4:noTabs=true:
*/
| Java |
package com.rideon.web.security;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.DefaultHttpClient;
import org.springframework.web.client.RestTemplate;
public class ClientAuthenticator {
public ClientAuthenticator() {
super();
}
// API
public static void setAuthentication(final RestTemplate restTemplate, final String username, final String password) {
basicAuth(restTemplate, username, password);
}
private static void basicAuth(final RestTemplate restTemplate, final String username, final String password) {
final HttpComponentsClientHttpRequestFactoryBasicAuth requestFactory =
((HttpComponentsClientHttpRequestFactoryBasicAuth) restTemplate.getRequestFactory());
DefaultHttpClient httpClient = (DefaultHttpClient) requestFactory.getHttpClient();
CredentialsProvider prov = httpClient.getCredentialsProvider();
prov.setCredentials(requestFactory.getAuthScope(), new UsernamePasswordCredentials(username, password));
}
}
| Java |
<?php
namespace TYPO3\CMS\T3editor;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Code completion for t3editor
*/
class CodeCompletion
{
/**
* @var \TYPO3\CMS\Core\Http\AjaxRequestHandler
*/
protected $ajaxObj;
/**
* Default constructor
*/
public function __construct()
{
$GLOBALS['LANG']->includeLLFile('EXT:t3editor/Resources/Private/Language/locallang.xlf');
}
/**
* General processor for AJAX requests.
* Called by AjaxRequestHandler
*
* @param ServerRequestInterface $request
* @param ResponseInterface $response
* @return ResponseInterface
*/
public function processAjaxRequest(ServerRequestInterface $request, ResponseInterface $response)
{
$pageId = (int)(isset($request->getParsedBody()['pageId']) ? $request->getParsedBody()['pageId'] : $request->getQueryParams()['pageId']);
return $this->loadTemplates($pageId);
}
/**
* Loads all templates up to a given page id (walking the rootline) and
* cleans parts that are not required for the t3editor codecompletion.
*
* @param int $pageId ID of the page
* @return ResponseInterface
*/
protected function loadTemplates($pageId)
{
/** @var \TYPO3\CMS\Core\Http\Response $response */
$response = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Http\Response::class);
// Check whether access is granted (only admin have access to sys_template records):
if ($GLOBALS['BE_USER']->isAdmin()) {
// Check whether there is a pageId given:
if ($pageId) {
$response->getBody()->write(json_encode($this->getMergedTemplates($pageId)));
} else {
$response->getBody()->write($GLOBALS['LANG']->getLL('pageIDInteger'));
$response = $response->withStatus(500);
}
} else {
$response->getBody()->write($GLOBALS['LANG']->getLL('noPermission'));
$response = $response->withStatus(500);
}
return $response;
}
/**
* Gets merged templates by walking the rootline to a given page id.
*
* @todo oliver@typo3.org: Refactor this method and comment what's going on there
* @param int $pageId
* @param int $templateId
* @return array Setup part of merged template records
*/
protected function getMergedTemplates($pageId, $templateId = 0)
{
/** @var $tsParser \TYPO3\CMS\Core\TypoScript\ExtendedTemplateService */
$tsParser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::class);
$tsParser->init();
// Gets the rootLine
$page = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\PageRepository::class);
$rootLine = $page->getRootLine($pageId);
// This generates the constants/config + hierarchy info for the template.
$tsParser->runThroughTemplates($rootLine);
// ts-setup & ts-constants of the currently edited template should not be included
// therefor we have to delete the last template from the stack
array_pop($tsParser->config);
array_pop($tsParser->constants);
$tsParser->linkObjects = true;
$tsParser->ext_regLinenumbers = false;
$tsParser->generateConfig();
$result = $this->treeWalkCleanup($tsParser->setup);
return $result;
}
/**
* Walks through a tree of TypoScript configuration an cleans it up.
*
* @TODO oliver@typo3.org: Define and comment why this is necessary and exactly happens below
* @param array $treeBranch TypoScript configuration or sub branch of it
* @return array Cleaned TypoScript branch
*/
private function treeWalkCleanup(array $treeBranch)
{
$cleanedTreeBranch = array();
foreach ($treeBranch as $key => $value) {
$dotCount = substr_count($key, '.');
//type definition or value-assignment
if ($dotCount == 0) {
if ($value != '') {
if (strlen($value) > 20) {
$value = substr($value, 0, 20);
}
if (!isset($cleanedTreeBranch[$key])) {
$cleanedTreeBranch[$key] = array();
}
$cleanedTreeBranch[$key]['v'] = $value;
}
} elseif ($dotCount == 1) {
// subtree (definition of properties)
$subBranch = $this->treeWalkCleanup($value);
if ($subBranch) {
$key = str_replace('.', '', $key);
if (!isset($cleanedTreeBranch[$key])) {
$cleanedTreeBranch[$key] = array();
}
$cleanedTreeBranch[$key]['c'] = $subBranch;
}
}
}
return $cleanedTreeBranch;
}
}
| Java |
# -*- encoding: utf-8 -*-
try:
from httplib import HTTPSConnection
from urlparse import urlparse
except ImportError:
from http.client import HTTPSConnection
from urllib.parse import urlparse
from json import dumps, loads
from django.conf import settings
class GCMError(Exception):
pass
def send(user, message, **kwargs):
"""
Site: https://developers.google.com
API: https://developers.google.com/cloud-messaging/
Desc: Android notifications
"""
headers = {
"Content-type": "application/json",
"Authorization": "key=" + kwargs.pop("gcm_key", settings.GCM_KEY)
}
hook_url = 'https://android.googleapis.com/gcm/send'
data = {
"registration_ids": [user],
"data": {
"title": kwargs.pop("event"),
'message': message,
}
}
data['data'].update(kwargs)
up = urlparse(hook_url)
http = HTTPSConnection(up.netloc)
http.request(
"POST", up.path,
headers=headers,
body=dumps(data))
response = http.getresponse()
if response.status != 200:
raise GCMError(response.reason)
body = response.read()
if loads(body).get("failure") > 0:
raise GCMError(repr(body))
return True
| Java |
<?php
/***************************************************************
* Copyright notice
*
* (c) 2011 Adrien LUCAS (adrien@oblady.fr)
* All rights reserved
*
* This script is part of the TYPO3 project. The Typo3 project 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 GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script 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.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class tx_obladydebug_Reporting_SystemeLog extends tx_obladydebug_Reporting_Base{
public function report($error, $index, $showSource){
$rendering = new tx_obladydebug_Rendering_PlainText;
@error_log($this->classicRendering($error, $rendering), SYSTEM_LOG);
}
public function finish(){}
} | Java |
/* Copyright (c) 2012-2014, 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.
*
*/
#define pr_fmt(fmt) "%s:%s " fmt, KBUILD_MODNAME, __func__
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/mutex.h>
#include <linux/msm_tsens.h>
#include <linux/workqueue.h>
#include <linux/completion.h>
#include <linux/cpu.h>
#include <linux/cpufreq.h>
#include <linux/msm_tsens.h>
#include <linux/msm_thermal.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/sysfs.h>
#include <linux/types.h>
#include <linux/thermal.h>
#include <linux/regulator/rpm-smd-regulator.h>
#include <linux/regulator/consumer.h>
#include <linux/regulator/driver.h>
#include <linux/msm_thermal_ioctl.h>
#include <soc/qcom/rpm-smd.h>
#include <soc/qcom/scm.h>
#include <linux/sched/rt.h>
#define CREATE_TRACE_POINTS
#define TRACE_MSM_THERMAL
#include <trace/trace_thermal.h>
#define MAX_CURRENT_UA 100000
#define MAX_RAILS 5
#define MAX_THRESHOLD 2
#define MONITOR_ALL_TSENS -1
#define TSENS_NAME_MAX 20
#define TSENS_NAME_FORMAT "tsens_tz_sensor%d"
#define THERM_SECURE_BITE_CMD 8
#define SENSOR_SCALING_FACTOR 1
#define CPU_DEVICE "cpu%d"
#define POLLING_DELAY 100
unsigned int temp_threshold = 60;
module_param(temp_threshold, int, 0755);
static struct msm_thermal_data msm_thermal_info;
static struct delayed_work check_temp_work;
static bool core_control_enabled;
static uint32_t cpus_offlined;
static DEFINE_MUTEX(core_control_mutex);
static struct kobject *cc_kobj;
static struct kobject *mx_kobj;
static struct task_struct *hotplug_task;
static struct task_struct *freq_mitigation_task;
static struct task_struct *thermal_monitor_task;
static struct completion hotplug_notify_complete;
static struct completion freq_mitigation_complete;
static struct completion thermal_monitor_complete;
static int enabled;
static int polling_enabled;
static int rails_cnt;
static int sensor_cnt;
static int psm_rails_cnt;
static int ocr_rail_cnt;
static int limit_idx;
static int limit_idx_low;
static int limit_idx_high;
static int max_tsens_num;
static struct cpufreq_frequency_table *table;
static uint32_t usefreq;
static int freq_table_get;
static bool vdd_rstr_enabled;
static bool vdd_rstr_nodes_called;
static bool vdd_rstr_probed;
static bool sensor_info_nodes_called;
static bool sensor_info_probed;
static bool psm_enabled;
static bool psm_nodes_called;
static bool psm_probed;
static bool freq_mitigation_enabled;
static bool ocr_enabled;
static bool ocr_nodes_called;
static bool ocr_probed;
static bool ocr_reg_init_defer;
static bool hotplug_enabled;
static bool interrupt_mode_enable;
static bool msm_thermal_probed;
static bool gfx_crit_phase_ctrl_enabled;
static bool gfx_warm_phase_ctrl_enabled;
static bool cx_phase_ctrl_enabled;
static bool vdd_mx_enabled;
static bool therm_reset_enabled;
static bool online_core;
static bool cluster_info_probed;
static bool cluster_info_nodes_called;
static int *tsens_id_map;
static DEFINE_MUTEX(vdd_rstr_mutex);
static DEFINE_MUTEX(psm_mutex);
static DEFINE_MUTEX(cx_mutex);
static DEFINE_MUTEX(gfx_mutex);
static DEFINE_MUTEX(ocr_mutex);
static DEFINE_MUTEX(vdd_mx_mutex);
static uint32_t min_freq_limit;
static uint32_t curr_gfx_band;
static uint32_t curr_cx_band;
static struct kobj_attribute cx_mode_attr;
static struct kobj_attribute gfx_mode_attr;
static struct kobj_attribute mx_enabled_attr;
static struct attribute_group cx_attr_gp;
static struct attribute_group gfx_attr_gp;
static struct attribute_group mx_attr_group;
static struct regulator *vdd_mx;
static struct cpufreq_frequency_table *pending_freq_table_ptr;
static int pending_cpu_freq = -1;
static long *tsens_temp_at_panic;
static LIST_HEAD(devices_list);
enum thermal_threshold {
HOTPLUG_THRESHOLD_HIGH,
HOTPLUG_THRESHOLD_LOW,
FREQ_THRESHOLD_HIGH,
FREQ_THRESHOLD_LOW,
THRESHOLD_MAX_NR,
};
enum sensor_id_type {
THERM_ZONE_ID,
THERM_TSENS_ID,
THERM_ID_MAX_NR,
};
struct cluster_info {
int cluster_id;
uint32_t entity_count;
struct cluster_info *child_entity_ptr;
struct cluster_info *parent_ptr;
struct cpufreq_frequency_table *freq_table;
int freq_idx;
int freq_idx_low;
int freq_idx_high;
cpumask_t cluster_cores;
bool sync_cluster;
uint32_t limited_max_freq;
uint32_t limited_min_freq;
};
struct cpu_info {
uint32_t cpu;
const char *sensor_type;
enum sensor_id_type id_type;
uint32_t sensor_id;
bool offline;
bool user_offline;
bool hotplug_thresh_clear;
struct sensor_threshold threshold[THRESHOLD_MAX_NR];
bool max_freq;
uint32_t user_max_freq;
uint32_t user_min_freq;
uint32_t limited_max_freq;
uint32_t limited_min_freq;
bool freq_thresh_clear;
struct cluster_info *parent_ptr;
};
struct threshold_info;
struct therm_threshold {
int32_t sensor_id;
enum sensor_id_type id_type;
struct sensor_threshold threshold[MAX_THRESHOLD];
int32_t trip_triggered;
void (*notify)(struct therm_threshold *);
struct threshold_info *parent;
};
struct threshold_info {
uint32_t thresh_ct;
bool thresh_triggered;
struct therm_threshold *thresh_list;
};
struct rail {
const char *name;
uint32_t freq_req;
uint32_t min_level;
uint32_t num_levels;
int32_t curr_level;
uint32_t levels[3];
struct kobj_attribute value_attr;
struct kobj_attribute level_attr;
struct regulator *reg;
struct attribute_group attr_gp;
};
struct msm_sensor_info {
const char *name;
const char *alias;
const char *type;
uint32_t scaling_factor;
};
struct psm_rail {
const char *name;
uint8_t init;
uint8_t mode;
struct kobj_attribute mode_attr;
struct rpm_regulator *reg;
struct regulator *phase_reg;
struct attribute_group attr_gp;
};
struct devmgr_devices {
struct device_manager_data *hotplug_dev;
struct device_manager_data *cpufreq_dev[NR_CPUS];
};
enum msm_thresh_list {
MSM_THERM_RESET,
MSM_VDD_RESTRICTION,
MSM_CX_PHASE_CTRL_HOT,
MSM_GFX_PHASE_CTRL_WARM,
MSM_GFX_PHASE_CTRL_HOT,
MSM_OCR,
MSM_VDD_MX_RESTRICTION,
MSM_LIST_MAX_NR,
};
enum msm_thermal_phase_ctrl {
MSM_CX_PHASE_CTRL,
MSM_GFX_PHASE_CTRL,
MSM_PHASE_CTRL_NR,
};
enum msm_temp_band {
MSM_COLD_CRITICAL = 1,
MSM_COLD,
MSM_COOL,
MSM_NORMAL,
MSM_WARM,
MSM_HOT,
MSM_HOT_CRITICAL,
MSM_TEMP_MAX_NR,
};
static struct psm_rail *psm_rails;
static struct psm_rail *ocr_rails;
static struct rail *rails;
static struct msm_sensor_info *sensors;
static struct cpu_info cpus[NR_CPUS];
static struct threshold_info *thresh;
static bool mx_restr_applied;
static struct cluster_info *core_ptr;
static struct devmgr_devices *devices;
struct vdd_rstr_enable {
struct kobj_attribute ko_attr;
uint32_t enabled;
};
/* For SMPS only*/
enum PMIC_SW_MODE {
PMIC_AUTO_MODE = RPM_REGULATOR_MODE_AUTO,
PMIC_IPEAK_MODE = RPM_REGULATOR_MODE_IPEAK,
PMIC_PWM_MODE = RPM_REGULATOR_MODE_HPM,
};
enum ocr_request {
OPTIMUM_CURRENT_MIN,
OPTIMUM_CURRENT_MAX,
OPTIMUM_CURRENT_NR,
};
#define SYNC_CORE(_cpu) \
(core_ptr && cpus[_cpu].parent_ptr->sync_cluster)
#define VDD_RES_RO_ATTRIB(_rail, ko_attr, j, _name) \
ko_attr.attr.name = __stringify(_name); \
ko_attr.attr.mode = 0444; \
ko_attr.show = vdd_rstr_reg_##_name##_show; \
ko_attr.store = NULL; \
sysfs_attr_init(&ko_attr.attr); \
_rail.attr_gp.attrs[j] = &ko_attr.attr;
#define VDD_RES_RW_ATTRIB(_rail, ko_attr, j, _name) \
ko_attr.attr.name = __stringify(_name); \
ko_attr.attr.mode = 0644; \
ko_attr.show = vdd_rstr_reg_##_name##_show; \
ko_attr.store = vdd_rstr_reg_##_name##_store; \
sysfs_attr_init(&ko_attr.attr); \
_rail.attr_gp.attrs[j] = &ko_attr.attr;
#define VDD_RSTR_ENABLE_FROM_ATTRIBS(attr) \
(container_of(attr, struct vdd_rstr_enable, ko_attr));
#define VDD_RSTR_REG_VALUE_FROM_ATTRIBS(attr) \
(container_of(attr, struct rail, value_attr));
#define VDD_RSTR_REG_LEVEL_FROM_ATTRIBS(attr) \
(container_of(attr, struct rail, level_attr));
#define OCR_RW_ATTRIB(_rail, ko_attr, j, _name) \
ko_attr.attr.name = __stringify(_name); \
ko_attr.attr.mode = 0644; \
ko_attr.show = ocr_reg_##_name##_show; \
ko_attr.store = ocr_reg_##_name##_store; \
sysfs_attr_init(&ko_attr.attr); \
_rail.attr_gp.attrs[j] = &ko_attr.attr;
#define PSM_RW_ATTRIB(_rail, ko_attr, j, _name) \
ko_attr.attr.name = __stringify(_name); \
ko_attr.attr.mode = 0644; \
ko_attr.show = psm_reg_##_name##_show; \
ko_attr.store = psm_reg_##_name##_store; \
sysfs_attr_init(&ko_attr.attr); \
_rail.attr_gp.attrs[j] = &ko_attr.attr;
#define PSM_REG_MODE_FROM_ATTRIBS(attr) \
(container_of(attr, struct psm_rail, mode_attr));
#define PHASE_RW_ATTR(_phase, _name, _attr, j, _attr_gr) \
_attr.attr.name = __stringify(_name); \
_attr.attr.mode = 0644; \
_attr.show = _phase##_phase_show; \
_attr.store = _phase##_phase_store; \
sysfs_attr_init(&_attr.attr); \
_attr_gr.attrs[j] = &_attr.attr;
#define MX_RW_ATTR(ko_attr, _name, _attr_gp) \
ko_attr.attr.name = __stringify(_name); \
ko_attr.attr.mode = 0644; \
ko_attr.show = show_mx_##_name; \
ko_attr.store = store_mx_##_name; \
sysfs_attr_init(&ko_attr.attr); \
_attr_gp.attrs[0] = &ko_attr.attr;
static struct device_manager_data *find_device_by_name(const char *device_name)
{
struct device_manager_data *dev_mgr = NULL;
list_for_each_entry(dev_mgr, &devices_list, dev_ptr) {
if (strcmp(dev_mgr->device_name, device_name) == 0)
return dev_mgr;
}
return NULL;
}
static int validate_client(struct device_clnt_data *clnt)
{
int ret = 0;
struct device_manager_data *dev_mgr = NULL;
struct device_clnt_data *client_ptr = NULL;
if (!clnt || !clnt->dev_mgr) {
pr_err("Invalid client\n");
ret = -EINVAL;
goto validate_exit;
}
list_for_each_entry(dev_mgr, &devices_list, dev_ptr) {
if (dev_mgr == clnt->dev_mgr)
break;
}
if (dev_mgr != clnt->dev_mgr) {
pr_err("Invalid device manager\n");
ret = -EINVAL;
goto validate_exit;
}
mutex_lock(&dev_mgr->clnt_lock);
list_for_each_entry(client_ptr, &dev_mgr->client_list, clnt_ptr) {
if (clnt == client_ptr)
break;
}
if (clnt != client_ptr) {
pr_err("Invalid client\n");
ret = -EINVAL;
goto validate_unlock;
}
validate_unlock:
mutex_unlock(&dev_mgr->clnt_lock);
validate_exit:
return ret;
}
static int devmgr_client_cpufreq_update(struct device_manager_data *dev_mgr)
{
int ret = 0;
struct device_clnt_data *clnt = NULL;
uint32_t max_freq = UINT_MAX;
uint32_t min_freq = 0;
mutex_lock(&dev_mgr->clnt_lock);
list_for_each_entry(clnt, &dev_mgr->client_list, clnt_ptr) {
if (!clnt->req_active)
continue;
max_freq = min(max_freq, clnt->request.freq.max_freq);
min_freq = max(min_freq, clnt->request.freq.min_freq);
}
if (dev_mgr->active_req.freq.max_freq == max_freq &&
dev_mgr->active_req.freq.min_freq == min_freq) {
goto update_exit;
}
dev_mgr->active_req.freq.max_freq = max_freq;
dev_mgr->active_req.freq.min_freq = min_freq;
if (freq_mitigation_task) {
complete(&freq_mitigation_complete);
} else {
pr_err("Frequency mitigation task is not initialized\n");
ret = -ESRCH;
}
update_exit:
mutex_unlock(&dev_mgr->clnt_lock);
return ret;
}
static int devmgr_client_hotplug_update(struct device_manager_data *dev_mgr)
{
int ret = 0;
struct device_clnt_data *clnt = NULL;
cpumask_t offline_mask = CPU_MASK_NONE;
mutex_lock(&dev_mgr->clnt_lock);
list_for_each_entry(clnt, &dev_mgr->client_list, clnt_ptr) {
if (!clnt->req_active)
continue;
cpumask_or(&offline_mask, &offline_mask,
&clnt->request.offline_mask);
}
if (cpumask_equal(&dev_mgr->active_req.offline_mask, &offline_mask))
goto update_exit;
cpumask_copy(&dev_mgr->active_req.offline_mask, &offline_mask);
if (hotplug_task) {
complete(&hotplug_notify_complete);
} else {
pr_err("Hotplug task is not initialized\n");
ret = -ESRCH;
}
update_exit:
mutex_unlock(&dev_mgr->clnt_lock);
return ret;
}
static int devmgr_hotplug_client_request_validate_and_update(
struct device_clnt_data *clnt,
union device_request *req,
enum device_req_type type)
{
if (type != HOTPLUG_MITIGATION_REQ)
return -EINVAL;
cpumask_copy(&clnt->request.offline_mask, &req->offline_mask);
if (!cpumask_empty(&req->offline_mask))
clnt->req_active = true;
else
clnt->req_active = false;
return 0;
}
static int devmgr_cpufreq_client_request_validate_and_update(
struct device_clnt_data *clnt,
union device_request *req,
enum device_req_type type)
{
if (type != CPUFREQ_MITIGATION_REQ)
return -EINVAL;
if (req->freq.max_freq < req->freq.min_freq) {
pr_err("Invalid Max and Min freq req. max:%u min:%u\n",
req->freq.max_freq, req->freq.min_freq);
return -EINVAL;
}
clnt->request.freq.max_freq = req->freq.max_freq;
clnt->request.freq.min_freq = req->freq.min_freq;
if ((req->freq.max_freq == CPUFREQ_MAX_NO_MITIGATION) &&
(req->freq.min_freq == CPUFREQ_MIN_NO_MITIGATION))
clnt->req_active = false;
else
clnt->req_active = true;
return 0;
}
int devmgr_client_request_mitigation(struct device_clnt_data *clnt,
enum device_req_type type,
union device_request *req)
{
int ret = 0;
struct device_manager_data *dev_mgr = NULL;
if (!clnt || !req) {
pr_err("Invalid inputs for mitigation.\n");
ret = -EINVAL;
goto req_exit;
}
ret = validate_client(clnt);
if (ret) {
pr_err("Invalid mitigation client. ret:%d\n", ret);
goto req_exit;
}
if (!clnt->dev_mgr->request_validate) {
pr_err("Invalid dev mgr request update\n");
ret = -EINVAL;
goto req_exit;
}
dev_mgr = clnt->dev_mgr;
mutex_lock(&dev_mgr->clnt_lock);
ret = dev_mgr->request_validate(clnt, req, type);
if (ret) {
pr_err("Invalid client request\n");
goto req_unlock;
}
req_unlock:
mutex_unlock(&dev_mgr->clnt_lock);
if (!ret && dev_mgr->update)
dev_mgr->update(dev_mgr);
req_exit:
return ret;
}
struct device_clnt_data *devmgr_register_mitigation_client(struct device *dev,
const char *device_name,
void (*callback)(struct device_clnt_data *,
union device_request *, void *))
{
struct device_clnt_data *client = NULL;
struct device_manager_data *dev_mgr = NULL;
if (!dev || !device_name) {
pr_err("Invalid input\n");
return ERR_PTR(-EINVAL);
}
dev_mgr = find_device_by_name(device_name);
if (!dev_mgr) {
pr_err("Invalid device %s\n", device_name);
return ERR_PTR(-EINVAL);
}
client = devm_kzalloc(dev,
sizeof(struct device_clnt_data), GFP_KERNEL);
if (!client) {
pr_err("Memory alloc failed\n");
return ERR_PTR(-ENOMEM);
}
mutex_lock(&dev_mgr->clnt_lock);
client->dev_mgr = dev_mgr;
client->callback = callback;
list_add_tail(&client->clnt_ptr, &dev_mgr->client_list);
mutex_unlock(&dev_mgr->clnt_lock);
return client;
}
void devmgr_unregister_mitigation_client(struct device *dev,
struct device_clnt_data *clnt)
{
int ret = 0;
struct device_manager_data *dev_mgr = NULL;
if (!clnt) {
pr_err("Invalid input\n");
return;
}
ret = validate_client(clnt);
if (ret)
return;
dev_mgr = clnt->dev_mgr;
mutex_lock(&dev_mgr->clnt_lock);
list_del(&clnt->clnt_ptr);
mutex_unlock(&dev_mgr->clnt_lock);
devm_kfree(dev, clnt);
if (dev_mgr->update)
dev_mgr->update(dev_mgr);
}
static int msm_thermal_cpufreq_callback(struct notifier_block *nfb,
unsigned long event, void *data)
{
struct cpufreq_policy *policy = data;
uint32_t max_freq_req, min_freq_req;
switch (event) {
case CPUFREQ_INCOMPATIBLE:
if (SYNC_CORE(policy->cpu)) {
max_freq_req =
cpus[policy->cpu].parent_ptr->limited_max_freq;
min_freq_req =
cpus[policy->cpu].parent_ptr->limited_min_freq;
} else {
max_freq_req = cpus[policy->cpu].limited_max_freq;
min_freq_req = cpus[policy->cpu].limited_min_freq;
}
pr_debug("mitigating CPU%d to freq max: %u min: %u\n",
policy->cpu, max_freq_req, min_freq_req);
cpufreq_verify_within_limits(policy, min_freq_req,
max_freq_req);
if (max_freq_req < min_freq_req)
pr_err("Invalid frequency request Max:%u Min:%u\n",
max_freq_req, min_freq_req);
break;
case CPUFREQ_CREATE_POLICY:
if (pending_cpu_freq != -1 &&
(cpumask_first(policy->related_cpus) ==
pending_cpu_freq)) {
pr_debug("Updating freq plan for cpu: %d\n",
policy->cpu);
pending_freq_table_ptr = cpufreq_frequency_get_table(
policy->cpu);
pending_cpu_freq = -1;
}
break;
}
return NOTIFY_OK;
}
static struct notifier_block msm_thermal_cpufreq_notifier = {
.notifier_call = msm_thermal_cpufreq_callback,
};
static void update_cpu_freq(int cpu)
{
int ret = 0;
if (cpu_online(cpu)) {
trace_thermal_pre_frequency_mit(cpu,
cpus[cpu].limited_max_freq,
cpus[cpu].limited_min_freq);
ret = cpufreq_update_policy(cpu);
trace_thermal_post_frequency_mit(cpu,
cpufreq_quick_get_max(cpu),
cpus[cpu].limited_min_freq);
if (ret)
pr_err("Unable to update policy for cpu:%d. err:%d\n",
cpu, ret);
}
}
static int * __init get_sync_cluster(struct device *dev, int *cnt)
{
int *sync_cluster = NULL, cluster_cnt = 0, ret = 0;
char *key = "qcom,synchronous-cluster-id";
if (!of_get_property(dev->of_node, key, &cluster_cnt)
|| cluster_cnt <= 0 || !core_ptr)
return NULL;
cluster_cnt /= sizeof(__be32);
if (cluster_cnt > core_ptr->entity_count) {
pr_err("Invalid cluster count:%d\n", cluster_cnt);
return NULL;
}
sync_cluster = devm_kzalloc(dev, sizeof(int) * cluster_cnt, GFP_KERNEL);
if (!sync_cluster) {
pr_err("Memory alloc failed\n");
return NULL;
}
ret = of_property_read_u32_array(dev->of_node, key, sync_cluster,
cluster_cnt);
if (ret) {
pr_err("Error in reading property:%s. err:%d\n", key, ret);
devm_kfree(dev, sync_cluster);
return NULL;
}
*cnt = cluster_cnt;
return sync_cluster;
}
static void update_cpu_datastructure(struct cluster_info *cluster_ptr,
int *sync_cluster, int sync_cluster_cnt)
{
int i = 0;
bool is_sync_cluster = false;
for (i = 0; (sync_cluster) && (i < sync_cluster_cnt); i++) {
if (cluster_ptr->cluster_id != sync_cluster[i])
continue;
is_sync_cluster = true;
break;
}
cluster_ptr->sync_cluster = is_sync_cluster;
pr_debug("Cluster ID:%d Sync cluster:%s Sibling mask:%lu\n",
cluster_ptr->cluster_id, is_sync_cluster ? "Yes" : "No",
*cluster_ptr->cluster_cores.bits);
for_each_cpu_mask(i, cluster_ptr->cluster_cores) {
cpus[i].parent_ptr = cluster_ptr;
}
}
static ssize_t cluster_info_show(
struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
uint32_t i = 0;
ssize_t tot_size = 0, size = 0;
for (; i < core_ptr->entity_count; i++) {
struct cluster_info *cluster_ptr =
&core_ptr->child_entity_ptr[i];
size = snprintf(&buf[tot_size], PAGE_SIZE - tot_size,
"%d:%lu:%d ", cluster_ptr->cluster_id,
*cluster_ptr->cluster_cores.bits,
cluster_ptr->sync_cluster);
if ((tot_size + size) >= PAGE_SIZE) {
pr_err("Not enough buffer size");
break;
}
tot_size += size;
}
return tot_size;
}
static struct kobj_attribute cluster_info_attr = __ATTR_RO(cluster_info);
static int create_cpu_topology_sysfs(void)
{
int ret = 0;
struct kobject *module_kobj = NULL;
if (!cluster_info_probed) {
cluster_info_nodes_called = true;
return ret;
}
if (!core_ptr)
return ret;
module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME);
if (!module_kobj) {
pr_err("cannot find kobject\n");
return -ENODEV;
}
sysfs_attr_init(&cluster_info_attr.attr);
ret = sysfs_create_file(module_kobj, &cluster_info_attr.attr);
if (ret) {
pr_err("cannot create cluster info attr group. err:%d\n", ret);
return ret;
}
return ret;
}
static int get_device_tree_cluster_info(struct device *dev, int *cluster_id,
cpumask_t *cluster_cpus)
{
int i, cluster_cnt = 0, ret = 0;
uint32_t val = 0;
char *key = "qcom,synchronous-cluster-map";
if (!of_get_property(dev->of_node, key, &cluster_cnt)
|| cluster_cnt <= 0) {
pr_debug("Property %s not defined.\n", key);
return -ENODEV;
}
if (cluster_cnt % (sizeof(__be32) * 2)) {
pr_err("Invalid number(%d) of entry for %s\n",
cluster_cnt, key);
return -EINVAL;
}
cluster_cnt /= (sizeof(__be32) * 2);
for (i = 0; i < cluster_cnt; i++) {
ret = of_property_read_u32_index(dev->of_node, key,
i * 2, &val);
if (ret) {
pr_err("Error reading index%d\n", i * 2);
return -EINVAL;
}
cluster_id[i] = val;
of_property_read_u32_index(dev->of_node, key, i * 2 + 1, &val);
if (ret) {
pr_err("Error reading index%d\n", i * 2 + 1);
return -EINVAL;
}
*cluster_cpus[i].bits = val;
}
return cluster_cnt;
}
static int get_kernel_cluster_info(int *cluster_id, cpumask_t *cluster_cpus)
{
uint32_t _cpu, cluster_index, cluster_cnt;
for (_cpu = 0, cluster_cnt = 0; _cpu < num_possible_cpus(); _cpu++) {
if (topology_physical_package_id(_cpu) < 0) {
pr_err("CPU%d topology not initialized.\n", _cpu);
return -ENODEV;
}
/* Do not use the sibling cpumask from topology module.
** kernel topology module updates the sibling cpumask
** only when the cores are brought online for the first time.
** KTM figures out the sibling cpumask using the
** cluster and core ID mapping.
*/
for (cluster_index = 0; cluster_index < num_possible_cpus();
cluster_index++) {
if (cluster_id[cluster_index] == -1) {
cluster_id[cluster_index] =
topology_physical_package_id(_cpu);
*cluster_cpus[cluster_index].bits = 0;
cpumask_set_cpu(_cpu,
&cluster_cpus[cluster_index]);
cluster_cnt++;
break;
}
if (cluster_id[cluster_index] ==
topology_physical_package_id(_cpu)) {
cpumask_set_cpu(_cpu,
&cluster_cpus[cluster_index]);
break;
}
}
}
return cluster_cnt;
}
static void update_cpu_topology(struct device *dev)
{
int cluster_id[NR_CPUS] = {[0 ... NR_CPUS-1] = -1};
cpumask_t cluster_cpus[NR_CPUS];
uint32_t i, j;
int cluster_cnt, cpu, sync_cluster_cnt = 0;
struct cluster_info *temp_ptr = NULL;
int *sync_cluster_id = NULL;
cluster_info_probed = true;
cluster_cnt = get_kernel_cluster_info(cluster_id, cluster_cpus);
if (cluster_cnt <= 0) {
cluster_cnt = get_device_tree_cluster_info(dev, cluster_id,
cluster_cpus);
if (cluster_cnt <= 0) {
core_ptr = NULL;
pr_debug("Cluster Info not defined. KTM continues.\n");
return;
}
}
core_ptr = devm_kzalloc(dev, sizeof(struct cluster_info), GFP_KERNEL);
if (!core_ptr) {
pr_err("Memory alloc failed\n");
return;
}
core_ptr->parent_ptr = NULL;
core_ptr->entity_count = cluster_cnt;
core_ptr->cluster_id = -1;
core_ptr->sync_cluster = false;
temp_ptr = devm_kzalloc(dev, sizeof(struct cluster_info) * cluster_cnt,
GFP_KERNEL);
if (!temp_ptr) {
pr_err("Memory alloc failed\n");
devm_kfree(dev, core_ptr);
core_ptr = NULL;
return;
}
sync_cluster_id = get_sync_cluster(dev, &sync_cluster_cnt);
for (i = 0; i < cluster_cnt; i++) {
pr_debug("Cluster_ID:%d CPU's:%lu\n", cluster_id[i],
*cluster_cpus[i].bits);
temp_ptr[i].cluster_id = cluster_id[i];
temp_ptr[i].parent_ptr = core_ptr;
temp_ptr[i].cluster_cores = cluster_cpus[i];
temp_ptr[i].limited_max_freq = UINT_MAX;
temp_ptr[i].limited_min_freq = 0;
temp_ptr[i].freq_idx = 0;
temp_ptr[i].freq_idx_low = 0;
temp_ptr[i].freq_idx_high = 0;
temp_ptr[i].freq_table = NULL;
j = 0;
for_each_cpu_mask(cpu, cluster_cpus[i])
j++;
temp_ptr[i].entity_count = j;
temp_ptr[i].child_entity_ptr = NULL;
update_cpu_datastructure(&temp_ptr[i], sync_cluster_id,
sync_cluster_cnt);
}
core_ptr->child_entity_ptr = temp_ptr;
}
static int __ref init_cluster_freq_table(void)
{
uint32_t _cluster = 0, _cpu = 0, table_len = 0, idx = 0;
int ret = 0;
struct cluster_info *cluster_ptr = NULL;
struct cpufreq_policy *policy = NULL;
struct cpufreq_frequency_table *freq_table_ptr = NULL;
for (; _cluster < core_ptr->entity_count; _cluster++, table_len = 0,
(policy && freq_table_ptr) ? cpufreq_cpu_put(policy) : 0,
policy = NULL, freq_table_ptr = NULL) {
cluster_ptr = &core_ptr->child_entity_ptr[_cluster];
if (cluster_ptr->freq_table)
continue;
for_each_cpu_mask(_cpu, cluster_ptr->cluster_cores) {
policy = cpufreq_cpu_get(_cpu);
if (!policy)
continue;
freq_table_ptr = cpufreq_frequency_get_table(
policy->cpu);
if (!freq_table_ptr) {
cpufreq_cpu_put(policy);
continue;
} else {
break;
}
}
if (!freq_table_ptr) {
_cpu = first_cpu(cluster_ptr->cluster_cores);
pr_debug(
"Online cpu%d in cluster%d to read cpufreq table\n",
cluster_ptr->cluster_id, _cpu);
pending_cpu_freq = _cpu;
if (!cpu_online(_cpu)) {
#ifdef CONFIG_SMP
cpu_up(_cpu);
cpu_down(_cpu);
#endif
}
freq_table_ptr = pending_freq_table_ptr;
}
if (!freq_table_ptr) {
pr_debug("Error reading cluster%d cpufreq table\n",
cluster_ptr->cluster_id);
ret = -EAGAIN;
continue;
}
while (freq_table_ptr[table_len].frequency
!= CPUFREQ_TABLE_END)
table_len++;
cluster_ptr->freq_idx_low = 0;
cluster_ptr->freq_idx_high = cluster_ptr->freq_idx =
table_len - 1;
if (cluster_ptr->freq_idx_high < 0
|| (cluster_ptr->freq_idx_high
< cluster_ptr->freq_idx_low)) {
cluster_ptr->freq_idx = cluster_ptr->freq_idx_low =
cluster_ptr->freq_idx_high = 0;
WARN(1, "Cluster%d frequency table length:%d\n",
cluster_ptr->cluster_id, table_len);
ret = -EINVAL;
goto release_and_exit;
}
cluster_ptr->freq_table = devm_kzalloc(
&msm_thermal_info.pdev->dev,
sizeof(struct cpufreq_frequency_table) * table_len,
GFP_KERNEL);
if (!cluster_ptr->freq_table) {
pr_err("memory alloc failed\n");
cluster_ptr->freq_idx = cluster_ptr->freq_idx_low =
cluster_ptr->freq_idx_high = 0;
ret = -ENOMEM;
goto release_and_exit;
}
for (idx = 0; idx < table_len; idx++)
cluster_ptr->freq_table[idx].frequency =
freq_table_ptr[idx].frequency;
}
return ret;
release_and_exit:
cpufreq_cpu_put(policy);
return ret;
}
static void update_cluster_freq(void)
{
int online_cpu = -1;
struct cluster_info *cluster_ptr = NULL;
uint32_t _cluster = 0, _cpu = 0, max = UINT_MAX, min = 0;
if (!core_ptr)
return;
for (; _cluster < core_ptr->entity_count; _cluster++, _cpu = 0,
online_cpu = -1, max = UINT_MAX, min = 0) {
/*
** If a cluster is synchronous, go over the frequency limits
** of each core in that cluster and aggregate the minimum
** and maximum frequencies. After aggregating, request for
** frequency update on the first online core in that cluster.
** Cpufreq driver takes care of updating the frequency of
** other cores in a synchronous cluster.
*/
cluster_ptr = &core_ptr->child_entity_ptr[_cluster];
if (!cluster_ptr->sync_cluster)
continue;
for_each_cpu_mask(_cpu, cluster_ptr->cluster_cores) {
if (online_cpu == -1 && cpu_online(_cpu))
online_cpu = _cpu;
max = min(max, cpus[_cpu].limited_max_freq);
min = max(min, cpus[_cpu].limited_min_freq);
}
if (cluster_ptr->limited_max_freq == max
&& cluster_ptr->limited_min_freq == min)
continue;
cluster_ptr->limited_max_freq = max;
cluster_ptr->limited_min_freq = min;
if (online_cpu != -1)
update_cpu_freq(online_cpu);
}
}
static void do_cluster_freq_ctrl(long temp)
{
uint32_t _cluster = 0;
int _cpu = -1, freq_idx = 0;
bool mitigate = false;
struct cluster_info *cluster_ptr = NULL;
if (temp >= msm_thermal_info.limit_temp_degC)
mitigate = true;
else if (temp < msm_thermal_info.limit_temp_degC -
msm_thermal_info.temp_hysteresis_degC)
mitigate = false;
else
return;
get_online_cpus();
for (; _cluster < core_ptr->entity_count; _cluster++) {
cluster_ptr = &core_ptr->child_entity_ptr[_cluster];
if (!cluster_ptr->freq_table)
continue;
if (mitigate)
freq_idx = max_t(int, cluster_ptr->freq_idx_low,
(cluster_ptr->freq_idx
- msm_thermal_info.bootup_freq_step));
else
freq_idx = min_t(int, cluster_ptr->freq_idx_high,
(cluster_ptr->freq_idx
+ msm_thermal_info.bootup_freq_step));
if (freq_idx == cluster_ptr->freq_idx)
continue;
cluster_ptr->freq_idx = freq_idx;
for_each_cpu_mask(_cpu, cluster_ptr->cluster_cores) {
if (!(msm_thermal_info.bootup_freq_control_mask
& BIT(_cpu)))
continue;
pr_info("Limiting CPU%d max frequency to %u. Temp:%ld\n"
, _cpu
, cluster_ptr->freq_table[freq_idx].frequency
, temp);
cpus[_cpu].limited_max_freq =
cluster_ptr->freq_table[freq_idx].frequency;
}
}
if (_cpu != -1)
update_cluster_freq();
put_online_cpus();
}
/* If freq table exists, then we can send freq request */
static int check_freq_table(void)
{
int ret = 0;
uint32_t i = 0;
static bool invalid_table;
if (invalid_table)
return -EINVAL;
if (freq_table_get)
return 0;
if (core_ptr) {
ret = init_cluster_freq_table();
if (!ret)
freq_table_get = 1;
else if (ret == -EINVAL)
invalid_table = true;
return ret;
}
table = cpufreq_frequency_get_table(0);
if (!table) {
pr_debug("error reading cpufreq table\n");
return -EINVAL;
}
while (table[i].frequency != CPUFREQ_TABLE_END)
i++;
limit_idx_low = 0;
limit_idx_high = limit_idx = i - 1;
if (limit_idx_high < 0 || limit_idx_high < limit_idx_low) {
invalid_table = true;
table = NULL;
limit_idx_low = limit_idx_high = limit_idx = 0;
WARN(1, "CPU0 frequency table length:%d\n", i);
return -EINVAL;
}
freq_table_get = 1;
return 0;
}
static int update_cpu_min_freq_all(uint32_t min)
{
uint32_t cpu = 0, _cluster = 0;
int ret = 0;
struct cluster_info *cluster_ptr = NULL;
bool valid_table = false;
if (!freq_table_get) {
ret = check_freq_table();
if (ret && !core_ptr) {
pr_err("Fail to get freq table. err:%d\n", ret);
return ret;
}
}
/* If min is larger than allowed max */
if (core_ptr) {
for (; _cluster < core_ptr->entity_count; _cluster++) {
cluster_ptr = &core_ptr->child_entity_ptr[_cluster];
if (!cluster_ptr->freq_table)
continue;
valid_table = true;
min = min(min,
cluster_ptr->freq_table[
cluster_ptr->freq_idx_high].frequency);
}
if (!valid_table)
return ret;
} else {
min = min(min, table[limit_idx_high].frequency);
}
pr_debug("Requesting min freq:%u for all CPU's\n", min);
if (freq_mitigation_task) {
min_freq_limit = min;
complete(&freq_mitigation_complete);
} else {
get_online_cpus();
for_each_possible_cpu(cpu) {
cpus[cpu].limited_min_freq = min;
if (!SYNC_CORE(cpu))
update_cpu_freq(cpu);
}
update_cluster_freq();
put_online_cpus();
}
return ret;
}
static int vdd_restriction_apply_freq(struct rail *r, int level)
{
int ret = 0;
if (level == r->curr_level)
return ret;
/* level = -1: disable, level = 0,1,2..n: enable */
if (level == -1) {
ret = update_cpu_min_freq_all(r->min_level);
if (ret)
return ret;
else
r->curr_level = -1;
} else if (level >= 0 && level < (r->num_levels)) {
ret = update_cpu_min_freq_all(r->levels[level]);
if (ret)
return ret;
else
r->curr_level = level;
} else {
pr_err("level input:%d is not within range\n", level);
return -EINVAL;
}
return ret;
}
static int vdd_restriction_apply_voltage(struct rail *r, int level)
{
int ret = 0;
if (r->reg == NULL) {
pr_err("%s don't have regulator handle. can't apply vdd\n",
r->name);
return -EFAULT;
}
if (level == r->curr_level)
return ret;
/* level = -1: disable, level = 0,1,2..n: enable */
if (level == -1) {
ret = regulator_set_voltage(r->reg, r->min_level,
r->levels[r->num_levels - 1]);
if (!ret)
r->curr_level = -1;
pr_debug("Requested min level for %s. curr level: %d\n",
r->name, r->curr_level);
} else if (level >= 0 && level < (r->num_levels)) {
ret = regulator_set_voltage(r->reg, r->levels[level],
r->levels[r->num_levels - 1]);
if (!ret)
r->curr_level = level;
pr_debug("Requesting level %d for %s. curr level: %d\n",
r->levels[level], r->name, r->levels[r->curr_level]);
} else {
pr_err("level input:%d is not within range\n", level);
return -EINVAL;
}
return ret;
}
/* Setting all rails the same mode */
static int psm_set_mode_all(int mode)
{
int i = 0;
int fail_cnt = 0;
int ret = 0;
pr_debug("Requesting PMIC Mode: %d\n", mode);
for (i = 0; i < psm_rails_cnt; i++) {
if (psm_rails[i].mode != mode) {
ret = rpm_regulator_set_mode(psm_rails[i].reg, mode);
if (ret) {
pr_err("Cannot set mode:%d for %s. err:%d",
mode, psm_rails[i].name, ret);
fail_cnt++;
} else
psm_rails[i].mode = mode;
}
}
return fail_cnt ? (-EFAULT) : ret;
}
static ssize_t vdd_rstr_en_show(
struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
struct vdd_rstr_enable *en = VDD_RSTR_ENABLE_FROM_ATTRIBS(attr);
return snprintf(buf, PAGE_SIZE, "%d\n", en->enabled);
}
static ssize_t vdd_rstr_en_store(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
int i = 0;
uint8_t en_cnt = 0;
uint8_t dis_cnt = 0;
uint32_t val = 0;
struct kernel_param kp;
struct vdd_rstr_enable *en = VDD_RSTR_ENABLE_FROM_ATTRIBS(attr);
mutex_lock(&vdd_rstr_mutex);
kp.arg = &val;
ret = param_set_bool(buf, &kp);
if (ret) {
pr_err("Invalid input %s for enabled\n", buf);
goto done_vdd_rstr_en;
}
if ((val == 0) && (en->enabled == 0))
goto done_vdd_rstr_en;
for (i = 0; i < rails_cnt; i++) {
if (rails[i].freq_req == 1 && freq_table_get)
ret = vdd_restriction_apply_freq(&rails[i],
(val) ? 0 : -1);
else
ret = vdd_restriction_apply_voltage(&rails[i],
(val) ? 0 : -1);
/*
* Even if fail to set one rail, still try to set the
* others. Continue the loop
*/
if (ret)
pr_err("Set vdd restriction for %s failed\n",
rails[i].name);
else {
if (val)
en_cnt++;
else
dis_cnt++;
}
}
/* As long as one rail is enabled, vdd rstr is enabled */
if (val && en_cnt)
en->enabled = 1;
else if (!val && (dis_cnt == rails_cnt))
en->enabled = 0;
pr_debug("%s vdd restriction. curr: %d\n",
(val) ? "Enable" : "Disable", en->enabled);
done_vdd_rstr_en:
mutex_unlock(&vdd_rstr_mutex);
return count;
}
static int send_temperature_band(enum msm_thermal_phase_ctrl phase,
enum msm_temp_band req_band)
{
int ret = 0;
uint32_t msg_id;
struct msm_rpm_request *rpm_req;
unsigned int band = req_band;
uint32_t key, resource, resource_id;
if (phase < 0 || phase >= MSM_PHASE_CTRL_NR ||
req_band <= 0 || req_band >= MSM_TEMP_MAX_NR) {
pr_err("Invalid input\n");
ret = -EINVAL;
goto phase_ctrl_exit;
}
switch (phase) {
case MSM_CX_PHASE_CTRL:
key = msm_thermal_info.cx_phase_request_key;
break;
case MSM_GFX_PHASE_CTRL:
key = msm_thermal_info.gfx_phase_request_key;
break;
default:
goto phase_ctrl_exit;
break;
}
resource = msm_thermal_info.phase_rpm_resource_type;
resource_id = msm_thermal_info.phase_rpm_resource_id;
pr_debug("Sending %s temperature band %d\n",
(phase == MSM_CX_PHASE_CTRL) ? "CX" : "GFX",
req_band);
rpm_req = msm_rpm_create_request(MSM_RPM_CTX_ACTIVE_SET,
resource, resource_id, 1);
if (!rpm_req) {
pr_err("Creating RPM request failed\n");
ret = -ENXIO;
goto phase_ctrl_exit;
}
ret = msm_rpm_add_kvp_data(rpm_req, key, (const uint8_t *)&band,
(int)sizeof(band));
if (ret) {
pr_err("Adding KVP data failed. err:%d\n", ret);
goto free_rpm_handle;
}
msg_id = msm_rpm_send_request(rpm_req);
if (!msg_id) {
pr_err("RPM send request failed\n");
ret = -ENXIO;
goto free_rpm_handle;
}
ret = msm_rpm_wait_for_ack(msg_id);
if (ret) {
pr_err("RPM wait for ACK failed. err:%d\n", ret);
goto free_rpm_handle;
}
free_rpm_handle:
msm_rpm_free_request(rpm_req);
phase_ctrl_exit:
return ret;
}
static uint32_t msm_thermal_str_to_int(const char *inp)
{
int i, len;
uint32_t output = 0;
len = strnlen(inp, sizeof(uint32_t));
for (i = 0; i < len; i++)
output |= inp[i] << (i * 8);
return output;
}
static ssize_t sensor_info_show(
struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
int i;
ssize_t tot_size = 0, size = 0;
for (i = 0; i < sensor_cnt; i++) {
size = snprintf(&buf[tot_size], PAGE_SIZE - tot_size,
"%s:%s:%s:%d ",
sensors[i].type, sensors[i].name,
sensors[i].alias ? : "",
sensors[i].scaling_factor);
if (tot_size + size >= PAGE_SIZE) {
pr_err("Not enough buffer size\n");
break;
}
tot_size += size;
}
if (tot_size)
buf[tot_size - 1] = '\n';
return tot_size;
}
static struct vdd_rstr_enable vdd_rstr_en = {
.ko_attr.attr.name = __stringify(enabled),
.ko_attr.attr.mode = 0644,
.ko_attr.show = vdd_rstr_en_show,
.ko_attr.store = vdd_rstr_en_store,
.enabled = 1,
};
static struct attribute *vdd_rstr_en_attribs[] = {
&vdd_rstr_en.ko_attr.attr,
NULL,
};
static struct attribute_group vdd_rstr_en_attribs_gp = {
.attrs = vdd_rstr_en_attribs,
};
static ssize_t vdd_rstr_reg_value_show(
struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
int val = 0;
struct rail *reg = VDD_RSTR_REG_VALUE_FROM_ATTRIBS(attr);
/* -1:disabled, -2:fail to get regualtor handle */
if (reg->curr_level < 0)
val = reg->curr_level;
else
val = reg->levels[reg->curr_level];
return snprintf(buf, PAGE_SIZE, "%d\n", val);
}
static ssize_t vdd_rstr_reg_level_show(
struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
struct rail *reg = VDD_RSTR_REG_LEVEL_FROM_ATTRIBS(attr);
return snprintf(buf, PAGE_SIZE, "%d\n", reg->curr_level);
}
static ssize_t vdd_rstr_reg_level_store(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
int val = 0;
struct rail *reg = VDD_RSTR_REG_LEVEL_FROM_ATTRIBS(attr);
mutex_lock(&vdd_rstr_mutex);
if (vdd_rstr_en.enabled == 0)
goto done_store_level;
ret = kstrtouint(buf, 10, &val);
if (ret) {
pr_err("Invalid input %s for level\n", buf);
goto done_store_level;
}
if (val < 0 || val > reg->num_levels - 1) {
pr_err(" Invalid number %d for level\n", val);
goto done_store_level;
}
if (val != reg->curr_level) {
if (reg->freq_req == 1 && freq_table_get)
update_cpu_min_freq_all(reg->levels[val]);
else {
ret = vdd_restriction_apply_voltage(reg, val);
if (ret) {
pr_err( \
"Set vdd restriction for regulator %s failed. err:%d\n",
reg->name, ret);
goto done_store_level;
}
}
reg->curr_level = val;
pr_debug("Request level %d for %s\n",
reg->curr_level, reg->name);
}
done_store_level:
mutex_unlock(&vdd_rstr_mutex);
return count;
}
static int request_optimum_current(struct psm_rail *rail, enum ocr_request req)
{
int ret = 0;
if ((!rail) || (req >= OPTIMUM_CURRENT_NR) ||
(req < 0)) {
pr_err("Invalid input %d\n", req);
ret = -EINVAL;
goto request_ocr_exit;
}
ret = regulator_set_optimum_mode(rail->phase_reg,
(req == OPTIMUM_CURRENT_MAX) ? MAX_CURRENT_UA : 0);
if (ret < 0) {
pr_err("Optimum current request failed. err:%d\n", ret);
goto request_ocr_exit;
}
ret = 0; /*regulator_set_optimum_mode returns the mode on success*/
pr_debug("Requested optimum current mode: %d\n", req);
request_ocr_exit:
return ret;
}
static int ocr_set_mode_all(enum ocr_request req)
{
int ret = 0, i;
for (i = 0; i < ocr_rail_cnt; i++) {
if (ocr_rails[i].mode == req)
continue;
ret = request_optimum_current(&ocr_rails[i], req);
if (ret)
goto ocr_set_mode_exit;
ocr_rails[i].mode = req;
}
ocr_set_mode_exit:
return ret;
}
static ssize_t ocr_reg_mode_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
struct psm_rail *reg = PSM_REG_MODE_FROM_ATTRIBS(attr);
return snprintf(buf, PAGE_SIZE, "%d\n", reg->mode);
}
static ssize_t ocr_reg_mode_store(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
int val = 0;
struct psm_rail *reg = PSM_REG_MODE_FROM_ATTRIBS(attr);
if (!ocr_enabled)
return count;
mutex_lock(&ocr_mutex);
ret = kstrtoint(buf, 10, &val);
if (ret) {
pr_err("Invalid input %s for mode. err:%d\n",
buf, ret);
goto done_ocr_store;
}
if ((val != OPTIMUM_CURRENT_MAX) &&
(val != OPTIMUM_CURRENT_MIN)) {
pr_err("Invalid value %d for mode\n", val);
goto done_ocr_store;
}
if (val != reg->mode) {
ret = request_optimum_current(reg, val);
if (ret)
goto done_ocr_store;
reg->mode = val;
}
done_ocr_store:
mutex_unlock(&ocr_mutex);
return count;
}
static ssize_t store_phase_request(const char *buf, size_t count, bool is_cx)
{
int ret = 0, val;
struct mutex *phase_mutex = (is_cx) ? (&cx_mutex) : (&gfx_mutex);
enum msm_thermal_phase_ctrl phase_req = (is_cx) ? MSM_CX_PHASE_CTRL :
MSM_GFX_PHASE_CTRL;
ret = kstrtoint(buf, 10, &val);
if (ret) {
pr_err("Invalid input %s for %s temperature band\n",
buf, (is_cx) ? "CX" : "GFX");
goto phase_store_exit;
}
if ((val <= 0) || (val >= MSM_TEMP_MAX_NR)) {
pr_err("Invalid input %d for %s temperature band\n",
val, (is_cx) ? "CX" : "GFX");
ret = -EINVAL;
goto phase_store_exit;
}
mutex_lock(phase_mutex);
if (val != ((is_cx) ? curr_cx_band : curr_gfx_band)) {
ret = send_temperature_band(phase_req, val);
if (!ret) {
*((is_cx) ? &curr_cx_band : &curr_gfx_band) = val;
} else {
pr_err("Failed to send %d temp. band to %s rail\n", val,
(is_cx) ? "CX" : "GFX");
goto phase_store_unlock_exit;
}
}
ret = count;
phase_store_unlock_exit:
mutex_unlock(phase_mutex);
phase_store_exit:
return ret;
}
#define show_phase(_name, _variable) \
static ssize_t _name##_phase_show(struct kobject *kobj, \
struct kobj_attribute *attr, char *buf) \
{ \
return snprintf(buf, PAGE_SIZE, "%u\n", _variable); \
}
#define store_phase(_name, _variable, _iscx) \
static ssize_t _name##_phase_store(struct kobject *kobj, \
struct kobj_attribute *attr, const char *buf, size_t count) \
{ \
return store_phase_request(buf, count, _iscx); \
}
show_phase(gfx, curr_gfx_band)
show_phase(cx, curr_cx_band)
store_phase(gfx, curr_gfx_band, false)
store_phase(cx, curr_cx_band, true)
static ssize_t psm_reg_mode_show(
struct kobject *kobj, struct kobj_attribute *attr, char *buf)
{
struct psm_rail *reg = PSM_REG_MODE_FROM_ATTRIBS(attr);
return snprintf(buf, PAGE_SIZE, "%d\n", reg->mode);
}
static ssize_t psm_reg_mode_store(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
int val = 0;
struct psm_rail *reg = PSM_REG_MODE_FROM_ATTRIBS(attr);
mutex_lock(&psm_mutex);
ret = kstrtoint(buf, 10, &val);
if (ret) {
pr_err("Invalid input %s for mode\n", buf);
goto done_psm_store;
}
if ((val != PMIC_PWM_MODE) && (val != PMIC_AUTO_MODE)) {
pr_err("Invalid number %d for mode\n", val);
goto done_psm_store;
}
if (val != reg->mode) {
ret = rpm_regulator_set_mode(reg->reg, val);
if (ret) {
pr_err("Fail to set Mode:%d for %s. err:%d\n",
val, reg->name, ret);
goto done_psm_store;
}
reg->mode = val;
}
done_psm_store:
mutex_unlock(&psm_mutex);
return count;
}
static int check_sensor_id(int sensor_id)
{
int i = 0;
bool hw_id_found = false;
int ret = 0;
for (i = 0; i < max_tsens_num; i++) {
if (sensor_id == tsens_id_map[i]) {
hw_id_found = true;
break;
}
}
if (!hw_id_found) {
pr_err("Invalid sensor hw id:%d\n", sensor_id);
return -EINVAL;
}
return ret;
}
static int create_sensor_id_map(void)
{
int i = 0;
int ret = 0;
tsens_id_map = kzalloc(sizeof(int) * max_tsens_num,
GFP_KERNEL);
if (!tsens_id_map) {
pr_err("Cannot allocate memory for tsens_id_map\n");
return -ENOMEM;
}
for (i = 0; i < max_tsens_num; i++) {
ret = tsens_get_hw_id_mapping(i, &tsens_id_map[i]);
/* If return -ENXIO, hw_id is default in sequence */
if (ret) {
if (ret == -ENXIO) {
tsens_id_map[i] = i;
ret = 0;
} else {
pr_err("Failed to get hw id for id:%d.err:%d\n",
i, ret);
goto fail;
}
}
}
return ret;
fail:
kfree(tsens_id_map);
return ret;
}
/* 1:enable, 0:disable */
static int vdd_restriction_apply_all(int en)
{
int i = 0;
int en_cnt = 0;
int dis_cnt = 0;
int fail_cnt = 0;
int ret = 0;
for (i = 0; i < rails_cnt; i++) {
if (rails[i].freq_req == 1)
if (freq_table_get)
ret = vdd_restriction_apply_freq(&rails[i],
en ? 0 : -1);
else
continue;
else
ret = vdd_restriction_apply_voltage(&rails[i],
en ? 0 : -1);
if (ret) {
pr_err("Failed to %s for %s. err:%d",
(en) ? "enable" : "disable",
rails[i].name, ret);
fail_cnt++;
} else {
if (en)
en_cnt++;
else
dis_cnt++;
}
}
/* As long as one rail is enabled, vdd rstr is enabled */
if (en && en_cnt)
vdd_rstr_en.enabled = 1;
else if (!en && (dis_cnt == rails_cnt))
vdd_rstr_en.enabled = 0;
/*
* Check fail_cnt again to make sure all of the rails are applied
* restriction successfully or not
*/
if (fail_cnt)
return -EFAULT;
return ret;
}
static int set_and_activate_threshold(uint32_t sensor_id,
struct sensor_threshold *threshold)
{
int ret = 0;
ret = sensor_set_trip(sensor_id, threshold);
if (ret != 0) {
pr_err("sensor:%u Error in setting trip:%d. err:%d\n",
sensor_id, threshold->trip, ret);
goto set_done;
}
ret = sensor_activate_trip(sensor_id, threshold, true);
if (ret != 0) {
pr_err("sensor:%u Error in enabling trip:%d. err:%d\n",
sensor_id, threshold->trip, ret);
goto set_done;
}
set_done:
return ret;
}
static int therm_get_temp(uint32_t id, enum sensor_id_type type, long *temp)
{
int ret = 0;
struct tsens_device tsens_dev;
if (!temp) {
pr_err("Invalid value\n");
ret = -EINVAL;
goto get_temp_exit;
}
switch (type) {
case THERM_ZONE_ID:
ret = sensor_get_temp(id, temp);
if (ret) {
pr_err("Unable to read thermal zone sensor:%d\n", id);
goto get_temp_exit;
}
break;
case THERM_TSENS_ID:
tsens_dev.sensor_num = id;
ret = tsens_get_temp(&tsens_dev, temp);
if (ret) {
pr_err("Unable to read TSENS sensor:%d\n",
tsens_dev.sensor_num);
goto get_temp_exit;
}
break;
default:
pr_err("Invalid type\n");
ret = -EINVAL;
goto get_temp_exit;
}
get_temp_exit:
return ret;
}
static int msm_thermal_panic_callback(struct notifier_block *nfb,
unsigned long event, void *data)
{
int i;
for (i = 0; i < max_tsens_num; i++)
therm_get_temp(tsens_id_map[i],
THERM_TSENS_ID,
&tsens_temp_at_panic[i]);
return NOTIFY_OK;
}
static struct notifier_block msm_thermal_panic_notifier = {
.notifier_call = msm_thermal_panic_callback,
};
static int set_threshold(uint32_t zone_id,
struct sensor_threshold *threshold)
{
int i = 0, ret = 0;
long temp;
if (!threshold) {
pr_err("Invalid input\n");
ret = -EINVAL;
goto set_threshold_exit;
}
ret = therm_get_temp(zone_id, THERM_ZONE_ID, &temp);
if (ret) {
pr_err("Unable to read temperature for zone:%d. err:%d\n",
zone_id, ret);
goto set_threshold_exit;
}
while (i < MAX_THRESHOLD) {
switch (threshold[i].trip) {
case THERMAL_TRIP_CONFIGURABLE_HI:
if (threshold[i].temp >= temp) {
ret = set_and_activate_threshold(zone_id,
&threshold[i]);
if (ret)
goto set_threshold_exit;
}
break;
case THERMAL_TRIP_CONFIGURABLE_LOW:
if (threshold[i].temp <= temp) {
ret = set_and_activate_threshold(zone_id,
&threshold[i]);
if (ret)
goto set_threshold_exit;
}
break;
default:
pr_err("zone:%u Invalid trip:%d\n", zone_id,
threshold[i].trip);
break;
}
i++;
}
set_threshold_exit:
return ret;
}
static int apply_vdd_mx_restriction(void)
{
int ret = 0;
if (mx_restr_applied)
goto done;
ret = regulator_set_voltage(vdd_mx, msm_thermal_info.vdd_mx_min,
INT_MAX);
if (ret) {
pr_err("Failed to add mx vote, error %d\n", ret);
goto done;
}
ret = regulator_enable(vdd_mx);
if (ret)
pr_err("Failed to vote for mx voltage %d, error %d\n",
msm_thermal_info.vdd_mx_min, ret);
else
mx_restr_applied = true;
done:
return ret;
}
static int remove_vdd_mx_restriction(void)
{
int ret = 0;
if (!mx_restr_applied)
goto done;
ret = regulator_disable(vdd_mx);
if (ret) {
pr_err("Failed to disable mx voting, error %d\n", ret);
goto done;
}
ret = regulator_set_voltage(vdd_mx, 0, INT_MAX);
if (ret)
pr_err("Failed to remove mx vote, error %d\n", ret);
else
mx_restr_applied = false;
done:
return ret;
}
static int do_vdd_mx(void)
{
long temp = 0;
int ret = 0;
int i = 0;
int dis_cnt = 0;
if (!vdd_mx_enabled)
return ret;
mutex_lock(&vdd_mx_mutex);
for (i = 0; i < thresh[MSM_VDD_MX_RESTRICTION].thresh_ct; i++) {
ret = therm_get_temp(
thresh[MSM_VDD_MX_RESTRICTION].thresh_list[i].sensor_id,
thresh[MSM_VDD_MX_RESTRICTION].thresh_list[i].id_type,
&temp);
if (ret) {
pr_err("Unable to read TSENS sensor:%d, err:%d\n",
thresh[MSM_VDD_MX_RESTRICTION].thresh_list[i].
sensor_id, ret);
dis_cnt++;
continue;
}
if (temp <= msm_thermal_info.vdd_mx_temp_degC) {
ret = apply_vdd_mx_restriction();
if (ret)
pr_err(
"Failed to apply mx restriction\n");
goto exit;
} else if (temp >= (msm_thermal_info.vdd_mx_temp_degC +
msm_thermal_info.vdd_mx_temp_hyst_degC)) {
dis_cnt++;
}
}
if ((dis_cnt == thresh[MSM_VDD_MX_RESTRICTION].thresh_ct)) {
ret = remove_vdd_mx_restriction();
if (ret)
pr_err("Failed to remove vdd mx restriction\n");
}
exit:
mutex_unlock(&vdd_mx_mutex);
return ret;
}
static void vdd_mx_notify(struct therm_threshold *trig_thresh)
{
static uint32_t mx_sens_status;
int ret;
pr_debug("Sensor%d trigger recevied for type %d\n",
trig_thresh->sensor_id,
trig_thresh->trip_triggered);
if (!vdd_mx_enabled)
return;
mutex_lock(&vdd_mx_mutex);
switch (trig_thresh->trip_triggered) {
case THERMAL_TRIP_CONFIGURABLE_LOW:
mx_sens_status |= BIT(trig_thresh->sensor_id);
break;
case THERMAL_TRIP_CONFIGURABLE_HI:
if (mx_sens_status & BIT(trig_thresh->sensor_id))
mx_sens_status ^= BIT(trig_thresh->sensor_id);
break;
default:
pr_err("Unsupported trip type\n");
break;
}
if (mx_sens_status) {
ret = apply_vdd_mx_restriction();
if (ret)
pr_err("Failed to apply mx restriction\n");
} else if (!mx_sens_status) {
ret = remove_vdd_mx_restriction();
if (ret)
pr_err("Failed to remove vdd mx restriction\n");
}
mutex_unlock(&vdd_mx_mutex);
set_threshold(trig_thresh->sensor_id, trig_thresh->threshold);
}
static void msm_thermal_bite(int tsens_id, long temp)
{
struct scm_desc desc;
pr_err("TSENS:%d reached temperature:%ld. System reset\n",
tsens_id, temp);
if (!is_scm_armv8()) {
scm_call_atomic1(SCM_SVC_BOOT, THERM_SECURE_BITE_CMD, 0);
} else {
desc.args[0] = 0;
desc.arginfo = SCM_ARGS(1);
scm_call2_atomic(SCM_SIP_FNID(SCM_SVC_BOOT,
THERM_SECURE_BITE_CMD), &desc);
}
}
static int do_therm_reset(void)
{
int ret = 0, i;
long temp = 0;
if (!therm_reset_enabled)
return ret;
for (i = 0; i < thresh[MSM_THERM_RESET].thresh_ct; i++) {
ret = therm_get_temp(
thresh[MSM_THERM_RESET].thresh_list[i].sensor_id,
thresh[MSM_THERM_RESET].thresh_list[i].id_type,
&temp);
if (ret) {
pr_err("Unable to read TSENS sensor:%d. err:%d\n",
thresh[MSM_THERM_RESET].thresh_list[i].sensor_id,
ret);
continue;
}
if (temp >= msm_thermal_info.therm_reset_temp_degC)
msm_thermal_bite(
thresh[MSM_THERM_RESET].thresh_list[i].sensor_id, temp);
}
return ret;
}
static void therm_reset_notify(struct therm_threshold *thresh_data)
{
long temp;
int ret = 0;
if (!therm_reset_enabled)
return;
if (!thresh_data) {
pr_err("Invalid input\n");
return;
}
switch (thresh_data->trip_triggered) {
case THERMAL_TRIP_CONFIGURABLE_HI:
ret = therm_get_temp(thresh_data->sensor_id,
thresh_data->id_type, &temp);
if (ret)
pr_err("Unable to read TSENS sensor:%d. err:%d\n",
thresh_data->sensor_id, ret);
msm_thermal_bite(tsens_id_map[thresh_data->sensor_id],
temp);
break;
case THERMAL_TRIP_CONFIGURABLE_LOW:
break;
default:
pr_err("Invalid trip type\n");
break;
}
set_threshold(thresh_data->sensor_id, thresh_data->threshold);
}
#ifdef CONFIG_SMP
static void __ref do_core_control(long temp)
{
int i = 0;
int ret = 0;
if (!core_control_enabled)
return;
mutex_lock(&core_control_mutex);
if (msm_thermal_info.core_control_mask &&
temp >= msm_thermal_info.core_limit_temp_degC) {
for (i = num_possible_cpus(); i > 0; i--) {
if (!(msm_thermal_info.core_control_mask & BIT(i)))
continue;
if (cpus_offlined & BIT(i) && !cpu_online(i))
continue;
pr_info("Set Offline: CPU%d Temp: %ld\n",
i, temp);
trace_thermal_pre_core_offline(i);
ret = cpu_down(i);
if (ret)
pr_err("Error %d offline core %d\n",
ret, i);
trace_thermal_post_core_offline(i,
cpumask_test_cpu(i, cpu_online_mask));
cpus_offlined |= BIT(i);
break;
}
} else if (msm_thermal_info.core_control_mask && cpus_offlined &&
temp <= (msm_thermal_info.core_limit_temp_degC -
msm_thermal_info.core_temp_hysteresis_degC)) {
for (i = 0; i < num_possible_cpus(); i++) {
if (!(cpus_offlined & BIT(i)))
continue;
cpus_offlined &= ~BIT(i);
pr_info("Allow Online CPU%d Temp: %ld\n",
i, temp);
/*
* If this core is already online, then bring up the
* next offlined core.
*/
if (cpu_online(i))
continue;
trace_thermal_pre_core_online(i);
ret = cpu_up(i);
if (ret)
pr_err("Error %d online core %d\n",
ret, i);
trace_thermal_post_core_online(i,
cpumask_test_cpu(i, cpu_online_mask));
break;
}
}
mutex_unlock(&core_control_mutex);
}
/* Call with core_control_mutex locked */
static int __ref update_offline_cores(int val)
{
uint32_t cpu = 0;
int ret = 0;
uint32_t previous_cpus_offlined = 0;
if (!core_control_enabled)
return 0;
previous_cpus_offlined = cpus_offlined;
cpus_offlined = msm_thermal_info.core_control_mask & val;
for_each_possible_cpu(cpu) {
if (cpus_offlined & BIT(cpu)) {
if (!cpu_online(cpu))
continue;
trace_thermal_pre_core_offline(cpu);
ret = cpu_down(cpu);
if (ret)
pr_err("Unable to offline CPU%d. err:%d\n",
cpu, ret);
else
pr_debug("Offlined CPU%d\n", cpu);
trace_thermal_post_core_offline(cpu,
cpumask_test_cpu(cpu, cpu_online_mask));
} else if (online_core && (previous_cpus_offlined & BIT(cpu))) {
if (cpu_online(cpu))
continue;
trace_thermal_pre_core_online(cpu);
ret = cpu_up(cpu);
if (ret && ret == notifier_to_errno(NOTIFY_BAD))
pr_debug("Onlining CPU%d is vetoed\n", cpu);
else if (ret)
pr_err("Unable to online CPU%d. err:%d\n",
cpu, ret);
else
pr_debug("Onlined CPU%d\n", cpu);
trace_thermal_post_core_online(cpu,
cpumask_test_cpu(cpu, cpu_online_mask));
}
}
return ret;
}
static __ref int do_hotplug(void *data)
{
int ret = 0;
uint32_t cpu = 0, mask = 0;
struct device_clnt_data *clnt = NULL;
struct sched_param param = {.sched_priority = MAX_RT_PRIO-2};
if (!core_control_enabled) {
pr_debug("Core control disabled\n");
return -EINVAL;
}
sched_setscheduler(current, SCHED_FIFO, ¶m);
while (!kthread_should_stop()) {
while (wait_for_completion_interruptible(
&hotplug_notify_complete) != 0)
;
INIT_COMPLETION(hotplug_notify_complete);
mask = 0;
mutex_lock(&core_control_mutex);
for_each_possible_cpu(cpu) {
if (hotplug_enabled &&
cpus[cpu].hotplug_thresh_clear) {
set_threshold(cpus[cpu].sensor_id,
&cpus[cpu].threshold[HOTPLUG_THRESHOLD_HIGH]);
cpus[cpu].hotplug_thresh_clear = false;
}
if (cpus[cpu].offline || cpus[cpu].user_offline)
mask |= BIT(cpu);
}
if (devices && devices->hotplug_dev) {
mutex_lock(&devices->hotplug_dev->clnt_lock);
for_each_cpu_mask(cpu,
devices->hotplug_dev->active_req.offline_mask)
mask |= BIT(cpu);
mutex_unlock(&devices->hotplug_dev->clnt_lock);
}
if (mask != cpus_offlined)
update_offline_cores(mask);
mutex_unlock(&core_control_mutex);
if (devices && devices->hotplug_dev) {
union device_request req;
req.offline_mask = CPU_MASK_NONE;
mutex_lock(&devices->hotplug_dev->clnt_lock);
for_each_cpu_mask(cpu,
devices->hotplug_dev->active_req.offline_mask)
if (mask & BIT(cpu))
cpumask_test_and_set_cpu(cpu,
&req.offline_mask);
list_for_each_entry(clnt,
&devices->hotplug_dev->client_list,
clnt_ptr) {
if (clnt->callback)
clnt->callback(clnt, &req,
clnt->usr_data);
}
mutex_unlock(&devices->hotplug_dev->clnt_lock);
}
sysfs_notify(cc_kobj, NULL, "cpus_offlined");
}
return ret;
}
#else
static void __ref do_core_control(long temp)
{
return;
}
static __ref int do_hotplug(void *data)
{
return 0;
}
static int __ref update_offline_cores(int val)
{
return 0;
}
#endif
static int do_gfx_phase_cond(void)
{
long temp = 0;
int ret = 0;
uint32_t new_req_band = curr_gfx_band;
if (!gfx_warm_phase_ctrl_enabled && !gfx_crit_phase_ctrl_enabled)
return ret;
mutex_lock(&gfx_mutex);
if (gfx_warm_phase_ctrl_enabled) {
ret = therm_get_temp(
thresh[MSM_GFX_PHASE_CTRL_WARM].thresh_list->sensor_id,
thresh[MSM_GFX_PHASE_CTRL_WARM].thresh_list->id_type,
&temp);
if (ret) {
pr_err("Unable to read TSENS sensor:%d. err:%d\n",
thresh[MSM_GFX_PHASE_CTRL_WARM].thresh_list->sensor_id,
ret);
goto gfx_phase_cond_exit;
}
} else {
ret = therm_get_temp(
thresh[MSM_GFX_PHASE_CTRL_HOT].thresh_list->sensor_id,
thresh[MSM_GFX_PHASE_CTRL_HOT].thresh_list->id_type,
&temp);
if (ret) {
pr_err("Unable to read TSENS sensor:%d. err:%d\n",
thresh[MSM_GFX_PHASE_CTRL_HOT].thresh_list->sensor_id,
ret);
goto gfx_phase_cond_exit;
}
}
switch (curr_gfx_band) {
case MSM_HOT_CRITICAL:
if (temp < (msm_thermal_info.gfx_phase_hot_temp_degC -
msm_thermal_info.gfx_phase_hot_temp_hyst_degC))
new_req_band = MSM_WARM;
break;
case MSM_WARM:
if (temp >= msm_thermal_info.gfx_phase_hot_temp_degC)
new_req_band = MSM_HOT_CRITICAL;
else if (temp < (msm_thermal_info.gfx_phase_warm_temp_degC -
msm_thermal_info.gfx_phase_warm_temp_hyst_degC))
new_req_band = MSM_NORMAL;
break;
case MSM_NORMAL:
if (temp >= msm_thermal_info.gfx_phase_warm_temp_degC)
new_req_band = MSM_WARM;
break;
default:
if (temp >= msm_thermal_info.gfx_phase_hot_temp_degC)
new_req_band = MSM_HOT_CRITICAL;
else if (temp >= msm_thermal_info.gfx_phase_warm_temp_degC)
new_req_band = MSM_WARM;
else
new_req_band = MSM_NORMAL;
break;
}
if (new_req_band != curr_gfx_band) {
ret = send_temperature_band(MSM_GFX_PHASE_CTRL, new_req_band);
if (!ret) {
pr_debug("Reached %d band. Temp:%ld\n", new_req_band,
temp);
curr_gfx_band = new_req_band;
} else {
pr_err("Error sending temp. band:%d. Temp:%ld. err:%d",
new_req_band, temp, ret);
}
}
gfx_phase_cond_exit:
mutex_unlock(&gfx_mutex);
return ret;
}
static int do_cx_phase_cond(void)
{
long temp = 0;
int i, ret = 0, dis_cnt = 0;
if (!cx_phase_ctrl_enabled)
return ret;
mutex_lock(&cx_mutex);
for (i = 0; i < thresh[MSM_CX_PHASE_CTRL_HOT].thresh_ct; i++) {
ret = therm_get_temp(
thresh[MSM_CX_PHASE_CTRL_HOT].thresh_list[i].sensor_id,
thresh[MSM_CX_PHASE_CTRL_HOT].thresh_list[i].id_type,
&temp);
if (ret) {
pr_err("Unable to read TSENS sensor:%d. err:%d\n",
thresh[MSM_CX_PHASE_CTRL_HOT].thresh_list[i].sensor_id,
ret);
dis_cnt++;
continue;
}
if (temp >= msm_thermal_info.cx_phase_hot_temp_degC) {
if (curr_cx_band != MSM_HOT_CRITICAL) {
ret = send_temperature_band(MSM_CX_PHASE_CTRL,
MSM_HOT_CRITICAL);
if (!ret) {
pr_debug("band:HOT_CRITICAL Temp:%ld\n",
temp);
curr_cx_band = MSM_HOT_CRITICAL;
} else {
pr_err("Error %d sending HOT_CRITICAL",
ret);
}
}
goto cx_phase_cond_exit;
} else if (temp < (msm_thermal_info.cx_phase_hot_temp_degC -
msm_thermal_info.cx_phase_hot_temp_hyst_degC))
dis_cnt++;
}
if (dis_cnt == max_tsens_num && curr_cx_band != MSM_WARM) {
ret = send_temperature_band(MSM_CX_PHASE_CTRL, MSM_WARM);
if (!ret) {
pr_debug("band:WARM Temp:%ld\n", temp);
curr_cx_band = MSM_WARM;
} else {
pr_err("Error sending WARM temp band. err:%d",
ret);
}
}
cx_phase_cond_exit:
mutex_unlock(&cx_mutex);
return ret;
}
static int do_ocr(void)
{
long temp = 0;
int ret = 0;
int i = 0, j = 0;
int pfm_cnt = 0;
if (!ocr_enabled)
return ret;
mutex_lock(&ocr_mutex);
for (i = 0; i < thresh[MSM_OCR].thresh_ct; i++) {
ret = therm_get_temp(
thresh[MSM_OCR].thresh_list[i].sensor_id,
thresh[MSM_OCR].thresh_list[i].id_type,
&temp);
if (ret) {
pr_err("Unable to read TSENS sensor %d. err:%d\n",
thresh[MSM_OCR].thresh_list[i].sensor_id,
ret);
pfm_cnt++;
continue;
}
if (temp > msm_thermal_info.ocr_temp_degC) {
if (ocr_rails[0].init != OPTIMUM_CURRENT_NR)
for (j = 0; j < ocr_rail_cnt; j++)
ocr_rails[j].init = OPTIMUM_CURRENT_NR;
ret = ocr_set_mode_all(OPTIMUM_CURRENT_MAX);
if (ret)
pr_err("Error setting max ocr. err:%d\n",
ret);
else
pr_debug("Requested MAX OCR. tsens:%d Temp:%ld",
thresh[MSM_OCR].thresh_list[i].sensor_id, temp);
goto do_ocr_exit;
} else if (temp <= (msm_thermal_info.ocr_temp_degC -
msm_thermal_info.ocr_temp_hyst_degC))
pfm_cnt++;
}
if (pfm_cnt == thresh[MSM_OCR].thresh_ct ||
ocr_rails[0].init != OPTIMUM_CURRENT_NR) {
/* 'init' not equal to OPTIMUM_CURRENT_NR means this is the
** first polling iteration after device probe. During first
** iteration, if temperature is less than the set point, clear
** the max current request made and reset the 'init'.
*/
if (ocr_rails[0].init != OPTIMUM_CURRENT_NR)
for (j = 0; j < ocr_rail_cnt; j++)
ocr_rails[j].init = OPTIMUM_CURRENT_NR;
ret = ocr_set_mode_all(OPTIMUM_CURRENT_MIN);
if (ret) {
pr_err("Error setting min ocr. err:%d\n",
ret);
goto do_ocr_exit;
} else {
pr_debug("Requested MIN OCR. Temp:%ld", temp);
}
}
do_ocr_exit:
mutex_unlock(&ocr_mutex);
return ret;
}
static int do_vdd_restriction(void)
{
long temp = 0;
int ret = 0;
int i = 0;
int dis_cnt = 0;
if (!vdd_rstr_enabled)
return ret;
if (usefreq && !freq_table_get) {
if (check_freq_table() && !core_ptr)
return ret;
}
mutex_lock(&vdd_rstr_mutex);
for (i = 0; i < thresh[MSM_VDD_RESTRICTION].thresh_ct; i++) {
ret = therm_get_temp(
thresh[MSM_VDD_RESTRICTION].thresh_list[i].sensor_id,
thresh[MSM_VDD_RESTRICTION].thresh_list[i].id_type,
&temp);
if (ret) {
pr_err("Unable to read TSENS sensor:%d. err:%d\n",
thresh[MSM_VDD_RESTRICTION].thresh_list[i].sensor_id,
ret);
dis_cnt++;
continue;
}
if (temp <= msm_thermal_info.vdd_rstr_temp_degC) {
ret = vdd_restriction_apply_all(1);
if (ret) {
pr_err( \
"Enable vdd rstr for all failed. err:%d\n",
ret);
goto exit;
}
pr_debug("Enabled Vdd Restriction tsens:%d. Temp:%ld\n",
thresh[MSM_VDD_RESTRICTION].thresh_list[i].sensor_id,
temp);
goto exit;
} else if (temp > msm_thermal_info.vdd_rstr_temp_hyst_degC)
dis_cnt++;
}
if (dis_cnt == max_tsens_num) {
ret = vdd_restriction_apply_all(0);
if (ret) {
pr_err("Disable vdd rstr for all failed. err:%d\n",
ret);
goto exit;
}
pr_debug("Disabled Vdd Restriction\n");
}
exit:
mutex_unlock(&vdd_rstr_mutex);
return ret;
}
static int do_psm(void)
{
long temp = 0;
int ret = 0;
int i = 0;
int auto_cnt = 0;
mutex_lock(&psm_mutex);
for (i = 0; i < max_tsens_num; i++) {
ret = therm_get_temp(tsens_id_map[i], THERM_TSENS_ID, &temp);
if (ret) {
pr_err("Unable to read TSENS sensor:%d. err:%d\n",
tsens_id_map[i], ret);
auto_cnt++;
continue;
}
/*
* As long as one sensor is above the threshold, set PWM mode
* on all rails, and loop stops. Set auto mode when all rails
* are below thershold
*/
if (temp > msm_thermal_info.psm_temp_degC) {
ret = psm_set_mode_all(PMIC_PWM_MODE);
if (ret) {
pr_err("Set pwm mode for all failed. err:%d\n",
ret);
goto exit;
}
pr_debug("Requested PMIC PWM Mode tsens:%d. Temp:%ld\n",
tsens_id_map[i], temp);
break;
} else if (temp <= msm_thermal_info.psm_temp_hyst_degC)
auto_cnt++;
}
if (auto_cnt == max_tsens_num) {
ret = psm_set_mode_all(PMIC_AUTO_MODE);
if (ret) {
pr_err("Set auto mode for all failed. err:%d\n", ret);
goto exit;
}
pr_debug("Requested PMIC AUTO Mode\n");
}
exit:
mutex_unlock(&psm_mutex);
return ret;
}
static void do_freq_control(long temp)
{
uint32_t cpu = 0;
uint32_t max_freq = cpus[cpu].limited_max_freq;
if (core_ptr)
return do_cluster_freq_ctrl(temp);
if (!freq_table_get)
return;
if (temp >= temp_threshold) {
if (limit_idx == limit_idx_low)
return;
limit_idx -= msm_thermal_info.bootup_freq_step;
if (limit_idx < limit_idx_low)
limit_idx = limit_idx_low;
max_freq = table[limit_idx].frequency;
} else if (temp < temp_threshold - msm_thermal_info.temp_hysteresis_degC) {
if (limit_idx == limit_idx_high)
return;
limit_idx += msm_thermal_info.bootup_freq_step;
if (limit_idx >= limit_idx_high) {
limit_idx = limit_idx_high;
max_freq = UINT_MAX;
} else
max_freq = table[limit_idx].frequency;
}
if (max_freq == cpus[cpu].limited_max_freq)
return;
/* Update new limits */
get_online_cpus();
for_each_possible_cpu(cpu) {
if (!(msm_thermal_info.bootup_freq_control_mask & BIT(cpu)))
continue;
pr_info("Limiting CPU%d max frequency to %u. Temp:%ld\n",
cpu, max_freq, temp);
cpus[cpu].limited_max_freq = max_freq;
if (!SYNC_CORE(cpu))
update_cpu_freq(cpu);
}
update_cluster_freq();
put_online_cpus();
}
static void check_temp(struct work_struct *work)
{
long temp = 0;
int ret = 0;
do_therm_reset();
ret = therm_get_temp(msm_thermal_info.sensor_id, THERM_TSENS_ID, &temp);
if (ret) {
pr_err("Unable to read TSENS sensor:%d. err:%d\n",
msm_thermal_info.sensor_id, ret);
goto reschedule;
}
do_core_control(temp);
do_vdd_mx();
do_psm();
do_gfx_phase_cond();
do_cx_phase_cond();
do_ocr();
/*
** All mitigation involving CPU frequency should be
** placed below this check. The mitigation following this
** frequency table check, should be able to handle the failure case.
*/
if (!freq_table_get)
check_freq_table();
do_vdd_restriction();
do_freq_control(temp);
reschedule:
if (polling_enabled)
schedule_delayed_work(&check_temp_work, msecs_to_jiffies(POLLING_DELAY));
}
static int __ref msm_thermal_cpu_callback(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
uint32_t cpu = (uintptr_t)hcpu;
if (action == CPU_UP_PREPARE || action == CPU_UP_PREPARE_FROZEN) {
if (core_control_enabled &&
(msm_thermal_info.core_control_mask & BIT(cpu)) &&
(cpus_offlined & BIT(cpu))) {
pr_debug("Preventing CPU%d from coming online.\n",
cpu);
return NOTIFY_BAD;
}
}
pr_debug("voting for CPU%d to be online\n", cpu);
return NOTIFY_OK;
}
static struct notifier_block __refdata msm_thermal_cpu_notifier = {
.notifier_call = msm_thermal_cpu_callback,
};
static int hotplug_notify(enum thermal_trip_type type, int temp, void *data)
{
struct cpu_info *cpu_node = (struct cpu_info *)data;
pr_info("%s reach temp threshold: %d\n", cpu_node->sensor_type, temp);
if (!(msm_thermal_info.core_control_mask & BIT(cpu_node->cpu)))
return 0;
switch (type) {
case THERMAL_TRIP_CONFIGURABLE_HI:
if (!(cpu_node->offline))
cpu_node->offline = 1;
break;
case THERMAL_TRIP_CONFIGURABLE_LOW:
if (cpu_node->offline)
cpu_node->offline = 0;
break;
default:
break;
}
if (hotplug_task) {
cpu_node->hotplug_thresh_clear = true;
complete(&hotplug_notify_complete);
} else
pr_err("Hotplug task is not initialized\n");
return 0;
}
/* Adjust cpus offlined bit based on temperature reading. */
static int hotplug_init_cpu_offlined(void)
{
long temp = 0;
uint32_t cpu = 0;
if (!hotplug_enabled)
return 0;
mutex_lock(&core_control_mutex);
for_each_possible_cpu(cpu) {
if (!(msm_thermal_info.core_control_mask & BIT(cpus[cpu].cpu)))
continue;
if (therm_get_temp(cpus[cpu].sensor_id, cpus[cpu].id_type,
&temp)) {
pr_err("Unable to read TSENS sensor:%d.\n",
cpus[cpu].sensor_id);
mutex_unlock(&core_control_mutex);
return -EINVAL;
}
if (temp >= msm_thermal_info.hotplug_temp_degC)
cpus[cpu].offline = 1;
else if (temp <= (msm_thermal_info.hotplug_temp_degC -
msm_thermal_info.hotplug_temp_hysteresis_degC))
cpus[cpu].offline = 0;
}
mutex_unlock(&core_control_mutex);
if (hotplug_task)
complete(&hotplug_notify_complete);
else {
pr_err("Hotplug task is not initialized\n");
return -EINVAL;
}
return 0;
}
static void hotplug_init(void)
{
uint32_t cpu = 0;
struct sensor_threshold *hi_thresh = NULL, *low_thresh = NULL;
if (hotplug_task)
return;
if (!hotplug_enabled)
goto init_kthread;
for_each_possible_cpu(cpu) {
cpus[cpu].sensor_id =
sensor_get_id((char *)cpus[cpu].sensor_type);
cpus[cpu].id_type = THERM_ZONE_ID;
if (!(msm_thermal_info.core_control_mask & BIT(cpus[cpu].cpu)))
continue;
hi_thresh = &cpus[cpu].threshold[HOTPLUG_THRESHOLD_HIGH];
low_thresh = &cpus[cpu].threshold[HOTPLUG_THRESHOLD_LOW];
hi_thresh->temp = msm_thermal_info.hotplug_temp_degC;
hi_thresh->trip = THERMAL_TRIP_CONFIGURABLE_HI;
low_thresh->temp = msm_thermal_info.hotplug_temp_degC -
msm_thermal_info.hotplug_temp_hysteresis_degC;
low_thresh->trip = THERMAL_TRIP_CONFIGURABLE_LOW;
hi_thresh->notify = low_thresh->notify = hotplug_notify;
hi_thresh->data = low_thresh->data = (void *)&cpus[cpu];
set_threshold(cpus[cpu].sensor_id, hi_thresh);
}
init_kthread:
init_completion(&hotplug_notify_complete);
hotplug_task = kthread_run(do_hotplug, NULL, "msm_thermal:hotplug");
if (IS_ERR(hotplug_task)) {
pr_err("Failed to create do_hotplug thread. err:%ld\n",
PTR_ERR(hotplug_task));
return;
}
/*
* Adjust cpus offlined bit when hotplug intitializes so that the new
* cpus offlined state is based on hotplug threshold range
*/
if (hotplug_init_cpu_offlined())
kthread_stop(hotplug_task);
}
static __ref int do_freq_mitigation(void *data)
{
int ret = 0;
uint32_t cpu = 0, max_freq_req = 0, min_freq_req = 0;
struct sched_param param = {.sched_priority = MAX_RT_PRIO-1};
struct device_clnt_data *clnt = NULL;
struct device_manager_data *cpu_dev = NULL;
sched_setscheduler(current, SCHED_FIFO, ¶m);
while (!kthread_should_stop()) {
while (wait_for_completion_interruptible(
&freq_mitigation_complete) != 0)
;
INIT_COMPLETION(freq_mitigation_complete);
for_each_possible_cpu(cpu) {
max_freq_req = (cpus[cpu].max_freq) ?
msm_thermal_info.freq_limit :
UINT_MAX;
max_freq_req = min(max_freq_req,
cpus[cpu].user_max_freq);
min_freq_req = max(min_freq_limit,
cpus[cpu].user_min_freq);
if (devices && devices->cpufreq_dev[cpu]) {
cpu_dev = devices->cpufreq_dev[cpu];
mutex_lock(&cpu_dev->clnt_lock);
max_freq_req = min(max_freq_req,
cpu_dev->active_req.freq.max_freq);
min_freq_req = max(min_freq_req,
cpu_dev->active_req.freq.min_freq);
mutex_unlock(&cpu_dev->clnt_lock);
}
if ((max_freq_req == cpus[cpu].limited_max_freq)
&& (min_freq_req ==
cpus[cpu].limited_min_freq))
goto reset_threshold;
cpus[cpu].limited_max_freq = max_freq_req;
cpus[cpu].limited_min_freq = min_freq_req;
if (!SYNC_CORE(cpu))
update_cpu_freq(cpu);
reset_threshold:
if (!SYNC_CORE(cpu) &&
devices && devices->cpufreq_dev[cpu]) {
union device_request req;
req.freq.max_freq = max_freq_req;
req.freq.min_freq = min_freq_req;
cpu_dev = devices->cpufreq_dev[cpu];
mutex_lock(&cpu_dev->clnt_lock);
list_for_each_entry(clnt,
&cpu_dev->client_list,
clnt_ptr) {
if (clnt->callback)
clnt->callback(clnt,
&req,
clnt->usr_data);
}
mutex_unlock(&cpu_dev->clnt_lock);
}
if (freq_mitigation_enabled &&
cpus[cpu].freq_thresh_clear) {
set_threshold(cpus[cpu].sensor_id,
&cpus[cpu].threshold[FREQ_THRESHOLD_HIGH]);
cpus[cpu].freq_thresh_clear = false;
}
}
update_cluster_freq();
}
return ret;
}
static int freq_mitigation_notify(enum thermal_trip_type type,
int temp, void *data)
{
struct cpu_info *cpu_node = (struct cpu_info *) data;
pr_debug("%s reached temp threshold: %d\n",
cpu_node->sensor_type, temp);
if (!(msm_thermal_info.freq_mitig_control_mask &
BIT(cpu_node->cpu)))
return 0;
switch (type) {
case THERMAL_TRIP_CONFIGURABLE_HI:
if (!cpu_node->max_freq) {
pr_info("Mitigating CPU%d frequency to %d\n",
cpu_node->cpu,
msm_thermal_info.freq_limit);
cpu_node->max_freq = true;
}
break;
case THERMAL_TRIP_CONFIGURABLE_LOW:
if (cpu_node->max_freq) {
pr_info("Removing frequency mitigation for CPU%d\n",
cpu_node->cpu);
cpu_node->max_freq = false;
}
break;
default:
break;
}
if (freq_mitigation_task) {
cpu_node->freq_thresh_clear = true;
complete(&freq_mitigation_complete);
} else {
pr_err("Frequency mitigation task is not initialized\n");
}
return 0;
}
static void freq_mitigation_init(void)
{
uint32_t cpu = 0;
struct sensor_threshold *hi_thresh = NULL, *low_thresh = NULL;
if (freq_mitigation_task)
return;
if (!freq_mitigation_enabled)
goto init_freq_thread;
for_each_possible_cpu(cpu) {
if (!(msm_thermal_info.freq_mitig_control_mask & BIT(cpu)))
continue;
hi_thresh = &cpus[cpu].threshold[FREQ_THRESHOLD_HIGH];
low_thresh = &cpus[cpu].threshold[FREQ_THRESHOLD_LOW];
hi_thresh->temp = msm_thermal_info.freq_mitig_temp_degc;
hi_thresh->trip = THERMAL_TRIP_CONFIGURABLE_HI;
low_thresh->temp = msm_thermal_info.freq_mitig_temp_degc -
msm_thermal_info.freq_mitig_temp_hysteresis_degc;
low_thresh->trip = THERMAL_TRIP_CONFIGURABLE_LOW;
hi_thresh->notify = low_thresh->notify =
freq_mitigation_notify;
hi_thresh->data = low_thresh->data = (void *)&cpus[cpu];
set_threshold(cpus[cpu].sensor_id, hi_thresh);
}
init_freq_thread:
init_completion(&freq_mitigation_complete);
freq_mitigation_task = kthread_run(do_freq_mitigation, NULL,
"msm_thermal:freq_mitig");
if (IS_ERR(freq_mitigation_task)) {
pr_err("Failed to create frequency mitigation thread. err:%ld\n",
PTR_ERR(freq_mitigation_task));
return;
}
}
int msm_thermal_get_freq_plan_size(uint32_t cluster, unsigned int *table_len)
{
uint32_t i = 0;
struct cluster_info *cluster_ptr = NULL;
if (!core_ptr) {
pr_err("Topology ptr not initialized\n");
return -ENODEV;
}
if (!table_len) {
pr_err("Invalid input\n");
return -EINVAL;
}
if (!freq_table_get)
check_freq_table();
for (; i < core_ptr->entity_count; i++) {
cluster_ptr = &core_ptr->child_entity_ptr[i];
if (cluster_ptr->cluster_id == cluster) {
if (!cluster_ptr->freq_table) {
pr_err("Cluster%d clock plan not initialized\n",
cluster);
return -EINVAL;
}
*table_len = cluster_ptr->freq_idx_high + 1;
return 0;
}
}
pr_err("Invalid cluster ID:%d\n", cluster);
return -EINVAL;
}
int msm_thermal_get_cluster_freq_plan(uint32_t cluster, unsigned int *table_ptr)
{
uint32_t i = 0;
struct cluster_info *cluster_ptr = NULL;
if (!core_ptr) {
pr_err("Topology ptr not initialized\n");
return -ENODEV;
}
if (!table_ptr) {
pr_err("Invalid input\n");
return -EINVAL;
}
if (!freq_table_get)
check_freq_table();
for (; i < core_ptr->entity_count; i++) {
cluster_ptr = &core_ptr->child_entity_ptr[i];
if (cluster_ptr->cluster_id == cluster)
break;
}
if (i == core_ptr->entity_count) {
pr_err("Invalid cluster ID:%d\n", cluster);
return -EINVAL;
}
if (!cluster_ptr->freq_table) {
pr_err("Cluster%d clock plan not initialized\n", cluster);
return -EINVAL;
}
for (i = 0; i <= cluster_ptr->freq_idx_high; i++)
table_ptr[i] = cluster_ptr->freq_table[i].frequency;
return 0;
}
int msm_thermal_set_cluster_freq(uint32_t cluster, uint32_t freq, bool is_max)
{
int ret = 0;
uint32_t i = 0;
struct cluster_info *cluster_ptr = NULL;
bool notify = false;
if (!core_ptr) {
pr_err("Topology ptr not initialized\n");
return -ENODEV;
}
for (; i < core_ptr->entity_count; i++) {
cluster_ptr = &core_ptr->child_entity_ptr[i];
if (cluster_ptr->cluster_id != cluster)
continue;
if (!cluster_ptr->sync_cluster) {
pr_err("Cluster%d is not synchronous\n", cluster);
return -EINVAL;
} else {
pr_debug("Update Cluster%d %s frequency to %d\n",
cluster, (is_max) ? "max" : "min", freq);
break;
}
}
if (i == core_ptr->entity_count) {
pr_err("Invalid cluster ID:%d\n", cluster);
return -EINVAL;
}
for_each_cpu_mask(i, cluster_ptr->cluster_cores) {
uint32_t *freq_ptr = (is_max) ? &cpus[i].user_max_freq
: &cpus[i].user_min_freq;
if (*freq_ptr == freq)
continue;
notify = true;
*freq_ptr = freq;
}
if (freq_mitigation_task) {
if (notify)
complete(&freq_mitigation_complete);
} else {
pr_err("Frequency mitigation task is not initialized\n");
return -ESRCH;
}
return ret;
}
int msm_thermal_set_frequency(uint32_t cpu, uint32_t freq, bool is_max)
{
int ret = 0;
if (cpu >= num_possible_cpus()) {
pr_err("Invalid input\n");
ret = -EINVAL;
goto set_freq_exit;
}
pr_debug("Userspace requested %s frequency %u for CPU%u\n",
(is_max) ? "Max" : "Min", freq, cpu);
if (is_max) {
if (cpus[cpu].user_max_freq == freq)
goto set_freq_exit;
cpus[cpu].user_max_freq = freq;
} else {
if (cpus[cpu].user_min_freq == freq)
goto set_freq_exit;
cpus[cpu].user_min_freq = freq;
}
if (freq_mitigation_task) {
complete(&freq_mitigation_complete);
} else {
pr_err("Frequency mitigation task is not initialized\n");
ret = -ESRCH;
goto set_freq_exit;
}
set_freq_exit:
return ret;
}
int therm_set_threshold(struct threshold_info *thresh_inp)
{
int ret = 0, i = 0, err = 0;
struct therm_threshold *thresh_ptr;
if (!thresh_inp) {
pr_err("Invalid input\n");
ret = -EINVAL;
goto therm_set_exit;
}
thresh_inp->thresh_triggered = false;
for (i = 0; i < thresh_inp->thresh_ct; i++) {
thresh_ptr = &thresh_inp->thresh_list[i];
thresh_ptr->trip_triggered = -1;
err = set_threshold(thresh_ptr->sensor_id,
thresh_ptr->threshold);
if (err) {
ret = err;
err = 0;
}
}
therm_set_exit:
return ret;
}
static void cx_phase_ctrl_notify(struct therm_threshold *trig_thresh)
{
static uint32_t cx_sens_status;
int ret = 0;
if (!cx_phase_ctrl_enabled)
return;
if (trig_thresh->trip_triggered < 0)
goto cx_phase_ctrl_exit;
mutex_lock(&cx_mutex);
pr_debug("sensor:%d reached %s thresh for CX\n",
tsens_id_map[trig_thresh->sensor_id],
(trig_thresh->trip_triggered == THERMAL_TRIP_CONFIGURABLE_HI) ?
"hot critical" : "warm");
switch (trig_thresh->trip_triggered) {
case THERMAL_TRIP_CONFIGURABLE_HI:
cx_sens_status |= BIT(trig_thresh->sensor_id);
break;
case THERMAL_TRIP_CONFIGURABLE_LOW:
if (cx_sens_status & BIT(trig_thresh->sensor_id))
cx_sens_status ^= BIT(trig_thresh->sensor_id);
break;
default:
pr_err("Unsupported trip type\n");
goto cx_phase_unlock_exit;
break;
}
if ((cx_sens_status && (curr_cx_band == MSM_HOT_CRITICAL)) ||
(!cx_sens_status && (curr_cx_band == MSM_WARM)))
goto cx_phase_unlock_exit;
ret = send_temperature_band(MSM_CX_PHASE_CTRL, (cx_sens_status) ?
MSM_HOT_CRITICAL : MSM_WARM);
if (!ret)
curr_cx_band = (cx_sens_status) ? MSM_HOT_CRITICAL : MSM_WARM;
cx_phase_unlock_exit:
mutex_unlock(&cx_mutex);
cx_phase_ctrl_exit:
set_threshold(trig_thresh->sensor_id, trig_thresh->threshold);
return;
}
static void gfx_phase_ctrl_notify(struct therm_threshold *trig_thresh)
{
uint32_t new_req_band = curr_gfx_band;
int ret = 0;
if (!gfx_warm_phase_ctrl_enabled && !gfx_crit_phase_ctrl_enabled)
return;
if (trig_thresh->trip_triggered < 0)
goto gfx_phase_ctrl_exit;
mutex_lock(&gfx_mutex);
if (gfx_crit_phase_ctrl_enabled) {
switch (
thresh[MSM_GFX_PHASE_CTRL_HOT].thresh_list->trip_triggered) {
case THERMAL_TRIP_CONFIGURABLE_HI:
new_req_band = MSM_HOT_CRITICAL;
pr_debug(
"sensor:%d reached hot critical thresh for GFX\n",
tsens_id_map[trig_thresh->sensor_id]);
goto notify_new_band;
break;
case THERMAL_TRIP_CONFIGURABLE_LOW:
new_req_band = MSM_WARM;
pr_debug("sensor:%d reached warm thresh for GFX\n",
tsens_id_map[trig_thresh->sensor_id]);
goto notify_new_band;
break;
default:
break;
}
}
if (gfx_warm_phase_ctrl_enabled) {
switch (
thresh[MSM_GFX_PHASE_CTRL_WARM].thresh_list->trip_triggered) {
case THERMAL_TRIP_CONFIGURABLE_HI:
new_req_band = MSM_WARM;
pr_debug("sensor:%d reached warm thresh for GFX\n",
tsens_id_map[trig_thresh->sensor_id]);
goto notify_new_band;
break;
case THERMAL_TRIP_CONFIGURABLE_LOW:
new_req_band = MSM_NORMAL;
pr_debug("sensor:%d reached normal thresh for GFX\n",
tsens_id_map[trig_thresh->sensor_id]);
goto notify_new_band;
break;
default:
break;
}
}
notify_new_band:
if (new_req_band != curr_gfx_band) {
ret = send_temperature_band(MSM_GFX_PHASE_CTRL, new_req_band);
if (!ret)
curr_gfx_band = new_req_band;
}
mutex_unlock(&gfx_mutex);
gfx_phase_ctrl_exit:
switch (curr_gfx_band) {
case MSM_HOT_CRITICAL:
if (gfx_crit_phase_ctrl_enabled)
therm_set_threshold(&thresh[MSM_GFX_PHASE_CTRL_HOT]);
break;
case MSM_NORMAL:
if (gfx_warm_phase_ctrl_enabled)
therm_set_threshold(&thresh[MSM_GFX_PHASE_CTRL_WARM]);
break;
case MSM_WARM:
default:
if (gfx_crit_phase_ctrl_enabled)
therm_set_threshold(&thresh[MSM_GFX_PHASE_CTRL_HOT]);
if (gfx_warm_phase_ctrl_enabled)
therm_set_threshold(&thresh[MSM_GFX_PHASE_CTRL_WARM]);
break;
}
return;
}
static void vdd_restriction_notify(struct therm_threshold *trig_thresh)
{
int ret = 0;
static uint32_t vdd_sens_status;
if (!vdd_rstr_enabled)
return;
if (!trig_thresh) {
pr_err("Invalid input\n");
return;
}
if (trig_thresh->trip_triggered < 0)
goto set_and_exit;
mutex_lock(&vdd_rstr_mutex);
pr_debug("sensor:%d reached %s thresh for Vdd restriction\n",
tsens_id_map[trig_thresh->sensor_id],
(trig_thresh->trip_triggered == THERMAL_TRIP_CONFIGURABLE_HI) ?
"high" : "low");
switch (trig_thresh->trip_triggered) {
case THERMAL_TRIP_CONFIGURABLE_HI:
if (vdd_sens_status & BIT(trig_thresh->sensor_id))
vdd_sens_status ^= BIT(trig_thresh->sensor_id);
break;
case THERMAL_TRIP_CONFIGURABLE_LOW:
vdd_sens_status |= BIT(trig_thresh->sensor_id);
break;
default:
pr_err("Unsupported trip type\n");
goto unlock_and_exit;
break;
}
ret = vdd_restriction_apply_all((vdd_sens_status) ? 1 : 0);
if (ret) {
pr_err("%s vdd rstr votlage for all failed\n",
(vdd_sens_status) ?
"Enable" : "Disable");
goto unlock_and_exit;
}
unlock_and_exit:
mutex_unlock(&vdd_rstr_mutex);
set_and_exit:
set_threshold(trig_thresh->sensor_id, trig_thresh->threshold);
return;
}
static void ocr_notify(struct therm_threshold *trig_thresh)
{
int ret = 0;
static uint32_t ocr_sens_status;
if (!ocr_enabled)
return;
if (!trig_thresh) {
pr_err("Invalid input\n");
return;
}
if (trig_thresh->trip_triggered < 0)
goto set_and_exit;
mutex_lock(&ocr_mutex);
pr_debug("sensor%d reached %d thresh for Optimum current request\n",
tsens_id_map[trig_thresh->sensor_id],
trig_thresh->trip_triggered);
switch (trig_thresh->trip_triggered) {
case THERMAL_TRIP_CONFIGURABLE_HI:
ocr_sens_status |= BIT(trig_thresh->sensor_id);
break;
case THERMAL_TRIP_CONFIGURABLE_LOW:
if (ocr_sens_status & BIT(trig_thresh->sensor_id))
ocr_sens_status ^= BIT(trig_thresh->sensor_id);
break;
default:
pr_err("Unsupported trip type\n");
goto unlock_and_exit;
break;
}
ret = ocr_set_mode_all(ocr_sens_status ? OPTIMUM_CURRENT_MAX :
OPTIMUM_CURRENT_MIN);
if (ret) {
pr_err("%s Optimum current mode for all failed. err:%d\n",
(ocr_sens_status) ?
"Enable" : "Disable", ret);
goto unlock_and_exit;
}
unlock_and_exit:
mutex_unlock(&ocr_mutex);
set_and_exit:
set_threshold(trig_thresh->sensor_id, trig_thresh->threshold);
return;
}
static __ref int do_thermal_monitor(void *data)
{
int ret = 0, i, j;
struct therm_threshold *sensor_list;
while (!kthread_should_stop()) {
while (wait_for_completion_interruptible(
&thermal_monitor_complete) != 0)
;
INIT_COMPLETION(thermal_monitor_complete);
for (i = 0; i < MSM_LIST_MAX_NR; i++) {
if (!thresh[i].thresh_triggered)
continue;
thresh[i].thresh_triggered = false;
for (j = 0; j < thresh[i].thresh_ct; j++) {
sensor_list = &thresh[i].thresh_list[j];
if (sensor_list->trip_triggered < 0)
continue;
sensor_list->notify(sensor_list);
sensor_list->trip_triggered = -1;
}
}
}
return ret;
}
static int convert_to_zone_id(struct threshold_info *thresh_inp)
{
int ret = 0, i, zone_id;
struct therm_threshold *thresh_array;
if (!thresh_inp) {
pr_err("Invalid input\n");
ret = -EINVAL;
goto convert_to_exit;
}
thresh_array = thresh_inp->thresh_list;
for (i = 0; i < thresh_inp->thresh_ct; i++) {
char tsens_name[TSENS_NAME_MAX] = "";
if (thresh_array[i].id_type == THERM_ZONE_ID)
continue;
snprintf(tsens_name, TSENS_NAME_MAX, TSENS_NAME_FORMAT,
thresh_array[i].sensor_id);
zone_id = sensor_get_id(tsens_name);
if (zone_id < 0) {
pr_err("Error getting zone id for %s. err:%d\n",
tsens_name, ret);
ret = zone_id;
goto convert_to_exit;
}
thresh_array[i].sensor_id = zone_id;
thresh_array[i].id_type = THERM_ZONE_ID;
}
convert_to_exit:
return ret;
}
static void thermal_monitor_init(void)
{
if (thermal_monitor_task)
return;
init_completion(&thermal_monitor_complete);
thermal_monitor_task = kthread_run(do_thermal_monitor, NULL,
"msm_thermal:therm_monitor");
if (IS_ERR(thermal_monitor_task)) {
pr_err("Failed to create thermal monitor thread. err:%ld\n",
PTR_ERR(thermal_monitor_task));
goto init_exit;
}
if (therm_reset_enabled &&
!(convert_to_zone_id(&thresh[MSM_THERM_RESET])))
therm_set_threshold(&thresh[MSM_THERM_RESET]);
if ((cx_phase_ctrl_enabled) &&
!(convert_to_zone_id(&thresh[MSM_CX_PHASE_CTRL_HOT])))
therm_set_threshold(&thresh[MSM_CX_PHASE_CTRL_HOT]);
if ((vdd_rstr_enabled) &&
!(convert_to_zone_id(&thresh[MSM_VDD_RESTRICTION])))
therm_set_threshold(&thresh[MSM_VDD_RESTRICTION]);
if ((gfx_warm_phase_ctrl_enabled) &&
!(convert_to_zone_id(&thresh[MSM_GFX_PHASE_CTRL_WARM]))) {
therm_set_threshold(&thresh[MSM_GFX_PHASE_CTRL_WARM]);
}
if ((gfx_crit_phase_ctrl_enabled) &&
!(convert_to_zone_id(&thresh[MSM_GFX_PHASE_CTRL_HOT]))) {
therm_set_threshold(&thresh[MSM_GFX_PHASE_CTRL_HOT]);
}
if ((ocr_enabled) &&
!(convert_to_zone_id(&thresh[MSM_OCR])))
therm_set_threshold(&thresh[MSM_OCR]);
if (vdd_mx_enabled &&
!(convert_to_zone_id(&thresh[MSM_VDD_MX_RESTRICTION])))
therm_set_threshold(&thresh[MSM_VDD_MX_RESTRICTION]);
init_exit:
return;
}
static int msm_thermal_notify(enum thermal_trip_type type, int temp, void *data)
{
struct therm_threshold *thresh_data = (struct therm_threshold *)data;
if (thermal_monitor_task) {
thresh_data->trip_triggered = type;
thresh_data->parent->thresh_triggered = true;
complete(&thermal_monitor_complete);
} else {
pr_err("Thermal monitor task is not initialized\n");
}
return 0;
}
static int init_threshold(enum msm_thresh_list index,
int sensor_id, int32_t hi_temp, int32_t low_temp,
void (*callback)(struct therm_threshold *))
{
int ret = 0, i;
struct therm_threshold *thresh_ptr;
if (!callback || index >= MSM_LIST_MAX_NR || index < 0
|| sensor_id == -ENODEV) {
pr_err("Invalid input. sensor:%d. index:%d\n",
sensor_id, index);
ret = -EINVAL;
goto init_thresh_exit;
}
if (thresh[index].thresh_list) {
pr_info("threshold id:%d already initialized\n", index);
goto init_thresh_exit;
}
thresh[index].thresh_ct = (sensor_id == MONITOR_ALL_TSENS) ?
max_tsens_num : 1;
thresh[index].thresh_triggered = false;
thresh[index].thresh_list = kzalloc(sizeof(struct therm_threshold) *
thresh[index].thresh_ct, GFP_KERNEL);
if (!thresh[index].thresh_list) {
pr_err("kzalloc failed for thresh index:%d\n", index);
ret = -ENOMEM;
goto init_thresh_exit;
}
thresh_ptr = thresh[index].thresh_list;
if (sensor_id == MONITOR_ALL_TSENS) {
for (i = 0; i < max_tsens_num; i++) {
thresh_ptr[i].sensor_id = tsens_id_map[i];
thresh_ptr[i].id_type = THERM_TSENS_ID;
thresh_ptr[i].notify = callback;
thresh_ptr[i].trip_triggered = -1;
thresh_ptr[i].parent = &thresh[index];
thresh_ptr[i].threshold[0].temp = hi_temp;
thresh_ptr[i].threshold[0].trip =
THERMAL_TRIP_CONFIGURABLE_HI;
thresh_ptr[i].threshold[1].temp = low_temp;
thresh_ptr[i].threshold[1].trip =
THERMAL_TRIP_CONFIGURABLE_LOW;
thresh_ptr[i].threshold[0].notify =
thresh_ptr[i].threshold[1].notify = msm_thermal_notify;
thresh_ptr[i].threshold[0].data =
thresh_ptr[i].threshold[1].data =
(void *)&thresh_ptr[i];
}
} else {
thresh_ptr->sensor_id = sensor_id;
thresh_ptr->id_type = THERM_TSENS_ID;
thresh_ptr->notify = callback;
thresh_ptr->trip_triggered = -1;
thresh_ptr->parent = &thresh[index];
thresh_ptr->threshold[0].temp = hi_temp;
thresh_ptr->threshold[0].trip =
THERMAL_TRIP_CONFIGURABLE_HI;
thresh_ptr->threshold[1].temp = low_temp;
thresh_ptr->threshold[1].trip =
THERMAL_TRIP_CONFIGURABLE_LOW;
thresh_ptr->threshold[0].notify =
thresh_ptr->threshold[1].notify = msm_thermal_notify;
thresh_ptr->threshold[0].data =
thresh_ptr->threshold[1].data = (void *)thresh_ptr;
}
init_thresh_exit:
return ret;
}
static int msm_thermal_add_gfx_nodes(void)
{
struct kobject *module_kobj = NULL;
struct kobject *gfx_kobj = NULL;
int ret = 0;
if (!gfx_warm_phase_ctrl_enabled && !gfx_crit_phase_ctrl_enabled)
return -EINVAL;
module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME);
if (!module_kobj) {
pr_err("cannot find kobject\n");
ret = -ENOENT;
goto gfx_node_exit;
}
gfx_kobj = kobject_create_and_add("gfx_phase_ctrl", module_kobj);
if (!gfx_kobj) {
pr_err("cannot create gfx kobject\n");
ret = -ENOMEM;
goto gfx_node_exit;
}
gfx_attr_gp.attrs = kzalloc(sizeof(struct attribute *) * 2, GFP_KERNEL);
if (!gfx_attr_gp.attrs) {
pr_err("kzalloc failed\n");
ret = -ENOMEM;
goto gfx_node_fail;
}
PHASE_RW_ATTR(gfx, temp_band, gfx_mode_attr, 0, gfx_attr_gp);
gfx_attr_gp.attrs[1] = NULL;
ret = sysfs_create_group(gfx_kobj, &gfx_attr_gp);
if (ret) {
pr_err("cannot create GFX attribute group. err:%d\n", ret);
goto gfx_node_fail;
}
gfx_node_fail:
if (ret) {
kobject_put(gfx_kobj);
kfree(gfx_attr_gp.attrs);
gfx_attr_gp.attrs = NULL;
}
gfx_node_exit:
return ret;
}
static int msm_thermal_add_cx_nodes(void)
{
struct kobject *module_kobj = NULL;
struct kobject *cx_kobj = NULL;
int ret = 0;
if (!cx_phase_ctrl_enabled)
return -EINVAL;
module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME);
if (!module_kobj) {
pr_err("cannot find kobject\n");
ret = -ENOENT;
goto cx_node_exit;
}
cx_kobj = kobject_create_and_add("cx_phase_ctrl", module_kobj);
if (!cx_kobj) {
pr_err("cannot create cx kobject\n");
ret = -ENOMEM;
goto cx_node_exit;
}
cx_attr_gp.attrs = kzalloc(sizeof(struct attribute *) * 2, GFP_KERNEL);
if (!cx_attr_gp.attrs) {
pr_err("kzalloc failed\n");
ret = -ENOMEM;
goto cx_node_fail;
}
PHASE_RW_ATTR(cx, temp_band, cx_mode_attr, 0, cx_attr_gp);
cx_attr_gp.attrs[1] = NULL;
ret = sysfs_create_group(cx_kobj, &cx_attr_gp);
if (ret) {
pr_err("cannot create CX attribute group. err:%d\n", ret);
goto cx_node_fail;
}
cx_node_fail:
if (ret) {
kobject_put(cx_kobj);
kfree(cx_attr_gp.attrs);
cx_attr_gp.attrs = NULL;
}
cx_node_exit:
return ret;
}
/*
* We will reset the cpu frequencies limits here. The core online/offline
* status will be carried over to the process stopping the msm_thermal, as
* we dont want to online a core and bring in the thermal issues.
*/
static void __ref disable_msm_thermal(void)
{
uint32_t cpu = 0;
/* make sure check_temp is no longer running */
cancel_delayed_work_sync(&check_temp_work);
get_online_cpus();
for_each_possible_cpu(cpu) {
if (cpus[cpu].limited_max_freq == UINT_MAX &&
cpus[cpu].limited_min_freq == 0)
continue;
pr_info("Max frequency reset for CPU%d\n", cpu);
cpus[cpu].limited_max_freq = UINT_MAX;
cpus[cpu].limited_min_freq = 0;
if (!SYNC_CORE(cpu))
update_cpu_freq(cpu);
}
update_cluster_freq();
put_online_cpus();
}
static void interrupt_mode_init(void)
{
if (!msm_thermal_probed) {
interrupt_mode_enable = true;
return;
}
if (polling_enabled) {
pr_info("Interrupt mode init\n");
polling_enabled = 0;
disable_msm_thermal();
hotplug_init();
freq_mitigation_init();
thermal_monitor_init();
msm_thermal_add_cx_nodes();
msm_thermal_add_gfx_nodes();
}
}
static int __ref set_enabled(const char *val, const struct kernel_param *kp)
{
int ret = 0;
ret = param_set_bool(val, kp);
if (!enabled)
interrupt_mode_init();
else
pr_info("no action for enabled = %d\n",
enabled);
pr_info("enabled = %d\n", enabled);
return ret;
}
static struct kernel_param_ops module_ops = {
.set = set_enabled,
.get = param_get_bool,
};
module_param_cb(enabled, &module_ops, &enabled, 0644);
MODULE_PARM_DESC(enabled, "enforce thermal limit on cpu");
static ssize_t show_cc_enabled(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
return snprintf(buf, PAGE_SIZE, "%d\n", core_control_enabled);
}
static ssize_t __ref store_cc_enabled(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
int val = 0;
uint32_t cpu = 0;
ret = kstrtoint(buf, 10, &val);
if (ret) {
pr_err("Invalid input %s. err:%d\n", buf, ret);
goto done_store_cc;
}
if (core_control_enabled == !!val)
goto done_store_cc;
core_control_enabled = !!val;
if (core_control_enabled) {
pr_info("Core control enabled\n");
register_cpu_notifier(&msm_thermal_cpu_notifier);
/*
* Re-evaluate thermal core condition, update current status
* and set threshold for all cpus.
*/
hotplug_init_cpu_offlined();
mutex_lock(&core_control_mutex);
update_offline_cores(cpus_offlined);
if (hotplug_enabled) {
for_each_possible_cpu(cpu) {
if (!(msm_thermal_info.core_control_mask &
BIT(cpus[cpu].cpu)))
continue;
set_threshold(cpus[cpu].sensor_id,
&cpus[cpu].threshold[HOTPLUG_THRESHOLD_HIGH]);
}
}
mutex_unlock(&core_control_mutex);
} else {
pr_info("Core control disabled\n");
unregister_cpu_notifier(&msm_thermal_cpu_notifier);
}
done_store_cc:
return count;
}
static ssize_t show_cpus_offlined(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
return snprintf(buf, PAGE_SIZE, "%d\n", cpus_offlined);
}
static ssize_t __ref store_cpus_offlined(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
uint32_t val = 0;
uint32_t cpu;
mutex_lock(&core_control_mutex);
ret = kstrtouint(buf, 10, &val);
if (ret) {
pr_err("Invalid input %s. err:%d\n", buf, ret);
goto done_cc;
}
if (polling_enabled) {
pr_err("Ignoring request; polling thread is enabled.\n");
goto done_cc;
}
for_each_possible_cpu(cpu) {
if (!(msm_thermal_info.core_control_mask & BIT(cpu)))
continue;
cpus[cpu].user_offline = !!(val & BIT(cpu));
pr_debug("\"%s\"(PID:%i) requests %s CPU%d.\n", current->comm,
current->pid, (cpus[cpu].user_offline) ? "offline" :
"online", cpu);
}
if (hotplug_task)
complete(&hotplug_notify_complete);
else
pr_err("Hotplug task is not initialized\n");
done_cc:
mutex_unlock(&core_control_mutex);
return count;
}
static __refdata struct kobj_attribute cc_enabled_attr =
__ATTR(enabled, 0644, show_cc_enabled, store_cc_enabled);
static __refdata struct kobj_attribute cpus_offlined_attr =
__ATTR(cpus_offlined, 0644, show_cpus_offlined, store_cpus_offlined);
static __refdata struct attribute *cc_attrs[] = {
&cc_enabled_attr.attr,
&cpus_offlined_attr.attr,
NULL,
};
static __refdata struct attribute_group cc_attr_group = {
.attrs = cc_attrs,
};
static __init int msm_thermal_add_cc_nodes(void)
{
struct kobject *module_kobj = NULL;
int ret = 0;
module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME);
if (!module_kobj) {
pr_err("cannot find kobject\n");
ret = -ENOENT;
goto done_cc_nodes;
}
cc_kobj = kobject_create_and_add("core_control", module_kobj);
if (!cc_kobj) {
pr_err("cannot create core control kobj\n");
ret = -ENOMEM;
goto done_cc_nodes;
}
ret = sysfs_create_group(cc_kobj, &cc_attr_group);
if (ret) {
pr_err("cannot create sysfs group. err:%d\n", ret);
goto done_cc_nodes;
}
return 0;
done_cc_nodes:
if (cc_kobj)
kobject_del(cc_kobj);
return ret;
}
static ssize_t show_mx_enabled(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
return snprintf(buf, PAGE_SIZE, "%d\n", vdd_mx_enabled);
}
static ssize_t __ref store_mx_enabled(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{
int ret = 0;
int val = 0;
ret = kstrtoint(buf, 10, &val);
if (ret) {
pr_err("Invalid input %s\n", buf);
goto done_store_mx;
}
if (vdd_mx_enabled == !!val)
goto done_store_mx;
vdd_mx_enabled = !!val;
mutex_lock(&vdd_mx_mutex);
if (!vdd_mx_enabled)
remove_vdd_mx_restriction();
else if (!(convert_to_zone_id(&thresh[MSM_VDD_MX_RESTRICTION])))
therm_set_threshold(&thresh[MSM_VDD_MX_RESTRICTION]);
mutex_unlock(&vdd_mx_mutex);
done_store_mx:
return count;
}
static __init int msm_thermal_add_mx_nodes(void)
{
struct kobject *module_kobj = NULL;
int ret = 0;
if (!vdd_mx_enabled)
return -EINVAL;
module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME);
if (!module_kobj) {
pr_err("cannot find kobject for module\n");
ret = -ENOENT;
goto done_mx_nodes;
}
mx_kobj = kobject_create_and_add("vdd_mx", module_kobj);
if (!mx_kobj) {
pr_err("cannot create mx restriction kobj\n");
ret = -ENOMEM;
goto done_mx_nodes;
}
mx_attr_group.attrs = kzalloc(sizeof(struct attribute *) * 2,
GFP_KERNEL);
if (!mx_attr_group.attrs) {
ret = -ENOMEM;
pr_err("cannot allocate memory for mx_attr_group.attrs");
goto done_mx_nodes;
}
MX_RW_ATTR(mx_enabled_attr, enabled, mx_attr_group);
mx_attr_group.attrs[1] = NULL;
ret = sysfs_create_group(mx_kobj, &mx_attr_group);
if (ret) {
pr_err("cannot create group\n");
goto done_mx_nodes;
}
done_mx_nodes:
if (ret) {
if (mx_kobj)
kobject_del(mx_kobj);
kfree(mx_attr_group.attrs);
}
return ret;
}
static void msm_thermal_panic_notifier_init(struct device *dev)
{
int i;
tsens_temp_at_panic = devm_kzalloc(dev,
sizeof(long) * max_tsens_num,
GFP_KERNEL);
if (!tsens_temp_at_panic) {
pr_err("kzalloc failed\n");
return;
}
for (i = 0; i < max_tsens_num; i++)
tsens_temp_at_panic[i] = LONG_MIN;
atomic_notifier_chain_register(&panic_notifier_list,
&msm_thermal_panic_notifier);
}
int msm_thermal_pre_init(struct device *dev)
{
int ret = 0;
if (tsens_is_ready() <= 0) {
pr_err("Tsens driver is not ready yet\n");
return -EPROBE_DEFER;
}
ret = tsens_get_max_sensor_num(&max_tsens_num);
if (ret < 0) {
pr_err("failed to get max sensor number, err:%d\n", ret);
return ret;
}
if (create_sensor_id_map()) {
pr_err("Creating sensor id map failed\n");
ret = -EINVAL;
goto pre_init_exit;
}
if (!tsens_temp_at_panic)
msm_thermal_panic_notifier_init(dev);
if (!thresh) {
thresh = kzalloc(
sizeof(struct threshold_info) * MSM_LIST_MAX_NR,
GFP_KERNEL);
if (!thresh) {
pr_err("kzalloc failed\n");
ret = -ENOMEM;
goto pre_init_exit;
}
memset(thresh, 0, sizeof(struct threshold_info) *
MSM_LIST_MAX_NR);
}
pre_init_exit:
return ret;
}
static int devmgr_devices_init(struct platform_device *pdev)
{
int ret = 0;
uint32_t cpu;
struct device_manager_data *dev_mgr = NULL;
devices = devm_kzalloc(&pdev->dev,
sizeof(struct devmgr_devices),
GFP_KERNEL);
if (!devices) {
pr_err("Malloc failed for devmgr devices\n");
ret = -ENOMEM;
goto device_exit;
}
if (num_possible_cpus() > 1) {
/* Add hotplug device */
dev_mgr = devm_kzalloc(&pdev->dev,
sizeof(struct device_manager_data),
GFP_KERNEL);
if (!dev_mgr) {
pr_err("Malloc failed for hotplug device\n");
ret = -ENOMEM;
goto device_exit;
}
snprintf(dev_mgr->device_name,
TSENS_NAME_MAX, HOTPLUG_DEVICE);
dev_mgr->request_validate =
devmgr_hotplug_client_request_validate_and_update;
dev_mgr->update = devmgr_client_hotplug_update;
HOTPLUG_NO_MITIGATION(&dev_mgr->active_req.offline_mask);
mutex_init(&dev_mgr->clnt_lock);
INIT_LIST_HEAD(&dev_mgr->client_list);
list_add_tail(&dev_mgr->dev_ptr, &devices_list);
devices->hotplug_dev = dev_mgr;
}
/* Add cpu devices */
for_each_possible_cpu(cpu) {
dev_mgr = devm_kzalloc(&pdev->dev,
sizeof(struct device_manager_data),
GFP_KERNEL);
if (!dev_mgr) {
pr_err("Malloc failed for cpu%d device\n", cpu);
ret = -ENOMEM;
goto device_exit;
}
snprintf(dev_mgr->device_name, TSENS_NAME_MAX, CPU_DEVICE, cpu);
dev_mgr->request_validate =
devmgr_cpufreq_client_request_validate_and_update;
dev_mgr->update = devmgr_client_cpufreq_update;
dev_mgr->active_req.freq.max_freq = CPUFREQ_MAX_NO_MITIGATION;
dev_mgr->active_req.freq.min_freq = CPUFREQ_MIN_NO_MITIGATION;
mutex_init(&dev_mgr->clnt_lock);
INIT_LIST_HEAD(&dev_mgr->client_list);
list_add_tail(&dev_mgr->dev_ptr, &devices_list);
devices->cpufreq_dev[cpu] = dev_mgr;
}
device_exit:
if (ret) {
if (devices) {
if (devices->hotplug_dev)
devm_kfree(&pdev->dev,
devices->hotplug_dev);
for_each_possible_cpu(cpu) {
if (devices->cpufreq_dev[cpu])
devm_kfree(&pdev->dev,
devices->cpufreq_dev[cpu]);
}
}
}
return ret;
}
int msm_thermal_init(struct msm_thermal_data *pdata)
{
int ret = 0;
uint32_t cpu;
ret = devmgr_devices_init(pdata->pdev);
if (ret)
pr_err("cannot initialize devm devices. err:%d\n", ret);
for_each_possible_cpu(cpu) {
cpus[cpu].cpu = cpu;
cpus[cpu].offline = 0;
cpus[cpu].user_offline = 0;
cpus[cpu].hotplug_thresh_clear = false;
cpus[cpu].max_freq = false;
cpus[cpu].user_max_freq = UINT_MAX;
cpus[cpu].user_min_freq = 0;
cpus[cpu].limited_max_freq = UINT_MAX;
cpus[cpu].limited_min_freq = 0;
cpus[cpu].freq_thresh_clear = false;
}
BUG_ON(!pdata);
memcpy(&msm_thermal_info, pdata, sizeof(struct msm_thermal_data));
if (check_sensor_id(msm_thermal_info.sensor_id)) {
pr_err("Invalid sensor:%d for polling\n",
msm_thermal_info.sensor_id);
return -EINVAL;
}
enabled = 1;
polling_enabled = 1;
ret = cpufreq_register_notifier(&msm_thermal_cpufreq_notifier,
CPUFREQ_POLICY_NOTIFIER);
if (ret)
pr_err("cannot register cpufreq notifier. err:%d\n", ret);
INIT_DELAYED_WORK(&check_temp_work, check_temp);
schedule_delayed_work(&check_temp_work, 0);
if (num_possible_cpus() > 1)
register_cpu_notifier(&msm_thermal_cpu_notifier);
return ret;
}
static int ocr_reg_init(struct platform_device *pdev)
{
int ret = 0;
int i, j;
for (i = 0; i < ocr_rail_cnt; i++) {
/* Check if vdd_restriction has already initialized any
* regualtor handle. If so use the same handle.*/
for (j = 0; j < rails_cnt; j++) {
if (!strcmp(ocr_rails[i].name, rails[j].name)) {
if (rails[j].reg == NULL)
break;
ocr_rails[i].phase_reg = rails[j].reg;
goto reg_init;
}
}
ocr_rails[i].phase_reg = devm_regulator_get(&pdev->dev,
ocr_rails[i].name);
if (IS_ERR_OR_NULL(ocr_rails[i].phase_reg)) {
ret = PTR_ERR(ocr_rails[i].phase_reg);
if (ret != -EPROBE_DEFER) {
pr_err("Could not get regulator: %s, err:%d\n",
ocr_rails[i].name, ret);
ocr_rails[i].phase_reg = NULL;
ocr_rails[i].mode = 0;
ocr_rails[i].init = 0;
}
return ret;
}
reg_init:
ocr_rails[i].mode = OPTIMUM_CURRENT_MIN;
}
return ret;
}
static int vdd_restriction_reg_init(struct platform_device *pdev)
{
int ret = 0;
int i;
for (i = 0; i < rails_cnt; i++) {
if (rails[i].freq_req == 1) {
usefreq |= BIT(i);
check_freq_table();
/*
* Restrict frequency by default until we have made
* our first temp reading
*/
if (freq_table_get)
ret = vdd_restriction_apply_freq(&rails[i], 0);
else
pr_info("Defer vdd rstr freq init.\n");
} else {
rails[i].reg = devm_regulator_get(&pdev->dev,
rails[i].name);
if (IS_ERR_OR_NULL(rails[i].reg)) {
ret = PTR_ERR(rails[i].reg);
if (ret != -EPROBE_DEFER) {
pr_err( \
"could not get regulator: %s. err:%d\n",
rails[i].name, ret);
rails[i].reg = NULL;
rails[i].curr_level = -2;
return ret;
}
pr_info("Defer regulator %s probe\n",
rails[i].name);
return ret;
}
/*
* Restrict votlage by default until we have made
* our first temp reading
*/
ret = vdd_restriction_apply_voltage(&rails[i], 0);
}
}
return ret;
}
static int psm_reg_init(struct platform_device *pdev)
{
int ret = 0;
int i = 0;
int j = 0;
for (i = 0; i < psm_rails_cnt; i++) {
psm_rails[i].reg = rpm_regulator_get(&pdev->dev,
psm_rails[i].name);
if (IS_ERR_OR_NULL(psm_rails[i].reg)) {
ret = PTR_ERR(psm_rails[i].reg);
if (ret != -EPROBE_DEFER) {
pr_err("couldn't get rpm regulator %s. err%d\n",
psm_rails[i].name, ret);
psm_rails[i].reg = NULL;
goto psm_reg_exit;
}
pr_info("Defer regulator %s probe\n",
psm_rails[i].name);
return ret;
}
/* Apps default vote for PWM mode */
psm_rails[i].init = PMIC_PWM_MODE;
ret = rpm_regulator_set_mode(psm_rails[i].reg,
psm_rails[i].init);
if (ret) {
pr_err("Cannot set PMIC PWM mode. err:%d\n", ret);
return ret;
} else
psm_rails[i].mode = PMIC_PWM_MODE;
}
return ret;
psm_reg_exit:
if (ret) {
for (j = 0; j < i; j++) {
if (psm_rails[j].reg != NULL)
rpm_regulator_put(psm_rails[j].reg);
}
}
return ret;
}
static struct kobj_attribute sensor_info_attr =
__ATTR_RO(sensor_info);
static int msm_thermal_add_sensor_info_nodes(void)
{
struct kobject *module_kobj = NULL;
int ret = 0;
if (!sensor_info_probed) {
sensor_info_nodes_called = true;
return ret;
}
if (sensor_info_probed && sensor_cnt == 0)
return ret;
module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME);
if (!module_kobj) {
pr_err("cannot find kobject\n");
return -ENOENT;
}
sysfs_attr_init(&sensor_info_attr.attr);
ret = sysfs_create_file(module_kobj, &sensor_info_attr.attr);
if (ret) {
pr_err(
"cannot create sensor info kobject attribute. err:%d\n",
ret);
return ret;
}
return ret;
}
static int msm_thermal_add_vdd_rstr_nodes(void)
{
struct kobject *module_kobj = NULL;
struct kobject *vdd_rstr_kobj = NULL;
struct kobject *vdd_rstr_reg_kobj[MAX_RAILS] = {0};
int rc = 0;
int i = 0;
if (!vdd_rstr_probed) {
vdd_rstr_nodes_called = true;
return rc;
}
if (vdd_rstr_probed && rails_cnt == 0)
return rc;
module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME);
if (!module_kobj) {
pr_err("cannot find kobject\n");
rc = -ENOENT;
goto thermal_sysfs_add_exit;
}
vdd_rstr_kobj = kobject_create_and_add("vdd_restriction", module_kobj);
if (!vdd_rstr_kobj) {
pr_err("cannot create vdd_restriction kobject\n");
rc = -ENOMEM;
goto thermal_sysfs_add_exit;
}
rc = sysfs_create_group(vdd_rstr_kobj, &vdd_rstr_en_attribs_gp);
if (rc) {
pr_err("cannot create kobject attribute group. err:%d\n", rc);
rc = -ENOMEM;
goto thermal_sysfs_add_exit;
}
for (i = 0; i < rails_cnt; i++) {
vdd_rstr_reg_kobj[i] = kobject_create_and_add(rails[i].name,
vdd_rstr_kobj);
if (!vdd_rstr_reg_kobj[i]) {
pr_err("cannot create kobject for %s\n",
rails[i].name);
rc = -ENOMEM;
goto thermal_sysfs_add_exit;
}
rails[i].attr_gp.attrs = kzalloc(sizeof(struct attribute *) * 3,
GFP_KERNEL);
if (!rails[i].attr_gp.attrs) {
pr_err("kzalloc failed\n");
rc = -ENOMEM;
goto thermal_sysfs_add_exit;
}
VDD_RES_RW_ATTRIB(rails[i], rails[i].level_attr, 0, level);
VDD_RES_RO_ATTRIB(rails[i], rails[i].value_attr, 1, value);
rails[i].attr_gp.attrs[2] = NULL;
rc = sysfs_create_group(vdd_rstr_reg_kobj[i],
&rails[i].attr_gp);
if (rc) {
pr_err("cannot create attribute group for %s. err:%d\n",
rails[i].name, rc);
goto thermal_sysfs_add_exit;
}
}
return rc;
thermal_sysfs_add_exit:
if (rc) {
for (i = 0; i < rails_cnt; i++) {
kobject_del(vdd_rstr_reg_kobj[i]);
kfree(rails[i].attr_gp.attrs);
}
if (vdd_rstr_kobj)
kobject_del(vdd_rstr_kobj);
}
return rc;
}
static int msm_thermal_add_ocr_nodes(void)
{
struct kobject *module_kobj = NULL;
struct kobject *ocr_kobj = NULL;
struct kobject *ocr_reg_kobj[MAX_RAILS] = {0};
int rc = 0;
int i = 0;
if (!ocr_probed) {
ocr_nodes_called = true;
return rc;
}
if (ocr_probed && ocr_rail_cnt == 0)
return rc;
module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME);
if (!module_kobj) {
pr_err("Cannot find kobject\n");
rc = -ENOENT;
goto ocr_node_exit;
}
ocr_kobj = kobject_create_and_add("opt_curr_req", module_kobj);
if (!ocr_kobj) {
pr_err("Cannot create ocr kobject\n");
rc = -ENOMEM;
goto ocr_node_exit;
}
for (i = 0; i < ocr_rail_cnt; i++) {
ocr_reg_kobj[i] = kobject_create_and_add(ocr_rails[i].name,
ocr_kobj);
if (!ocr_reg_kobj[i]) {
pr_err("Cannot create kobject for %s\n",
ocr_rails[i].name);
rc = -ENOMEM;
goto ocr_node_exit;
}
ocr_rails[i].attr_gp.attrs = kzalloc(
sizeof(struct attribute *) * 2, GFP_KERNEL);
if (!ocr_rails[i].attr_gp.attrs) {
pr_err("Fail to allocate memory for attribute for %s\n",
ocr_rails[i].name);
rc = -ENOMEM;
goto ocr_node_exit;
}
OCR_RW_ATTRIB(ocr_rails[i], ocr_rails[i].mode_attr, 0, mode);
ocr_rails[i].attr_gp.attrs[1] = NULL;
rc = sysfs_create_group(ocr_reg_kobj[i], &ocr_rails[i].attr_gp);
if (rc) {
pr_err("Cannot create attribute group for %s. err:%d\n",
ocr_rails[i].name, rc);
goto ocr_node_exit;
}
}
ocr_node_exit:
if (rc) {
for (i = 0; i < ocr_rail_cnt; i++) {
if (ocr_reg_kobj[i])
kobject_del(ocr_reg_kobj[i]);
kfree(ocr_rails[i].attr_gp.attrs);
ocr_rails[i].attr_gp.attrs = NULL;
}
if (ocr_kobj)
kobject_del(ocr_kobj);
}
return rc;
}
static int msm_thermal_add_psm_nodes(void)
{
struct kobject *module_kobj = NULL;
struct kobject *psm_kobj = NULL;
struct kobject *psm_reg_kobj[MAX_RAILS] = {0};
int rc = 0;
int i = 0;
if (!psm_probed) {
psm_nodes_called = true;
return rc;
}
if (psm_probed && psm_rails_cnt == 0)
return rc;
module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME);
if (!module_kobj) {
pr_err("cannot find kobject\n");
rc = -ENOENT;
goto psm_node_exit;
}
psm_kobj = kobject_create_and_add("pmic_sw_mode", module_kobj);
if (!psm_kobj) {
pr_err("cannot create psm kobject\n");
rc = -ENOMEM;
goto psm_node_exit;
}
for (i = 0; i < psm_rails_cnt; i++) {
psm_reg_kobj[i] = kobject_create_and_add(psm_rails[i].name,
psm_kobj);
if (!psm_reg_kobj[i]) {
pr_err("cannot create kobject for %s\n",
psm_rails[i].name);
rc = -ENOMEM;
goto psm_node_exit;
}
psm_rails[i].attr_gp.attrs = kzalloc( \
sizeof(struct attribute *) * 2, GFP_KERNEL);
if (!psm_rails[i].attr_gp.attrs) {
pr_err("kzalloc failed\n");
rc = -ENOMEM;
goto psm_node_exit;
}
PSM_RW_ATTRIB(psm_rails[i], psm_rails[i].mode_attr, 0, mode);
psm_rails[i].attr_gp.attrs[1] = NULL;
rc = sysfs_create_group(psm_reg_kobj[i], &psm_rails[i].attr_gp);
if (rc) {
pr_err("cannot create attribute group for %s. err:%d\n",
psm_rails[i].name, rc);
goto psm_node_exit;
}
}
return rc;
psm_node_exit:
if (rc) {
for (i = 0; i < psm_rails_cnt; i++) {
kobject_del(psm_reg_kobj[i]);
kfree(psm_rails[i].attr_gp.attrs);
}
if (psm_kobj)
kobject_del(psm_kobj);
}
return rc;
}
static int probe_vdd_mx(struct device_node *node,
struct msm_thermal_data *data, struct platform_device *pdev)
{
int ret = 0;
char *key = NULL;
key = "qcom,disable-vdd-mx";
if (of_property_read_bool(node, key)) {
vdd_mx_enabled = false;
return ret;
}
key = "qcom,mx-restriction-temp";
ret = of_property_read_u32(node, key, &data->vdd_mx_temp_degC);
if (ret)
goto read_node_done;
key = "qcom,mx-restriction-temp-hysteresis";
ret = of_property_read_u32(node, key, &data->vdd_mx_temp_hyst_degC);
if (ret)
goto read_node_done;
key = "qcom,mx-retention-min";
ret = of_property_read_u32(node, key, &data->vdd_mx_min);
if (ret)
goto read_node_done;
vdd_mx = devm_regulator_get(&pdev->dev, "vdd-mx");
if (IS_ERR_OR_NULL(vdd_mx)) {
ret = PTR_ERR(vdd_mx);
if (ret != -EPROBE_DEFER) {
pr_err(
"Could not get regulator: vdd-mx, err:%d\n", ret);
}
goto read_node_done;
}
ret = init_threshold(MSM_VDD_MX_RESTRICTION, MONITOR_ALL_TSENS,
data->vdd_mx_temp_degC + data->vdd_mx_temp_hyst_degC,
data->vdd_mx_temp_degC, vdd_mx_notify);
read_node_done:
if (!ret)
vdd_mx_enabled = true;
else if (ret != -EPROBE_DEFER)
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s. KTM continues\n",
__func__, node->full_name, key);
return ret;
}
static int probe_vdd_rstr(struct device_node *node,
struct msm_thermal_data *data, struct platform_device *pdev)
{
int ret = 0;
int i = 0;
int arr_size;
char *key = NULL;
struct device_node *child_node = NULL;
rails = NULL;
key = "qcom,disable-vdd-rstr";
if (of_property_read_bool(node, key)) {
vdd_rstr_probed = true;
vdd_rstr_enabled = false;
rails_cnt = 0;
return ret;
}
key = "qcom,vdd-restriction-temp";
ret = of_property_read_u32(node, key, &data->vdd_rstr_temp_degC);
if (ret)
goto read_node_fail;
key = "qcom,vdd-restriction-temp-hysteresis";
ret = of_property_read_u32(node, key, &data->vdd_rstr_temp_hyst_degC);
if (ret)
goto read_node_fail;
for_each_child_of_node(node, child_node) {
rails_cnt++;
}
if (rails_cnt == 0)
goto read_node_fail;
if (rails_cnt >= MAX_RAILS) {
pr_err("Too many rails:%d.\n", rails_cnt);
return -EFAULT;
}
rails = kzalloc(sizeof(struct rail) * rails_cnt,
GFP_KERNEL);
if (!rails) {
pr_err("Fail to allocate memory for rails.\n");
return -ENOMEM;
}
i = 0;
for_each_child_of_node(node, child_node) {
key = "qcom,vdd-rstr-reg";
ret = of_property_read_string(child_node, key, &rails[i].name);
if (ret)
goto read_node_fail;
key = "qcom,levels";
if (!of_get_property(child_node, key, &arr_size))
goto read_node_fail;
rails[i].num_levels = arr_size/sizeof(__be32);
if (rails[i].num_levels >
sizeof(rails[i].levels)/sizeof(uint32_t)) {
pr_err("Array size:%d too large for index:%d\n",
rails[i].num_levels, i);
return -EFAULT;
}
ret = of_property_read_u32_array(child_node, key,
rails[i].levels, rails[i].num_levels);
if (ret)
goto read_node_fail;
key = "qcom,freq-req";
rails[i].freq_req = of_property_read_bool(child_node, key);
if (rails[i].freq_req)
rails[i].min_level = 0;
else {
key = "qcom,min-level";
ret = of_property_read_u32(child_node, key,
&rails[i].min_level);
if (ret)
goto read_node_fail;
}
rails[i].curr_level = -1;
rails[i].reg = NULL;
i++;
}
if (rails_cnt) {
ret = vdd_restriction_reg_init(pdev);
if (ret) {
pr_err("Err regulator init. err:%d. KTM continues.\n",
ret);
goto read_node_fail;
}
ret = init_threshold(MSM_VDD_RESTRICTION, MONITOR_ALL_TSENS,
data->vdd_rstr_temp_hyst_degC, data->vdd_rstr_temp_degC,
vdd_restriction_notify);
if (ret) {
pr_err("Error in initializing thresholds. err:%d\n",
ret);
goto read_node_fail;
}
vdd_rstr_enabled = true;
}
read_node_fail:
vdd_rstr_probed = true;
if (ret) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s. err=%d. KTM continues\n",
__func__, node->full_name, key, ret);
kfree(rails);
rails_cnt = 0;
}
if (ret == -EPROBE_DEFER)
vdd_rstr_probed = false;
return ret;
}
static void probe_sensor_info(struct device_node *node,
struct msm_thermal_data *data, struct platform_device *pdev)
{
int err = 0;
int i = 0;
char *key = NULL;
struct device_node *child_node = NULL;
struct device_node *np = NULL;
key = "qcom,disable-sensor-info";
if (of_property_read_bool(node, key)) {
sensor_info_probed = true;
return;
}
np = of_find_compatible_node(NULL, NULL, "qcom,sensor-information");
if (!np) {
dev_info(&pdev->dev,
"%s:unable to find DT for sensor-information.KTM continues\n",
__func__);
sensor_info_probed = true;
return;
}
sensor_cnt = of_get_child_count(np);
if (sensor_cnt == 0) {
err = -ENODEV;
goto read_node_fail;
}
sensors = devm_kzalloc(&pdev->dev,
sizeof(struct msm_sensor_info) * sensor_cnt,
GFP_KERNEL);
if (!sensors) {
pr_err("Fail to allocate memory for sensor_info.\n");
err = -ENOMEM;
goto read_node_fail;
}
for_each_child_of_node(np, child_node) {
key = "qcom,sensor-type";
err = of_property_read_string(child_node,
key, &sensors[i].type);
if (err)
goto read_node_fail;
key = "qcom,sensor-name";
err = of_property_read_string(child_node,
key, &sensors[i].name);
if (err)
goto read_node_fail;
key = "qcom,alias-name";
of_property_read_string(child_node,
key, &sensors[i].alias);
key = "qcom,scaling-factor";
err = of_property_read_u32(child_node,
key, &sensors[i].scaling_factor);
if (err) {
sensors[i].scaling_factor = SENSOR_SCALING_FACTOR;
err = 0;
}
i++;
}
read_node_fail:
sensor_info_probed = true;
if (err) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s. err=%d. KTM continues\n",
__func__, np->full_name, key, err);
devm_kfree(&pdev->dev, sensors);
}
}
static int probe_ocr(struct device_node *node, struct msm_thermal_data *data,
struct platform_device *pdev)
{
int ret = 0;
int j = 0;
char *key = NULL;
if (ocr_probed) {
pr_info("Nodes already probed\n");
goto read_ocr_exit;
}
ocr_rails = NULL;
key = "qcom,disable-ocr";
if (of_property_read_bool(node, key)) {
ocr_probed = true;
ocr_enabled = false;
ocr_rail_cnt = 0;
goto read_ocr_exit;
}
key = "qcom,pmic-opt-curr-temp";
ret = of_property_read_u32(node, key, &data->ocr_temp_degC);
if (ret)
goto read_ocr_fail;
key = "qcom,pmic-opt-curr-temp-hysteresis";
ret = of_property_read_u32(node, key, &data->ocr_temp_hyst_degC);
if (ret)
goto read_ocr_fail;
key = "qcom,pmic-opt-curr-regs";
ocr_rail_cnt = of_property_count_strings(node, key);
if (ocr_rail_cnt <= 0) {
pr_err("Invalid ocr rail count. err:%d\n", ocr_rail_cnt);
goto read_ocr_fail;
}
ocr_rails = kzalloc(sizeof(struct psm_rail) * ocr_rail_cnt,
GFP_KERNEL);
if (!ocr_rails) {
pr_err("Fail to allocate memory for ocr rails\n");
ocr_rail_cnt = 0;
return -ENOMEM;
}
for (j = 0; j < ocr_rail_cnt; j++) {
ret = of_property_read_string_index(node, key, j,
&ocr_rails[j].name);
if (ret)
goto read_ocr_fail;
ocr_rails[j].phase_reg = NULL;
ocr_rails[j].init = OPTIMUM_CURRENT_MAX;
}
key = "qcom,pmic-opt-curr-sensor-id";
ret = of_property_read_u32(node, key, &data->ocr_sensor_id);
if (ret) {
pr_info("ocr sensor is not configured, use all TSENS. err:%d\n",
ret);
data->ocr_sensor_id = MONITOR_ALL_TSENS;
}
ret = ocr_reg_init(pdev);
if (ret) {
if (ret == -EPROBE_DEFER) {
ocr_reg_init_defer = true;
pr_info("ocr reg init is defered\n");
} else {
pr_err(
"Failed to get regulators. KTM continues. err:%d\n",
ret);
goto read_ocr_fail;
}
}
ret = init_threshold(MSM_OCR, data->ocr_sensor_id,
data->ocr_temp_degC,
data->ocr_temp_degC - data->ocr_temp_hyst_degC,
ocr_notify);
if (ret)
goto read_ocr_fail;
if (!ocr_reg_init_defer)
ocr_enabled = true;
ocr_nodes_called = false;
/*
* Vote for max optimum current by default until we have made
* our first temp reading
*/
if (ocr_enabled) {
ret = ocr_set_mode_all(OPTIMUM_CURRENT_MAX);
if (ret) {
pr_err("Set max optimum current failed. err:%d\n",
ret);
ocr_enabled = false;
}
}
read_ocr_fail:
ocr_probed = true;
if (ret) {
if (ret == -EPROBE_DEFER) {
ret = 0;
goto read_ocr_exit;
}
dev_err(
&pdev->dev,
"%s:Failed reading node=%s, key=%s err:%d. KTM continues\n",
__func__, node->full_name, key, ret);
kfree(ocr_rails);
ocr_rails = NULL;
ocr_rail_cnt = 0;
}
read_ocr_exit:
return ret;
}
static int probe_psm(struct device_node *node, struct msm_thermal_data *data,
struct platform_device *pdev)
{
int ret = 0;
int j = 0;
char *key = NULL;
psm_rails = NULL;
key = "qcom,disable-psm";
if (of_property_read_bool(node, key)) {
psm_probed = true;
psm_enabled = false;
psm_rails_cnt = 0;
return ret;
}
key = "qcom,pmic-sw-mode-temp";
ret = of_property_read_u32(node, key, &data->psm_temp_degC);
if (ret)
goto read_node_fail;
key = "qcom,pmic-sw-mode-temp-hysteresis";
ret = of_property_read_u32(node, key, &data->psm_temp_hyst_degC);
if (ret)
goto read_node_fail;
key = "qcom,pmic-sw-mode-regs";
psm_rails_cnt = of_property_count_strings(node, key);
psm_rails = kzalloc(sizeof(struct psm_rail) * psm_rails_cnt,
GFP_KERNEL);
if (!psm_rails) {
pr_err("Fail to allocate memory for psm rails\n");
psm_rails_cnt = 0;
return -ENOMEM;
}
for (j = 0; j < psm_rails_cnt; j++) {
ret = of_property_read_string_index(node, key, j,
&psm_rails[j].name);
if (ret)
goto read_node_fail;
}
if (psm_rails_cnt) {
ret = psm_reg_init(pdev);
if (ret) {
pr_err("Err regulator init. err:%d. KTM continues.\n",
ret);
goto read_node_fail;
}
psm_enabled = true;
}
read_node_fail:
psm_probed = true;
if (ret) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s. err=%d. KTM continues\n",
__func__, node->full_name, key, ret);
kfree(psm_rails);
psm_rails_cnt = 0;
}
if (ret == -EPROBE_DEFER)
psm_probed = false;
return ret;
}
static int probe_cc(struct device_node *node, struct msm_thermal_data *data,
struct platform_device *pdev)
{
char *key = NULL;
uint32_t cpu_cnt = 0;
int ret = 0;
uint32_t cpu = 0;
if (num_possible_cpus() > 1) {
core_control_enabled = 1;
hotplug_enabled = 1;
}
key = "qcom,core-limit-temp";
ret = of_property_read_u32(node, key, &data->core_limit_temp_degC);
if (ret)
goto read_node_fail;
key = "qcom,core-temp-hysteresis";
ret = of_property_read_u32(node, key, &data->core_temp_hysteresis_degC);
if (ret)
goto read_node_fail;
key = "qcom,core-control-mask";
ret = of_property_read_u32(node, key, &data->core_control_mask);
if (ret)
goto read_node_fail;
key = "qcom,hotplug-temp";
ret = of_property_read_u32(node, key, &data->hotplug_temp_degC);
if (ret)
goto hotplug_node_fail;
key = "qcom,hotplug-temp-hysteresis";
ret = of_property_read_u32(node, key,
&data->hotplug_temp_hysteresis_degC);
if (ret)
goto hotplug_node_fail;
key = "qcom,cpu-sensors";
cpu_cnt = of_property_count_strings(node, key);
if (cpu_cnt < num_possible_cpus()) {
pr_err("Wrong number of cpu sensors:%d\n", cpu_cnt);
ret = -EINVAL;
goto hotplug_node_fail;
}
for_each_possible_cpu(cpu) {
ret = of_property_read_string_index(node, key, cpu,
&cpus[cpu].sensor_type);
if (ret)
goto hotplug_node_fail;
}
read_node_fail:
if (ret) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s. err=%d. KTM continues\n",
KBUILD_MODNAME, node->full_name, key, ret);
core_control_enabled = 0;
}
return ret;
hotplug_node_fail:
if (ret) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s. err=%d. KTM continues\n",
KBUILD_MODNAME, node->full_name, key, ret);
hotplug_enabled = 0;
}
return ret;
}
static int probe_gfx_phase_ctrl(struct device_node *node,
struct msm_thermal_data *data,
struct platform_device *pdev)
{
char *key = NULL;
const char *tmp_str = NULL;
int ret = 0;
key = "qcom,disable-gfx-phase-ctrl";
if (of_property_read_bool(node, key)) {
gfx_crit_phase_ctrl_enabled = false;
gfx_warm_phase_ctrl_enabled = false;
return ret;
}
key = "qcom,gfx-sensor-id";
ret = of_property_read_u32(node, key,
&data->gfx_sensor);
if (ret)
goto probe_gfx_exit;
key = "qcom,gfx-phase-resource-key";
ret = of_property_read_string(node, key,
&tmp_str);
if (ret)
goto probe_gfx_exit;
data->gfx_phase_request_key = msm_thermal_str_to_int(tmp_str);
key = "qcom,gfx-phase-warm-temp";
ret = of_property_read_u32(node, key,
&data->gfx_phase_warm_temp_degC);
if (ret) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s. err=%d. KTM continues\n",
KBUILD_MODNAME, node->full_name, key, ret);
data->gfx_phase_warm_temp_degC = INT_MIN;
goto probe_gfx_crit;
}
key = "qcom,gfx-phase-warm-temp-hyst";
ret = of_property_read_u32(node, key,
&data->gfx_phase_warm_temp_hyst_degC);
if (ret) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s. err=%d. KTM continues\n",
KBUILD_MODNAME, node->full_name, key, ret);
goto probe_gfx_crit;
}
ret = init_threshold(MSM_GFX_PHASE_CTRL_WARM, data->gfx_sensor,
data->gfx_phase_warm_temp_degC, data->gfx_phase_warm_temp_degC -
data->gfx_phase_warm_temp_hyst_degC,
gfx_phase_ctrl_notify);
if (ret) {
pr_err("init WARM threshold failed. err:%d\n", ret);
goto probe_gfx_crit;
}
gfx_warm_phase_ctrl_enabled = true;
probe_gfx_crit:
key = "qcom,gfx-phase-hot-crit-temp";
ret = of_property_read_u32(node, key,
&data->gfx_phase_hot_temp_degC);
if (ret) {
data->gfx_phase_hot_temp_degC = INT_MAX;
goto probe_gfx_exit;
}
key = "qcom,gfx-phase-hot-crit-temp-hyst";
ret = of_property_read_u32(node, key,
&data->gfx_phase_hot_temp_hyst_degC);
if (ret)
goto probe_gfx_exit;
ret = init_threshold(MSM_GFX_PHASE_CTRL_HOT, data->gfx_sensor,
data->gfx_phase_hot_temp_degC, data->gfx_phase_hot_temp_degC -
data->gfx_phase_hot_temp_hyst_degC,
gfx_phase_ctrl_notify);
if (ret) {
pr_err("init HOT threshold failed. err:%d\n", ret);
goto probe_gfx_exit;
}
gfx_crit_phase_ctrl_enabled = true;
probe_gfx_exit:
if (ret) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s. err=%d. KTM continues\n",
KBUILD_MODNAME, node->full_name, key, ret);
}
return ret;
}
static int probe_cx_phase_ctrl(struct device_node *node,
struct msm_thermal_data *data,
struct platform_device *pdev)
{
char *key = NULL;
const char *tmp_str;
int ret = 0;
key = "qcom,disable-cx-phase-ctrl";
if (of_property_read_bool(node, key)) {
cx_phase_ctrl_enabled = false;
return ret;
}
key = "qcom,rpm-phase-resource-type";
ret = of_property_read_string(node, key,
&tmp_str);
if (ret)
goto probe_cx_exit;
data->phase_rpm_resource_type = msm_thermal_str_to_int(tmp_str);
key = "qcom,rpm-phase-resource-id";
ret = of_property_read_u32(node, key,
&data->phase_rpm_resource_id);
if (ret)
goto probe_cx_exit;
key = "qcom,cx-phase-resource-key";
ret = of_property_read_string(node, key,
&tmp_str);
if (ret)
goto probe_cx_exit;
data->cx_phase_request_key = msm_thermal_str_to_int(tmp_str);
key = "qcom,cx-phase-hot-crit-temp";
ret = of_property_read_u32(node, key,
&data->cx_phase_hot_temp_degC);
if (ret)
goto probe_cx_exit;
key = "qcom,cx-phase-hot-crit-temp-hyst";
ret = of_property_read_u32(node, key,
&data->cx_phase_hot_temp_hyst_degC);
if (ret)
goto probe_cx_exit;
ret = init_threshold(MSM_CX_PHASE_CTRL_HOT, MONITOR_ALL_TSENS,
data->cx_phase_hot_temp_degC, data->cx_phase_hot_temp_degC -
data->cx_phase_hot_temp_hyst_degC,
cx_phase_ctrl_notify);
if (ret) {
pr_err("init HOT threshold failed. err:%d\n", ret);
goto probe_cx_exit;
}
cx_phase_ctrl_enabled = true;
probe_cx_exit:
if (ret) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s err=%d. KTM continues\n",
KBUILD_MODNAME, node->full_name, key, ret);
cx_phase_ctrl_enabled = false;
}
return ret;
}
static int probe_therm_reset(struct device_node *node,
struct msm_thermal_data *data,
struct platform_device *pdev)
{
char *key = NULL;
int ret = 0;
key = "qcom,therm-reset-temp";
ret = of_property_read_u32(node, key, &data->therm_reset_temp_degC);
if (ret)
goto PROBE_RESET_EXIT;
ret = init_threshold(MSM_THERM_RESET, MONITOR_ALL_TSENS,
data->therm_reset_temp_degC, data->therm_reset_temp_degC - 10,
therm_reset_notify);
if (ret) {
pr_err("Therm reset data structure init failed\n");
goto PROBE_RESET_EXIT;
}
therm_reset_enabled = true;
PROBE_RESET_EXIT:
if (ret) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s err=%d. KTM continues\n",
__func__, node->full_name, key, ret);
therm_reset_enabled = false;
}
return ret;
}
static int probe_freq_mitigation(struct device_node *node,
struct msm_thermal_data *data,
struct platform_device *pdev)
{
char *key = NULL;
int ret = 0;
key = "qcom,freq-mitigation-temp";
ret = of_property_read_u32(node, key, &data->freq_mitig_temp_degc);
if (ret)
goto PROBE_FREQ_EXIT;
key = "qcom,freq-mitigation-temp-hysteresis";
ret = of_property_read_u32(node, key,
&data->freq_mitig_temp_hysteresis_degc);
if (ret)
goto PROBE_FREQ_EXIT;
key = "qcom,freq-mitigation-value";
ret = of_property_read_u32(node, key, &data->freq_limit);
if (ret)
goto PROBE_FREQ_EXIT;
key = "qcom,freq-mitigation-control-mask";
ret = of_property_read_u32(node, key, &data->freq_mitig_control_mask);
if (ret)
goto PROBE_FREQ_EXIT;
freq_mitigation_enabled = 1;
PROBE_FREQ_EXIT:
if (ret) {
dev_info(&pdev->dev,
"%s:Failed reading node=%s, key=%s. err=%d. KTM continues\n",
__func__, node->full_name, key, ret);
freq_mitigation_enabled = 0;
}
return ret;
}
static int msm_thermal_dev_probe(struct platform_device *pdev)
{
int ret = 0;
char *key = NULL;
struct device_node *node = pdev->dev.of_node;
struct msm_thermal_data data;
memset(&data, 0, sizeof(struct msm_thermal_data));
data.pdev = pdev;
ret = msm_thermal_pre_init(&pdev->dev);
if (ret) {
pr_err("thermal pre init failed. err:%d\n", ret);
goto fail;
}
key = "qcom,sensor-id";
ret = of_property_read_u32(node, key, &data.sensor_id);
if (ret)
goto fail;
key = "qcom,temp-hysteresis";
ret = of_property_read_u32(node, key, &data.temp_hysteresis_degC);
if (ret)
goto fail;
key = "qcom,freq-step";
ret = of_property_read_u32(node, key, &data.bootup_freq_step);
if (ret)
goto fail;
key = "qcom,online-hotplug-core";
if (of_property_read_bool(node, key))
online_core = true;
else
online_core = false;
key = "qcom,freq-control-mask";
ret = of_property_read_u32(node, key, &data.bootup_freq_control_mask);
ret = probe_cc(node, &data, pdev);
ret = probe_freq_mitigation(node, &data, pdev);
ret = probe_cx_phase_ctrl(node, &data, pdev);
ret = probe_gfx_phase_ctrl(node, &data, pdev);
ret = probe_therm_reset(node, &data, pdev);
ret = probe_vdd_mx(node, &data, pdev);
if (ret == -EPROBE_DEFER)
goto fail;
/*
* Probe optional properties below. Call probe_psm before
* probe_vdd_rstr because rpm_regulator_get has to be called
* before devm_regulator_get
* probe_ocr should be called after probe_vdd_rstr to reuse the
* regualtor handle. calling devm_regulator_get more than once
* will fail.
*/
ret = probe_psm(node, &data, pdev);
if (ret == -EPROBE_DEFER)
goto fail;
ret = probe_vdd_rstr(node, &data, pdev);
if (ret == -EPROBE_DEFER)
goto fail;
probe_sensor_info(node, &data, pdev);
ret = probe_ocr(node, &data, pdev);
update_cpu_topology(&pdev->dev);
/*
* In case sysfs add nodes get called before probe function.
* Need to make sure sysfs node is created again
*/
if (psm_nodes_called) {
msm_thermal_add_psm_nodes();
psm_nodes_called = false;
}
if (vdd_rstr_nodes_called) {
msm_thermal_add_vdd_rstr_nodes();
vdd_rstr_nodes_called = false;
}
if (sensor_info_nodes_called) {
msm_thermal_add_sensor_info_nodes();
sensor_info_nodes_called = false;
}
if (ocr_nodes_called) {
msm_thermal_add_ocr_nodes();
ocr_nodes_called = false;
}
if (cluster_info_nodes_called) {
create_cpu_topology_sysfs();
cluster_info_nodes_called = false;
}
msm_thermal_ioctl_init();
ret = msm_thermal_init(&data);
msm_thermal_probed = true;
if (interrupt_mode_enable) {
interrupt_mode_init();
interrupt_mode_enable = false;
}
return ret;
fail:
if (ret)
pr_err("Failed reading node=%s, key=%s. err:%d\n",
node->full_name, key, ret);
return ret;
}
static int msm_thermal_dev_exit(struct platform_device *inp_dev)
{
int i = 0;
msm_thermal_ioctl_cleanup();
if (thresh) {
if (vdd_rstr_enabled)
kfree(thresh[MSM_VDD_RESTRICTION].thresh_list);
if (cx_phase_ctrl_enabled)
kfree(thresh[MSM_CX_PHASE_CTRL_HOT].thresh_list);
if (gfx_warm_phase_ctrl_enabled)
kfree(thresh[MSM_GFX_PHASE_CTRL_WARM].thresh_list);
if (gfx_crit_phase_ctrl_enabled)
kfree(thresh[MSM_GFX_PHASE_CTRL_HOT].thresh_list);
if (ocr_enabled) {
for (i = 0; i < ocr_rail_cnt; i++)
kfree(ocr_rails[i].attr_gp.attrs);
kfree(ocr_rails);
ocr_rails = NULL;
kfree(thresh[MSM_OCR].thresh_list);
}
if (vdd_mx_enabled) {
kfree(mx_kobj);
kfree(mx_attr_group.attrs);
kfree(thresh[MSM_VDD_MX_RESTRICTION].thresh_list);
}
kfree(thresh);
thresh = NULL;
}
return 0;
}
static struct of_device_id msm_thermal_match_table[] = {
{.compatible = "qcom,msm-thermal"},
{},
};
static struct platform_driver msm_thermal_device_driver = {
.probe = msm_thermal_dev_probe,
.driver = {
.name = "msm-thermal",
.owner = THIS_MODULE,
.of_match_table = msm_thermal_match_table,
},
.remove = msm_thermal_dev_exit,
};
int __init msm_thermal_device_init(void)
{
return platform_driver_register(&msm_thermal_device_driver);
}
arch_initcall(msm_thermal_device_init);
int __init msm_thermal_late_init(void)
{
if (num_possible_cpus() > 1)
msm_thermal_add_cc_nodes();
msm_thermal_add_psm_nodes();
msm_thermal_add_vdd_rstr_nodes();
msm_thermal_add_sensor_info_nodes();
if (ocr_reg_init_defer) {
if (!ocr_reg_init(msm_thermal_info.pdev)) {
ocr_enabled = true;
msm_thermal_add_ocr_nodes();
}
}
msm_thermal_add_mx_nodes();
interrupt_mode_init();
create_cpu_topology_sysfs();
return 0;
}
late_initcall(msm_thermal_late_init);
| Java |
#!/usr/bin/perl
#[SUMMARY] Flashcard program. Used to train yourself for vocab retention, possibly other uses (e.g. general question and answer format).
# Read through an input file (key - value), shuffle the keys randomly, and prompt the user for an answer.
# If the answer doesn't match (case insensitive), retry (optional), or move on to the next key.
# Track all failed keys. Give a summary at the end of all failed keys.
# We use an error file to track our failures over time. The format of the error file is:
# <key> <tab> <semi-colon separated list of dates and times>
# This way we can see what we're having most trouble with.
# [OUTLINE][step]
# 1. Open files. Loop through input file and build hash.
# 2. Shuffle hash, and prompt user for values.
# 3. Summarize results.
#
# [todo]
# 1. Dynamically parse the format to make this function general. Use a hash to map the characters in the format string to the localtime array. 'Y' maps to index 5, 'M' to index 4, 'D' to 3, 'H' to 2, 'MI' to 1, and 'S' to 0.
# You cretae the sformat string by replacing these references in the format string with their sprintf equivalents (e.g. YYYY => %04d) and simultaneously push the appropriate localtime index onto an array.
# This way you can pass a format of "YYYYMMDD", "MMYYYY", "DD-MM-YYYY HH:MI", etc., and the function could parse them correctly, without hardcoding in kludgy pattern matches as you currently do.
# [FUZZY MATCH] Would be useful here - the answer we give could be fuzzy matched against the correct answer.
# It fails if it falls below some threshold value (e.g. 90% match). We could also track the fuzzy match percentage in the error file metadata, which could help sorting the keys by difficulty.
use strict;
use warnings;
use List::Util qw(shuffle);
my %vocab;
my $input_file;
$input_file = shift || die "<usage> $0 <input file> <err_file>*\n\t*- optional. Default is <input_file>.err\n";
my $err_file = shift || "$input_file.err";
my $global_lim = 0; # No retries.
my ($errcnt, $cnt, @errkeys, %errhash, @extra, $err_mdata);
my $lim = 0;
my $curtime = format_time(time, "YYYY/MM/DD HH:MI:SS");
# [step].1
open(IN, "<" , "$input_file") or die "opening $input_file for reading: $!\n";
# Build a hash.
while (<IN>) {
s/\s+$//; # Trim trailing blanks.
next unless $_;
my ($k,$v) = split /\s*[=-]\s*/, $_, 2;
$vocab{$k} = $v;
}
close(IN);
# Build err file.
if (-s $err_file) {
open(ERRFILE, "<", "$err_file") or die "opening $err_file for reading: $!\n";
while (<ERRFILE>) {
s/\s+$//;
if (/\t/) {
my ($err, $mdata) = split /\t/, $_, 2;
$errhash{$err} = $mdata;
} else {
push(@extra, $_); # This could be comments, or anything. We print it at the top of the error file.
}
}
close(ERRFILE);
}
# [step].2
foreach my $key (shuffle(keys %vocab)) {
my $correct_value = $vocab{$key};
my $val;
my @dates;
print "$key > ";
($val = <STDIN>) =~ s/\s+$//;
if (lc($val) ne lc($correct_value)) {
if (++$lim > $global_lim) {
print "\t[answer] $correct_value\n";
$errcnt++;
if ($err_mdata = $errhash{$key}) {
@dates = split /\s*;\s*/, $err_mdata;
}
push(@dates, $curtime);
$errhash{$key} = join("; ", @dates);
push(@errkeys, $key);
} else {
print "\t[wrong] try again.\n";
redo;
}
}
$cnt++;
$lim = 0;
}
# [step].3
if (%errhash) {
open(ERRFILE, ">", $err_file) or die "opening $err_file for writing: $!\n";
print ERRFILE join("\n", @extra);
foreach my $key (sort keys %errhash) {
print ERRFILE "$key\t$errhash{$key}\n";
}
close(ERRFILE);
}
my $summary =<<EOF;
[SUMMARY]
$errcnt wrong out of $cnt
Missed keys:
${\(join("\n", @errkeys))}
See $err_file for more information.
EOF
print $summary;
##########
# [todo].1
sub format_time {
my $epoch_timeval = shift;
my $format = shift;
my @ltime = localtime($epoch_timeval);
my $sformat;
$ltime[5] += 1900;
$ltime[4] += 1;
if ($format =~ m|YYYY/MM/DD HH:MI:SS|) {
$sformat = "%04d/%02d/%02d %02d:%02d:%02d";
}
return sprintf "$sformat", @ltime[5,4,3,2,1,0];
}
| Java |
#ifndef COIN_SBPIMPLPTR_HPP
#define COIN_SBPIMPLPTR_HPP
/**************************************************************************\
*
* This file is part of the Coin 3D visualization library.
* Copyright (C) 1998-2008 by Kongsberg SIM. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* ("GPL") version 2 as published by the Free Software Foundation.
* See the file LICENSE.GPL at the root directory of this source
* distribution for additional information about the GNU GPL.
*
* For using Coin with software that can not be combined with the GNU
* GPL, and for taking advantage of the additional benefits of our
* support services, please contact Kongsberg SIM about acquiring
* a Coin Professional Edition License.
*
* See http://www.coin3d.org/ for more information.
*
* Kongsberg SIM, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
* http://www.sim.no/ sales@sim.no coin-support@coin3d.org
*
\**************************************************************************/
#ifndef COIN_SBPIMPLPTR_H
#error do not include Inventor/tools/SbPimplPtr.hpp directly, use Inventor/tools/SbPimplPtr.h
#endif // !COIN_SBPIMPLPTR_H
/* ********************************************************************** */
template <typename T>
SbPimplPtr<T>::SbPimplPtr(void)
: ptr(NULL)
{
this->set(this->getNew());
}
template <typename T>
SbPimplPtr<T>::SbPimplPtr(T * initial)
{
this->ptr = initial;
}
template <typename T>
SbPimplPtr<T>::SbPimplPtr(const SbPimplPtr<T> & copy)
{
*this = copy;
}
template <typename T>
SbPimplPtr<T>::~SbPimplPtr(void)
{
this->set(NULL);
}
template <typename T>
void
SbPimplPtr<T>::set(T * value)
{
if (this->ptr) {
delete this->ptr;
}
this->ptr = value;
}
template <typename T>
T &
SbPimplPtr<T>::get(void) const
{
return *(this->ptr);
}
template <typename T>
T *
SbPimplPtr<T>::getNew(void) const
{
return new T;
}
template <typename T>
SbPimplPtr<T> &
SbPimplPtr<T>::operator = (const SbPimplPtr<T> & copy)
{
this->get() = copy.get();
return *this;
}
template <typename T>
SbBool
SbPimplPtr<T>::operator == (const SbPimplPtr<T> & rhs) const
{
return this->get() == rhs.get();
}
template <typename T>
SbBool
SbPimplPtr<T>::operator != (const SbPimplPtr<T> & rhs) const
{
return !(*this == rhs);
}
template <typename T>
const T *
SbPimplPtr<T>::operator -> (void) const
{
return &(this->get());
}
template <typename T>
T *
SbPimplPtr<T>::operator -> (void)
{
return &(this->get());
}
/* ********************************************************************** */
#endif // !COIN_SBPIMPLPTR_HPP
| Java |
/* $Id$
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 this program; if not, write to the Free Software
Foundation, Inc., Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
oroborus - (c) 2001 Ken Lynch
xfwm4 - (c) 2002-2020 Olivier Fourdan
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <string.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
#include <glib.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#ifdef HAVE_RANDR
#include <X11/extensions/Xrandr.h>
#endif
#include <libxfce4util/libxfce4util.h>
#include <libxfce4ui/libxfce4ui.h>
#include <common/xfwm-common.h>
#include "misc.h"
#include "workspaces.h"
#include "settings.h"
#include "mywindow.h"
#include "frame.h"
#include "client.h"
#include "moveresize.h"
#include "cycle.h"
#include "placement.h"
#include "stacking.h"
#include "transients.h"
#include "focus.h"
#include "netwm.h"
#include "menu.h"
#include "hints.h"
#include "startup_notification.h"
#include "compositor.h"
#include "events.h"
#include "event_filter.h"
#include "xsync.h"
#include "display.h"
#ifndef CHECK_BUTTON_TIME
#define CHECK_BUTTON_TIME 0
#endif
#define WIN_IS_BUTTON(win) ((win == MYWINDOW_XWINDOW(c->buttons[HIDE_BUTTON])) || \
(win == MYWINDOW_XWINDOW(c->buttons[CLOSE_BUTTON])) || \
(win == MYWINDOW_XWINDOW(c->buttons[MAXIMIZE_BUTTON])) || \
(win == MYWINDOW_XWINDOW(c->buttons[SHADE_BUTTON])) || \
(win == MYWINDOW_XWINDOW(c->buttons[STICK_BUTTON])))
#define DOUBLE_CLICK_GRAB (ButtonMotionMask | \
PointerMotionMask | \
ButtonPressMask | \
ButtonReleaseMask)
static xfwmWindow menu_event_window;
/* Forward decl. */
static eventFilterStatus handleEvent (DisplayInfo *display_info,
XfwmEvent *event);
static void menu_callback (Menu * menu,
MenuOp op,
Window xid,
gpointer menu_data,
gpointer item_data);
static void show_window_menu (Client *c,
gint px,
gint py,
guint button,
guint32 time,
gboolean needscale);
static gboolean show_popup_cb (GtkWidget * widget,
GdkEventButton * ev,
gpointer data);
static gboolean set_reload (DisplayInfo *display_info);
typedef enum
{
XFWM_BUTTON_UNDEFINED = 0,
XFWM_BUTTON_DRAG = 1,
XFWM_BUTTON_CLICK = 2,
XFWM_BUTTON_CLICK_AND_DRAG = 3,
XFWM_BUTTON_DOUBLE_CLICK = 4
}
XfwmButtonClickType;
typedef struct _XfwmButtonClickData XfwmButtonClickData;
struct _XfwmButtonClickData
{
DisplayInfo *display_info;
Window w;
guint button;
guint clicks;
guint timeout;
gint x0;
gint y0;
guint t0;
gint xcurrent;
gint ycurrent;
guint tcurrent;
gint double_click_time;
gint double_click_distance;
gboolean allow_double_click;
};
static gboolean
typeOfClick_end (gpointer data)
{
XfwmButtonClickData *passdata;
passdata = data;
if (passdata->timeout)
{
g_source_remove (passdata->timeout);
passdata->timeout = 0;
}
gtk_main_quit ();
return FALSE;
}
static eventFilterStatus
typeOfClick_event_filter (XfwmEvent *event, gpointer data)
{
XfwmButtonClickData *passdata;
eventFilterStatus status;
guint32 timestamp;
gboolean keep_going;
keep_going = TRUE;
passdata = data;
status = EVENT_FILTER_CONTINUE;
/* Update the display time */
timestamp = myDisplayUpdateCurrentTime (passdata->display_info, event);
if (timestamp)
{
passdata->tcurrent = timestamp;
if (((gint) passdata->tcurrent - (gint) passdata->t0) > passdata->double_click_time)
{
keep_going = FALSE;
}
}
if (event->meta.type == XFWM_EVENT_BUTTON)
{
if (event->button.button == passdata->button)
{
passdata->clicks++;
}
if (((XfwmButtonClickType) passdata->clicks == XFWM_BUTTON_DOUBLE_CLICK)
|| (!(passdata->allow_double_click) &&
(XfwmButtonClickType) passdata->clicks == XFWM_BUTTON_CLICK))
{
keep_going = FALSE;
}
status = EVENT_FILTER_STOP;
}
else if (event->meta.type == XFWM_EVENT_MOTION)
{
passdata->xcurrent = event->motion.x_root;
passdata->ycurrent = event->motion.y_root;
if ((ABS (passdata->x0 - passdata->xcurrent) > passdata->double_click_distance) ||
(ABS (passdata->y0 - passdata->ycurrent) > passdata->double_click_distance))
{
keep_going = FALSE;
}
status = EVENT_FILTER_STOP;
}
else if ((event->meta.xevent->type == DestroyNotify) || (event->meta.xevent->type == UnmapNotify))
{
if (event->meta.window == passdata->w)
{
/* Discard, mark the click as undefined */
passdata->clicks = (guint) XFWM_BUTTON_UNDEFINED;
keep_going = FALSE;
}
}
if (!keep_going)
{
TRACE ("click type=%u", passdata->clicks);
TRACE ("time=%ims (timeout=%ims)", (gint) passdata->tcurrent - (gint) passdata->t0, passdata->double_click_time);
TRACE ("dist x=%i (max=%i)", ABS (passdata->x0 - passdata->xcurrent), passdata->double_click_distance);
TRACE ("dist y=%i (max=%i)", ABS (passdata->y0 - passdata->ycurrent), passdata->double_click_distance);
typeOfClick_end (data);
}
return status;
}
static XfwmButtonClickType
typeOfClick (ScreenInfo *screen_info, Window w, XfwmEventButton *event, gboolean allow_double_click)
{
DisplayInfo *display_info;
XfwmButtonClickData passdata;
gboolean g;
g_return_val_if_fail (screen_info != NULL, XFWM_BUTTON_UNDEFINED);
g_return_val_if_fail (event != NULL, XFWM_BUTTON_UNDEFINED);
g_return_val_if_fail (w != None, XFWM_BUTTON_UNDEFINED);
display_info = screen_info->display_info;
g = myScreenGrabPointer (screen_info, FALSE, DOUBLE_CLICK_GRAB, None, event->time);
if (!g)
{
TRACE ("grab failed");
gdk_display_beep (display_info->gdisplay);
myScreenUngrabPointer (screen_info, event->time);
return XFWM_BUTTON_UNDEFINED;
}
passdata.display_info = display_info;
passdata.button = event->button;
passdata.w = w;
passdata.x0 = event->x_root;
passdata.y0 = event->y_root;
passdata.t0 = event->time;
passdata.xcurrent = passdata.x0;
passdata.ycurrent = passdata.y0;
passdata.tcurrent = passdata.t0;
passdata.clicks = 1;
passdata.allow_double_click = allow_double_click;
passdata.double_click_time = display_info->double_click_time;
passdata.double_click_distance = display_info->double_click_distance;
TRACE ("double click time= %i, distance=%i\n", display_info->double_click_time,
display_info->double_click_distance);
passdata.timeout = g_timeout_add_full (G_PRIORITY_HIGH,
display_info->double_click_time,
typeOfClick_end,
&passdata, NULL);
TRACE ("entering loop");
eventFilterPush (display_info->xfilter, typeOfClick_event_filter, &passdata);
gtk_main ();
eventFilterPop (display_info->xfilter);
TRACE ("leaving loop");
myScreenUngrabPointer (screen_info, myDisplayGetCurrentTime (display_info));
return (XfwmButtonClickType) passdata.clicks;
}
static void
toggle_show_desktop (ScreenInfo *screen_info)
{
screen_info->show_desktop = !screen_info->show_desktop;
setHint (screen_info->display_info, screen_info->xroot, NET_SHOWING_DESKTOP,
screen_info->show_desktop);
sendRootMessage (screen_info, NET_SHOWING_DESKTOP, screen_info->show_desktop,
myDisplayGetCurrentTime (screen_info->display_info));
}
static eventFilterStatus
handleMotionNotify (DisplayInfo *display_info, XfwmEventMotion *event)
{
TRACE ("entering");
return EVENT_FILTER_REMOVE;
}
static eventFilterStatus
handleKeyPress (DisplayInfo *display_info, XfwmEventKey *event)
{
eventFilterStatus status;
ScreenInfo *screen_info;
ScreenInfo *ev_screen_info;
Client *c;
int key;
TRACE ("entering");
ev_screen_info = myDisplayGetScreenFromRoot (display_info, event->root);
if (!ev_screen_info)
{
return EVENT_FILTER_PASS;
}
status = EVENT_FILTER_PASS;
c = clientGetFocus ();
if (c)
{
screen_info = c->screen_info;
key = myScreenGetKeyPressed (screen_info, event);
status = EVENT_FILTER_REMOVE;
switch (key)
{
case KEY_MOVE:
clientMove (c, NULL);
break;
case KEY_RESIZE:
clientResize (c, CORNER_BOTTOM_RIGHT, NULL);
break;
case KEY_CYCLE_WINDOWS:
case KEY_CYCLE_REVERSE_WINDOWS:
clientCycle (c, event);
break;
case KEY_CLOSE_WINDOW:
clientClose (c);
break;
case KEY_HIDE_WINDOW:
if (CLIENT_CAN_HIDE_WINDOW (c))
{
clientWithdraw (c, c->win_workspace, TRUE);
}
break;
case KEY_MAXIMIZE_WINDOW:
clientToggleMaximized (c, CLIENT_FLAG_MAXIMIZED, TRUE);
break;
case KEY_MAXIMIZE_VERT:
clientToggleMaximized (c, CLIENT_FLAG_MAXIMIZED_VERT, TRUE);
break;
case KEY_MAXIMIZE_HORIZ:
clientToggleMaximized (c, CLIENT_FLAG_MAXIMIZED_HORIZ, TRUE);
break;
case KEY_SHADE_WINDOW:
clientToggleShaded (c);
break;
case KEY_STICK_WINDOW:
if (FLAG_TEST(c->xfwm_flags, XFWM_FLAG_HAS_STICK))
{
clientToggleSticky (c, TRUE);
frameQueueDraw (c, FALSE);
}
break;
case KEY_RAISE_WINDOW:
clientRaise (c, None);
break;
case KEY_LOWER_WINDOW:
clientLower (c, None);
break;
case KEY_RAISELOWER_WINDOW:
if (clientIsTopMost (c))
{
clientLower (c, None);
}
else
{
clientRaise (c, None);
}
break;
case KEY_TOGGLE_ABOVE:
clientToggleLayerAbove (c);
break;
case KEY_TOGGLE_FULLSCREEN:
clientToggleFullscreen (c);
break;
case KEY_MOVE_NEXT_WORKSPACE:
workspaceSwitch (screen_info, screen_info->current_ws + 1, c, TRUE, event->time);
break;
case KEY_MOVE_PREV_WORKSPACE:
workspaceSwitch (screen_info, screen_info->current_ws - 1, c, TRUE, event->time);
break;
case KEY_MOVE_UP_WORKSPACE:
workspaceMove (screen_info, -1, 0, c, event->time);
break;
case KEY_MOVE_DOWN_WORKSPACE:
workspaceMove (screen_info, 1, 0, c, event->time);
break;
case KEY_MOVE_LEFT_WORKSPACE:
workspaceMove (screen_info, 0, -1, c, event->time);
break;
case KEY_MOVE_RIGHT_WORKSPACE:
workspaceMove (screen_info, 0, 1, c, event->time);
break;
case KEY_MOVE_WORKSPACE_1:
case KEY_MOVE_WORKSPACE_2:
case KEY_MOVE_WORKSPACE_3:
case KEY_MOVE_WORKSPACE_4:
case KEY_MOVE_WORKSPACE_5:
case KEY_MOVE_WORKSPACE_6:
case KEY_MOVE_WORKSPACE_7:
case KEY_MOVE_WORKSPACE_8:
case KEY_MOVE_WORKSPACE_9:
case KEY_MOVE_WORKSPACE_10:
case KEY_MOVE_WORKSPACE_11:
case KEY_MOVE_WORKSPACE_12:
if ((guint) (key - KEY_MOVE_WORKSPACE_1) < screen_info->workspace_count)
{
clientRaise (c, None);
clientSetWorkspace (c, key - KEY_MOVE_WORKSPACE_1, TRUE);
}
break;
case KEY_POPUP_MENU:
show_window_menu (c, frameExtentX (c) + frameLeft (c),
frameExtentY (c) + frameTop (c),
Button1, event->time, TRUE);
break;
case KEY_FILL_WINDOW:
clientFill (c, CLIENT_FILL);
break;
case KEY_FILL_VERT:
clientFill (c, CLIENT_FILL_VERT);
break;
case KEY_FILL_HORIZ:
clientFill (c, CLIENT_FILL_HORIZ);
break;
case KEY_TILE_DOWN:
clientToggleTile (c, TILE_DOWN);
break;
case KEY_TILE_LEFT:
clientToggleTile (c, TILE_LEFT);
break;
case KEY_TILE_RIGHT:
clientToggleTile (c, TILE_RIGHT);
break;
case KEY_TILE_UP:
clientToggleTile (c, TILE_UP);
break;
case KEY_TILE_DOWN_LEFT:
clientToggleTile (c, TILE_DOWN_LEFT);
break;
case KEY_TILE_DOWN_RIGHT:
clientToggleTile (c, TILE_DOWN_RIGHT);
break;
case KEY_TILE_UP_LEFT:
clientToggleTile (c, TILE_UP_LEFT);
break;
case KEY_TILE_UP_RIGHT:
clientToggleTile (c, TILE_UP_RIGHT);
break;
default:
break;
}
}
else
{
key = myScreenGetKeyPressed (ev_screen_info, event);
switch (key)
{
case KEY_CYCLE_WINDOWS:
status = EVENT_FILTER_REMOVE;
if (ev_screen_info->clients)
{
clientCycle (ev_screen_info->clients->prev, event);
}
break;
case KEY_CLOSE_WINDOW:
status = EVENT_FILTER_REMOVE;
if (display_info->session)
{
xfce_sm_client_request_shutdown(display_info->session, XFCE_SM_CLIENT_SHUTDOWN_HINT_LOGOUT);
}
break;
default:
break;
}
}
switch (key)
{
case KEY_SWITCH_WINDOW:
clientSwitchWindow ();
break;
case KEY_SWITCH_APPLICATION:
clientSwitchApp ();
break;
case KEY_NEXT_WORKSPACE:
status = EVENT_FILTER_REMOVE;
workspaceSwitch (ev_screen_info, ev_screen_info->current_ws + 1, NULL, TRUE, event->time);
break;
case KEY_PREV_WORKSPACE:
status = EVENT_FILTER_REMOVE;
workspaceSwitch (ev_screen_info, ev_screen_info->current_ws - 1, NULL, TRUE, event->time);
break;
case KEY_UP_WORKSPACE:
status = EVENT_FILTER_REMOVE;
workspaceMove(ev_screen_info, -1, 0, NULL, event->time);
break;
case KEY_DOWN_WORKSPACE:
status = EVENT_FILTER_REMOVE;
workspaceMove(ev_screen_info, 1, 0, NULL, event->time);
break;
case KEY_LEFT_WORKSPACE:
status = EVENT_FILTER_REMOVE;
workspaceMove(ev_screen_info, 0, -1, NULL, event->time);
break;
case KEY_RIGHT_WORKSPACE:
status = EVENT_FILTER_REMOVE;
workspaceMove(ev_screen_info, 0, 1, NULL, event->time);
break;
case KEY_ADD_WORKSPACE:
status = EVENT_FILTER_REMOVE;
workspaceSetCount (ev_screen_info, ev_screen_info->workspace_count + 1);
break;
case KEY_DEL_WORKSPACE:
status = EVENT_FILTER_REMOVE;
workspaceSetCount (ev_screen_info, ev_screen_info->workspace_count - 1);
break;
case KEY_ADD_ADJACENT_WORKSPACE:
workspaceInsert (ev_screen_info, ev_screen_info->current_ws + 1);
break;
case KEY_DEL_ACTIVE_WORKSPACE:
workspaceDelete (ev_screen_info, ev_screen_info->current_ws);
break;
case KEY_WORKSPACE_1:
case KEY_WORKSPACE_2:
case KEY_WORKSPACE_3:
case KEY_WORKSPACE_4:
case KEY_WORKSPACE_5:
case KEY_WORKSPACE_6:
case KEY_WORKSPACE_7:
case KEY_WORKSPACE_8:
case KEY_WORKSPACE_9:
case KEY_WORKSPACE_10:
case KEY_WORKSPACE_11:
case KEY_WORKSPACE_12:
status = EVENT_FILTER_REMOVE;
if ((guint) (key - KEY_WORKSPACE_1) < ev_screen_info->workspace_count)
{
workspaceSwitch (ev_screen_info, key - KEY_WORKSPACE_1, NULL, TRUE, event->time);
}
break;
case KEY_SHOW_DESKTOP:
status = EVENT_FILTER_REMOVE;
toggle_show_desktop (ev_screen_info);
break;
default:
break;
}
/* Release pending events */
XAllowEvents (display_info->dpy, SyncKeyboard, CurrentTime);
return status;
}
static eventFilterStatus
handleKeyRelease (DisplayInfo *display_info, XfwmEventKey *event)
{
TRACE ("entering");
/* Release pending events */
XAllowEvents (display_info->dpy, SyncKeyboard, CurrentTime);
return EVENT_FILTER_PASS;
}
/* User has clicked on an edge or corner.
* Button 1 : Raise and resize
* Button 2 : Move
* Button 3 : Resize
*/
static void
edgeButton (Client *c, int part, XfwmEventButton *event)
{
ScreenInfo *screen_info;
XfwmButtonClickType tclick;
guint state;
screen_info = c->screen_info;
state = event->state & MODIFIER_MASK;
if (event->button == Button2)
{
tclick = typeOfClick (screen_info, c->window, event, FALSE);
if (tclick == XFWM_BUTTON_CLICK)
{
clientLower (c, None);
}
else if (tclick == XFWM_BUTTON_DRAG)
{
clientMove (c, event);
}
}
else if ((event->button == Button1) || (event->button == Button3))
{
if ((event->button == Button1) ||
((screen_info->params->easy_click) && (state == screen_info->params->easy_click)))
{
if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
{
clientSetFocus (screen_info, c, event->time, NO_FOCUS_FLAG);
}
clientRaise (c, None);
}
tclick = typeOfClick (screen_info, c->window, event, TRUE);
if (tclick == XFWM_BUTTON_DOUBLE_CLICK)
{
switch (part)
{
case CORNER_COUNT + SIDE_LEFT:
case CORNER_COUNT + SIDE_RIGHT:
clientFill(c, CLIENT_FILL_HORIZ);
break;
case CORNER_COUNT + SIDE_TOP:
case CORNER_COUNT + SIDE_BOTTOM:
clientFill(c, CLIENT_FILL_VERT);
break;
default:
clientFill(c, CLIENT_FILL);
break;
}
}
else if (tclick == XFWM_BUTTON_DRAG)
{
clientResize (c, part, event);
}
}
}
static int
edgeGetPart (Client *c, XfwmEventButton *event)
{
int part, x_corner_pixels, y_corner_pixels, x_distance, y_distance;
/* Corner is 1/3 of the side */
x_corner_pixels = MAX(c->width / 3, 50);
y_corner_pixels = MAX(c->height / 3, 50);
/* Distance from event to edge of client window */
x_distance = c->width / 2 - abs(c->width / 2 - event->x);
y_distance = c->height / 2 - abs(c->height / 2 - event->y);
if (x_distance < x_corner_pixels && y_distance < y_corner_pixels)
{
/* In a corner */
if (event->x < c->width / 2)
{
if (event->y < c->height / 2)
{
part = CORNER_TOP_LEFT;
}
else
{
part = CORNER_BOTTOM_LEFT;
}
}
else
{
if (event->y < c->height / 2)
{
part = CORNER_TOP_RIGHT;
}
else
{
part = CORNER_BOTTOM_RIGHT;
}
}
}
else
{
/* Not a corner - some side */
if (x_distance / x_corner_pixels < y_distance / y_corner_pixels)
{
/* Left or right side */
if (event->x < c->width / 2)
{
part = CORNER_COUNT + SIDE_LEFT;
}
else
{
part = CORNER_COUNT + SIDE_RIGHT;
}
}
else
{
/* Top or bottom side */
if (event->y < c->height / 2)
{
part = CORNER_COUNT + SIDE_TOP;
}
else
{
part = CORNER_COUNT + SIDE_BOTTOM;
}
}
}
return part;
}
static void
button1Action (Client *c, XfwmEventButton *event)
{
ScreenInfo *screen_info;
XfwmButtonClickType tclick;
g_return_if_fail (c != NULL);
g_return_if_fail (event != NULL);
screen_info = c->screen_info;
if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
{
clientSetFocus (screen_info, c, event->time, NO_FOCUS_FLAG);
}
clientRaise (c, None);
tclick = typeOfClick (screen_info, c->window, event, TRUE);
if ((tclick == XFWM_BUTTON_DRAG) || (tclick == XFWM_BUTTON_CLICK_AND_DRAG))
{
clientMove (c, event);
}
else if (tclick == XFWM_BUTTON_DOUBLE_CLICK)
{
switch (screen_info->params->double_click_action)
{
case DOUBLE_CLICK_ACTION_MAXIMIZE:
clientToggleMaximized (c, CLIENT_FLAG_MAXIMIZED, TRUE);
break;
case DOUBLE_CLICK_ACTION_SHADE:
clientToggleShaded (c);
break;
case DOUBLE_CLICK_ACTION_FILL:
clientFill(c, CLIENT_FILL);
break;
case DOUBLE_CLICK_ACTION_HIDE:
if (CLIENT_CAN_HIDE_WINDOW (c))
{
clientWithdraw (c, c->win_workspace, TRUE);
}
break;
case DOUBLE_CLICK_ACTION_ABOVE:
clientToggleLayerAbove (c);
break;
default:
break;
}
}
}
static void
titleButton (Client *c, guint state, XfwmEventButton *event)
{
ScreenInfo *screen_info;
g_return_if_fail (c != NULL);
g_return_if_fail (event != NULL);
/* Get Screen data from the client itself */
screen_info = c->screen_info;
if (event->button == Button1)
{
button1Action (c, event);
}
else if (event->button == Button2)
{
clientLower (c, None);
}
else if (event->button == Button3)
{
XfwmButtonClickType tclick;
tclick = typeOfClick (screen_info, c->window, event, FALSE);
if (tclick == XFWM_BUTTON_DRAG)
{
clientMove (c, event);
}
else if (tclick != XFWM_BUTTON_UNDEFINED)
{
if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
{
clientSetFocus (screen_info, c, event->time, NO_FOCUS_FLAG);
}
if (screen_info->params->raise_on_click)
{
clientRaise (c, None);
}
xfwm_device_button_update_window (event, event->root);
if (screen_info->button_handler_id)
{
g_signal_handler_disconnect (G_OBJECT (myScreenGetGtkWidget (screen_info)), screen_info->button_handler_id);
}
screen_info->button_handler_id = g_signal_connect (G_OBJECT (myScreenGetGtkWidget (screen_info)),
"button_press_event", G_CALLBACK (show_popup_cb), (gpointer) c);
/* Let GTK handle this for us. */
}
}
else if (event->button == Button4)
{
/* Mouse wheel scroll up */
#ifdef HAVE_COMPOSITOR
if ((state) && (state == screen_info->params->easy_click) && compositorIsActive (screen_info))
{
clientIncOpacity(c);
}
else
#endif /* HAVE_COMPOSITOR */
if (!FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
{
if (screen_info->params->mousewheel_rollup)
{
clientShade (c);
}
}
}
else if (event->button == Button5)
{
/* Mouse wheel scroll down */
#ifdef HAVE_COMPOSITOR
if ((state) && (state == screen_info->params->easy_click) && compositorIsActive (screen_info))
{
clientDecOpacity(c);
}
else
#endif /* HAVE_COMPOSITOR */
if (FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
{
if (screen_info->params->mousewheel_rollup)
{
clientUnshade (c);
}
}
}
#ifdef HAVE_COMPOSITOR
else if (screen_info->params->horiz_scroll_opacity)
{
if (event->button == Button6)
{
/* Mouse wheel scroll left, or left side button */
clientDecOpacity(c);
}
else if (event->button == Button7)
{
/* Mouse wheel scroll right, or right side button */
clientIncOpacity(c);
}
}
#endif /* HAVE_COMPOSITOR */
}
static void
rootScrollButton (DisplayInfo *display_info, XfwmEventButton *event)
{
static guint32 lastscroll = CurrentTime;
ScreenInfo *screen_info;
if ((event->time - lastscroll) < 25) /* ms */
{
/* Too many events in too little time, drop this event... */
return;
}
lastscroll = event->time;
/* Get the screen structure from the root of the event */
screen_info = myDisplayGetScreenFromRoot (display_info, event->root);
if (!screen_info)
{
return;
}
if (event->button == Button4)
{
workspaceSwitch (screen_info, screen_info->current_ws - 1, NULL, TRUE, event->time);
}
else if (event->button == Button5)
{
workspaceSwitch (screen_info, screen_info->current_ws + 1, NULL, TRUE, event->time);
}
}
static eventFilterStatus
handleButtonPress (DisplayInfo *display_info, XfwmEventButton *event)
{
ScreenInfo *screen_info;
Client *c;
Window win;
guint state, part;
gboolean replay;
TRACE ("entering");
replay = FALSE;
c = myDisplayGetClientFromWindow (display_info, event->meta.window,
SEARCH_FRAME | SEARCH_WINDOW);
if (c)
{
state = event->state & MODIFIER_MASK;
win = event->subwindow;
screen_info = c->screen_info;
if ((event->button == Button1) && (state) && (state == screen_info->params->easy_click))
{
button1Action (c, event);
}
else if ((event->button == Button2) && (state) && (state == screen_info->params->easy_click))
{
clientLower (c, None);
}
else if ((event->button == Button3) && (state) && (state == screen_info->params->easy_click))
{
part = edgeGetPart (c, event);
edgeButton (c, part, event);
}
#ifdef HAVE_COMPOSITOR
else if ((event->button == Button4) && (screen_info->params->zoom_desktop) && (state) &&
(state == screen_info->params->easy_click) && compositorIsActive (screen_info))
{
compositorZoomIn(screen_info, event);
}
else if ((event->button == Button5) && (screen_info->params->zoom_desktop) && (state) &&
(state == screen_info->params->easy_click) && compositorIsActive (screen_info))
{
compositorZoomOut(screen_info, event);
}
#endif /* HAVE_COMPOSITOR */
else if ((event->button == Button8) && (state) && (state == screen_info->params->easy_click))
{
workspaceSwitch (screen_info, screen_info->current_ws - 1, NULL, TRUE, event->time);
}
else if ((event->button == Button9) && (state) && (state == screen_info->params->easy_click))
{
workspaceSwitch (screen_info, screen_info->current_ws + 1, NULL, TRUE, event->time);
}
else if (WIN_IS_BUTTON (win))
{
if (event->button <= Button3)
{
if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
{
clientSetFocus (screen_info, c, event->time, NO_FOCUS_FLAG);
}
if (screen_info->params->raise_on_click)
{
clientClearDelayedRaise ();
clientRaise (c, None);
}
clientButtonPress (c, win, event);
}
}
else if (win == MYWINDOW_XWINDOW (c->title))
{
titleButton (c, state, event);
}
else if (win == MYWINDOW_XWINDOW (c->buttons[MENU_BUTTON]))
{
if (event->button == Button1)
{
XfwmButtonClickType tclick;
tclick = typeOfClick (screen_info, c->window, event, TRUE);
if (tclick == XFWM_BUTTON_DOUBLE_CLICK)
{
clientClose (c);
}
else if (tclick != XFWM_BUTTON_UNDEFINED)
{
if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
{
clientSetFocus (screen_info, c, event->time, NO_FOCUS_FLAG);
}
if (screen_info->params->raise_on_click)
{
clientClearDelayedRaise ();
clientRaise (c, None);
}
xfwm_device_button_update_window (event, event->root);
if (screen_info->button_handler_id)
{
g_signal_handler_disconnect (G_OBJECT (myScreenGetGtkWidget (screen_info)), screen_info->button_handler_id);
}
screen_info->button_handler_id = g_signal_connect (G_OBJECT (myScreenGetGtkWidget (screen_info)),
"button_press_event", G_CALLBACK (show_popup_cb), (gpointer) c);
/* Let GTK handle this for us. */
}
}
}
else if (win == MYWINDOW_XWINDOW (c->corners[CORNER_TOP_LEFT]))
{
edgeButton (c, CORNER_TOP_LEFT, event);
}
else if (win == MYWINDOW_XWINDOW (c->corners[CORNER_TOP_RIGHT]))
{
edgeButton (c, CORNER_TOP_RIGHT, event);
}
else if (win == MYWINDOW_XWINDOW (c->corners[CORNER_BOTTOM_LEFT]))
{
edgeButton (c, CORNER_BOTTOM_LEFT, event);
}
else if (win == MYWINDOW_XWINDOW (c->corners[CORNER_BOTTOM_RIGHT]))
{
edgeButton (c, CORNER_BOTTOM_RIGHT, event);
}
else if (win == MYWINDOW_XWINDOW (c->sides[SIDE_BOTTOM]))
{
edgeButton (c, CORNER_COUNT + SIDE_BOTTOM, event);
}
else if (win == MYWINDOW_XWINDOW (c->sides[SIDE_TOP]))
{
edgeButton (c, CORNER_COUNT + SIDE_TOP, event);
}
else if (win == MYWINDOW_XWINDOW (c->sides[SIDE_LEFT]))
{
edgeButton (c, CORNER_COUNT + SIDE_LEFT, event);
}
else if (win == MYWINDOW_XWINDOW (c->sides[SIDE_RIGHT]))
{
edgeButton (c, CORNER_COUNT + SIDE_RIGHT, event);
}
else if (event->meta.window == c->window)
{
replay = TRUE;
if (((screen_info->params->raise_with_any_button) && (c->type & WINDOW_REGULAR_FOCUSABLE))
|| (event->button == Button1))
{
if (!(c->type & WINDOW_TYPE_DONT_FOCUS))
{
clientSetFocus (screen_info, c, event->time, NO_FOCUS_FLAG);
}
if ((screen_info->params->raise_on_click) ||
!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_BORDER))
{
clientClearDelayedRaise ();
clientRaise (c, None);
}
}
}
}
else
{
/*
The event did not occur in one of our known good clients...
Get the screen structure from the root of the event.
*/
screen_info = myDisplayGetScreenFromRoot (display_info, event->root);
if (screen_info)
{
if ((event->meta.window == screen_info->xroot) && (screen_info->params->scroll_workspaces)
&& ((event->button == Button4) || (event->button == Button5)))
{
rootScrollButton (display_info, event);
}
else
{
myDisplayErrorTrapPush (display_info);
xfwm_device_ungrab (display_info->devices, &display_info->devices->pointer,
display_info->dpy, event->time);
XSendEvent (display_info->dpy, screen_info->xfwm4_win, FALSE, SubstructureNotifyMask, event->meta.xevent);
myDisplayErrorTrapPopIgnored (display_info);
}
}
}
/* Release pending events */
XAllowEvents (display_info->dpy, replay ? ReplayPointer : SyncPointer, CurrentTime);
return EVENT_FILTER_REMOVE;
}
static eventFilterStatus
handleButtonRelease (DisplayInfo *display_info, XfwmEventButton *event)
{
ScreenInfo *screen_info;
TRACE ("entering");
/* Get the screen structure from the root of the event */
screen_info = myDisplayGetScreenFromRoot (display_info, event->root);
myDisplayErrorTrapPush (display_info);
if (screen_info)
{
XSendEvent (display_info->dpy, screen_info->xfwm4_win, FALSE, SubstructureNotifyMask,
(XEvent *) event->meta.xevent);
}
/* Release pending events */
XAllowEvents (display_info->dpy, SyncPointer, CurrentTime);
myDisplayErrorTrapPopIgnored (display_info);
return EVENT_FILTER_REMOVE;
}
static eventFilterStatus
handleDestroyNotify (DisplayInfo *display_info, XDestroyWindowEvent * ev)
{
eventFilterStatus status;
GList *list_of_windows;
Client *c;
#ifdef ENABLE_KDE_SYSTRAY_PROXY
ScreenInfo *screen_info;
#endif
TRACE ("window (0x%lx)", ev->window);
status = EVENT_FILTER_PASS;
#ifdef ENABLE_KDE_SYSTRAY_PROXY
screen_info = myDisplayGetScreenFromSystray (display_info, ev->window);
if (screen_info)
{
/* systray window is gone */
screen_info->systray = None;
return EVENT_FILTER_REMOVE;
}
#endif
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_WINDOW);
if (c)
{
TRACE ("client \"%s\" (0x%lx)", c->name, c->window);
list_of_windows = clientListTransientOrModal (c);
clientPassFocus (c->screen_info, c, list_of_windows);
clientUnframe (c, FALSE);
g_list_free (list_of_windows);
status = EVENT_FILTER_REMOVE;
}
return status;
}
static eventFilterStatus
handleMapRequest (DisplayInfo *display_info, XMapRequestEvent * ev)
{
eventFilterStatus status;
Client *c;
TRACE ("window (0x%lx)", ev->window);
status = EVENT_FILTER_PASS;
if (ev->window == None)
{
TRACE ("mapping None ???");
return status;
}
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_WINDOW);
if (c)
{
ScreenInfo *screen_info = c->screen_info;
if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MAP_PENDING))
{
TRACE ("ignoring MapRequest on window (0x%lx)", ev->window);
}
if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_WAS_SHOWN))
{
clientClearAllShowDesktop (screen_info);
}
clientShow (c, TRUE);
if (FLAG_TEST (c->flags, CLIENT_FLAG_STICKY) ||
(c->win_workspace == screen_info->current_ws))
{
clientFocusNew(c);
}
}
else
{
clientFrame (display_info, ev->window, FALSE);
}
status = EVENT_FILTER_REMOVE;
return status;
}
static eventFilterStatus
handleMapNotify (DisplayInfo *display_info, XMapEvent * ev)
{
Client *c;
TRACE ("window (0x%lx)", ev->window);
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_WINDOW);
if (c)
{
TRACE ("client \"%s\" (0x%lx)", c->name, c->window);
if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MAP_PENDING))
{
FLAG_UNSET (c->xfwm_flags, XFWM_FLAG_MAP_PENDING);
}
return EVENT_FILTER_REMOVE;
}
return EVENT_FILTER_PASS;
}
static eventFilterStatus
handleUnmapNotify (DisplayInfo *display_info, XUnmapEvent * ev)
{
eventFilterStatus status;
ScreenInfo *screen_info;
GList *list_of_windows;
Client *c;
TRACE ("window (0x%lx)", ev->window);
status = EVENT_FILTER_PASS;
if (ev->from_configure)
{
TRACE ("ignoring UnmapNotify caused by parent's resize");
return status;
}
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_WINDOW);
if (c)
{
TRACE ("client \"%s\" (0x%lx) ignore_unmap %i", c->name, c->window, c->ignore_unmap);
screen_info = c->screen_info;
if ((ev->event != ev->window) && (ev->event != screen_info->xroot || !ev->send_event))
{
TRACE ("event ignored");
return status;
}
status = EVENT_FILTER_REMOVE;
if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MAP_PENDING))
{
/*
* This UnmapNotify event is caused by reparenting
* so we just ignore it, so the window won't return
* to withdrawn state by mistake.
*/
TRACE ("client \"%s\" is not mapped, event ignored", c->name);
return status;
}
/*
* ICCCM spec states that a client wishing to switch
* to WithdrawnState should send a synthetic UnmapNotify
* with the event field set to root if the client window
* is already unmapped.
* Therefore, bypass the ignore_unmap counter and
* unframe the client.
*/
if ((ev->event == screen_info->xroot) && (ev->send_event))
{
if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
{
TRACE ("ICCCM UnmapNotify for \"%s\"", c->name);
list_of_windows = clientListTransientOrModal (c);
clientPassFocus (screen_info, c, list_of_windows);
clientUnframe (c, FALSE);
g_list_free (list_of_windows);
}
return status;
}
if (c->ignore_unmap)
{
c->ignore_unmap--;
TRACE ("ignore_unmap for \"%s\" is now %i", c->name, c->ignore_unmap);
}
else
{
TRACE ("unmapping \"%s\" as ignore_unmap is %i", c->name, c->ignore_unmap);
list_of_windows = clientListTransientOrModal (c);
clientPassFocus (screen_info, c, list_of_windows);
clientUnframe (c, FALSE);
g_list_free (list_of_windows);
}
}
return status;
}
static eventFilterStatus
handleConfigureNotify (DisplayInfo *display_info, XConfigureEvent * ev)
{
TRACE ("entering");
return EVENT_FILTER_PASS;
}
static eventFilterStatus
handleConfigureRequest (DisplayInfo *display_info, XConfigureRequestEvent * ev)
{
Client *c;
XWindowChanges wc;
TRACE ("window (0x%lx)", ev->window);
wc.x = ev->x;
wc.y = ev->y;
wc.width = ev->width;
wc.height = ev->height;
wc.sibling = ev->above;
wc.stack_mode = ev->detail;
wc.border_width = ev->border_width;
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_WINDOW);
if (!c)
{
/* Some app tend or try to manipulate the wm frame to achieve fullscreen mode */
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_FRAME);
if (c)
{
TRACE ("client %s (0x%lx) is attempting to manipulate its frame!", c->name, c->window);
if (ev->value_mask & CWX)
{
wc.x += frameLeft (c);
}
if (ev->value_mask & CWY)
{
wc.y += frameTop (c);
}
if (ev->value_mask & CWWidth)
{
wc.width -= frameLeft (c) + frameRight (c);
}
if (ev->value_mask & CWHeight)
{
wc.height -= frameTop (c) + frameBottom (c);
}
/* We don't allow changing stacking order by accessing the frame
window because that would break the layer management in xfwm4
*/
ev->value_mask &= ~(CWSibling | CWStackMode);
}
}
if (c)
{
TRACE ("window \"%s\" (0x%lx)", c->name, c->window);
if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING))
{
/* Sorry, but it's not the right time for configure request */
return EVENT_FILTER_REMOVE;
}
clientAdjustCoordGravity (c, c->gravity, &wc, &ev->value_mask);
clientMoveResizeWindow (c, &wc, ev->value_mask);
}
else
{
TRACE ("unmanaged configure request for window 0x%lx", ev->window);
myDisplayErrorTrapPush (display_info);
XConfigureWindow (display_info->dpy, ev->window, ev->value_mask, &wc);
myDisplayErrorTrapPopIgnored (display_info);
}
return EVENT_FILTER_REMOVE;
}
static eventFilterStatus
handleEnterNotify (DisplayInfo *display_info, XfwmEventCrossing *event)
{
ScreenInfo *screen_info;
Client *c;
int b;
gboolean need_redraw;
/* See http://rfc-ref.org/RFC-TEXTS/1013/chapter12.html for details */
TRACE ("entering");
if ((event->mode == NotifyGrab) || (event->mode == NotifyUngrab)
|| (event->detail > NotifyNonlinearVirtual))
{
/* We're not interested in such notifications */
return EVENT_FILTER_PASS;
}
TRACE ("window (0x%lx)", event->meta.window);
need_redraw = FALSE;
c = myDisplayGetClientFromWindow (display_info, event->meta.window,
SEARCH_FRAME | SEARCH_BUTTON);
if (c)
{
screen_info = c->screen_info;
TRACE ("client \"%s\"", c->name);
if (!(screen_info->params->click_to_focus) && clientAcceptFocus (c))
{
if (!(c->type & (WINDOW_DOCK | WINDOW_DESKTOP)))
{
if(screen_info->params->focus_delay)
{
clientClearDelayedFocus ();
clientAddDelayedFocus (c, event->time);
}
else
{
clientSetFocus (c->screen_info, c, event->time, NO_FOCUS_FLAG);
}
}
else
{
clientClearDelayedFocus ();
}
}
if (c == clientGetFocus ())
{
for (b = 0; b < BUTTON_COUNT; b++)
{
if (MYWINDOW_XWINDOW(c->buttons[b]) == event->meta.window)
{
if (!xfwmPixmapNone(clientGetButtonPixmap(c, b, PRELIGHT)))
{
c->button_status[b] = BUTTON_STATE_PRELIGHT;
need_redraw = TRUE;
}
}
}
if (need_redraw)
{
frameQueueDraw (c, FALSE);
}
}
/* No need to process the event any further */
return EVENT_FILTER_REMOVE;
}
/* The event was not for a client window */
if (display_info->nb_screens > 1)
{
/* Wrap workspace/wrap windows is disabled with multiscreen */
return EVENT_FILTER_REMOVE;
}
/* Get the screen structure from the root of the event */
screen_info = myDisplayGetScreenFromRoot (display_info, event->root);
if (!screen_info)
{
return EVENT_FILTER_PASS;
}
if (screen_info->params->wrap_workspaces && screen_info->workspace_count > 1)
{
clientMoveWarp (NULL, screen_info, &event->x_root, &event->y_root, event->time);
}
return EVENT_FILTER_REMOVE;
}
static eventFilterStatus
handleLeaveNotify (DisplayInfo *display_info, XfwmEventCrossing *event)
{
Client *c;
int b;
gboolean need_redraw;
TRACE ("entering");
need_redraw = FALSE;
c = myDisplayGetClientFromWindow (display_info, event->meta.window,
SEARCH_FRAME | SEARCH_BUTTON);
if (c)
{
for (b = 0; b < BUTTON_COUNT; b++)
{
if ((c->button_status[b] == BUTTON_STATE_PRELIGHT) || (c->button_status[b] == BUTTON_STATE_PRESSED))
{
if (MYWINDOW_XWINDOW(c->buttons[b]) == event->meta.window)
{
c->button_status[b] = BUTTON_STATE_NORMAL;
need_redraw = TRUE;
}
}
}
if (need_redraw)
{
frameQueueDraw (c, FALSE);
}
/* No need to process the event any further */
return EVENT_FILTER_REMOVE;
}
return EVENT_FILTER_PASS;
}
static eventFilterStatus
handleFocusIn (DisplayInfo *display_info, XFocusChangeEvent * ev)
{
ScreenInfo *screen_info;
Client *c, *user_focus, *current_focus;
/* See http://rfc-ref.org/RFC-TEXTS/1013/chapter12.html for details */
TRACE ("window (0x%lx) mode = %s",
ev->window,
(ev->mode == NotifyNormal) ?
"NotifyNormal" :
(ev->mode == NotifyWhileGrabbed) ?
"NotifyWhileGrabbed" :
(ev->mode == NotifyGrab) ?
"NotifyGrab" :
(ev->mode == NotifyUngrab) ?
"NotifyUngrab" :
"(unknown)");
TRACE ("window (0x%lx) detail = %s",
ev->window,
(ev->detail == NotifyAncestor) ?
"NotifyAncestor" :
(ev->detail == NotifyVirtual) ?
"NotifyVirtual" :
(ev->detail == NotifyInferior) ?
"NotifyInferior" :
(ev->detail == NotifyNonlinear) ?
"NotifyNonlinear" :
(ev->detail == NotifyNonlinearVirtual) ?
"NotifyNonlinearVirtual" :
(ev->detail == NotifyPointer) ?
"NotifyPointer" :
(ev->detail == NotifyPointerRoot) ?
"NotifyPointerRoot" :
(ev->detail == NotifyDetailNone) ?
"NotifyDetailNone" :
"(unknown)");
if ((ev->mode == NotifyGrab) || (ev->mode == NotifyUngrab))
{
/* We're not interested in such notifications */
return EVENT_FILTER_PASS;
}
screen_info = myDisplayGetScreenFromWindow (display_info, ev->window);
if (screen_info &&
((ev->detail == NotifyDetailNone) ||
((ev->mode == NotifyNormal) && (ev->detail == NotifyInferior))))
{
/*
Handle unexpected focus transition to root (means that an unknown
window has vanished and the focus is returned to the root).
*/
c = clientGetFocusOrPending ();
clientSetFocus (screen_info, c, getXServerTime (display_info), FOCUS_FORCE);
return EVENT_FILTER_PASS;
}
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_FRAME | SEARCH_WINDOW);
user_focus = clientGetUserFocus ();
current_focus = clientGetFocus ();
TRACE ("window (0x%lx)", ev->window);
if ((c) && (c != current_focus) && (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE)))
{
TRACE ("focus transfered to \"%s\" (0x%lx)", c->name, c->window);
screen_info = c->screen_info;
clientUpdateFocus (screen_info, c, FOCUS_SORT);
if ((user_focus != c) && (user_focus != NULL))
{
/*
Focus stealing prevention:
Some apps tend to focus the window directly. If focus stealing prevention is enabled,
we revert the user set focus to the window that we think has focus and then set the
demand attention flag.
Note that focus stealing prevention is ignored between windows of the same group or
between windows that have a transient relationship, as some apps tend to play with
focus with their "own" windows.
*/
if (screen_info->params->prevent_focus_stealing &&
!clientSameGroup (c, user_focus) &&
!clientIsTransientOrModalFor (c, user_focus))
{
TRACE ("setting focus back to \"%s\" (0x%lx)", user_focus->name, user_focus->window);
clientSetFocus (user_focus->screen_info, user_focus, getXServerTime (display_info), NO_FOCUS_FLAG);
if (current_focus)
{
TRACE ("setting WM_STATE_DEMANDS_ATTENTION flag on \"%s\" (0x%lx)", c->name, c->window);
FLAG_SET (c->flags, CLIENT_FLAG_DEMANDS_ATTENTION);
clientSetNetState (c);
}
}
}
}
return EVENT_FILTER_REMOVE;
}
static eventFilterStatus
handleFocusOut (DisplayInfo *display_info, XFocusChangeEvent * ev)
{
Client *c;
/* See http://rfc-ref.org/RFC-TEXTS/1013/chapter12.html for details */
TRACE ("window (0x%lx) mode = %s",
ev->window,
(ev->mode == NotifyNormal) ?
"NotifyNormal" :
(ev->mode == NotifyWhileGrabbed) ?
"NotifyWhileGrabbed" :
"(unknown)");
TRACE ("window (0x%lx) detail = %s",
ev->window,
(ev->detail == NotifyAncestor) ?
"NotifyAncestor" :
(ev->detail == NotifyVirtual) ?
"NotifyVirtual" :
(ev->detail == NotifyInferior) ?
"NotifyInferior" :
(ev->detail == NotifyNonlinear) ?
"NotifyNonlinear" :
(ev->detail == NotifyNonlinearVirtual) ?
"NotifyNonlinearVirtual" :
(ev->detail == NotifyPointer) ?
"NotifyPointer" :
(ev->detail == NotifyPointerRoot) ?
"NotifyPointerRoot" :
(ev->detail == NotifyDetailNone) ?
"NotifyDetailNone" :
"(unknown)");
if ((ev->mode == NotifyGrab) || (ev->mode == NotifyUngrab) ||
(ev->detail == NotifyInferior) || (ev->detail > NotifyNonlinearVirtual))
{
/* We're not interested in such notifications */
return EVENT_FILTER_PASS;
}
if ((ev->mode == NotifyNormal)
&& ((ev->detail == NotifyNonlinear)
|| (ev->detail == NotifyNonlinearVirtual)))
{
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_FRAME | SEARCH_WINDOW);
TRACE ("window (0x%lx)", ev->window);
if ((c) && (c == clientGetFocus ()))
{
TRACE ("focus lost from \"%s\" (0x%lx)", c->name, c->window);
clientUpdateFocus (c->screen_info, NULL, NO_FOCUS_FLAG);
clientClearDelayedRaise ();
}
}
return EVENT_FILTER_REMOVE;
}
static eventFilterStatus
handlePropertyNotify (DisplayInfo *display_info, XPropertyEvent * ev)
{
eventFilterStatus status;
ScreenInfo *screen_info;
Client *c;
TRACE ("entering");
status = EVENT_FILTER_PASS;
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_WINDOW | SEARCH_WIN_USER_TIME);
if (c)
{
status = EVENT_FILTER_REMOVE;
screen_info = c->screen_info;
if (ev->atom == XA_WM_NORMAL_HINTS)
{
TRACE ("client \"%s\" (0x%lx) has received a XA_WM_NORMAL_HINTS notify", c->name, c->window);
clientGetWMNormalHints (c, TRUE);
}
else if ((ev->atom == XA_WM_NAME) ||
(ev->atom == display_info->atoms[NET_WM_NAME]) ||
(ev->atom == display_info->atoms[WM_CLIENT_MACHINE]))
{
TRACE ("client \"%s\" (0x%lx) has received a XA_WM_NAME/NET_WM_NAME/WM_CLIENT_MACHINE notify", c->name, c->window);
clientUpdateName (c);
}
else if (ev->atom == display_info->atoms[MOTIF_WM_HINTS])
{
TRACE ("client \"%s\" (0x%lx) has received a MOTIF_WM_HINTS notify", c->name, c->window);
clientGetMWMHints (c);
clientApplyMWMHints (c, TRUE);
}
else if (ev->atom == XA_WM_HINTS)
{
TRACE ("client \"%s\" (0x%lx) has received a XA_WM_HINTS notify", c->name, c->window);
/* Free previous wmhints if any */
if (c->wmhints)
{
XFree (c->wmhints);
}
myDisplayErrorTrapPush (display_info);
c->wmhints = XGetWMHints (display_info->dpy, c->window);
myDisplayErrorTrapPopIgnored (display_info);
if (c->wmhints)
{
if (c->wmhints->flags & WindowGroupHint)
{
c->group_leader = c->wmhints->window_group;
}
if ((c->wmhints->flags & IconPixmapHint) && (screen_info->params->show_app_icon))
{
clientUpdateIcon (c);
}
if (HINTS_ACCEPT_INPUT (c->wmhints))
{
FLAG_SET (c->wm_flags, WM_FLAG_INPUT);
}
else
{
FLAG_UNSET (c->wm_flags, WM_FLAG_INPUT);
}
}
clientUpdateUrgency (c);
}
else if (ev->atom == display_info->atoms[WM_PROTOCOLS])
{
TRACE ("client \"%s\" (0x%lx) has received a WM_PROTOCOLS notify", c->name, c->window);
clientGetWMProtocols (c);
}
else if (ev->atom == display_info->atoms[WM_TRANSIENT_FOR])
{
Window w;
TRACE ("client \"%s\" (0x%lx) has received a WM_TRANSIENT_FOR notify", c->name, c->window);
c->transient_for = None;
getTransientFor (display_info, c->screen_info->xroot, c->window, &w);
if (clientCheckTransientWindow (c, w))
{
c->transient_for = w;
}
/* Recompute window type as it may have changed */
clientWindowType (c);
}
else if (ev->atom == display_info->atoms[NET_WM_WINDOW_TYPE])
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_WINDOW_TYPE notify", c->name, c->window);
clientGetNetWmType (c);
frameQueueDraw (c, TRUE);
}
else if ((ev->atom == display_info->atoms[NET_WM_STRUT]) ||
(ev->atom == display_info->atoms[NET_WM_STRUT_PARTIAL]))
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_STRUT notify", c->name, c->window);
if (clientGetNetStruts (c) && FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
{
workspaceUpdateArea (c->screen_info);
}
}
else if (ev->atom == display_info->atoms[WM_COLORMAP_WINDOWS])
{
TRACE ("client \"%s\" (0x%lx) has received a WM_COLORMAP_WINDOWS notify", c->name, c->window);
clientUpdateColormaps (c);
if (c == clientGetFocus ())
{
clientInstallColormaps (c);
}
}
else if (ev->atom == display_info->atoms[NET_WM_USER_TIME])
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_USER_TIME notify", c->name, c->window);
clientGetUserTime (c);
}
else if (ev->atom == display_info->atoms[NET_WM_USER_TIME_WINDOW])
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_USER_TIME_WINDOW notify", c->name, c->window);
clientRemoveUserTimeWin (c);
c->user_time_win = getNetWMUserTimeWindow(display_info, c->window);
clientAddUserTimeWin (c);
}
else if (ev->atom == display_info->atoms[NET_WM_PID])
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_PID notify", c->name, c->window);
if (c->pid == 0)
{
c->pid = getWindowPID (display_info, c->window);
TRACE ("client \"%s\" (0x%lx) updated PID = %i", c->name, c->window, c->pid);
}
}
else if (ev->atom == display_info->atoms[NET_WM_WINDOW_OPACITY])
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_WINDOW_OPACITY notify", c->name, c->window);
if (!getOpacity (display_info, c->window, &c->opacity))
{
c->opacity = NET_WM_OPAQUE;
}
clientSetOpacity (c, c->opacity, 0, 0);
}
else if (ev->atom == display_info->atoms[NET_WM_WINDOW_OPACITY_LOCKED])
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_WINDOW_OPACITY_LOCKED notify", c->name, c->window);
if (getOpacityLock (display_info, c->window))
{
FLAG_SET (c->xfwm_flags, XFWM_FLAG_OPACITY_LOCKED);
}
else
{
FLAG_UNSET (c->xfwm_flags, XFWM_FLAG_OPACITY_LOCKED);
}
}
else if ((screen_info->params->show_app_icon) &&
((ev->atom == display_info->atoms[NET_WM_ICON]) ||
(ev->atom == display_info->atoms[KWM_WIN_ICON])))
{
clientUpdateIcon (c);
}
else if (ev->atom == display_info->atoms[GTK_FRAME_EXTENTS])
{
TRACE ("client \"%s\" (0x%lx) has received a GTK_FRAME_EXTENTS notify", c->name, c->window);
if (clientGetGtkFrameExtents (c))
{
if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
{
clientUpdateMaximizeSize (c);
}
else if (c->tile_mode != TILE_NONE)
{
clientUpdateTileSize (c);
}
}
}
else if (ev->atom == display_info->atoms[GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED])
{
TRACE ("client \"%s\" (0x%lx) has received a GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED notify", c->name, c->window);
if (clientGetGtkHideTitlebar (c))
{
if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
{
clientUpdateMaximizeSize (c);
clientReconfigure (c, CFG_FORCE_REDRAW);
}
}
}
#ifdef HAVE_STARTUP_NOTIFICATION
else if (ev->atom == display_info->atoms[NET_STARTUP_ID])
{
if (c->startup_id)
{
g_free (c->startup_id);
c->startup_id = NULL;
}
getWindowStartupId (display_info, c->window, &c->startup_id);
}
#endif /* HAVE_STARTUP_NOTIFICATION */
#ifdef HAVE_XSYNC
else if (ev->atom == display_info->atoms[NET_WM_SYNC_REQUEST_COUNTER])
{
TRACE ("window 0x%lx has received NET_WM_SYNC_REQUEST_COUNTER", c->window);
clientGetXSyncCounter (c);
}
#endif /* HAVE_XSYNC */
return status;
}
screen_info = myDisplayGetScreenFromWindow (display_info, ev->window);
if (!screen_info)
{
return status;
}
if (ev->atom == display_info->atoms[NET_DESKTOP_NAMES])
{
gchar **names;
guint items;
TRACE ("root has received a NET_DESKTOP_NAMES notify");
if (getUTF8StringList (display_info, screen_info->xroot, NET_DESKTOP_NAMES, &names, &items))
{
workspaceSetNames (screen_info, names, items);
}
}
else if (ev->atom == display_info->atoms[NET_DESKTOP_LAYOUT])
{
TRACE ("root has received a NET_DESKTOP_LAYOUT notify");
getDesktopLayout(display_info, screen_info->xroot, screen_info->workspace_count, &screen_info->desktop_layout);
placeSidewalks(screen_info, screen_info->params->wrap_workspaces);
}
return status;
}
static eventFilterStatus
handleClientMessage (DisplayInfo *display_info, XClientMessageEvent * ev)
{
eventFilterStatus status;
ScreenInfo *screen_info;
Client *c;
TRACE ("window (0x%lx)", ev->window);
if (ev->window == None)
{
/* Some do not set the window member, not much we can do without */
return EVENT_FILTER_PASS;
}
status = EVENT_FILTER_PASS;
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_WINDOW);
if (c)
{
status = EVENT_FILTER_REMOVE;
if ((ev->message_type == display_info->atoms[WM_CHANGE_STATE]) && (ev->format == 32) && (ev->data.l[0] == IconicState))
{
TRACE ("client \"%s\" (0x%lx) has received a WM_CHANGE_STATE event", c->name, c->window);
if (!FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED))
{
clientWithdraw (c, c->win_workspace, TRUE);
}
}
else if ((ev->message_type == display_info->atoms[NET_WM_DESKTOP]) && (ev->format == 32))
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_DESKTOP event", c->name, c->window);
clientUpdateNetWmDesktop (c, ev);
}
else if ((ev->message_type == display_info->atoms[NET_CLOSE_WINDOW]) && (ev->format == 32))
{
TRACE ("client \"%s\" (0x%lx) has received a NET_CLOSE_WINDOW event", c->name, c->window);
clientClose (c);
}
else if ((ev->message_type == display_info->atoms[NET_WM_STATE]) && (ev->format == 32))
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_STATE event", c->name, c->window);
clientUpdateNetState (c, ev);
}
else if ((ev->message_type == display_info->atoms[NET_WM_MOVERESIZE]) && (ev->format == 32))
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_MOVERESIZE event", c->name, c->window);
clientNetMoveResize (c, ev);
}
else if ((ev->message_type == display_info->atoms[NET_MOVERESIZE_WINDOW]) && (ev->format == 32))
{
TRACE ("client \"%s\" (0x%lx) has received a NET_MOVERESIZE_WINDOW event", c->name, c->window);
clientNetMoveResizeWindow (c, ev);
}
else if ((ev->message_type == display_info->atoms[NET_ACTIVE_WINDOW]) && (ev->format == 32))
{
TRACE ("client \"%s\" (0x%lx) has received a NET_ACTIVE_WINDOW event", c->name, c->window);
clientHandleNetActiveWindow (c, (guint32) ev->data.l[1], (gboolean) (ev->data.l[0] == 1));
}
else if (ev->message_type == display_info->atoms[NET_REQUEST_FRAME_EXTENTS])
{
TRACE ("client \"%s\" (0x%lx) has received a NET_REQUEST_FRAME_EXTENTS event", c->name, c->window);
setNetFrameExtents (display_info, c->window, frameTop (c), frameLeft (c),
frameRight (c), frameBottom (c));
}
else if (ev->message_type == display_info->atoms[NET_WM_FULLSCREEN_MONITORS])
{
TRACE ("client \"%s\" (0x%lx) has received a NET_WM_FULLSCREEN_MONITORS event", c->name, c->window);
clientSetFullscreenMonitor (c, (gint) ev->data.l[0], (gint) ev->data.l[1],
(gint) ev->data.l[2], (gint) ev->data.l[3]);
}
else if ((ev->message_type == display_info->atoms[GTK_SHOW_WINDOW_MENU]) && (ev->format == 32))
{
TRACE ("client \"%s\" (0x%lx) has received a GTK_SHOW_WINDOW_MENU event", c->name, c->window);
show_window_menu (c, (gint) ev->data.l[1], (gint) ev->data.l[2], Button3, (Time) myDisplayGetCurrentTime (display_info), TRUE);
}
}
else
{
screen_info = myDisplayGetScreenFromWindow (display_info, ev->window);
if (!screen_info)
{
return status;
}
status = EVENT_FILTER_REMOVE;
if ((ev->message_type == display_info->atoms[NET_CURRENT_DESKTOP]) && (ev->format == 32))
{
TRACE ("root has received a win_workspace or a NET_CURRENT_DESKTOP event %li", ev->data.l[0]);
if ((ev->data.l[0] >= 0) && (ev->data.l[0] < (long) screen_info->workspace_count) &&
(ev->data.l[0] != (long) screen_info->current_ws))
{
workspaceSwitch (screen_info, ev->data.l[0], NULL, TRUE,
myDisplayGetTime (display_info, (guint32) ev->data.l[1]));
}
}
else if ((ev->message_type == display_info->atoms[NET_NUMBER_OF_DESKTOPS]) && (ev->format == 32))
{
TRACE ("root has received a win_workspace_count event");
if (ev->data.l[0] != (long) screen_info->workspace_count)
{
workspaceSetCount (screen_info, ev->data.l[0]);
getDesktopLayout(display_info, screen_info->xroot, screen_info->workspace_count, &screen_info->desktop_layout);
}
}
else if ((ev->message_type == display_info->atoms[NET_SHOWING_DESKTOP]) && (ev->format == 32))
{
TRACE ("root has received a NET_SHOWING_DESKTOP event");
screen_info->show_desktop = (ev->data.l[0] != 0);
clientToggleShowDesktop (screen_info);
setHint (display_info, screen_info->xroot, NET_SHOWING_DESKTOP, ev->data.l[0]);
}
else if (ev->message_type == display_info->atoms[NET_REQUEST_FRAME_EXTENTS])
{
TRACE ("window (0x%lx) has received a NET_REQUEST_FRAME_EXTENTS event", ev->window);
/* Size estimate from the decoration extents */
setNetFrameExtents (display_info, ev->window,
frameDecorationTop (screen_info),
frameDecorationLeft (screen_info),
frameDecorationRight (screen_info),
frameDecorationBottom (screen_info));
}
else if ((ev->message_type == display_info->atoms[MANAGER]) && (ev->format == 32))
{
Atom selection;
TRACE ("window (0x%lx) has received a MANAGER event", ev->window);
selection = (Atom) ev->data.l[1];
#ifdef ENABLE_KDE_SYSTRAY_PROXY
if (selection == screen_info->net_system_tray_selection)
{
TRACE ("root has received a NET_SYSTEM_TRAY_MANAGER selection event");
screen_info->systray = getSystrayWindow (display_info, screen_info->net_system_tray_selection);
}
else
#endif
if (myScreenCheckWMAtom (screen_info, selection))
{
TRACE ("root has received a WM_Sn selection event");
display_info->quit = TRUE;
}
}
else if (ev->message_type == display_info->atoms[WM_PROTOCOLS])
{
if ((Atom) ev->data.l[0] == display_info->atoms[NET_WM_PING])
{
TRACE ("root has received a NET_WM_PING (pong) event\n");
clientReceiveNetWMPong (screen_info, (guint32) ev->data.l[1]);
}
}
else if (ev->message_type == display_info->atoms[GTK_READ_RCFILES])
{
TRACE ("window (0x%lx) has received a GTK_READ_RCFILES event", ev->window);
set_reload (display_info);
}
else
{
TRACE ("unidentified client message for window 0x%lx", ev->window);
}
}
return status;
}
static eventFilterStatus
handleSelectionClear (DisplayInfo *display_info, XSelectionClearEvent * ev)
{
eventFilterStatus status;
ScreenInfo *screen_info, *pscreen;
GSList *list;
DBG ("entering handleSelectionClear 0x%lx", ev->window);
status = EVENT_FILTER_PASS;
screen_info = NULL;
for (list = display_info->screens; list; list = g_slist_next (list))
{
pscreen = (ScreenInfo *) list->data;
if (ev->window == pscreen->xfwm4_win)
{
screen_info = pscreen;
break;
}
}
if (screen_info)
{
if (myScreenCheckWMAtom (screen_info, ev->selection))
{
TRACE ("root has received a WM_Sn selection event");
display_info->quit = TRUE;
status = EVENT_FILTER_REMOVE;
}
}
return status;
}
static eventFilterStatus
handleShape (DisplayInfo *display_info, XShapeEvent * ev)
{
Client *c;
gboolean update;
TRACE ("entering");
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_WINDOW);
if (c)
{
update = FALSE;
if (ev->kind == ShapeInput)
{
frameSetShapeInput (c);
update = TRUE;
}
else if (ev->kind == ShapeBounding)
{
if ((ev->shaped) && !FLAG_TEST (c->flags, CLIENT_FLAG_HAS_SHAPE))
{
update = TRUE;
FLAG_SET (c->flags, CLIENT_FLAG_HAS_SHAPE);
clientGetMWMHints (c);
clientApplyMWMHints (c, TRUE);
}
else if (!(ev->shaped) && FLAG_TEST (c->flags, CLIENT_FLAG_HAS_SHAPE))
{
update = TRUE;
FLAG_UNSET (c->flags, CLIENT_FLAG_HAS_SHAPE);
clientGetMWMHints (c);
clientApplyMWMHints (c, TRUE);
}
}
if (!update)
{
frameQueueDraw (c, FALSE);
}
}
return EVENT_FILTER_REMOVE;
}
static eventFilterStatus
handleColormapNotify (DisplayInfo *display_info, XColormapEvent * ev)
{
Client *c;
TRACE ("entering");
c = myDisplayGetClientFromWindow (display_info, ev->window, SEARCH_WINDOW);
if ((c) && (ev->window == c->window) && (ev->new))
{
if (c == clientGetFocus ())
{
clientInstallColormaps (c);
}
return EVENT_FILTER_REMOVE;
}
return EVENT_FILTER_PASS;
}
static eventFilterStatus
handleReparentNotify (DisplayInfo *display_info, XReparentEvent * ev)
{
TRACE ("window 0x%lx reparented in 0x%lx", ev->window, ev->parent);
return EVENT_FILTER_PASS;
}
#ifdef HAVE_XSYNC
static eventFilterStatus
handleXSyncAlarmNotify (DisplayInfo *display_info, XSyncAlarmNotifyEvent * ev)
{
Client *c;
TRACE ("entering");
if (display_info->have_xsync)
{
c = myDisplayGetClientFromXSyncAlarm (display_info, ev->alarm);
if (c)
{
clientXSyncUpdateValue (c, ev->counter_value);
}
}
return EVENT_FILTER_REMOVE;
}
#endif /* HAVE_XSYNC */
static eventFilterStatus
handleEvent (DisplayInfo *display_info, XfwmEvent *event)
{
eventFilterStatus status;
status = EVENT_FILTER_PASS;
TRACE ("entering");
/* Update the display time */
myDisplayUpdateCurrentTime (display_info, event);
sn_process_event (event->meta.xevent);
switch (event->meta.type)
{
case XFWM_EVENT_KEY:
if (event->key.pressed)
{
status = handleKeyPress (display_info, &event->key);
}
else
{
status = handleKeyRelease (display_info, &event->key);
}
break;
case XFWM_EVENT_BUTTON:
if (event->button.pressed)
{
status = handleButtonPress (display_info, &event->button);
}
else
{
status = handleButtonRelease (display_info, &event->button);
}
break;
case XFWM_EVENT_MOTION:
status = handleMotionNotify (display_info, &event->motion);
break;
case XFWM_EVENT_CROSSING:
if (event->crossing.enter)
{
status = handleEnterNotify (display_info, &event->crossing);
}
else
{
status = handleLeaveNotify (display_info, &event->crossing);
}
break;
case XFWM_EVENT_XEVENT:
switch (event->meta.xevent->type)
{
case DestroyNotify:
status = handleDestroyNotify (display_info, (XDestroyWindowEvent *) event->meta.xevent);
break;
case UnmapNotify:
status = handleUnmapNotify (display_info, (XUnmapEvent *) event->meta.xevent);
break;
case MapRequest:
status = handleMapRequest (display_info, (XMapRequestEvent *) event->meta.xevent);
break;
case MapNotify:
status = handleMapNotify (display_info, (XMapEvent *) event->meta.xevent);
break;
case ConfigureNotify:
status = handleConfigureNotify (display_info, (XConfigureEvent *) event->meta.xevent);
break;
case ConfigureRequest:
status = handleConfigureRequest (display_info, (XConfigureRequestEvent *) event->meta.xevent);
break;
case FocusIn:
status = handleFocusIn (display_info, (XFocusChangeEvent *) event->meta.xevent);
break;
case FocusOut:
status = handleFocusOut (display_info, (XFocusChangeEvent *) event->meta.xevent);
break;
case PropertyNotify:
status = handlePropertyNotify (display_info, (XPropertyEvent *) event->meta.xevent);
break;
case ClientMessage:
status = handleClientMessage (display_info, (XClientMessageEvent *) event->meta.xevent);
break;
case SelectionClear:
status = handleSelectionClear (display_info, (XSelectionClearEvent *) event->meta.xevent);
break;
case ColormapNotify:
handleColormapNotify (display_info, (XColormapEvent *) event->meta.xevent);
break;
case ReparentNotify:
status = handleReparentNotify (display_info, (XReparentEvent *) event->meta.xevent);
break;
default:
if ((display_info->have_shape) &&
(event->meta.xevent->type == display_info->shape_event_base))
{
status = handleShape (display_info, (XShapeEvent *) event->meta.xevent);
}
#ifdef HAVE_XSYNC
if ((display_info->have_xsync) &&
(event->meta.xevent->type == (display_info->xsync_event_base + XSyncAlarmNotify)))
{
status = handleXSyncAlarmNotify (display_info, (XSyncAlarmNotifyEvent *) event->meta.xevent);
}
#endif /* HAVE_XSYNC */
break;
}
break;
}
if (!gdk_events_pending () && !XPending (display_info->dpy))
{
if (display_info->reload)
{
reloadSettings (display_info, UPDATE_ALL);
display_info->reload = FALSE;
}
else if (display_info->quit)
{
/*
* Qutting on purpose, update session manager so
* it does not restart the program immediately
*/
xfce_sm_client_set_restart_style(display_info->session, XFCE_SM_CLIENT_RESTART_NORMAL);
gtk_main_quit ();
}
}
compositorHandleEvent (display_info, event->meta.xevent);
return status;
}
eventFilterStatus
xfwm4_event_filter (XfwmEvent *event, gpointer data)
{
eventFilterStatus status;
DisplayInfo *display_info;
display_info = (DisplayInfo *) data;
TRACE ("entering");
status = handleEvent (display_info, event);
TRACE ("leaving");
return EVENT_FILTER_STOP | status;
}
/* GTK specific stuff */
static void
menu_callback (Menu * menu, MenuOp op, Window xid, gpointer menu_data, gpointer item_data)
{
Client *c;
TRACE ("entering");
if (!xfwmWindowDeleted(&menu_event_window))
{
xfwmWindowDelete (&menu_event_window);
}
c = NULL;
if ((menu_data != NULL) && (xid != None))
{
ScreenInfo *screen_info = (ScreenInfo *) menu_data;
c = myScreenGetClientFromWindow (screen_info, xid, SEARCH_WINDOW);
}
if (c)
{
c->button_status[MENU_BUTTON] = BUTTON_STATE_NORMAL;
switch (op)
{
case MENU_OP_QUIT:
gtk_main_quit ();
break;
case MENU_OP_MAXIMIZE:
case MENU_OP_UNMAXIMIZE:
if (CLIENT_CAN_MAXIMIZE_WINDOW (c))
{
clientToggleMaximized (c, CLIENT_FLAG_MAXIMIZED, TRUE);
}
break;
case MENU_OP_MINIMIZE:
if (CLIENT_CAN_HIDE_WINDOW (c))
{
clientWithdraw (c, c->win_workspace, TRUE);
}
break;
case MENU_OP_MOVE:
clientMove (c, NULL);
break;
case MENU_OP_RESIZE:
clientResize (c, CORNER_BOTTOM_RIGHT, NULL);
break;
case MENU_OP_MINIMIZE_ALL:
clientWithdrawAll (c, c->win_workspace);
break;
case MENU_OP_UNMINIMIZE:
if (FLAG_TEST (c->xfwm_flags, XFWM_FLAG_WAS_SHOWN))
{
clientClearAllShowDesktop (c->screen_info);
}
clientShow (c, TRUE);
break;
case MENU_OP_SHADE:
case MENU_OP_UNSHADE:
clientToggleShaded (c);
break;
case MENU_OP_STICK:
clientToggleSticky (c, TRUE);
frameQueueDraw (c, FALSE);
break;
case MENU_OP_WORKSPACES:
clientSetWorkspace (c, GPOINTER_TO_INT (item_data), TRUE);
break;
case MENU_OP_DELETE:
clientClose (c);
break;
case MENU_OP_CONTEXT_HELP:
clientEnterContextMenuState (c);
break;
case MENU_OP_ABOVE:
clientToggleLayerAbove (c);
break;
case MENU_OP_NORMAL:
clientSetLayerNormal (c);
break;
case MENU_OP_BELOW:
clientToggleLayerBelow (c);
break;
case MENU_OP_FULLSCREEN:
case MENU_OP_UNFULLSCREEN:
clientToggleFullscreen (c);
break;
default:
frameQueueDraw (c, FALSE);
break;
}
}
else
{
gdk_display_beep (gdk_display_get_default ());
}
menu_free (menu);
}
void
initMenuEventWin (void)
{
xfwmWindowInit (&menu_event_window);
}
static void
show_window_menu (Client *c, gint px, gint py, guint button, guint32 timestamp, gboolean needscale)
{
ScreenInfo *screen_info;
DisplayInfo *display_info;
Menu *menu;
MenuOp ops;
MenuOp insensitive;
gboolean is_transient;
gint x, y;
gint scale = 1;
TRACE ("coords (%d,%d)", px, py);
if ((button != Button1) && (button != Button3))
{
return;
}
if (!c || !FLAG_TEST (c->xfwm_flags, XFWM_FLAG_VISIBLE))
{
return;
}
screen_info = c->screen_info;
display_info = screen_info->display_info;
is_transient = clientIsValidTransientOrModal (c);
scale = gdk_window_get_scale_factor (gdk_screen_get_root_window (screen_info->gscr));
x = px;
y = py;
if (needscale) {
x /= scale;
y /= scale;
}
c->button_status[MENU_BUTTON] = BUTTON_STATE_PRESSED;
frameQueueDraw (c, FALSE);
if (CLIENT_HAS_FRAME (c))
{
x = px;
y = c->y / scale;
if (needscale) {
x /= scale;
}
}
ops = MENU_OP_DELETE | MENU_OP_MINIMIZE_ALL | MENU_OP_WORKSPACES | MENU_OP_MOVE | MENU_OP_RESIZE;
insensitive = 0;
if (FLAG_TEST (c->flags, CLIENT_FLAG_MAXIMIZED))
{
ops |= MENU_OP_UNMAXIMIZE;
}
else
{
ops |= MENU_OP_MAXIMIZE;
}
if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_MOVE))
{
insensitive |= MENU_OP_MOVE;
}
if (FLAG_TEST (c->flags, CLIENT_FLAG_ICONIFIED))
{
ops |= MENU_OP_UNMINIMIZE;
}
else
{
ops |= MENU_OP_MINIMIZE;
}
if (FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
{
ops |= MENU_OP_UNSHADE;
}
else
{
ops |= MENU_OP_SHADE;
}
if (!FLAG_TEST (c->flags, CLIENT_FLAG_STICKY))
{
ops |= MENU_OP_STICK;
}
if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_BORDER))
{
insensitive |= MENU_OP_SHADE | MENU_OP_UNSHADE;
}
if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_CLOSE))
{
insensitive |= MENU_OP_DELETE;
}
if (is_transient || !FLAG_TEST(c->xfwm_flags, XFWM_FLAG_HAS_STICK))
{
insensitive |= MENU_OP_STICK;
}
if (!CLIENT_CAN_HIDE_WINDOW (c))
{
insensitive |= MENU_OP_MINIMIZE;
}
if (!CLIENT_CAN_MAXIMIZE_WINDOW (c))
{
insensitive |= MENU_OP_MAXIMIZE;
}
if (!FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_MOVE))
{
insensitive |= MENU_OP_MOVE;
}
if (!FLAG_TEST_ALL (c->xfwm_flags, XFWM_FLAG_HAS_RESIZE | XFWM_FLAG_IS_RESIZABLE) ||
FLAG_TEST_ALL (c->flags, CLIENT_FLAG_MAXIMIZED))
{
insensitive |= MENU_OP_RESIZE;
}
if (FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
{
insensitive |= MENU_OP_SHADE | MENU_OP_MOVE | MENU_OP_RESIZE | MENU_OP_MAXIMIZE | MENU_OP_UNMAXIMIZE;
}
if (FLAG_TEST(c->flags, CLIENT_FLAG_FULLSCREEN))
{
ops |= MENU_OP_UNFULLSCREEN;
}
else
{
ops |= MENU_OP_FULLSCREEN;
}
if (is_transient || (c->type != WINDOW_NORMAL))
{
insensitive |= MENU_OP_FULLSCREEN | MENU_OP_UNFULLSCREEN;
}
if (FLAG_TEST(c->flags, CLIENT_FLAG_ABOVE))
{
ops |= MENU_OP_NORMAL | MENU_OP_BELOW;
}
else if (FLAG_TEST(c->flags, CLIENT_FLAG_BELOW))
{
ops |= MENU_OP_NORMAL | MENU_OP_ABOVE;
}
else
{
ops |= MENU_OP_ABOVE | MENU_OP_BELOW;
}
if (is_transient ||
!(c->type & WINDOW_REGULAR_FOCUSABLE) ||
FLAG_TEST (c->flags, CLIENT_FLAG_FULLSCREEN))
{
insensitive |= MENU_OP_NORMAL | MENU_OP_ABOVE | MENU_OP_BELOW;
}
/* KDE extension */
clientGetWMProtocols(c);
if (FLAG_TEST (c->wm_flags, WM_FLAG_CONTEXT_HELP))
{
ops |= MENU_OP_CONTEXT_HELP;
}
if (is_transient
|| !FLAG_TEST (c->xfwm_flags, XFWM_FLAG_HAS_STICK)
|| FLAG_TEST (c->flags, CLIENT_FLAG_STICKY))
{
insensitive |= MENU_OP_WORKSPACES;
}
if (screen_info->button_handler_id)
{
g_signal_handler_disconnect (G_OBJECT (myScreenGetGtkWidget (screen_info)), screen_info->button_handler_id);
}
screen_info->button_handler_id = g_signal_connect (G_OBJECT (myScreenGetGtkWidget (screen_info)),
"button_press_event", G_CALLBACK (show_popup_cb), (gpointer) NULL);
if (!xfwmWindowDeleted(&menu_event_window))
{
xfwmWindowDelete (&menu_event_window);
}
/*
Since all button press/release events are catched by the windows frames, there is some
side effect with GTK menu. When a menu is opened, any click on the window frame is not
detected as a click outside the menu, and the menu doesn't close.
To avoid this (painless but annoying) behavior, we just setup a no event window that
"hides" the events to regular windows.
That might look tricky, but it's very efficient and save plenty of lines of complicated
code.
Don't forget to delete that window once the menu is closed, though, or we'll get in
trouble.
*/
xfwmWindowTemp (screen_info,
NULL, 0,
screen_info->xroot,
&menu_event_window, 0, 0,
screen_info->width,
screen_info->height,
NoEventMask,
FALSE);
menu = menu_default (screen_info->gscr, c->window, ops, insensitive, menu_callback,
c->win_workspace, screen_info->workspace_count,
screen_info->workspace_names, screen_info->workspace_names_items,
display_info->xfilter, screen_info);
if (!menu_popup (menu, x, y, button, timestamp))
{
TRACE ("cannot open menu");
gdk_display_beep (display_info->gdisplay);
c->button_status[MENU_BUTTON] = BUTTON_STATE_NORMAL;
frameQueueDraw (c, FALSE);
xfwmWindowDelete (&menu_event_window);
menu_free (menu);
}
}
static gboolean
show_popup_cb (GtkWidget * widget, GdkEventButton * ev, gpointer data)
{
TRACE ("entering");
show_window_menu ((Client *) data, (gint) ev->x_root, (gint) ev->y_root, ev->button, ev->time, FALSE);
return TRUE;
}
static gboolean
set_reload (DisplayInfo *display_info)
{
TRACE ("setting reload flag so all prefs will be reread at next event loop");
display_info->reload = TRUE;
return TRUE;
}
static gboolean
double_click_time_cb (GObject * obj, GdkEvent * ev, gpointer data)
{
DisplayInfo *display_info;
GValue tmp_val = { 0, };
display_info = (DisplayInfo *) data;
g_return_val_if_fail (display_info, TRUE);
g_value_init (&tmp_val, G_TYPE_INT);
if (gdk_setting_get ("gtk-double-click-time", &tmp_val))
{
display_info->double_click_time = abs (g_value_get_int (&tmp_val));
}
return TRUE;
}
static gboolean
double_click_distance_cb (GObject * obj, GdkEvent * ev, gpointer data)
{
DisplayInfo *display_info;
GValue tmp_val = { 0, };
display_info = (DisplayInfo *) data;
g_return_val_if_fail (display_info, TRUE);
g_value_init (&tmp_val, G_TYPE_INT);
if (gdk_setting_get ("gtk-double-click-distance", &tmp_val))
{
display_info->double_click_distance = abs (g_value_get_int (&tmp_val));
}
return TRUE;
}
static void
cursor_theme_cb (GObject * obj, GParamSpec * pspec, gpointer data)
{
DisplayInfo * display_info;
GSList *list;
display_info = (DisplayInfo *) data;
g_return_if_fail (display_info);
myDisplayFreeCursor (display_info);
myDisplayCreateCursor (display_info);
for (list = display_info->screens; list; list = g_slist_next (list))
{
ScreenInfo *screen_info = (ScreenInfo *) list->data;
clientUpdateAllCursor (screen_info);
XDefineCursor (display_info->dpy, screen_info->xroot, display_info->root_cursor);
}
}
static void
update_screen_font (ScreenInfo *screen_info)
{
myScreenUpdateFontAttr (screen_info);
clientUpdateAllFrames (screen_info, UPDATE_FRAME);
}
static gboolean
refresh_font_cb (GObject * obj, GdkEvent * ev, gpointer data)
{
DisplayInfo * display_info;
GSList *list;
display_info = (DisplayInfo *) data;
g_return_val_if_fail (display_info, TRUE);
for (list = display_info->screens; list; list = g_slist_next (list))
{
update_screen_font (list->data);
}
return TRUE;
}
/*
* The size-changed signal is emitted when the pixel width or height
* of a screen changes.
*/
static void
size_changed_cb(GdkScreen *gscreen, gpointer data)
{
ScreenInfo *screen_info;
DisplayInfo *display_info;
gboolean size_changed;
TRACE ("entering");
screen_info = (ScreenInfo *) data;
g_return_if_fail (screen_info);
display_info = screen_info->display_info;
if (xfwm_get_n_monitors (screen_info->gscr) == 0)
{
/*
* Recent Xorg drivers disable the output when the lid
* is closed, leaving no active monitor, in that case simply
* ignore the event to avoid messing with windows' positions.
*/
return;
}
size_changed = myScreenComputeSize (screen_info);
if (size_changed)
{
myScreenInvalidateMonitorCache (screen_info);
setNetWorkarea (display_info, screen_info->xroot, screen_info->workspace_count,
screen_info->width, screen_info->height, screen_info->margins);
setNetDesktopInfo (display_info, screen_info->xroot, screen_info->current_ws,
screen_info->width, screen_info->height);
placeSidewalks (screen_info, screen_info->params->wrap_workspaces);
compositorUpdateScreenSize (screen_info);
}
clientScreenResize (screen_info, FALSE);
}
/*
* The monitors-changed signal is emitted when the number, size or
* position of the monitors attached to the screen change.
*/
static void
monitors_changed_cb(GdkScreen *gscreen, gpointer data)
{
ScreenInfo *screen_info;
DisplayInfo *display_info;
gint previous_num_monitors;
gboolean size_changed;
TRACE ("entering");
screen_info = (ScreenInfo *) data;
g_return_if_fail (screen_info);
display_info = screen_info->display_info;
if (xfwm_get_n_monitors (screen_info->gscr) == 0)
{
/*
* Recent Xorg drivers disable the output when the lid
* is closed, leaving no active monitor, in that case simply
* ignore the event to avoid messing with windows' positions.
*/
return;
}
/*
* We have added/removed a monitor or even changed the layout,
* the cache for monitor position we use in our screen structure
* is not valid anymore and potentially refers to a monitor that
* was just removed, so invalidate it.
*/
previous_num_monitors = screen_info->num_monitors;
myScreenInvalidateMonitorCache (screen_info);
myScreenRebuildMonitorIndex (screen_info);
size_changed = myScreenComputeSize (screen_info);
if (size_changed || (screen_info->num_monitors != previous_num_monitors))
{
setNetWorkarea (display_info, screen_info->xroot, screen_info->workspace_count,
screen_info->width, screen_info->height, screen_info->margins);
setNetDesktopInfo (display_info, screen_info->xroot, screen_info->current_ws,
screen_info->width, screen_info->height);
placeSidewalks (screen_info, screen_info->params->wrap_workspaces);
}
if (size_changed)
{
compositorUpdateScreenSize (screen_info);
}
clientScreenResize (screen_info, (screen_info->num_monitors < previous_num_monitors));
}
void
initPerScreenCallbacks (ScreenInfo *screen_info)
{
g_return_if_fail (screen_info);
screen_info->button_handler_id =
g_signal_connect (G_OBJECT (myScreenGetGtkWidget (screen_info)),
"button_press_event", G_CALLBACK (show_popup_cb), (gpointer) NULL);
g_object_connect (G_OBJECT(screen_info->gscr),
"signal::size-changed",
G_CALLBACK(size_changed_cb), (gpointer) (screen_info),
"signal::monitors-changed",
G_CALLBACK(monitors_changed_cb), (gpointer) (screen_info),
NULL);
g_signal_connect_swapped (G_OBJECT (myScreenGetGtkWidget (screen_info)),
"notify::scale-factor",
G_CALLBACK (update_screen_font),
screen_info);
}
void
initPerDisplayCallbacks (DisplayInfo *display_info)
{
GtkSettings *settings;
g_return_if_fail (display_info);
settings = gtk_settings_get_default ();
g_object_connect (settings,
"swapped-signal::notify::gtk-theme-name",
G_CALLBACK (set_reload), (gpointer) (display_info),
"swapped-signal::notify::gtk-font-name",
G_CALLBACK (set_reload), (gpointer) (display_info),
"signal::notify::gtk-double-click-time",
G_CALLBACK (double_click_time_cb), (gpointer) (display_info),
"signal::notify::gtk-double-click-distance",
G_CALLBACK (double_click_distance_cb), (gpointer) (display_info),
"signal::notify::gtk-cursor-theme-name",
G_CALLBACK (cursor_theme_cb), (gpointer) (display_info),
"signal::notify::gtk-cursor-theme-size",
G_CALLBACK (cursor_theme_cb), (gpointer) (display_info),
"signal::notify::gtk-xft-antialias",
G_CALLBACK (refresh_font_cb), (gpointer) (display_info),
"signal::notify::gtk-xft-dpi",
G_CALLBACK (refresh_font_cb), (gpointer) (display_info),
"signal::notify::gtk-xft-hinting",
G_CALLBACK (refresh_font_cb), (gpointer) (display_info),
"signal::notify::gtk-xft-hintstyle",
G_CALLBACK (refresh_font_cb), (gpointer) (display_info),
"signal::notify::gtk-xft-rgba",
G_CALLBACK (refresh_font_cb), (gpointer) (display_info),
NULL);
}
| Java |
{% extends "base.html" %}
{% block content_title %}{% endblock %}
{% block ogtitle %}{{ SITENAME }}{% endblock %}
{% block ogurl %}{{ SITEURL }}{%endblock%}
{% block canonicalurl %}{{ SITEURL }}{%endblock%}
{% block content %}
<div class="content-grid">
{% if articles %}
{% for article in articles_page.object_list %}
{% if loop.length > 0 %}
{% if loop.first %}
{% endif %}
<div class="content-grid-info">
{% if article.image or article.thumb %}
<img src="{{ article.thumb|default(article.image) }}" alt="{{ article.title|striptags }}"/>
{% endif %}
<div class="post-info">
{% include 'article_infos.html' %}
<div>{{ article.summary }}</div>
<a href="{{ SITEURL }}/{{ article.url }}"><span></span>{{ READMORE_TEXT|default('read more...') }}</a>
</div>
</div>
{% if loop.last %}
{% include 'pagination.html' %}
{% endif %}
{% endif %}
{% endfor %}
{% else %}
<section >
<h2>Pages</h2>
{% for page in PAGES %}
<li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
{% endfor %}
</section>
{% endif %}
</div>
{% endblock content %}
{% block sidebar %}
<div class="recent">
<h3>{{ CONTENT_TEXT|default('Content') }}</h3>
<ul class="fa-ul">
<li><a href="{{ SITEURL }}/{{ CATEGORIES_SAVE_AS|default('categories.html') }}"><i class="fa-li fa fa-tags"></i> {{ CATEGORIES_TEXT|default('Categories') }}</a></li>
<li><a href="{{ SITEURL }}/{{ ARCHIVES_SAVE_AS|default('archives.html') }}"><i class="fa-li fa fa-calendar"></i> {{ ARCHIVES_TEXT|default('Archives') }}</a></li>
<li><a href="{{ SITEURL }}/{{ TAGS_SAVE_AS|default('tags.html') }}"><i class="fa-li fa fa-tag"></i> {{ TAGS_TEXT|default('Tags') }}</a></li>
{% if TAG_FEED_ATOM and tag is defined %}
<li><a href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag.slug) }}"><i class="fa-li fa fa-rss"></i> {{ ATOM_FEED_TEXT|default('Feed Atom') }}</a></li>
{% elif CATEGORY_FEED_ATOM and category is defined %}
<li><a href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}"><i class="fa-li fa fa-rss"></i> {{ ATOM_FEED_TEXT|default('Feed Atom') }}</a></li>
{% elif FEED_ALL_ATOM %}
<li><a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}"><i class="fa-li fa fa-rss"></i> {{ ATOM_FEED_TEXT|default('Feed Atom') }}</a></li>
{% endif %}
{% if TAG_FEED_RSS and tag is defined %}
<li><a href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag.slug) }}"><i class="fa-li fa fa-rss"></i> {{ RSS_FEED_TEXT|default('Feed RSS') }}</a></li>
{% elif CATEGORY_FEED_RSS and category is defined %}
<li><a href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(category.slug) }}"><i class="fa-li fa fa-rss"></i> {{ RSS_FEED_TEXT|default('Feed RSS') }}</a></li>
{% elif FEED_ALL_RSS %}
<li><a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}"><i class="fa-li fa fa-rss"></i> {{ RSS_FEED_TEXT|default('Feed RSS') }}</a></li>
{% endif %}
</ul>
</div>
{% if LINKS %}
<div class="side-links">
<h3>{{ LINKS_TEXT|default('Links') }}</h3>
<ul class="fa-ul">
{% for name, link in LINKS %}
<li><a href="{{ link }}"><i class="fa-li fa fa-external-link"></i> {{ name }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if SOCIAL %}
<div class="side-links">
<h3>{{ SOCIALLINKS_TEXT|default('Social links') }}</h3>
<ul class="fa-ul">
{% for name, link in SOCIAL %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if TAG_CLOUD_STEPS %}
<div class="categories">
<h3>{{ TAGS_TEXT|default('Tags') }}</h3>
<ul id="cloud">
{% for tag in tag_cloud %}
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock %}
| Java |
#include "StdInc.h"
#include <ShellAPI.h>
unsigned int _gameFlags;
typedef struct
{
const wchar_t* argument;
unsigned int flag;
} flagDef_t;
flagDef_t flags[] =
{
{ L"offline", GAME_FLAG_OFFLINE },
{ L"console", GAME_FLAG_CONSOLE },
{ 0, 0 }
};
void DetermineGameFlags()
{
int numArgs;
LPCWSTR commandLine = GetCommandLineW();
LPWSTR* argv = CommandLineToArgvW(commandLine, &numArgs);
for (int i = 0; i < numArgs; i++)
{
if (argv[i][0] != L'-') continue;
for (wchar_t* c = argv[i]; *c != L'\0'; c++)
{
if (*c != L'-')
{
for (flagDef_t* flag = flags; flag->argument; flag++)
{
if (!wcscmp(c, flag->argument))
{
_gameFlags |= flag->flag;
break;
}
}
break;
}
}
}
} | Java |
/**********************************************************************
Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
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.
***********************************************************************/
#ifdef HAVE_CONFIG_H
#include <fc_config.h>
#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* utility */
#include "bitvector.h"
#include "fcintl.h"
#include "log.h"
#include "mem.h"
#include "registry.h"
#include "shared.h"
#include "string_vector.h"
#include "support.h"
/* common */
#include "ai.h"
#include "base.h"
#include "capability.h"
#include "city.h"
#include "effects.h"
#include "fc_types.h"
#include "game.h"
#include "government.h"
#include "map.h"
#include "movement.h"
#include "name_translation.h"
#include "nation.h"
#include "packets.h"
#include "player.h"
#include "requirements.h"
#include "rgbcolor.h"
#include "specialist.h"
#include "tech.h"
#include "unit.h"
#include "unittype.h"
/* server */
#include "citytools.h"
#include "plrhand.h"
#include "settings.h"
#include "srv_main.h"
/* server/advisors */
#include "advruleset.h"
/* server/scripting */
#include "script_server.h"
#include "ruleset.h"
#define RULESET_CAPABILITIES "+Freeciv-2.4-ruleset"
/*
* Ruleset capabilities acceptable to this program:
*
* +Freeciv-2.3-ruleset
* - basic ruleset format for Freeciv versions 2.3.x; required
*
* +Freeciv-tilespec-Devel-YYYY.MMM.DD
* - ruleset of the development version at the given data
*/
/* RULESET_SUFFIX already used, no leading dot here */
#define RULES_SUFFIX "ruleset"
#define SCRIPT_SUFFIX "lua"
#define ADVANCE_SECTION_PREFIX "advance_"
#define BUILDING_SECTION_PREFIX "building_"
#define CITYSTYLE_SECTION_PREFIX "citystyle_"
#define EFFECT_SECTION_PREFIX "effect_"
#define GOVERNMENT_SECTION_PREFIX "government_"
#define NATION_GROUP_SECTION_PREFIX "ngroup" /* without underscore? */
#define NATION_SET_SECTION_PREFIX "nset" /* without underscore? */
#define NATION_SECTION_PREFIX "nation" /* without underscore? */
#define RESOURCE_SECTION_PREFIX "resource_"
#define BASE_SECTION_PREFIX "base_"
#define SPECIALIST_SECTION_PREFIX "specialist_"
#define TERRAIN_SECTION_PREFIX "terrain_"
#define UNIT_CLASS_SECTION_PREFIX "unitclass_"
#define UNIT_SECTION_PREFIX "unit_"
#define check_name(name) (check_strlen(name, MAX_LEN_NAME, NULL))
/* avoid re-reading files */
static const char name_too_long[] = "Name \"%s\" too long; truncating.";
#define MAX_SECTION_LABEL 64
#define section_strlcpy(dst, src) \
(void) loud_strlcpy(dst, src, MAX_SECTION_LABEL, name_too_long)
static char *resource_sections = NULL;
static char *terrain_sections = NULL;
static char *base_sections = NULL;
static struct section_file *openload_ruleset_file(const char *whichset);
static const char *check_ruleset_capabilities(struct section_file *file,
const char *us_capstr,
const char *filename);
static void load_tech_names(struct section_file *file);
static void load_unit_names(struct section_file *file);
static void load_building_names(struct section_file *file);
static void load_government_names(struct section_file *file);
static void load_terrain_names(struct section_file *file);
static void load_citystyle_names(struct section_file *file);
static void load_nation_names(struct section_file *file);
static void load_city_name_list(struct section_file *file,
struct nation_type *pnation,
const char *secfile_str1,
const char *secfile_str2);
static void load_ruleset_techs(struct section_file *file);
static void load_ruleset_units(struct section_file *file);
static void load_ruleset_buildings(struct section_file *file);
static void load_ruleset_governments(struct section_file *file);
static void load_ruleset_terrain(struct section_file *file);
static void load_ruleset_cities(struct section_file *file);
static void load_ruleset_effects(struct section_file *file);
static void load_ruleset_game(void);
static void send_ruleset_techs(struct conn_list *dest);
static void send_ruleset_unit_classes(struct conn_list *dest);
static void send_ruleset_units(struct conn_list *dest);
static void send_ruleset_buildings(struct conn_list *dest);
static void send_ruleset_terrain(struct conn_list *dest);
static void send_ruleset_resources(struct conn_list *dest);
static void send_ruleset_bases(struct conn_list *dest);
static void send_ruleset_governments(struct conn_list *dest);
static void send_ruleset_cities(struct conn_list *dest);
static void send_ruleset_game(struct conn_list *dest);
static void send_ruleset_team_names(struct conn_list *dest);
static bool load_ruleset_veteran(struct section_file *file,
const char *path,
struct veteran_system **vsystem, char *err,
size_t err_len);
static bool nation_has_initial_tech(struct nation_type *pnation,
struct advance *tech);
static bool sanity_check_ruleset_data(void);
static void ruleset_error_real(const char *file, const char *function,
int line, enum log_level level,
const char *format, ...)
fc__attribute((__format__ (__printf__, 5, 6)));
#define ruleset_error(level, format, ...) \
if (log_do_output_for_level(level)) { \
ruleset_error_real(__FILE__, __FUNCTION__, __FC_LINE__, \
level, format, ## __VA_ARGS__); \
}
/**************************************************************************
Notifications about ruleset errors to clients. Especially important in
case of internal server crashing.
**************************************************************************/
static void ruleset_error_real(const char *file, const char *function,
int line, enum log_level level,
const char *format, ...)
{
va_list args;
va_start(args, format);
vdo_log(file, function, line, FALSE, level, format, args);
va_end(args);
if (LOG_FATAL >= level) {
exit(EXIT_FAILURE);
}
}
/**************************************************************************
datafilename() wrapper: tries to match in two ways.
Returns NULL on failure, the (statically allocated) filename on success.
**************************************************************************/
static const char *valid_ruleset_filename(const char *subdir,
const char *name,
const char *extension)
{
char filename[512];
const char *dfilename;
fc_assert_ret_val(subdir && name && extension, NULL);
fc_snprintf(filename, sizeof(filename), "%s/%s.%s",
subdir, name, extension);
log_verbose("Trying \"%s\".", filename);
dfilename = fileinfoname(get_data_dirs(), filename);
if (dfilename) {
return dfilename;
}
fc_snprintf(filename, sizeof(filename), "default/%s.%s", name, extension);
log_verbose("Trying \"%s\": default ruleset directory.", filename);
dfilename = fileinfoname(get_data_dirs(), filename);
if (dfilename) {
return dfilename;
}
fc_snprintf(filename, sizeof(filename), "%s_%s.%s",
subdir, name, extension);
log_verbose("Trying \"%s\": alternative ruleset filename syntax.",
filename);
dfilename = fileinfoname(get_data_dirs(), filename);
if (dfilename) {
return dfilename;
} else {
ruleset_error(LOG_FATAL,
/* TRANS: message about an installation error. */
_("Could not find a readable \"%s.%s\" ruleset file."),
name, extension);
}
return(NULL);
}
/**************************************************************************
Do initial section_file_load on a ruleset file.
"whichset" = "techs", "units", "buildings", "terrain", ...
**************************************************************************/
static struct section_file *openload_ruleset_file(const char *whichset)
{
char sfilename[512];
const char *dfilename = valid_ruleset_filename(game.server.rulesetdir,
whichset, RULES_SUFFIX);
struct section_file *secfile;
/* Need to save a copy of the filename for following message, since
section_file_load() may call datafilename() for includes. */
sz_strlcpy(sfilename, dfilename);
if (!(secfile = secfile_load(sfilename, FALSE))) {
ruleset_error(LOG_FATAL, "Could not load ruleset '%s':\n%s",
sfilename, secfile_error());
}
return secfile;
}
/**************************************************************************
Parse script file.
**************************************************************************/
static void openload_script_file(const char *whichset)
{
const char *dfilename = valid_ruleset_filename(game.server.rulesetdir,
whichset, SCRIPT_SUFFIX);
if (!script_server_do_file(NULL, dfilename)) {
ruleset_error(LOG_FATAL, "\"%s\": could not load ruleset script.",
dfilename);
}
}
/**************************************************************************
Ruleset files should have a capabilities string datafile.options
This gets and returns that string, and checks that the required
capabilities specified are satisified.
**************************************************************************/
static const char *check_ruleset_capabilities(struct section_file *file,
const char *us_capstr,
const char *filename)
{
const char *datafile_options;
if (!(datafile_options = secfile_lookup_str(file, "datafile.options"))) {
log_fatal("\"%s\": ruleset capability problem:", filename);
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
if (!has_capabilities(us_capstr, datafile_options)) {
log_fatal("\"%s\": ruleset datafile appears incompatible:", filename);
log_fatal(" datafile options: %s", datafile_options);
log_fatal(" supported options: %s", us_capstr);
ruleset_error(LOG_FATAL, "Capability problem");
}
if (!has_capabilities(datafile_options, us_capstr)) {
log_fatal("\"%s\": ruleset datafile claims required option(s)"
" that we don't support:", filename);
log_fatal(" datafile options: %s", datafile_options);
log_fatal(" supported options: %s", us_capstr);
ruleset_error(LOG_FATAL, "Capability problem");
}
return datafile_options;
}
/**************************************************************************
Load a requirement list. The list is returned as a static vector
(callers need not worry about freeing anything).
**************************************************************************/
static struct requirement_vector *lookup_req_list(struct section_file *file,
const char *sec,
const char *sub,
const char *rfor)
{
const char *type, *name;
int j;
const char *filename;
static struct requirement_vector list;
filename = secfile_name(file);
requirement_vector_reserve(&list, 0);
for (j = 0; (type = secfile_lookup_str_default(file, NULL, "%s.%s%d.type",
sec, sub, j)); j++) {
char buf[MAX_LEN_NAME];
const char *range;
bool survives, negated;
struct entry *pentry;
struct requirement req;
if (!(pentry = secfile_entry_lookup(file, "%s.%s%d.name",
sec, sub, j))) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
name = NULL;
switch (entry_type(pentry)) {
case ENTRY_BOOL:
{
bool val;
if (entry_bool_get(pentry, &val)) {
fc_snprintf(buf, sizeof(buf), "%d", val);
name = buf;
}
}
break;
case ENTRY_INT:
{
int val;
if (entry_int_get(pentry, &val)) {
fc_snprintf(buf, sizeof(buf), "%d", val);
name = buf;
}
}
break;
case ENTRY_STR:
(void) entry_str_get(pentry, &name);
break;
}
if (NULL == name) {
ruleset_error(LOG_FATAL,
"\"%s\": error in handling requirement name for '%s.%s%d'.",
filename, sec, sub, j);
}
if (!(range = secfile_lookup_str(file, "%s.%s%d.range", sec, sub, j))) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
survives = secfile_lookup_bool_default(file, FALSE,
"%s.%s%d.survives", sec, sub, j);
negated = secfile_lookup_bool_default(file, FALSE,
"%s.%s%d.negated", sec, sub, j);
req = req_from_str(type, range, survives, negated, name);
if (req.source.kind == universals_n_invalid()) {
ruleset_error(LOG_FATAL, "\"%s\" [%s] has unknown req: \"%s\" \"%s\".",
filename, sec, type, name);
}
requirement_vector_append(&list, req);
}
if (j > MAX_NUM_REQS) {
ruleset_error(LOG_FATAL, "Too many (%d) requirements for %s. Max is %d",
j, rfor, MAX_NUM_REQS);
}
return &list;
}
/**************************************************************************
Lookup a string prefix.entry in the file and return the corresponding
advances pointer. If (!required), return A_NEVER for match "Never" or
can't match. If (required), die when can't match. Note the first tech
should have name "None" so that will always match.
If description is not NULL, it is used in the warning message
instead of prefix (eg pass unit->name instead of prefix="units2.u27")
**************************************************************************/
static struct advance *lookup_tech(struct section_file *file,
const char *prefix, const char *entry,
int loglevel, const char *filename,
const char *description)
{
const char *sval;
struct advance *padvance;
sval = secfile_lookup_str_default(file, NULL, "%s.%s", prefix, entry);
if (!sval || (LOG_FATAL < loglevel && strcmp(sval, "Never") == 0)) {
padvance = A_NEVER;
} else {
padvance = advance_by_rule_name(sval);
if (A_NEVER == padvance) {
ruleset_error(loglevel,
"\"%s\" %s %s: couldn't match \"%s\".",
filename, (description ? description : prefix), entry, sval);
/* ruleset_error returned only if error was not fatal. */
}
}
return padvance;
}
/**************************************************************************
Lookup a string prefix.entry in the file and return the corresponding
improvement pointer. If (!required), return B_NEVER for match "None" or
can't match. If (required), die when can't match.
If description is not NULL, it is used in the warning message
instead of prefix (eg pass unit->name instead of prefix="units2.u27")
**************************************************************************/
static struct impr_type *lookup_building(struct section_file *file,
const char *prefix, const char *entry,
int loglevel, const char *filename,
const char *description)
{
const char *sval;
struct impr_type *pimprove;
sval = secfile_lookup_str_default(file, NULL, "%s.%s", prefix, entry);
if (!sval || (LOG_FATAL < loglevel && strcmp(sval, "None") == 0)) {
pimprove = B_NEVER;
} else {
pimprove = improvement_by_rule_name(sval);
if (B_NEVER == pimprove) {
ruleset_error(loglevel,
"\"%s\" %s %s: couldn't match \"%s\".",
filename, (description ? description : prefix), entry, sval);
/* ruleset_error() returned only if error was not fatal */
}
}
return pimprove;
}
/**************************************************************************
Lookup a prefix.entry string vector in the file and fill in the
array, which should hold MAX_NUM_UNIT_LIST items. The output array is
either U_LAST terminated or full (contains MAX_NUM_UNIT_LIST
items). If the vector is not found and the required parameter is set,
we report it as an error, otherwise we just punt.
**************************************************************************/
static void lookup_unit_list(struct section_file *file, const char *prefix,
const char *entry, int loglevel,
struct unit_type **output,
const char *filename)
{
const char **slist;
size_t nval;
int i;
/* pre-fill with NULL: */
for(i = 0; i < MAX_NUM_UNIT_LIST; i++) {
output[i] = NULL;
}
slist = secfile_lookup_str_vec(file, &nval, "%s.%s", prefix, entry);
if (nval == 0) {
if (LOG_FATAL >= loglevel) {
ruleset_error(LOG_FATAL, "\"%s\": missing string vector %s.%s",
filename, prefix, entry);
}
return;
}
if (nval > MAX_NUM_UNIT_LIST) {
ruleset_error(LOG_FATAL,
"\"%s\": string vector %s.%s too long (%d, max %d)",
filename, prefix, entry, (int) nval, MAX_NUM_UNIT_LIST);
}
if (nval == 1 && strcmp(slist[0], "") == 0) {
free(slist);
return;
}
for (i = 0; i < nval; i++) {
const char *sval = slist[i];
struct unit_type *punittype = unit_type_by_rule_name(sval);
if (!punittype) {
ruleset_error(LOG_FATAL,
"\"%s\" %s.%s (%d): couldn't match \"%s\".",
filename, prefix, entry, i, sval);
}
output[i] = punittype;
log_debug("\"%s\" %s.%s (%d): %s (%d)", filename, prefix, entry, i, sval,
utype_number(punittype));
}
free(slist);
return;
}
/**************************************************************************
Lookup a prefix.entry string vector in the file and fill in the
array, which should hold MAX_NUM_TECH_LIST items. The output array is
either A_LAST terminated or full (contains MAX_NUM_TECH_LIST
items). All valid entries of the output array are guaranteed to
exist. There should be at least one value, but it may be "",
meaning empty list.
**************************************************************************/
static void lookup_tech_list(struct section_file *file, const char *prefix,
const char *entry, int *output,
const char *filename)
{
const char **slist;
size_t nval;
int i;
/* pre-fill with A_LAST: */
for(i=0; i<MAX_NUM_TECH_LIST; i++) {
output[i] = A_LAST;
}
slist = secfile_lookup_str_vec(file, &nval, "%s.%s", prefix, entry);
if (nval==0) {
ruleset_error(LOG_FATAL, "\"%s\": missing string vector %s.%s",
filename, prefix, entry);
}
if (nval>MAX_NUM_TECH_LIST) {
ruleset_error(LOG_FATAL,
"\"%s\": string vector %s.%s too long (%d, max %d)",
filename, prefix, entry, (int) nval, MAX_NUM_TECH_LIST);
}
if (nval==1 && strcmp(slist[0], "")==0) {
free(slist);
return;
}
for (i=0; i<nval; i++) {
const char *sval = slist[i];
struct advance *padvance = advance_by_rule_name(sval);
if (NULL == padvance) {
ruleset_error(LOG_FATAL,
"\"%s\" %s.%s (%d): couldn't match \"%s\".",
filename, prefix, entry, i, sval);
}
if (!valid_advance(padvance)) {
ruleset_error(LOG_FATAL, "\"%s\" %s.%s (%d): \"%s\" is removed.",
filename, prefix, entry, i, sval);
}
output[i] = advance_number(padvance);
log_debug("\"%s\" %s.%s (%d): %s (%d)", filename, prefix, entry, i, sval,
advance_number(padvance));
}
free(slist);
return;
}
/**************************************************************************
Lookup a prefix.entry string vector in the file and fill in the
array, which should hold MAX_NUM_BUILDING_LIST items. The output array is
either B_LAST terminated or full (contains MAX_NUM_BUILDING_LIST
items). [All valid entries of the output array are guaranteed to pass
improvement_exist()?] There should be at least one value, but it may be
"", meaning an empty list.
**************************************************************************/
static void lookup_building_list(struct section_file *file,
const char *prefix, const char *entry,
int *output, const char *filename)
{
const char **slist;
size_t nval;
int i;
/* pre-fill with B_LAST: */
for (i = 0; i < MAX_NUM_BUILDING_LIST; i++) {
output[i] = B_LAST;
}
slist = secfile_lookup_str_vec(file, &nval, "%s.%s", prefix, entry);
if (nval == 0) {
ruleset_error(LOG_FATAL, "\"%s\": missing string vector %s.%s",
filename, prefix, entry);
}
if (nval > MAX_NUM_BUILDING_LIST) {
ruleset_error(LOG_FATAL,
"\"%s\": string vector %s.%s too long (%d, max %d)",
filename, prefix, entry, (int) nval, MAX_NUM_BUILDING_LIST);
}
if (nval == 1 && strcmp(slist[0], "") == 0) {
free(slist);
return;
}
for (i = 0; i < nval; i++) {
const char *sval = slist[i];
struct impr_type *pimprove = improvement_by_rule_name(sval);
if (NULL == pimprove) {
ruleset_error(LOG_FATAL,
"\"%s\" %s.%s (%d): couldn't match \"%s\".",
filename, prefix, entry, i, sval);
}
output[i] = improvement_number(pimprove);
log_debug("%s.%s,%d %s %d", prefix, entry, i, sval, output[i]);
}
free(slist);
}
/**************************************************************************
Lookup a string prefix.entry in the file and return the corresponding
unit_type id. If (!required), return NULL if match "None" or can't match.
If (required), die if can't match.
If description is not NULL, it is used in the warning message
instead of prefix (eg pass unit->name instead of prefix="units2.u27")
**************************************************************************/
static struct unit_type *lookup_unit_type(struct section_file *file,
const char *prefix,
const char *entry,
int loglevel,
const char *filename,
const char *description)
{
const char *sval;
struct unit_type *punittype;
if (LOG_FATAL >= loglevel) {
sval = secfile_lookup_str(file, "%s.%s", prefix, entry);
} else {
sval = secfile_lookup_str_default(file, "None", "%s.%s", prefix, entry);
}
if (strcmp(sval, "None")==0) {
punittype = NULL;
} else {
punittype = unit_type_by_rule_name(sval);
if (!punittype) {
ruleset_error(loglevel,
"\"%s\" %s %s: couldn't match \"%s\".",
filename, (description ? description : prefix), entry, sval);
/* We continue if error was not fatal. */
punittype = NULL;
}
}
return punittype;
}
/**************************************************************************
Lookup entry in the file and return the corresponding government index;
dies if can't find/match. filename is for error message.
**************************************************************************/
static struct government *lookup_government(struct section_file *file,
const char *entry,
const char *filename,
struct government *fallback)
{
const char *sval;
struct government *gov;
sval = secfile_lookup_str_default(file, NULL, "%s", entry);
if (!sval) {
gov = fallback;
} else {
gov = government_by_rule_name(sval);
}
if (!gov) {
ruleset_error(LOG_FATAL,
"\"%s\" %s: couldn't match \"%s\".",
filename, entry, sval);
}
return gov;
}
/**************************************************************************
Lookup entry in the file and return the corresponding move_type index;
dies if can't find/match. filename is for error message.
**************************************************************************/
static enum unit_move_type lookup_move_type(struct section_file *file,
const char *entry,
const char *filename)
{
const char *sval;
enum unit_move_type mt;
sval = secfile_lookup_str_default(file, NULL, "%s", entry);
if (sval == NULL) {
return unit_move_type_invalid();
}
mt = unit_move_type_by_name(sval, fc_strcasecmp);
if (!unit_move_type_is_valid(mt)) {
ruleset_error(LOG_FATAL,
"\"%s\" %s: couldn't match \"%s\".",
filename, entry, sval);
}
return mt;
}
/****************************************************************************
Lookup optional string, returning allocated memory or NULL.
****************************************************************************/
static char *lookup_string(struct section_file *file, const char *prefix,
const char *suffix)
{
const char *sval = secfile_lookup_str(file, "%s.%s", prefix, suffix);
if (NULL != sval) {
char copy[strlen(sval) + 1];
strcpy(copy, sval);
remove_leading_trailing_spaces(copy);
if (strlen(copy) > 0) {
return fc_strdup(copy);
}
}
return NULL;
}
/****************************************************************************
Lookup optional string vector, returning allocated memory or NULL.
****************************************************************************/
static struct strvec *lookup_strvec(struct section_file *file,
const char *prefix, const char *suffix)
{
size_t dim;
const char **vec = secfile_lookup_str_vec(file, &dim,
"%s.%s", prefix, suffix);
if (NULL != vec) {
struct strvec *dest = strvec_new();
strvec_store(dest, vec, dim);
free(vec);
return dest;
}
return NULL;
}
/**************************************************************************
Look up the resource section name and return its pointer.
**************************************************************************/
static struct resource *lookup_resource(const char *filename,
const char *name,
const char *jsection)
{
resource_type_iterate(presource) {
const int i = resource_index(presource);
const char *isection = &resource_sections[i * MAX_SECTION_LABEL];
if (0 == fc_strcasecmp(isection, name)) {
return presource;
}
} resource_type_iterate_end;
ruleset_error(LOG_ERROR,
"\"%s\" [%s] has unknown \"%s\".",
filename,
jsection,
name);
return NULL;
}
/**************************************************************************
Look up the terrain section name and return its pointer.
**************************************************************************/
static struct terrain *lookup_terrain(struct section_file *file,
const char *item,
struct terrain *pthis)
{
const int j = terrain_index(pthis);
const char *jsection = &terrain_sections[j * MAX_SECTION_LABEL];
const char *name = secfile_lookup_str(file, "%s.%s", jsection, item);
if (NULL == name
|| *name == '\0'
|| (0 == strcmp(name, "none"))
|| (0 == strcmp(name, "no"))) {
return T_NONE;
}
if (0 == strcmp(name, "yes")) {
return pthis;
}
terrain_type_iterate(pterrain) {
const int i = terrain_index(pterrain);
const char *isection = &terrain_sections[i * MAX_SECTION_LABEL];
if (0 == fc_strcasecmp(isection, name)) {
return pterrain;
}
} terrain_type_iterate_end;
ruleset_error(LOG_ERROR, "\"%s\" [%s] has unknown \"%s\".",
secfile_name(file), jsection, name);
return T_NONE;
}
/**************************************************************************
Load "name" and (optionally) "rule_name" into a struct name_translation.
**************************************************************************/
static void ruleset_load_names(struct name_translation *pname,
struct section_file *file,
const char *sec_name)
{
const char *name = secfile_lookup_str(file, "%s.name", sec_name);
const char *rule_name = secfile_lookup_str(file, "%s.rule_name", sec_name);
if (!name) {
ruleset_error(LOG_FATAL,
"\"%s\" [%s]: no \"name\" specified.",
secfile_name(file), sec_name);
}
names_set(pname, name, rule_name);
}
/**************************************************************************
Load names of technologies so other rulesets can refer to techs with
their name.
**************************************************************************/
static void load_tech_names(struct section_file *file)
{
struct section_list *sec;
/* Number of techs in the ruleset (means without A_NONE). */
int num_techs = 0;
int i;
const char *filename = secfile_name(file);
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
/* The names: */
sec = secfile_sections_by_name_prefix(file, ADVANCE_SECTION_PREFIX);
if (NULL == sec || 0 == (num_techs = section_list_size(sec))) {
ruleset_error(LOG_FATAL, "\"%s\": No Advances?!?", filename);
}
log_verbose("%d advances (including possibly unused)", num_techs);
if(num_techs + A_FIRST > A_LAST_REAL) {
ruleset_error(LOG_FATAL, "\"%s\": Too many advances (%d, max %d)",
filename, num_techs, A_LAST_REAL-A_FIRST);
}
game.control.num_tech_types = num_techs + A_FIRST; /* includes A_NONE */
i = 0;
advance_iterate(A_FIRST, a) {
ruleset_load_names(&a->name, file, section_name(section_list_get(sec, i)));
i++;
} advance_iterate_end;
section_list_destroy(sec);
}
/**************************************************************************
Load technologies related ruleset data
**************************************************************************/
static void load_ruleset_techs(struct section_file *file)
{
struct section_list *sec;
int i;
struct advance *a_none = advance_by_number(A_NONE);
const char *filename = secfile_name(file);
(void) check_ruleset_capabilities(file, RULESET_CAPABILITIES, filename);
sec = secfile_sections_by_name_prefix(file, ADVANCE_SECTION_PREFIX);
/* Initialize dummy tech A_NONE */
a_none->require[AR_ONE] = a_none;
a_none->require[AR_TWO] = a_none;
a_none->require[AR_ROOT] = A_NEVER;
BV_CLR_ALL(a_none->flags);
i = 0;
advance_iterate(A_FIRST, a) {
const char *sec_name = section_name(section_list_get(sec, i));
const char *sval, **slist;
size_t nval;
int j, ival;
a->require[AR_ONE] = lookup_tech(file, sec_name, "req1", LOG_ERROR,
filename, rule_name(&a->name));
a->require[AR_TWO] = lookup_tech(file, sec_name, "req2", LOG_ERROR,
filename, rule_name(&a->name));
a->require[AR_ROOT] = lookup_tech(file, sec_name, "root_req", LOG_ERROR,
filename, rule_name(&a->name));
if ((A_NEVER == a->require[AR_ONE] && A_NEVER != a->require[AR_TWO])
|| (A_NEVER != a->require[AR_ONE] && A_NEVER == a->require[AR_TWO])) {
log_error("\"%s\" [%s] \"%s\": \"Never\" with non-\"Never\".",
filename, sec_name, rule_name(&a->name));
a->require[AR_ONE] = a->require[AR_TWO] = A_NEVER;
}
if (a_none == a->require[AR_ONE] && a_none != a->require[AR_TWO]) {
log_error("\"%s\" [%s] \"%s\": should have \"None\" second.",
filename, sec_name, rule_name(&a->name));
a->require[AR_ONE] = a->require[AR_TWO];
a->require[AR_TWO] = a_none;
}
BV_CLR_ALL(a->flags);
slist = secfile_lookup_str_vec(file, &nval, "%s.flags", sec_name);
for(j=0; j<nval; j++) {
sval = slist[j];
if(strcmp(sval,"")==0) {
continue;
}
ival = tech_flag_id_by_name(sval, fc_strcasecmp);
if (!tech_flag_id_is_valid(ival)) {
log_error("\"%s\" [%s] \"%s\": bad flag name \"%s\".",
filename, sec_name, rule_name(&a->name), sval);
} else {
BV_SET(a->flags, ival);
}
}
free(slist);
sz_strlcpy(a->graphic_str,
secfile_lookup_str_default(file, "-", "%s.graphic", sec_name));
sz_strlcpy(a->graphic_alt,
secfile_lookup_str_default(file, "-",
"%s.graphic_alt", sec_name));
a->helptext = lookup_strvec(file, sec_name, "helptext");
a->bonus_message = lookup_string(file, sec_name, "bonus_message");
a->preset_cost =
secfile_lookup_int_default(file, -1, "%s.%s", sec_name, "cost");
a->num_reqs = 0;
i++;
} advance_iterate_end;
/* Propagate a root tech up into the tech tree. Thus if a technology
* X has Y has a root tech, then any technology requiring X also has
* Y as a root tech. */
restart:
advance_iterate(A_FIRST, a) {
if (valid_advance(a)
&& A_NEVER != a->require[AR_ROOT]) {
bool out_of_order = FALSE;
/* Now find any tech depending on this technology and update its
* root_req. */
advance_iterate(A_FIRST, b) {
if (valid_advance(b)
&& A_NEVER == b->require[AR_ROOT]
&& (a == b->require[AR_ONE] || a == b->require[AR_TWO])) {
b->require[AR_ROOT] = a->require[AR_ROOT];
if (b < a) {
out_of_order = TRUE;
}
}
} advance_iterate_end;
if (out_of_order) {
/* HACK: If we just changed the root_tech of a lower-numbered
* technology, we need to go back so that we can propagate the
* root_tech up to that technology's parents... */
goto restart;
}
}
} advance_iterate_end;
/* Now rename A_NEVER to A_NONE for consistency */
advance_iterate(A_NONE, a) {
if (A_NEVER == a->require[AR_ROOT]) {
a->require[AR_ROOT] = a_none;
}
} advance_iterate_end;
/* Some more consistency checking:
Non-removed techs depending on removed techs is too
broken to fix by default, so die.
*/
advance_iterate(A_FIRST, a) {
if (valid_advance(a)) {
/* We check for recursive tech loops later,
* in build_required_techs_helper. */
if (!valid_advance(a->require[AR_ONE])) {
ruleset_error(LOG_FATAL,
"\"%s\" tech \"%s\": req1 leads to removed tech.",
filename,
advance_rule_name(a));
}
if (!valid_advance(a->require[AR_TWO])) {
ruleset_error(LOG_FATAL,
"\"%s\" tech \"%s\": req2 leads to removed tech.",
filename,
advance_rule_name(a));
}
}
} advance_iterate_end;
section_list_destroy(sec);
secfile_check_unused(file);
secfile_destroy(file);
}
/**************************************************************************
Load names of units so other rulesets can refer to units with
their name.
**************************************************************************/
static void load_unit_names(struct section_file *file)
{
struct section_list *sec;
int nval = 0;
size_t user_flags;
const char **flaglist;
int i;
const char *filename = secfile_name(file);
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
/* User unit flag names */
flaglist = secfile_lookup_str_vec(file, &user_flags, "flags.names");
if (user_flags > MAX_NUM_USER_UNIT_FLAGS) {
ruleset_error(LOG_FATAL, "\"%s\": Too many user unit type flags!",
filename);
}
for (i = 0; i < user_flags; i++) {
set_user_unit_flag_name(F_USER_FLAG_1 + i, flaglist[i]);
}
for (; i < MAX_NUM_USER_UNIT_FLAGS; i++) {
set_user_unit_flag_name(F_USER_FLAG_1 + i, NULL);
}
if (flaglist) {
free(flaglist);
}
/* Unit classes */
sec = secfile_sections_by_name_prefix(file, UNIT_CLASS_SECTION_PREFIX);
if (NULL == sec || 0 == (nval = section_list_size(sec))) {
ruleset_error(LOG_FATAL, "\"%s\": No unit classes?!?", filename);
}
log_verbose("%d unit classes", nval);
if(nval > UCL_LAST) {
ruleset_error(LOG_FATAL, "\"%s\": Too many unit classes (%d, max %d)",
filename, nval, UCL_LAST);
}
game.control.num_unit_classes = nval;
unit_class_iterate(punitclass) {
const int i = uclass_index(punitclass);
ruleset_load_names(&punitclass->name, file,
section_name(section_list_get(sec, i)));
} unit_class_iterate_end;
section_list_destroy(sec);
/* The names: */
sec = secfile_sections_by_name_prefix(file, UNIT_SECTION_PREFIX);
if (NULL == sec || 0 == (nval = section_list_size(sec))) {
ruleset_error(LOG_FATAL, "\"%s\": No unit types?!?", filename);
}
log_verbose("%d unit types (including possibly unused)", nval);
if(nval > U_LAST) {
ruleset_error(LOG_FATAL, "\"%s\": Too many unit types (%d, max %d)",
filename, nval, U_LAST);
}
game.control.num_unit_types = nval;
unit_type_iterate(punittype) {
const int i = utype_index(punittype);
ruleset_load_names(&punittype->name, file,
section_name(section_list_get(sec, i)));
} unit_type_iterate_end;
section_list_destroy(sec);
}
/**************************************************************************
Load veteran levels.
**************************************************************************/
static bool load_ruleset_veteran(struct section_file *file,
const char *path,
struct veteran_system **vsystem, char *err,
size_t err_len)
{
const char **vlist_name;
int *vlist_power, *vlist_raise, *vlist_wraise, *vlist_move;
size_t count_name, count_power, count_raise, count_wraise, count_move;
int i;
bool ret = TRUE;
/* The pointer should be uninitialised. */
if (*vsystem != NULL) {
fc_snprintf(err, err_len, "Veteran system is defined?!");
return FALSE;
}
/* Load data. */
vlist_name = secfile_lookup_str_vec(file, &count_name,
"%s.veteran_names", path);
vlist_power = secfile_lookup_int_vec(file, &count_power,
"%s.veteran_power_fact", path);
vlist_raise = secfile_lookup_int_vec(file, &count_raise,
"%s.veteran_raise_chance", path);
vlist_wraise = secfile_lookup_int_vec(file, &count_wraise,
"%s.veteran_work_raise_chance",
path);
vlist_move = secfile_lookup_int_vec(file, &count_move,
"%s.veteran_move_bonus", path);
if (count_name > MAX_VET_LEVELS) {
ret = FALSE;
fc_snprintf(err, err_len, "\"%s\": Too many veteran levels (section "
"'%s': %lu, max %d)", secfile_name(file), path,
(long unsigned)count_name, MAX_VET_LEVELS);
} else if (count_name != count_power
|| count_name != count_raise
|| count_name != count_wraise
|| count_name != count_move) {
ret = FALSE;
fc_snprintf(err, err_len, "\"%s\": Different lengths for the veteran "
"settings in section '%s'", secfile_name(file),
path);
} else if (count_name == 0) {
/* Nothing defined. */
*vsystem = NULL;
} else {
/* Generate the veteran system. */
*vsystem = veteran_system_new((int)count_name);
#define rs_sanity_veteran(_path, _entry, _i, _condition, _action) \
if (_condition) { \
log_error("Invalid veteran definition '%s.%s[%d]'!", \
_path, _entry, _i); \
log_debug("Failed check: '%s'. Update value: '%s'.", \
#_condition, #_action); \
_action; \
}
for (i = 0; i < count_name; i++) {
/* Some sanity checks. */
rs_sanity_veteran(path, "veteran_power_fact", i,
(vlist_power[i] < 0), vlist_power[i] = 0);
rs_sanity_veteran(path, "veteran_raise_chance", i,
(vlist_raise[i] < 0), vlist_raise[i] = 0);
rs_sanity_veteran(path, "veteran_work_raise_chance", i,
(vlist_wraise[i] < 0), vlist_wraise[i] = 0);
rs_sanity_veteran(path, "veteran_move_bonus", i,
(vlist_move[i] < 0), vlist_move[i] = 0);
if (i == 0) {
/* First element.*/
rs_sanity_veteran(path, "veteran_power_fact", i,
(vlist_power[i] != 100), vlist_power[i] = 100);
} else if (i == count_name - 1) {
/* Last element. */
rs_sanity_veteran(path, "veteran_power_fact", i,
(vlist_power[i] < vlist_power[i - 1]),
vlist_power[i] = vlist_power[i - 1]);
rs_sanity_veteran(path, "veteran_raise_chance", i,
(vlist_raise[i] != 0), vlist_raise[i] = 0);
rs_sanity_veteran(path, "veteran_work_raise_chance", i,
(vlist_wraise[i] != 0), vlist_wraise[i] = 0);
} else {
/* All elements inbetween. */
rs_sanity_veteran(path, "veteran_power_fact", i,
(vlist_power[i] < vlist_power[i - 1]),
vlist_power[i] = vlist_power[i - 1]);
rs_sanity_veteran(path, "veteran_raise_chance", i,
(vlist_raise[i] > 100), vlist_raise[i] = 100);
rs_sanity_veteran(path, "veteran_work_raise_chance", i,
(vlist_wraise[i] > 100), vlist_wraise[i] = 100);
}
veteran_system_definition(*vsystem, i, vlist_name[i], vlist_power[i],
vlist_move[i], vlist_raise[i],
vlist_wraise[i]);
}
#undef rs_sanity_veteran
}
if (vlist_name) {
free(vlist_name);
}
if (vlist_power) {
free(vlist_power);
}
if (vlist_raise) {
free(vlist_raise);
}
if (vlist_wraise) {
free(vlist_wraise);
}
if (vlist_move) {
free(vlist_move);
}
return ret;
}
/**************************************************************************
Load units related ruleset data.
**************************************************************************/
static void load_ruleset_units(struct section_file *file)
{
struct unit_type *u;
int j, ival;
size_t nval;
struct section_list *sec, *csec;
const char *sval, **slist;
const char *filename = secfile_name(file);
char msg[MAX_LEN_MSG];
(void) check_ruleset_capabilities(file, RULESET_CAPABILITIES, filename);
if (!load_ruleset_veteran(file, "veteran_system", &game.veteran, msg,
sizeof(msg)) || game.veteran == NULL) {
ruleset_error(LOG_FATAL, "Error loading the default veteran system: %s",
msg);
}
sec = secfile_sections_by_name_prefix(file, UNIT_SECTION_PREFIX);
nval = (NULL != sec ? section_list_size(sec) : 0);
csec = secfile_sections_by_name_prefix(file, UNIT_CLASS_SECTION_PREFIX);
nval = (NULL != csec ? section_list_size(csec) : 0);
unit_class_iterate(uc) {
int i = uclass_index(uc);
char tmp[200] = "\0";
const char *hut_str;
const char *sec_name = section_name(section_list_get(csec, i));
if (secfile_lookup_int(file, &uc->min_speed, "%s.min_speed", sec_name)) {
uc->min_speed *= SINGLE_MOVE;
} else {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
if (!secfile_lookup_int(file, &uc->hp_loss_pct,
"%s.hp_loss_pct", sec_name)) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
hut_str = secfile_lookup_str_default(file, "Normal", "%s.hut_behavior", sec_name);
if (fc_strcasecmp(hut_str, "Normal") == 0) {
uc->hut_behavior = HUT_NORMAL;
} else if (fc_strcasecmp(hut_str, "Nothing") == 0) {
uc->hut_behavior = HUT_NOTHING;
} else if (fc_strcasecmp(hut_str, "Frighten") == 0) {
uc->hut_behavior = HUT_FRIGHTEN;
} else {
ruleset_error(LOG_FATAL,
"\"%s\" unit_class \"%s\":"
" Illegal hut behavior \"%s\".",
filename,
uclass_rule_name(uc),
hut_str);
}
BV_CLR_ALL(uc->flags);
slist = secfile_lookup_str_vec(file, &nval, "%s.flags", sec_name);
for(j = 0; j < nval; j++) {
sval = slist[j];
if(strcmp(sval,"") == 0) {
continue;
}
ival = unit_class_flag_id_by_name(sval, fc_strcasecmp);
if (!unit_class_flag_id_is_valid(ival)) {
ival = unit_flag_by_rule_name(sval);
if (ival != F_LAST) {
ruleset_error(LOG_FATAL,
"\"%s\" unit_class \"%s\": unit_type flag!",
filename, uclass_rule_name(uc));
} else {
ruleset_error(LOG_FATAL,
"\"%s\" unit_class \"%s\": bad flag name \"%s\".",
filename, uclass_rule_name(uc), sval);
}
} else {
BV_SET(uc->flags, ival);
}
}
free(slist);
fc_strlcat(tmp, sec_name, 200);
fc_strlcat(tmp, ".move_type", 200);
uc->move_type = lookup_move_type(file, tmp, filename);
if (!unit_move_type_is_valid(uc->move_type)) {
/* Not explicitly given, determine automatically */
bool land_moving = FALSE;
bool sea_moving = FALSE;
if (uclass_has_flag(uc, UCF_RIVER_NATIVE)
|| uclass_has_flag(uc, UCF_ROAD_NATIVE)) {
land_moving = TRUE;
}
terrain_type_iterate(pterrain) {
bv_special spe;
bv_bases bases;
BV_CLR_ALL(spe);
BV_CLR_ALL(bases);
if (is_native_to_class(uc, pterrain, spe, bases)) {
if (is_ocean(pterrain)) {
sea_moving = TRUE;
} else {
land_moving = TRUE;
}
}
} terrain_type_iterate_end;
if (land_moving && sea_moving) {
uc->move_type = UMT_BOTH;
} else if (sea_moving) {
uc->move_type = UMT_SEA;
} else {
/* If unit has no native terrains, it is considered land moving */
uc->move_type = UMT_LAND;
}
} else if (uc->move_type == UMT_SEA) {
/* Explicitly given SEA_MOVING */
if (uclass_has_flag(uc, UCF_RIVER_NATIVE)) {
log_error("\"%s\" unit_class \"%s\": cannot give RiverNative "
"flag to sea moving unit",
filename, uclass_rule_name(uc));
BV_CLR(uc->flags, UCF_RIVER_NATIVE);
}
if (uclass_has_flag(uc, UCF_ROAD_NATIVE)) {
log_error("\"%s\" unit_class \"%s\": cannot give RoadNative "
"flag to sea moving unit",
filename, uclass_rule_name(uc));
BV_CLR(uc->flags, UCF_ROAD_NATIVE);
}
}
} unit_class_iterate_end;
/* Tech and Gov requirements; per unit veteran system */
unit_type_iterate(u) {
const int i = utype_index(u);
const struct section *psection = section_list_get(sec, i);
const char *sec_name = section_name(psection);
u->require_advance = lookup_tech(file, sec_name,
"tech_req", LOG_FATAL, filename,
rule_name(&u->name));
if (NULL != section_entry_by_name(psection, "gov_req")) {
char tmp[200] = "\0";
fc_strlcat(tmp, section_name(psection), sizeof(tmp));
fc_strlcat(tmp, ".gov_req", sizeof(tmp));
u->need_government = lookup_government(file, tmp, filename, NULL);
} else {
u->need_government = NULL; /* no requirement */
}
if (!load_ruleset_veteran(file, sec_name, &u->veteran,
msg, sizeof(msg))) {
ruleset_error(LOG_NORMAL, "Error loading the veteran system: %s",
msg);
}
u->obsoleted_by = lookup_unit_type(file, sec_name, "obsolete_by",
LOG_ERROR, filename,
rule_name(&u->name));
u->converted_to = lookup_unit_type(file, sec_name, "convert_to",
LOG_ERROR, filename,
rule_name(&u->name));
} unit_type_iterate_end;
/* main stats: */
unit_type_iterate(u) {
const int i = utype_index(u);
struct unit_class *pclass;
const char *sec_name = section_name(section_list_get(sec, i));
const char *string;
u->need_improvement = lookup_building(file, sec_name, "impr_req",
LOG_ERROR, filename,
rule_name(&u->name));
sval = secfile_lookup_str(file, "%s.class", sec_name);
pclass = unit_class_by_rule_name(sval);
if (!pclass) {
ruleset_error(LOG_FATAL,
"\"%s\" unit_type \"%s\":"
" bad class \"%s\".",
filename,
utype_rule_name(u),
sval);
}
u->uclass = pclass;
sz_strlcpy(u->sound_move,
secfile_lookup_str_default(file, "-", "%s.sound_move",
sec_name));
sz_strlcpy(u->sound_move_alt,
secfile_lookup_str_default(file, "-", "%s.sound_move_alt",
sec_name));
sz_strlcpy(u->sound_fight,
secfile_lookup_str_default(file, "-", "%s.sound_fight",
sec_name));
sz_strlcpy(u->sound_fight_alt,
secfile_lookup_str_default(file, "-", "%s.sound_fight_alt",
sec_name));
if ((string = secfile_lookup_str(file, "%s.graphic", sec_name))) {
sz_strlcpy(u->graphic_str, string);
} else {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
sz_strlcpy(u->graphic_alt,
secfile_lookup_str_default(file, "-", "%s.graphic_alt",
sec_name));
if (!secfile_lookup_int(file, &u->build_cost,
"%s.build_cost", sec_name)
|| !secfile_lookup_int(file, &u->pop_cost,
"%s.pop_cost", sec_name)
|| !secfile_lookup_int(file, &u->attack_strength,
"%s.attack", sec_name)
|| !secfile_lookup_int(file, &u->defense_strength,
"%s.defense", sec_name)
|| !secfile_lookup_int(file, &u->move_rate,
"%s.move_rate", sec_name)
|| !secfile_lookup_int(file, &u->vision_radius_sq,
"%s.vision_radius_sq", sec_name)
|| !secfile_lookup_int(file, &u->transport_capacity,
"%s.transport_cap", sec_name)
|| !secfile_lookup_int(file, &u->hp,
"%s.hitpoints", sec_name)
|| !secfile_lookup_int(file, &u->firepower,
"%s.firepower", sec_name)
|| !secfile_lookup_int(file, &u->fuel,
"%s.fuel", sec_name)
|| !secfile_lookup_int(file, &u->happy_cost,
"%s.uk_happy", sec_name)) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
u->move_rate *= SINGLE_MOVE;
if (u->firepower <= 0) {
ruleset_error(LOG_FATAL,
"\"%s\" unit_type \"%s\":"
" firepower is %d,"
" but must be at least 1. "
" If you want no attack ability,"
" set the unit's attack strength to 0.",
filename,
utype_rule_name(u),
u->firepower);
}
output_type_iterate(o) {
u->upkeep[o] = secfile_lookup_int_default(file, 0, "%s.uk_%s",
sec_name,
get_output_identifier(o));
} output_type_iterate_end;
slist = secfile_lookup_str_vec(file, &nval, "%s.cargo", sec_name);
BV_CLR_ALL(u->cargo);
for (j = 0; j < nval; j++) {
struct unit_class *uclass = unit_class_by_rule_name(slist[j]);
if (!uclass) {
ruleset_error(LOG_FATAL,
"\"%s\" unit_type \"%s\":"
"has unknown unit class %s as cargo.",
filename,
utype_rule_name(u),
slist[j]);
}
BV_SET(u->cargo, uclass_index(uclass));
}
free(slist);
slist = secfile_lookup_str_vec(file, &nval, "%s.targets", sec_name);
BV_CLR_ALL(u->targets);
for (j = 0; j < nval; j++) {
struct unit_class *uclass = unit_class_by_rule_name(slist[j]);
if (!uclass) {
ruleset_error(LOG_FATAL,
"\"%s\" unit_type \"%s\":"
"has unknown unit class %s as target.",
filename,
utype_rule_name(u),
slist[j]);
}
BV_SET(u->targets, uclass_index(uclass));
}
free(slist);
/* Set also all classes that are never unreachable as targets. */
unit_class_iterate(pclass) {
if (!uclass_has_flag(pclass, UCF_UNREACHABLE)) {
BV_SET(u->targets, uclass_index(pclass));
}
} unit_class_iterate_end;
u->helptext = lookup_strvec(file, sec_name, "helptext");
u->paratroopers_range = secfile_lookup_int_default(file,
0, "%s.paratroopers_range", sec_name);
u->paratroopers_mr_req = SINGLE_MOVE * secfile_lookup_int_default(file,
0, "%s.paratroopers_mr_req", sec_name);
u->paratroopers_mr_sub = SINGLE_MOVE * secfile_lookup_int_default(file,
0, "%s.paratroopers_mr_sub", sec_name);
u->bombard_rate = secfile_lookup_int_default(file,
0, "%s.bombard_rate", sec_name);
u->city_size = secfile_lookup_int_default(file,
1, "%s.city_size", sec_name);
} unit_type_iterate_end;
/* flags */
unit_type_iterate(u) {
const int i = utype_index(u);
BV_CLR_ALL(u->flags);
fc_assert(!utype_has_flag(u, F_LAST - 1));
slist = secfile_lookup_str_vec(file, &nval, "%s.flags",
section_name(section_list_get(sec, i)));
for(j=0; j<nval; j++) {
sval = slist[j];
if (0 == strcmp(sval, "")) {
continue;
}
ival = unit_flag_by_rule_name(sval);
if (F_LAST == ival) {
log_error("\"%s\" unit_type \"%s\": bad flag name \"%s\".",
filename, utype_rule_name(u), sval);
ival = unit_class_flag_id_by_name(sval, fc_strcasecmp);
if (unit_class_flag_id_is_valid(ival)) {
ruleset_error(LOG_FATAL,
"\"%s\" unit_type \"%s\": unit_class flag!",
filename, utype_rule_name(u));
} else {
ruleset_error(LOG_FATAL,
"\"%s\" unit_type \"%s\": bad flag name \"%s\".",
filename, utype_rule_name(u), sval);
}
} else {
BV_SET(u->flags, ival);
}
fc_assert(utype_has_flag(u, ival));
}
free(slist);
} unit_type_iterate_end;
/* roles */
unit_type_iterate(u) {
const int i = utype_index(u);
BV_CLR_ALL(u->roles);
slist = secfile_lookup_str_vec(file, &nval, "%s.roles",
section_name(section_list_get(sec, i)));
for(j=0; j<nval; j++) {
sval = slist[j];
if(strcmp(sval,"")==0) {
continue;
}
ival = unit_role_by_rule_name(sval);
if (ival==L_LAST) {
log_error("\"%s\" unit_type \"%s\": bad role name \"%s\".",
filename, utype_rule_name(u), sval);
} else if ((ival == L_FERRYBOAT || ival == L_BARBARIAN_BOAT)
&& u->uclass->move_type == UMT_LAND) {
log_error( "\"%s\" unit_type \"%s\": role \"%s\" "
"for land moving unit.",
filename, utype_rule_name(u), sval);
} else {
BV_SET(u->roles, ival - L_FIRST);
}
fc_assert(utype_has_role(u, ival));
}
free(slist);
} unit_type_iterate_end;
/* Some more consistency checking: */
unit_type_iterate(u) {
if (!valid_advance(u->require_advance)) {
log_error("\"%s\" unit_type \"%s\": depends on removed tech \"%s\".",
filename, utype_rule_name(u),
advance_rule_name(u->require_advance));
u->require_advance = A_NEVER;
}
if (utype_has_flag(u, F_SETTLERS)
&& u->city_size <= 0) {
ruleset_error(LOG_ERROR, "\"%s\": Unit %s would build size %d cities",
filename, utype_rule_name(u), u->city_size);
u->city_size = 1;
}
} unit_type_iterate_end;
/* Setup roles and flags pre-calcs: */
role_unit_precalcs();
/* Check some required flags and roles etc: */
if(num_role_units(F_CITIES)==0) {
ruleset_error(LOG_FATAL, "\"%s\": No flag=cities units?", filename);
}
if(num_role_units(F_SETTLERS)==0) {
ruleset_error(LOG_FATAL, "\"%s\": No flag=settler units?", filename);
}
if(num_role_units(L_EXPLORER)==0) {
ruleset_error(LOG_FATAL, "\"%s\": No role=explorer units?", filename);
}
if(num_role_units(L_FERRYBOAT)==0) {
ruleset_error(LOG_FATAL, "\"%s\": No role=ferryboat units?", filename);
}
if(num_role_units(L_FIRSTBUILD)==0) {
ruleset_error(LOG_FATAL, "\"%s\": No role=firstbuild units?", filename);
}
if (0 == num_role_units(L_BARBARIAN)
&& BARBS_DISABLED != game.server.barbarianrate) {
ruleset_error(LOG_FATAL, "\"%s\": No role=barbarian units?", filename);
}
if (0 == num_role_units(L_BARBARIAN_LEADER)
&& BARBS_DISABLED != game.server.barbarianrate) {
ruleset_error(LOG_FATAL, "\"%s\": No role=barbarian leader units?", filename);
}
if (0 == num_role_units(L_BARBARIAN_BUILD)
&& BARBS_DISABLED != game.server.barbarianrate) {
ruleset_error(LOG_FATAL, "\"%s\": No role=barbarian build units?", filename);
}
if (0 == num_role_units(L_BARBARIAN_BOAT)
&& BARBS_DISABLED != game.server.barbarianrate) {
ruleset_error(LOG_FATAL, "\"%s\": No role=barbarian ship units?", filename);
} else if (num_role_units(L_BARBARIAN_BOAT) > 0) {
u = get_role_unit(L_BARBARIAN_BOAT,0);
if(utype_move_type(u) != UMT_SEA) {
ruleset_error(LOG_FATAL,
"\"%s\": Barbarian boat (%s) needs to be a sea unit.",
filename,
utype_rule_name(u));
}
}
if (0 == num_role_units(L_BARBARIAN_SEA)
&& BARBS_DISABLED != game.server.barbarianrate) {
ruleset_error(LOG_FATAL, "\"%s\": No role=sea raider barbarian units?",
filename);
}
section_list_destroy(csec);
section_list_destroy(sec);
secfile_check_unused(file);
secfile_destroy(file);
}
/**************************************************************************
Load names of buildings so other rulesets can refer to buildings with
their name.
**************************************************************************/
static void load_building_names(struct section_file *file)
{
struct section_list *sec;
int i, nval = 0;
const char *filename = secfile_name(file);
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
/* The names: */
sec = secfile_sections_by_name_prefix(file, BUILDING_SECTION_PREFIX);
if (NULL == sec || 0 == (nval = section_list_size(sec))) {
ruleset_error(LOG_FATAL, "\"%s\": No improvements?!?", filename);
}
log_verbose("%d improvement types (including possibly unused)", nval);
if (nval > B_LAST) {
ruleset_error(LOG_FATAL, "\"%s\": Too many improvements (%d, max %d)",
filename, nval, B_LAST);
}
game.control.num_impr_types = nval;
for (i = 0; i < nval; i++) {
struct impr_type *b = improvement_by_number(i);
ruleset_load_names(&b->name, file, section_name(section_list_get(sec, i)));
}
section_list_destroy(sec);
}
/**************************************************************************
Load buildings related ruleset data
**************************************************************************/
static void load_ruleset_buildings(struct section_file *file)
{
struct section_list *sec;
const char *item;
int i, nval;
const char *filename = secfile_name(file);
(void) check_ruleset_capabilities(file, RULESET_CAPABILITIES, filename);
sec = secfile_sections_by_name_prefix(file, BUILDING_SECTION_PREFIX);
nval = (NULL != sec ? section_list_size(sec) : 0);
for (i = 0; i < nval; i++) {
struct impr_type *b = improvement_by_number(i);
const char *sec_name = section_name(section_list_get(sec, i));
struct requirement_vector *reqs =
lookup_req_list(file, sec_name, "reqs",
improvement_rule_name(b));
const char *sval, **slist;
int j, ival;
size_t nflags;
item = secfile_lookup_str(file, "%s.genus", sec_name);
b->genus = impr_genus_id_by_name(item, fc_strcasecmp);
if (!impr_genus_id_is_valid(b->genus)) {
ruleset_error(LOG_FATAL, "\"%s\" improvement \"%s\": couldn't match "
"genus \"%s\".", filename,
improvement_rule_name(b), item);
}
slist = secfile_lookup_str_vec(file, &nflags, "%s.flags", sec_name);
BV_CLR_ALL(b->flags);
for(j=0; j<nflags; j++) {
sval = slist[j];
if(strcmp(sval,"")==0) {
continue;
}
ival = impr_flag_id_by_name(sval, fc_strcasecmp);
if (!impr_flag_id_is_valid(ival)) {
ruleset_error(LOG_FATAL,
"\"%s\" improvement \"%s\": bad flag name \"%s\".",
filename, improvement_rule_name(b), sval);
} else {
BV_SET(b->flags, ival);
}
}
free(slist);
requirement_vector_copy(&b->reqs, reqs);
b->obsolete_by = lookup_tech(file, sec_name, "obsolete_by", LOG_ERROR,
filename, rule_name(&b->name));
if (advance_by_number(A_NONE) == b->obsolete_by) {
/*
* The ruleset can specify "None" for a never-obsoleted
* improvement. Currently this means A_NONE, which is an
* unnecessary special-case. We use A_NEVER to flag a
* never-obsoleted improvement in the code instead.
* (Test for valid_advance() later.)
*/
b->obsolete_by = A_NEVER;
}
b->replaced_by = lookup_building(file, sec_name, "replaced_by",
LOG_ERROR, filename,
rule_name(&b->name));
if (!secfile_lookup_int(file, &b->build_cost,
"%s.build_cost", sec_name)
|| !secfile_lookup_int(file, &b->upkeep,
"%s.upkeep", sec_name)
|| !secfile_lookup_int(file, &b->sabotage,
"%s.sabotage", sec_name)) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
sz_strlcpy(b->graphic_str,
secfile_lookup_str_default(file, "-",
"%s.graphic", sec_name));
sz_strlcpy(b->graphic_alt,
secfile_lookup_str_default(file, "-",
"%s.graphic_alt", sec_name));
sz_strlcpy(b->soundtag,
secfile_lookup_str_default(file, "-",
"%s.sound", sec_name));
sz_strlcpy(b->soundtag_alt,
secfile_lookup_str_default(file, "-",
"%s.sound_alt", sec_name));
b->helptext = lookup_strvec(file, sec_name, "helptext");
b->allows_units = FALSE;
unit_type_iterate(ut) {
if (ut->need_improvement == b) {
b->allows_units = TRUE;
break;
}
} unit_type_iterate_end;
}
/* Some more consistency checking: */
improvement_iterate(b) {
if (valid_improvement(b)) {
if (A_NEVER != b->obsolete_by
&& !valid_advance(b->obsolete_by)) {
log_error("\"%s\" improvement \"%s\": obsoleted by "
"removed tech \"%s\".",
filename, improvement_rule_name(b),
advance_rule_name(b->obsolete_by));
b->obsolete_by = A_NEVER;
}
}
} improvement_iterate_end;
section_list_destroy(sec);
secfile_check_unused(file);
secfile_destroy(file);
}
/**************************************************************************
Load names of terrain types so other rulesets can refer to terrains with
their name.
**************************************************************************/
static void load_terrain_names(struct section_file *file)
{
int nval = 0;
struct section_list *sec;
const char *filename = secfile_name(file);
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
/* terrain names */
sec = secfile_sections_by_name_prefix(file, TERRAIN_SECTION_PREFIX);
if (NULL == sec || 0 == (nval = section_list_size(sec))) {
ruleset_error(LOG_FATAL, "\"%s\": ruleset doesn't have any terrains.",
filename);
}
if (nval > MAX_NUM_TERRAINS) {
ruleset_error(LOG_FATAL, "\"%s\": Too many terrains (%d, max %d)",
filename, nval, MAX_NUM_TERRAINS);
}
game.control.terrain_count = nval;
/* avoid re-reading files */
if (terrain_sections) {
free(terrain_sections);
}
terrain_sections = fc_calloc(nval, MAX_SECTION_LABEL);
terrain_type_iterate(pterrain) {
const int i = terrain_index(pterrain);
const char *sec_name = section_name(section_list_get(sec, i));
ruleset_load_names(&pterrain->name, file, sec_name);
if (0 == strcmp(rule_name(&pterrain->name), "unused")) {
name_set(&pterrain->name, "");
}
section_strlcpy(&terrain_sections[i * MAX_SECTION_LABEL], sec_name);
} terrain_type_iterate_end;
section_list_destroy(sec);
/* resource names */
sec = secfile_sections_by_name_prefix(file, RESOURCE_SECTION_PREFIX);
nval = (NULL != sec ? section_list_size(sec) : 0);
if (nval > MAX_NUM_RESOURCES) {
ruleset_error(LOG_FATAL, "\"%s\": Too many resources (%d, max %d)",
filename, nval, MAX_NUM_RESOURCES);
}
game.control.resource_count = nval;
/* avoid re-reading files */
if (resource_sections) {
free(resource_sections);
}
resource_sections = fc_calloc(nval, MAX_SECTION_LABEL);
resource_type_iterate(presource) {
const int i = resource_index(presource);
const char *sec_name = section_name(section_list_get(sec, i));
ruleset_load_names(&presource->name, file, sec_name);
if (0 == strcmp(rule_name(&presource->name), "unused")) {
name_set(&presource->name, "");
}
section_strlcpy(&resource_sections[i * MAX_SECTION_LABEL], sec_name);
} resource_type_iterate_end;
if (NULL != sec) {
section_list_destroy(sec);
}
/* base names */
sec = secfile_sections_by_name_prefix(file, BASE_SECTION_PREFIX);
nval = (NULL != sec ? section_list_size(sec) : 0);
if (nval > MAX_BASE_TYPES) {
ruleset_error(LOG_FATAL, "\"%s\": Too many base types (%d, max %d)",
filename, nval, MAX_BASE_TYPES);
}
game.control.num_base_types = nval;
if (base_sections) {
free(base_sections);
}
base_sections = fc_calloc(nval, MAX_SECTION_LABEL);
base_type_iterate(pbase) {
const int i = base_index(pbase);
const char *sec_name = section_name(section_list_get(sec, i));
ruleset_load_names(&pbase->name, file, sec_name);
section_strlcpy(&base_sections[i * MAX_SECTION_LABEL], sec_name);
} base_type_iterate_end;
if (NULL != sec) {
section_list_destroy(sec);
}
}
/**************************************************************************
Load terrain types related ruleset data
**************************************************************************/
static void load_ruleset_terrain(struct section_file *file)
{
struct strvec *psv;
size_t nval;
int j;
const char **res;
const char *filename = secfile_name(file);
/* char *datafile_options = */ (void)
check_ruleset_capabilities(file, RULESET_CAPABILITIES, filename);
/* options */
terrain_control.may_road =
secfile_lookup_bool_default(file, TRUE, "options.may_road");
terrain_control.may_irrigate =
secfile_lookup_bool_default(file, TRUE, "options.may_irrigate");
terrain_control.may_mine =
secfile_lookup_bool_default(file, TRUE, "options.may_mine");
terrain_control.may_transform =
secfile_lookup_bool_default(file, TRUE, "options.may_transform");
/* parameters */
terrain_control.ocean_reclaim_requirement_pct
= secfile_lookup_int_default(file, 101,
"parameters.ocean_reclaim_requirement");
terrain_control.land_channel_requirement_pct
= secfile_lookup_int_default(file, 101,
"parameters.land_channel_requirement");
terrain_control.lake_max_size
= secfile_lookup_int_default(file, 0,
"parameters.lake_max_size");
map.server.ocean_resources
= secfile_lookup_bool_default(file, FALSE,
"parameters.ocean_resources");
terrain_control.river_move_mode =
secfile_lookup_int_default(file, RMV_FAST_STRICT, "parameters.river_move_mode");
terrain_control.river_defense_bonus =
secfile_lookup_int_default(file, 50, "parameters.river_defense_bonus");
terrain_control.river_trade_incr =
secfile_lookup_int_default(file, 1, "parameters.river_trade_incr");
psv = lookup_strvec(file, "parameters", "river_help_text");
PACKET_STRVEC_COMPUTE(terrain_control.river_help_text, psv);
if (NULL != psv) {
strvec_destroy(psv);
}
terrain_control.road_superhighway_trade_bonus =
secfile_lookup_int_default(file, 50, "parameters.road_superhighway_trade_bonus");
output_type_iterate(o) {
terrain_control.rail_tile_bonus[o] =
secfile_lookup_int_default(file, 0, "parameters.rail_%s_bonus",
get_output_identifier(o));
terrain_control.pollution_tile_penalty[o]
= secfile_lookup_int_default(file, 50,
"parameters.pollution_%s_penalty",
get_output_identifier(o));
terrain_control.fallout_tile_penalty[o]
= secfile_lookup_int_default(file, 50,
"parameters.fallout_%s_penalty",
get_output_identifier(o));
} output_type_iterate_end;
/* terrain details */
terrain_type_iterate(pterrain) {
const char **slist;
const int i = terrain_index(pterrain);
const char *tsection = &terrain_sections[i * MAX_SECTION_LABEL];
sz_strlcpy(pterrain->graphic_str,
secfile_lookup_str(file,"%s.graphic", tsection));
sz_strlcpy(pterrain->graphic_alt,
secfile_lookup_str(file,"%s.graphic_alt", tsection));
pterrain->identifier
= secfile_lookup_str(file, "%s.identifier", tsection)[0];
if ('\0' == pterrain->identifier) {
ruleset_error(LOG_FATAL, "\"%s\" [%s] identifier missing value.",
filename, tsection);
}
if (TERRAIN_UNKNOWN_IDENTIFIER == pterrain->identifier) {
ruleset_error(LOG_FATAL,
"\"%s\" [%s] cannot use '%c' as an identifier;"
" it is reserved for unknown terrain.",
filename, tsection, pterrain->identifier);
}
for (j = T_FIRST; j < i; j++) {
if (pterrain->identifier == terrain_by_number(j)->identifier) {
ruleset_error(LOG_FATAL,
"\"%s\" [%s] has the same identifier as [%s].",
filename,
tsection,
&terrain_sections[j * MAX_SECTION_LABEL]);
}
}
if (!secfile_lookup_int(file, &pterrain->movement_cost,
"%s.movement_cost", tsection)
|| !secfile_lookup_int(file, &pterrain->defense_bonus,
"%s.defense_bonus", tsection)) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
output_type_iterate(o) {
pterrain->output[o]
= secfile_lookup_int_default(file, 0, "%s.%s", tsection,
get_output_identifier(o));
} output_type_iterate_end;
res = secfile_lookup_str_vec(file, &nval, "%s.resources", tsection);
pterrain->resources = fc_calloc(nval + 1, sizeof(*pterrain->resources));
for (j = 0; j < nval; j++) {
pterrain->resources[j] = lookup_resource(filename, res[j], tsection);
}
pterrain->resources[nval] = NULL;
free(res);
res = NULL;
if (!secfile_lookup_int(file, &pterrain->road_trade_incr,
"%s.road_trade_incr", tsection)
|| !secfile_lookup_int(file, &pterrain->road_time,
"%s.road_time", tsection)) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
pterrain->irrigation_result
= lookup_terrain(file, "irrigation_result", pterrain);
if (!secfile_lookup_int(file, &pterrain->irrigation_food_incr,
"%s.irrigation_food_incr", tsection)
|| !secfile_lookup_int(file, &pterrain->irrigation_time,
"%s.irrigation_time", tsection)) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
pterrain->mining_result
= lookup_terrain(file, "mining_result", pterrain);
if (!secfile_lookup_int(file, &pterrain->mining_shield_incr,
"%s.mining_shield_incr", tsection)
|| !secfile_lookup_int(file, &pterrain->mining_time,
"%s.mining_time", tsection)) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
pterrain->transform_result
= lookup_terrain(file, "transform_result", pterrain);
if (!secfile_lookup_int(file, &pterrain->transform_time,
"%s.transform_time", tsection)) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
pterrain->rail_time
= secfile_lookup_int_default(file, 3, "%s.rail_time", tsection);
pterrain->clean_pollution_time
= secfile_lookup_int_default(file, 3, "%s.clean_pollution_time", tsection);
pterrain->clean_fallout_time
= secfile_lookup_int_default(file, 3, "%s.clean_fallout_time", tsection);
pterrain->warmer_wetter_result
= lookup_terrain(file, "warmer_wetter_result", pterrain);
pterrain->warmer_drier_result
= lookup_terrain(file, "warmer_drier_result", pterrain);
pterrain->cooler_wetter_result
= lookup_terrain(file, "cooler_wetter_result", pterrain);
pterrain->cooler_drier_result
= lookup_terrain(file, "cooler_drier_result", pterrain);
slist = secfile_lookup_str_vec(file, &nval, "%s.flags", tsection);
BV_CLR_ALL(pterrain->flags);
for (j = 0; j < nval; j++) {
const char *sval = slist[j];
enum terrain_flag_id flag
= terrain_flag_id_by_name(sval, fc_strcasecmp);
if (!terrain_flag_id_is_valid(flag)) {
ruleset_error(LOG_FATAL, "\"%s\" [%s] has unknown flag \"%s\".",
filename, tsection, sval);
} else {
BV_SET(pterrain->flags, flag);
}
}
free(slist);
{
enum mapgen_terrain_property mtp;
for (mtp = mapgen_terrain_property_begin();
mtp != mapgen_terrain_property_end();
mtp = mapgen_terrain_property_next(mtp)) {
pterrain->property[mtp]
= secfile_lookup_int_default(file, 0, "%s.property_%s", tsection,
mapgen_terrain_property_name(mtp));
}
}
slist = secfile_lookup_str_vec(file, &nval, "%s.native_to", tsection);
BV_CLR_ALL(pterrain->native_to);
for (j = 0; j < nval; j++) {
struct unit_class *class = unit_class_by_rule_name(slist[j]);
if (!class) {
ruleset_error(LOG_FATAL,
"\"%s\" [%s] is native to unknown unit class \"%s\".",
filename, tsection, slist[j]);
} else {
BV_SET(pterrain->native_to, uclass_index(class));
}
}
free(slist);
/* get terrain color */
{
fc_assert_ret(pterrain->rgb == NULL);
if (!rgbcolor_load(file, &pterrain->rgb, "%s.color", tsection)) {
ruleset_error(LOG_FATAL, "Missing terrain color definition: %s",
secfile_error());
}
}
pterrain->helptext = lookup_strvec(file, tsection, "helptext");
} terrain_type_iterate_end;
/* resource details */
resource_type_iterate(presource) {
char identifier[MAX_LEN_NAME];
const int i = resource_index(presource);
const char *rsection = &resource_sections[i * MAX_SECTION_LABEL];
output_type_iterate (o) {
presource->output[o] =
secfile_lookup_int_default(file, 0, "%s.%s", rsection,
get_output_identifier(o));
} output_type_iterate_end;
sz_strlcpy(presource->graphic_str,
secfile_lookup_str(file,"%s.graphic", rsection));
sz_strlcpy(presource->graphic_alt,
secfile_lookup_str(file,"%s.graphic_alt", rsection));
sz_strlcpy(identifier,
secfile_lookup_str(file,"%s.identifier", rsection));
presource->identifier = identifier[0];
if (RESOURCE_NULL_IDENTIFIER == presource->identifier) {
ruleset_error(LOG_FATAL, "\"%s\" [%s] identifier missing value.",
filename, rsection);
}
if (RESOURCE_NONE_IDENTIFIER == presource->identifier) {
ruleset_error(LOG_FATAL,
"\"%s\" [%s] cannot use '%c' as an identifier;"
" it is reserved.",
filename, rsection, presource->identifier);
}
for (j = 0; j < i; j++) {
if (presource->identifier == resource_by_number(j)->identifier) {
ruleset_error(LOG_FATAL,
"\"%s\" [%s] has the same identifier as [%s].",
filename,
rsection,
&resource_sections[j * MAX_SECTION_LABEL]);
}
}
} resource_type_iterate_end;
/* base details */
base_type_iterate(pbase) {
BV_CLR_ALL(pbase->conflicts);
} base_type_iterate_end;
base_type_iterate(pbase) {
const char *section = &base_sections[base_index(pbase) * MAX_SECTION_LABEL];
int j;
const char **slist;
struct requirement_vector *reqs;
const char *gui_str;
pbase->buildable = secfile_lookup_bool_default(file, TRUE,
"%s.buildable", section);
pbase->pillageable = secfile_lookup_bool_default(file, TRUE,
"%s.pillageable", section);
sz_strlcpy(pbase->graphic_str,
secfile_lookup_str_default(file, "-", "%s.graphic", section));
sz_strlcpy(pbase->graphic_alt,
secfile_lookup_str_default(file, "-",
"%s.graphic_alt", section));
sz_strlcpy(pbase->activity_gfx,
secfile_lookup_str_default(file, "-",
"%s.activity_gfx", section));
reqs = lookup_req_list(file, section, "reqs", base_rule_name(pbase));
requirement_vector_copy(&pbase->reqs, reqs);
slist = secfile_lookup_str_vec(file, &nval, "%s.native_to", section);
BV_CLR_ALL(pbase->native_to);
for (j = 0; j < nval; j++) {
struct unit_class *class = unit_class_by_rule_name(slist[j]);
if (!class) {
ruleset_error(LOG_FATAL,
"\"%s\" base \"%s\" is native to unknown unit class \"%s\".",
filename,
base_rule_name(pbase),
slist[j]);
} else {
BV_SET(pbase->native_to, uclass_index(class));
}
}
free(slist);
gui_str = secfile_lookup_str(file,"%s.gui_type", section);
pbase->gui_type = base_gui_type_by_name(gui_str, fc_strcasecmp);
if (!base_gui_type_is_valid(pbase->gui_type)) {
ruleset_error(LOG_FATAL, "\"%s\" base \"%s\": unknown gui_type \"%s\".",
filename,
base_rule_name(pbase),
gui_str);
}
if (!secfile_lookup_int(file, &pbase->build_time,
"%s.build_time", section)) {
ruleset_error(LOG_FATAL, "%s", secfile_error());
}
pbase->border_sq = secfile_lookup_int_default(file, -1, "%s.border_sq",
section);
pbase->vision_main_sq = secfile_lookup_int_default(file, -1,
"%s.vision_main_sq",
section);
pbase->vision_invis_sq = secfile_lookup_int_default(file, -1,
"%s.vision_invis_sq",
section);
pbase->defense_bonus = secfile_lookup_int_default(file, 0,
"%s.defense_bonus",
section);
slist = secfile_lookup_str_vec(file, &nval, "%s.flags", section);
BV_CLR_ALL(pbase->flags);
for (j = 0; j < nval; j++) {
const char *sval = slist[j];
enum base_flag_id flag = base_flag_id_by_name(sval, fc_strcasecmp);
if (!base_flag_id_is_valid(flag)) {
ruleset_error(LOG_FATAL, "\"%s\" base \"%s\": unknown flag \"%s\".",
filename,
base_rule_name(pbase),
sval);
} else {
BV_SET(pbase->flags, flag);
}
}
free(slist);
slist = secfile_lookup_str_vec(file, &nval, "%s.conflicts", section);
for (j = 0; j < nval; j++) {
const char *sval = slist[j];
struct base_type *pbase2 = base_type_by_rule_name(sval);
if (pbase2 == NULL) {
ruleset_error(LOG_FATAL, "\"%s\" base \"%s\": unknown conflict base \"%s\".",
filename,
base_rule_name(pbase),
sval);
} else {
BV_SET(pbase->conflicts, base_index(pbase2));
BV_SET(pbase2->conflicts, base_index(pbase));
}
}
free(slist);
if (territory_claiming_base(pbase)) {
base_type_iterate(pbase2) {
if (pbase == pbase2) {
/* End of the fully initialized bases iteration. */
break;
}
if (territory_claiming_base(pbase2)) {
BV_SET(pbase->conflicts, base_index(pbase2));
BV_SET(pbase2->conflicts, base_index(pbase));
}
} base_type_iterate_end;
}
pbase->helptext = lookup_strvec(file, section, "helptext");
} base_type_iterate_end;
secfile_check_unused(file);
secfile_destroy(file);
}
/**************************************************************************
Load names of governments so other rulesets can refer to governments with
their name.
**************************************************************************/
static void load_government_names(struct section_file *file)
{
int nval = 0;
struct section_list *sec;
const char *filename = secfile_name(file);
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
sec = secfile_sections_by_name_prefix(file, GOVERNMENT_SECTION_PREFIX);
if (NULL == sec || 0 == (nval = section_list_size(sec))) {
ruleset_error(LOG_FATAL, "\"%s\": No governments?!?", filename);
} else if(nval > G_MAGIC) {
/* upper limit is really about 255 for 8-bit id values, but
use G_MAGIC elsewhere as a sanity check, and should be plenty
big enough --dwp */
ruleset_error(LOG_FATAL, "\"%s\": Too many governments (%d, max %d)",
filename, nval, G_MAGIC);
}
governments_alloc(nval);
/* Government names are needed early so that get_government_by_name will
* work. */
governments_iterate(gov) {
const char *sec_name =
section_name(section_list_get(sec, government_index(gov)));
ruleset_load_names(&gov->name, file, sec_name);
} governments_iterate_end;
section_list_destroy(sec);
}
/**************************************************************************
This loads information from given governments.ruleset
**************************************************************************/
static void load_ruleset_governments(struct section_file *file)
{
struct section_list *sec;
const char *filename = secfile_name(file);
(void) check_ruleset_capabilities(file, RULESET_CAPABILITIES, filename);
sec = secfile_sections_by_name_prefix(file, GOVERNMENT_SECTION_PREFIX);
game.government_during_revolution
= lookup_government(file, "governments.during_revolution", filename, NULL);
game.info.government_during_revolution_id =
government_number(game.government_during_revolution);
/* easy ones: */
governments_iterate(g) {
const int i = government_index(g);
const char *sec_name = section_name(section_list_get(sec, i));
struct requirement_vector *reqs =
lookup_req_list(file, sec_name, "reqs", government_rule_name(g));
if (NULL != secfile_entry_lookup(file, "%s.ai_better", sec_name)) {
char entry[100];
fc_snprintf(entry, sizeof(entry), "%s.ai_better", sec_name);
g->ai.better = lookup_government(file, entry, filename, NULL);
} else {
g->ai.better = NULL;
}
requirement_vector_copy(&g->reqs, reqs);
sz_strlcpy(g->graphic_str,
secfile_lookup_str(file, "%s.graphic", sec_name));
sz_strlcpy(g->graphic_alt,
secfile_lookup_str(file, "%s.graphic_alt", sec_name));
g->helptext = lookup_strvec(file, sec_name, "helptext");
} governments_iterate_end;
/* titles */
governments_iterate(g) {
const char *sec_name =
section_name(section_list_get(sec, government_index(g)));
const char *male, *female;
if (!(male = secfile_lookup_str(file, "%s.ruler_male_title", sec_name))
|| !(female = secfile_lookup_str(file, "%s.ruler_female_title",
sec_name))) {
ruleset_error(LOG_FATAL, "Lack of default ruler titles for "
"government \"%s\" (nb %d): %s",
government_rule_name(g), government_number(g),
secfile_error());
} else if (NULL == government_ruler_title_new(g, NULL, male, female)) {
ruleset_error(LOG_FATAL, "Lack of default ruler titles for "
"government \"%s\" (nb %d).",
government_rule_name(g), government_number(g));
}
} governments_iterate_end;
section_list_destroy(sec);
secfile_check_unused(file);
secfile_destroy(file);
}
/**************************************************************************
Send information in packet_ruleset_control (numbers of units etc, and
other miscellany) to specified connections.
The client assumes that exactly one ruleset control packet is sent as
a part of each ruleset send. So after sending this packet we have to
resend every other part of the rulesets (and none of them should be
is-info in the network code!). The client frees ruleset data when
receiving this packet and then re-initializes as it receives the
individual ruleset packets. See packhand.c.
**************************************************************************/
static void send_ruleset_control(struct conn_list *dest)
{
struct packet_ruleset_control packet;
packet = game.control;
lsend_packet_ruleset_control(dest, &packet);
}
/****************************************************************************
This checks if nations[pos] leader names are not already defined in any
previous nation, or twice in its own leader name table.
If not return NULL, if yes return pointer to name which is repeated
and id of a conflicting nation as second parameter.
****************************************************************************/
static const char *check_leader_names(struct nation_type *pnation,
struct nation_type **ppconflict_nation)
{
nation_leader_list_iterate(nation_leaders(pnation), pleader) {
const char *name = nation_leader_name(pleader);
nation_leader_list_iterate(nation_leaders(pnation), prev_leader) {
if (prev_leader == pleader) {
break;
} else if (0 == fc_strcasecmp(name, nation_leader_name(prev_leader))) {
*ppconflict_nation = pnation;
return name;
}
} nation_leader_list_iterate_end;
} nation_leader_list_iterate_end;
nations_iterate(prev_nation) {
if (prev_nation == pnation) {
break;
}
nation_leader_list_iterate(nation_leaders(prev_nation), pleader) {
const char *name = nation_leader_name(pleader);
nation_leader_list_iterate(nation_leaders(prev_nation), prev_leader) {
if (prev_leader == pleader) {
break;
} else if (0 == fc_strcasecmp(name,
nation_leader_name(prev_leader))) {
*ppconflict_nation = prev_nation;
return name;
}
} nation_leader_list_iterate_end;
} nation_leader_list_iterate_end;
} nations_iterate_end;
return NULL;
}
/**************************************************************************
Load names of nations so other rulesets can refer to nations with
their name.
**************************************************************************/
static void load_nation_names(struct section_file *file)
{
struct section_list *sec;
int j;
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
sec = secfile_sections_by_name_prefix(file, NATION_SECTION_PREFIX);
if (NULL == sec) {
ruleset_error(LOG_FATAL, "No available nations in this ruleset!");
}
game.control.nation_count = section_list_size(sec);
nations_alloc(game.control.nation_count);
nations_iterate(pl) {
const int i = nation_index(pl);
const char *sec_name = section_name(section_list_get(sec, i));
const char *noun_plural = secfile_lookup_str(file,
"%s.plural", sec_name);
ruleset_load_names(&pl->adjective, file, sec_name);
name_set(&pl->noun_plural, noun_plural);
/* Check if nation name is already defined. */
for(j = 0; j < i; j++) {
struct nation_type *n2 = nation_by_number(j);
/* Compare strings after stripping off qualifiers -- we don't want
* two nations to end up with identical adjectives displayed to users.
* (This check only catches English, not localisations, of course.) */
if (0 == strcmp(Qn_(untranslated_name(&n2->adjective)),
Qn_(untranslated_name(&pl->adjective)))) {
ruleset_error(LOG_FATAL,
"Two nations defined with the same adjective \"%s\": "
"in section \'%s\' and section \'%s\'",
Qn_(untranslated_name(&pl->adjective)),
section_name(section_list_get(sec, j)), sec_name);
} else if (0 == strcmp(rule_name(&n2->adjective),
rule_name(&pl->adjective))) {
/* We cannot have the same rule name, as the game needs them to be
* distinct. */
ruleset_error(LOG_FATAL,
"Two nations defined with the same rule_name \"%s\": "
"in section \'%s\' and section \'%s\'",
rule_name(&pl->adjective),
section_name(section_list_get(sec, j)), sec_name);
} else if (0 == strcmp(Qn_(untranslated_name(&n2->noun_plural)),
Qn_(untranslated_name(&pl->noun_plural)))) {
/* We don't want identical English plural names either. */
ruleset_error(LOG_FATAL,
"Two nations defined with the same plural name \"%s\": "
"in section \'%s\' and section \'%s\'",
Qn_(untranslated_name(&pl->noun_plural)),
section_name(section_list_get(sec, j)), sec_name);
}
}
} nations_iterate_end;
section_list_destroy(sec);
}
/****************************************************************************
This function loads a city name list from a section file. The file and
two section names (which will be concatenated) are passed in. The
malloc'ed city name list (which is all filled out) will be returned.
****************************************************************************/
static void load_city_name_list(struct section_file *file,
struct nation_type *pnation,
const char *secfile_str1,
const char *secfile_str2)
{
size_t dim, j;
const char **cities = secfile_lookup_str_vec(file, &dim, "%s.%s",
secfile_str1, secfile_str2);
/* Each string will be of the form "<cityname> (<label>, <label>, ...)".
* The cityname is just the name for this city, while each "label" matches
* a terrain type for the city (or "river"), with a preceeding ! to negate
* it. The parentheses are optional (but necessary to have the settings,
* of course). Our job is now to parse it. */
for (j = 0; j < dim; j++) {
size_t len = strlen(cities[j]);
char city_name[len + 1], *p, *next, *end;
struct nation_city *pncity;
sz_strlcpy(city_name, cities[j]);
/* Now we wish to determine values for all of the city labels. A value
* of NCP_NONE means no preference (which is necessary so that the use
* of this is optional); NCP_DISLIKE means the label is negated and
* NCP_LIKE means it's labelled. Mostly the parsing just involves
* a lot of ugly string handling... */
if ((p = strchr(city_name, '('))) {
*p++ = '\0';
if (!(end = strchr(p, ')'))) {
ruleset_error(LOG_ERROR, "\"%s\" [%s] %s: city name \"%s\" "
"unmatched parenthesis.", secfile_name(file),
secfile_str1, secfile_str2, cities[j]);
}
for (*end++ = '\0'; '\0' != *end; end++) {
if (!fc_isspace(*end)) {
ruleset_error(LOG_ERROR, "\"%s\" [%s] %s: city name \"%s\" "
"contains characthers after last parenthesis, "
"ignoring...", secfile_name(file), secfile_str1,
secfile_str2, cities[j]);
}
}
}
/* Build the nation_city. */
remove_leading_trailing_spaces(city_name);
if (check_name(city_name)) {
/* The ruleset contains a name that is too long. This shouldn't
* happen - if it does, the author should get immediate feedback. */
ruleset_error(LOG_ERROR, "\"%s\" [%s] %s: city name \"%s\" "
"is too long; shortening it.", secfile_name(file),
secfile_str1, secfile_str2, city_name);
city_name[MAX_LEN_NAME - 1] = '\0';
}
pncity = nation_city_new(pnation, city_name);
if (NULL != p) {
/* Handle the labels one at a time. */
do {
enum nation_city_preference prefer;
if ((next = strchr(p, ','))) {
*next = '\0';
}
remove_leading_trailing_spaces(p);
/* The ! is used to mark a negative, which is recorded with
* NCP_DISLIKE. Otherwise we use a NCP_LIKE.
*/
if (*p == '!') {
p++;
prefer = NCP_DISLIKE;
} else {
prefer = NCP_LIKE;
}
if (0 == fc_strcasecmp(p, "river")) {
nation_city_set_river_preference(pncity, prefer);
} else {
const struct terrain *pterrain = terrain_by_rule_name(p);
if (NULL == pterrain) {
/* Try with removing frequent trailing 's'. */
size_t l = strlen(p);
if (0 < l && 's' == fc_tolower(p[l - 1])) {
p[l - 1] = '\0';
}
pterrain = terrain_by_rule_name(p);
}
if (NULL != pterrain) {
nation_city_set_terrain_preference(pncity, pterrain, prefer);
} else {
/* Nation authors may use terrains like "lake" that are
* available in the default ruleset but not in civ1/civ2.
* In normal use we should just ignore hints for unknown
* terrains, but nation authors may want to know about this
* to spot typos etc. */
log_verbose("\"%s\" [%s] %s: terrain \"%s\" not found;"
" skipping it.",
secfile_name(file), secfile_str1, secfile_str2, p);
}
}
p = next ? next + 1 : NULL;
} while (NULL != p && '\0' != *p);
}
}
if (NULL != cities) {
free(cities);
}
}
/**************************************************************************
Load nations.ruleset file
**************************************************************************/
static void load_ruleset_nations(struct section_file *file)
{
struct government *gov;
int j;
size_t dim;
char temp_name[MAX_LEN_NAME];
const char **vec;
const char *name, *bad_leader;
int barb_land_count = 0;
int barb_sea_count = 0;
bool warn_city_style;
const char *sval;
struct government *default_government = NULL;
const char *filename = secfile_name(file);
struct section_list *sec;
(void) check_ruleset_capabilities(file, RULESET_CAPABILITIES, filename);
warn_city_style
= secfile_lookup_bool_default(file, TRUE,
"compatibility.warn_city_style");
sval = secfile_lookup_str_default(file, NULL,
"compatibility.default_government");
if (sval != NULL) {
default_government = government_by_rule_name(sval);
}
set_allowed_nation_groups(NULL);
sec = secfile_sections_by_name_prefix(file, NATION_SET_SECTION_PREFIX);
if (sec) {
section_list_iterate(sec, psection) {
struct nation_group *pset;
name = secfile_lookup_str(file, "%s.name", section_name(psection));
if (NULL == name) {
ruleset_error(LOG_FATAL, "Error: %s", secfile_error());
}
pset = nation_group_new(name);
nation_group_set_set(pset, TRUE);
} section_list_iterate_end;
section_list_destroy(sec);
}
sec = secfile_sections_by_name_prefix(file, NATION_GROUP_SECTION_PREFIX);
section_list_iterate(sec, psection) {
struct nation_group *pgroup;
name = secfile_lookup_str(file, "%s.name", section_name(psection));
if (NULL == name) {
ruleset_error(LOG_FATAL, "Error: %s", secfile_error());
}
pgroup = nation_group_new(name);
if (!secfile_lookup_int(file, &j, "%s.match", section_name(psection))) {
ruleset_error(LOG_FATAL, "Error: %s", secfile_error());
}
nation_group_set_match(pgroup, j);
} section_list_iterate_end;
section_list_destroy(sec);
sec = secfile_sections_by_name_prefix(file, NATION_SECTION_PREFIX);
nations_iterate(pnation) {
struct nation_type *pconflict;
const int i = nation_index(pnation);
char tmp[200] = "\0";
const char *barb_type;
const char *sec_name = section_name(section_list_get(sec, i));
/* Nation groups. */
vec = secfile_lookup_str_vec(file, &dim, "%s.groups", sec_name);
for (j = 0; j < dim; j++) {
struct nation_group *pgroup = nation_group_by_rule_name(vec[j]);
if (NULL != pgroup) {
nation_group_list_append(pnation->groups, pgroup);
} else {
/* For nation authors, this would probably be considered an error.
* But it can happen normally. The civ1 compatibility ruleset only
* uses the nations that were in civ1, so not all of the links will
* exist. */
log_verbose("Nation %s: Unknown group \"%s\".",
nation_rule_name(pnation), vec[j]);
}
}
if (NULL != vec) {
free(vec);
}
/* Nation conflicts. */
vec = secfile_lookup_str_vec(file, &dim, "%s.conflicts_with", sec_name);
for (j = 0; j < dim; j++) {
pconflict = nation_by_rule_name(vec[j]);
if (pnation == pconflict) {
ruleset_error(LOG_ERROR, "Nation %s conflicts with itself",
nation_rule_name(pnation));
} else if (NULL != pconflict) {
nation_list_append(pnation->server.conflicts_with, pconflict);
} else {
/* For nation authors, this would probably be considered an error.
* But it can happen normally. The civ1 compatibility ruleset only
* uses the nations that were in civ1, so not all of the links will
* exist. */
log_verbose("Nation %s: conflicts_with nation \"%s\" is unknown.",
nation_rule_name(pnation), vec[j]);
}
}
if (NULL != vec) {
free(vec);
}
/* Nation leaders. */
for (j = 0; j < MAX_NUM_LEADERS; j++) {
const char *sex;
bool is_male = FALSE;
name = secfile_lookup_str(file, "%s.leaders%d.name", sec_name, j);
if (NULL == name) {
/* No more to read. */
break;
}
if (check_name(name)) {
/* The ruleset contains a name that is too long. This shouldn't
* happen - if it does, the author should get immediate feedback */
sz_strlcpy(temp_name, name);
ruleset_error(LOG_ERROR, "Nation %s: leader name \"%s\" "
"is too long; shortening it to \"%s\".",
nation_rule_name(pnation), name, temp_name);
name = temp_name;
}
sex = secfile_lookup_str(file, "%s.leaders%d.sex", sec_name, j);
if (NULL == sex) {
ruleset_error(LOG_FATAL, "Nation %s: leader \"%s\": %s.",
nation_rule_name(pnation), name, secfile_error());
} else if (0 == fc_strcasecmp("Male", sex)) {
is_male = TRUE;
} else if (0 != fc_strcasecmp("Female", sex)) {
ruleset_error(LOG_FATAL, "Nation %s: leader \"%s\" has unsupported "
"sex variant \"%s\".",
nation_rule_name(pnation), name, sex);
}
(void) nation_leader_new(pnation, name, is_male);
}
/* Check the number of leaders. */
if (MAX_NUM_LEADERS == j) {
/* Too much leaders, get the real number defined in the ruleset. */
while (NULL != secfile_entry_lookup(file, "%s.leaders%d.name",
sec_name, j)) {
j++;
}
log_error("Nation %s: Too many leaders; using %d of %d",
nation_rule_name(pnation), MAX_NUM_LEADERS, j);
} else if (0 == j) {
ruleset_error(LOG_FATAL,
"Nation %s: no leaders; at least one is required.",
nation_rule_name(pnation));
}
/* Check if leader name is not already defined */
if ((bad_leader = check_leader_names(pnation, &pconflict))) {
if (pnation == pconflict) {
ruleset_error(LOG_FATAL,
"Nation %s: leader \"%s\" defined more than once.",
nation_rule_name(pnation), bad_leader);
} else {
ruleset_error(LOG_FATAL,
"Nations %s and %s share the same leader \"%s\".",
nation_rule_name(pnation), nation_rule_name(pconflict),
bad_leader);
}
}
pnation->is_available =
secfile_lookup_bool_default(file, TRUE, "%s.is_available", sec_name);
pnation->is_playable =
secfile_lookup_bool_default(file, TRUE, "%s.is_playable", sec_name);
if (pnation->is_playable) {
server.playable_nations++;
}
/* Check barbarian type. Default is "None" meaning not a barbarian */
barb_type = secfile_lookup_str_default(file, "None",
"%s.barbarian_type", sec_name);
if (fc_strcasecmp(barb_type, "None") == 0) {
pnation->barb_type = NOT_A_BARBARIAN;
} else if (fc_strcasecmp(barb_type, "Land") == 0) {
if (pnation->is_playable) {
/* We can't allow players to use barbarian nations, barbarians
* may run out of nations */
ruleset_error(LOG_FATAL,
"Nation %s marked both barbarian and playable.",
nation_rule_name(pnation));
}
pnation->barb_type = LAND_BARBARIAN;
barb_land_count++;
} else if (fc_strcasecmp(barb_type, "Sea") == 0) {
if (pnation->is_playable) {
/* We can't allow players to use barbarian nations, barbarians
* may run out of nations */
ruleset_error(LOG_FATAL,
"Nation %s marked both barbarian and playable.",
nation_rule_name(pnation));
}
pnation->barb_type = SEA_BARBARIAN;
barb_sea_count++;
} else {
ruleset_error(LOG_FATAL,
"Nation %s, barbarian_type is \"%s\". Must be "
"\"None\" or \"Land\" or \"Sea\".",
nation_rule_name(pnation), barb_type);
}
/* Flags */
sz_strlcpy(pnation->flag_graphic_str,
secfile_lookup_str_default(file, "-", "%s.flag", sec_name));
sz_strlcpy(pnation->flag_graphic_alt,
secfile_lookup_str_default(file, "-",
"%s.flag_alt", sec_name));
/* Ruler titles */
for (j = 0;; j++) {
const char *male, *female;
name = secfile_lookup_str_default(file, NULL,
"%s.ruler_titles%d.government",
sec_name, j);
if (NULL == name) {
/* End of the list of ruler titles. */
break;
}
/* NB: even if the government doesn't exist, we load the entries for
* the ruler titles to avoid warnings about unused entries. */
male = secfile_lookup_str(file, "%s.ruler_titles%d.male_title",
sec_name, j);
female = secfile_lookup_str(file, "%s.ruler_titles%d.female_title",
sec_name, j);
gov = government_by_rule_name(name);
if (NULL == gov) {
/* log_verbose() rather than log_error() so that can use single
* nation ruleset file with variety of government ruleset files: */
log_verbose("Nation %s: government \"%s\" not found.",
nation_rule_name(pnation), name);
} else if (NULL != male && NULL != female) {
(void) government_ruler_title_new(gov, pnation, male, female);
} else {
ruleset_error(LOG_ERROR, "%s", secfile_error());
}
}
/* City styles */
name = secfile_lookup_str(file, "%s.city_style", sec_name);
pnation->city_style = city_style_by_rule_name(name);
if (0 > pnation->city_style) {
if (warn_city_style) {
log_error("Nation %s: city style \"%s\" is unknown, using default.",
nation_rule_name(pnation), name);
}
pnation->city_style = 0;
}
while (city_style_has_requirements(city_styles + pnation->city_style)) {
if (pnation->city_style == 0) {
ruleset_error(LOG_FATAL,
"Nation %s: the default city style is not available "
"from the beginning!", nation_rule_name(pnation));
/* Note that we can't use temp_name here. */
}
log_error("Nation %s: city style \"%s\" is not available "
"from beginning; using default.",
nation_rule_name(pnation), name);
pnation->city_style = 0;
}
/* Civilwar nations */
vec = secfile_lookup_str_vec(file, &dim,
"%s.civilwar_nations", sec_name);
for (j = 0; j < dim; j++) {
pconflict = nation_by_rule_name(vec[j]);
/* No test for duplicate nations is performed. If there is a duplicate
* entry it will just cause that nation to have an increased
* probability of being chosen. */
if (pconflict == pnation) {
ruleset_error(LOG_ERROR, "Nation %s is its own civil war nation",
nation_rule_name(pnation));
} else if (NULL != pconflict) {
nation_list_append(pnation->server.civilwar_nations, pconflict);
nation_list_append(pconflict->server.parent_nations, pnation);
} else {
/* For nation authors, this would probably be considered an error.
* But it can happen normally. The civ1 compatability ruleset only
* uses the nations that were in civ1, so not all of the links will
* exist. */
log_verbose("Nation %s: civil war nation \"%s\" is unknown.",
nation_rule_name(pnation), vec[j]);
}
}
if (NULL != vec) {
free(vec);
}
/* Load nation specific initial items */
lookup_tech_list(file, sec_name, "init_techs",
pnation->init_techs, filename);
lookup_building_list(file, sec_name, "init_buildings",
pnation->init_buildings, filename);
lookup_unit_list(file, sec_name, "init_units", LOG_ERROR,
pnation->init_units, filename);
fc_strlcat(tmp, sec_name, 200);
fc_strlcat(tmp, ".init_government", 200);
pnation->init_government = lookup_government(file, tmp, filename,
default_government);
/* Read default city names. */
load_city_name_list(file, pnation, sec_name, "cities");
pnation->legend = fc_strdup(secfile_lookup_str(file, "%s.legend",
sec_name));
if (check_strlen(pnation->legend, MAX_LEN_MSG, NULL)) {
ruleset_error(LOG_ERROR,
"Nation %s: legend \"%s\" is too long;"
" shortening it.", nation_rule_name(pnation),
pnation->legend);
pnation->legend[MAX_LEN_MSG - 1] = '\0';
}
pnation->player = NULL;
} nations_iterate_end;
section_list_destroy(sec);
secfile_check_unused(file);
secfile_destroy(file);
if (barb_land_count == 0) {
ruleset_error(LOG_FATAL,
"No land barbarian nation defined. At least one required!");
}
if (barb_sea_count == 0) {
ruleset_error(LOG_FATAL,
"No sea barbarian nation defined. At least one required!");
}
}
/**************************************************************************
Load names of city styles so other rulesets can refer to city styles with
their name.
**************************************************************************/
static void load_citystyle_names(struct section_file *file)
{
struct section_list *styles;
int i = 0;
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
/* The sections: */
styles = secfile_sections_by_name_prefix(file, CITYSTYLE_SECTION_PREFIX);
if (NULL != styles) {
city_styles_alloc(section_list_size(styles));
section_list_iterate(styles, style) {
ruleset_load_names(&city_styles[i].name, file, section_name(style));
i++;
} section_list_iterate_end;
section_list_destroy(styles);
} else {
city_styles_alloc(0);
}
}
/**************************************************************************
Load cities.ruleset file
**************************************************************************/
static void load_ruleset_cities(struct section_file *file)
{
const char *replacement;
int i;
const char *filename = secfile_name(file);
const char *item;
struct section_list *sec;
(void) check_ruleset_capabilities(file, RULESET_CAPABILITIES, filename);
/* Specialist options */
sec = secfile_sections_by_name_prefix(file, SPECIALIST_SECTION_PREFIX);
if (section_list_size(sec) >= SP_MAX) {
ruleset_error(LOG_FATAL, "\"%s\": Too many specialists (%d, max %d).",
filename, section_list_size(sec), SP_MAX);
}
game.control.num_specialist_types = section_list_size(sec);
i = 0;
section_list_iterate(sec, psection) {
struct specialist *s = specialist_by_number(i);
struct requirement_vector *reqs;
const char *sec_name = section_name(psection);
ruleset_load_names(&s->name, file, sec_name);
item = secfile_lookup_str_default(file, untranslated_name(&s->name),
"%s.short_name", sec_name);
name_set(&s->abbreviation, item);
reqs = lookup_req_list(file, sec_name, "reqs", specialist_rule_name(s));
requirement_vector_copy(&s->reqs, reqs);
s->helptext = lookup_strvec(file, sec_name, "helptext");
if (requirement_vector_size(&s->reqs) == 0 && DEFAULT_SPECIALIST == -1) {
DEFAULT_SPECIALIST = i;
}
i++;
} section_list_iterate_end;
if (DEFAULT_SPECIALIST == -1) {
ruleset_error(LOG_FATAL,
"\"%s\": must give a min_size of 0 for at least one "
"specialist type.", filename);
}
section_list_destroy(sec);
/* City Parameters */
game.info.celebratesize =
secfile_lookup_int_default(file, GAME_DEFAULT_CELEBRATESIZE,
"parameters.celebrate_size_limit");
game.info.add_to_size_limit =
secfile_lookup_int_default(file, 9, "parameters.add_to_size_limit");
game.info.angrycitizen =
secfile_lookup_bool_default(file, GAME_DEFAULT_ANGRYCITIZEN,
"parameters.angry_citizens");
game.info.changable_tax =
secfile_lookup_bool_default(file, TRUE, "parameters.changable_tax");
game.info.forced_science =
secfile_lookup_int_default(file, 0, "parameters.forced_science");
game.info.forced_luxury =
secfile_lookup_int_default(file, 100, "parameters.forced_luxury");
game.info.forced_gold =
secfile_lookup_int_default(file, 0, "parameters.forced_gold");
if (game.info.forced_science + game.info.forced_luxury
+ game.info.forced_gold != 100) {
ruleset_error(LOG_FATAL,
"\"%s\": Forced taxes do not add up in ruleset!",
filename);
}
/* civ1 & 2 didn't reveal tiles */
game.server.vision_reveal_tiles =
secfile_lookup_bool_default(file, FALSE, "parameters.vision_reveal_tiles");
/* Citizens configuration. */
game.info.citizen_nationality =
secfile_lookup_bool_default(file, FALSE,
"citizen.nationality");
/* City Styles ... */
sec = secfile_sections_by_name_prefix(file, CITYSTYLE_SECTION_PREFIX);
/* Get rest: */
for (i = 0; i < game.control.styles_count; i++) {
struct requirement_vector *reqs;
const char *sec_name = section_name(section_list_get(sec, i));
sz_strlcpy(city_styles[i].graphic,
secfile_lookup_str(file, "%s.graphic", sec_name));
sz_strlcpy(city_styles[i].graphic_alt,
secfile_lookup_str(file, "%s.graphic_alt", sec_name));
sz_strlcpy(city_styles[i].oceanic_graphic,
secfile_lookup_str_default(file, "",
"%s.oceanic_graphic", sec_name));
sz_strlcpy(city_styles[i].oceanic_graphic_alt,
secfile_lookup_str_default(file, "",
"%s.oceanic_graphic_alt",
sec_name));
sz_strlcpy(city_styles[i].citizens_graphic,
secfile_lookup_str_default(file, "-",
"%s.citizens_graphic", sec_name));
sz_strlcpy(city_styles[i].citizens_graphic_alt,
secfile_lookup_str_default(file, "generic",
"%s.citizens_graphic_alt", sec_name));
reqs = lookup_req_list(file, sec_name, "reqs", city_style_rule_name(i));
requirement_vector_copy(&city_styles[i].reqs, reqs);
replacement = secfile_lookup_str(file, "%s.replaced_by", sec_name);
if(0 == strcmp(replacement, "-")) {
city_styles[i].replaced_by = -1;
} else {
city_styles[i].replaced_by = city_style_by_rule_name(replacement);
if (city_styles[i].replaced_by < 0) {
log_error("\"%s\": style \"%s\" replacement \"%s\" not found",
filename, city_style_rule_name(i), replacement);
}
}
}
section_list_destroy(sec);
secfile_check_unused(file);
secfile_destroy(file);
}
/**************************************************************************
Load effects.ruleset file
**************************************************************************/
static void load_ruleset_effects(struct section_file *file)
{
struct section_list *sec;
const char *type;
const char *filename;
filename = secfile_name(file);
(void) check_ruleset_capabilities(file, RULESET_CAPABILITIES, filename);
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
/* Parse effects and add them to the effects ruleset cache. */
sec = secfile_sections_by_name_prefix(file, EFFECT_SECTION_PREFIX);
section_list_iterate(sec, psection) {
enum effect_type eff;
int value;
struct effect *peffect;
const char *sec_name = section_name(psection);
type = secfile_lookup_str(file, "%s.name", sec_name);
if (!type) {
log_error("\"%s\" [%s] missing effect name.", filename, sec_name);
continue;
}
eff = effect_type_by_name(type, fc_strcasecmp);
if (!effect_type_is_valid(eff)) {
log_error("\"%s\" [%s] lists unknown effect type \"%s\".",
filename, sec_name, type);
continue;
}
value = secfile_lookup_int_default(file, 1, "%s.value", sec_name);
peffect = effect_new(eff, value);
requirement_vector_iterate(lookup_req_list(file, sec_name, "reqs", type),
req) {
struct requirement *preq = fc_malloc(sizeof(*preq));
*preq = *req;
effect_req_append(peffect, FALSE, preq);
} requirement_vector_iterate_end;
requirement_vector_iterate(lookup_req_list(file, sec_name,
"nreqs", type),
req) {
struct requirement *preq = fc_malloc(sizeof(*preq));
*preq = *req;
effect_req_append(peffect, TRUE, preq);
} requirement_vector_iterate_end;
} section_list_iterate_end;
section_list_destroy(sec);
secfile_check_unused(file);
secfile_destroy(file);
}
/**************************************************************************
Print an error message if the value is out of range.
**************************************************************************/
static int secfile_lookup_int_default_min_max(struct section_file *file,
int def, int min, int max,
const char *path, ...)
fc__attribute((__format__ (__printf__, 5, 6)));
static int secfile_lookup_int_default_min_max(struct section_file *file,
int def, int min, int max,
const char *path, ...)
{
char fullpath[256];
int ival;
va_list args;
va_start(args, path);
fc_vsnprintf(fullpath, sizeof(fullpath), path, args);
va_end(args);
if (!secfile_lookup_int(file, &ival, "%s", fullpath)) {
ival = def;
}
if (ival < min) {
ruleset_error(LOG_ERROR,"\"%s\" should be in the interval [%d, %d] "
"but is %d; using the minimal value.",
fullpath, min, max, ival);
ival = min;
}
if (ival > max) {
ruleset_error(LOG_ERROR,"\"%s\" should be in the interval [%d, %d] "
"but is %d; using the maximal value.",
fullpath, min, max, ival);
ival = max;
}
return ival;
}
/**************************************************************************
Load ruleset file.
**************************************************************************/
static void load_ruleset_game(void)
{
struct section_file *file;
const char *sval, **svec;
const char *filename;
int *food_ini;
int i;
size_t teams;
const char *text;
size_t gni_tmp;
file = openload_ruleset_file("game");
filename = secfile_name(file);
/* section: datafile */
(void) check_ruleset_capabilities(file, RULESET_CAPABILITIES, filename);
(void) secfile_entry_by_path(file, "datafile.description"); /* unused */
/* section: tileset */
text = secfile_lookup_str_default(file, "", "tileset.prefered");
if (text[0] != '\0') {
/* There was tileset suggestion */
sz_strlcpy(game.control.prefered_tileset, text);
} else {
/* No tileset suggestions */
game.control.prefered_tileset[0] = '\0';
}
/* section: about */
text = secfile_lookup_str(file, "about.name");
/* Ruleset/modpack name found */
sz_strlcpy(game.control.name, text);
text = secfile_lookup_str_default(file, "", "about.description");
if (text[0] != '\0') {
/* Ruleset/modpack description found */
sz_strlcpy(game.control.description, text);
} else {
/* No description */
game.control.description[0] = '\0';
}
/* section: options */
lookup_tech_list(file, "options", "global_init_techs",
game.rgame.global_init_techs, filename);
lookup_building_list(file, "options", "global_init_buildings",
game.rgame.global_init_buildings, filename);
/* section: civstyle */
game.info.base_pollution
= secfile_lookup_int_default(file, RS_DEFAULT_BASE_POLLUTION,
"civstyle.base_pollution");
game.info.happy_cost
= secfile_lookup_int_def_min_max(file,
RS_DEFAULT_HAPPY_COST,
RS_MIN_HAPPY_COST,
RS_MAX_HAPPY_COST,
"civstyle.happy_cost");
game.info.food_cost
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_FOOD_COST,
RS_MIN_FOOD_COST,
RS_MAX_FOOD_COST,
"civstyle.food_cost");
/* TODO: move to global_unit_options */
game.info.base_bribe_cost
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_BASE_BRIBE_COST,
RS_MIN_BASE_BRIBE_COST,
RS_MAX_BASE_BRIBE_COST,
"civstyle.base_bribe_cost");
/* TODO: move to global_unit_options */
game.server.ransom_gold
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_RANSOM_GOLD,
RS_MIN_RANSOM_GOLD,
RS_MAX_RANSOM_GOLD,
"civstyle.ransom_gold");
/* TODO: move to global_unit_options */
game.info.pillage_select
= secfile_lookup_bool_default(file, RS_DEFAULT_PILLAGE_SELECT,
"civstyle.pillage_select");
/* TODO: move to global_unit_options */
game.server.upgrade_veteran_loss
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_UPGRADE_VETERAN_LOSS,
RS_MIN_UPGRADE_VETERAN_LOSS,
RS_MAX_UPGRADE_VETERAN_LOSS,
"civstyle.upgrade_veteran_loss");
/* TODO: move to global_unit_options */
game.server.autoupgrade_veteran_loss
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_UPGRADE_VETERAN_LOSS,
RS_MIN_UPGRADE_VETERAN_LOSS,
RS_MAX_UPGRADE_VETERAN_LOSS,
"civstyle.autoupgrade_veteran_loss");
/* TODO: move to new section research */
game.info.base_tech_cost
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_BASE_TECH_COST,
RS_MIN_BASE_TECH_COST,
RS_MAX_BASE_TECH_COST,
"civstyle.base_tech_cost");
food_ini = secfile_lookup_int_vec(file, &gni_tmp,
"civstyle.granary_food_ini");
game.info.granary_num_inis = (int) gni_tmp;
if (game.info.granary_num_inis > MAX_GRANARY_INIS) {
ruleset_error(LOG_FATAL,
"Too many granary_food_ini entries (%d, max %d)",
game.info.granary_num_inis, MAX_GRANARY_INIS);
} else if (game.info.granary_num_inis == 0) {
log_error("No values for granary_food_ini. Using default "
"value %d.", RS_DEFAULT_GRANARY_FOOD_INI);
game.info.granary_num_inis = 1;
game.info.granary_food_ini[0] = RS_DEFAULT_GRANARY_FOOD_INI;
} else {
int i;
/* check for <= 0 entries */
for (i = 0; i < game.info.granary_num_inis; i++) {
if (food_ini[i] <= 0) {
if (i == 0) {
food_ini[i] = RS_DEFAULT_GRANARY_FOOD_INI;
} else {
food_ini[i] = food_ini[i - 1];
}
log_error("Bad value for granary_food_ini[%i]. Using %i.",
i, food_ini[i]);
}
game.info.granary_food_ini[i] = food_ini[i];
}
}
free(food_ini);
game.info.granary_food_inc
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_GRANARY_FOOD_INC,
RS_MIN_GRANARY_FOOD_INC,
RS_MAX_GRANARY_FOOD_INC,
"civstyle.granary_food_inc");
output_type_iterate(o) {
game.info.min_city_center_output[o]
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_CITY_CENTER_OUTPUT,
RS_MIN_CITY_CENTER_OUTPUT,
RS_MAX_CITY_CENTER_OUTPUT,
"civstyle.min_city_center_%s",
get_output_identifier(o));
} output_type_iterate_end;
sval = secfile_lookup_str(file, "civstyle.nuke_contamination" );
if (fc_strcasecmp(sval, "Pollution") == 0) {
game.server.nuke_contamination = CONTAMINATION_POLLUTION;
} else if (fc_strcasecmp(sval, "Fallout") == 0) {
game.server.nuke_contamination = CONTAMINATION_FALLOUT;
} else {
log_error("Bad value %s for nuke_contamination. Using "
"\"Pollution\".", sval);
game.server.nuke_contamination = CONTAMINATION_POLLUTION;
}
game.server.init_vis_radius_sq
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_VIS_RADIUS_SQ,
RS_MIN_VIS_RADIUS_SQ,
RS_MAX_VIS_RADIUS_SQ,
"civstyle.init_vis_radius_sq");
game.info.init_city_radius_sq
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_CITY_RADIUS_SQ,
RS_MIN_CITY_RADIUS_SQ,
RS_MAX_CITY_RADIUS_SQ,
"civstyle.init_city_radius_sq");
game.info.gold_upkeep_style
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_GOLD_UPKEEP_STYLE,
RS_MIN_GOLD_UPKEEP_STYLE,
RS_MAX_GOLD_UPKEEP_STYLE,
"civstyle.gold_upkeep_style");
/* TODO: move to new section research */
game.info.tech_cost_style
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_TECH_COST_STYLE,
RS_MIN_TECH_COST_STYLE,
RS_MAX_TECH_COST_STYLE,
"civstyle.tech_cost_style");
/* TODO: move to new section research */
game.info.tech_leakage
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_TECH_LEAKAGE,
RS_MIN_TECH_LEAKAGE,
RS_MAX_TECH_LEAKAGE,
"civstyle.tech_leakage");
if (game.info.tech_cost_style == 0 && game.info.tech_leakage != 0) {
log_error("Only tech_leakage 0 supported with tech_cost_style 0.");
log_error("Switching to tech_leakage 0.");
game.info.tech_leakage = 0;
}
/* section: illness */
game.info.illness_on
= secfile_lookup_bool_default(file, RS_DEFAULT_ILLNESS_ON,
"illness.illness_on");
game.info.illness_base_factor
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_ILLNESS_BASE_FACTOR,
RS_MIN_ILLNESS_BASE_FACTOR,
RS_MAX_ILLNESS_BASE_FACTOR,
"illness.illness_base_factor");
game.info.illness_min_size
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_ILLNESS_MIN_SIZE,
RS_MIN_ILLNESS_MIN_SIZE,
RS_MAX_ILLNESS_MIN_SIZE,
"illness.illness_min_size");
game.info.illness_trade_infection
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_ILLNESS_TRADE_INFECTION_PCT,
RS_MIN_ILLNESS_TRADE_INFECTION_PCT,
RS_MAX_ILLNESS_TRADE_INFECTION_PCT,
"illness.illness_trade_infection");
game.info.illness_pollution_factor
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_ILLNESS_POLLUTION_PCT,
RS_MIN_ILLNESS_POLLUTION_PCT,
RS_MAX_ILLNESS_POLLUTION_PCT,
"illness.illness_pollution_factor");
/* section: incite_cost */
game.server.base_incite_cost
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_INCITE_BASE_COST,
RS_MIN_INCITE_BASE_COST,
RS_MAX_INCITE_BASE_COST,
"incite_cost.base_incite_cost");
game.server.incite_improvement_factor
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_INCITE_IMPROVEMENT_FCT,
RS_MIN_INCITE_IMPROVEMENT_FCT,
RS_MAX_INCITE_IMPROVEMENT_FCT,
"incite_cost.improvement_factor");
game.server.incite_unit_factor
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_INCITE_UNIT_FCT,
RS_MIN_INCITE_UNIT_FCT,
RS_MAX_INCITE_UNIT_FCT,
"incite_cost.unit_factor");
game.server.incite_total_factor
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_INCITE_TOTAL_FCT,
RS_MIN_INCITE_TOTAL_FCT,
RS_MAX_INCITE_TOTAL_FCT,
"incite_cost.total_factor");
/* section: global_unit_options */
game.info.slow_invasions
= secfile_lookup_bool_default(file, RS_DEFAULT_SLOW_INVASIONS,
"global_unit_options.slow_invasions");
/* section: combat_rules */
game.info.killstack
= secfile_lookup_bool_default(file, RS_DEFAULT_KILLSTACK,
"combat_rules.killstack");
game.info.tired_attack
= secfile_lookup_bool_default(file, RS_DEFAULT_TIRED_ATTACK,
"combat_rules.tired_attack");
/* section: borders */
game.info.border_city_radius_sq
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_BORDER_RADIUS_SQ_CITY,
RS_MIN_BORDER_RADIUS_SQ_CITY,
RS_MAX_BORDER_RADIUS_SQ_CITY,
"borders.radius_sq_city");
game.info.border_size_effect
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_BORDER_SIZE_EFFECT,
RS_MIN_BORDER_SIZE_EFFECT,
RS_MAX_BORDER_SIZE_EFFECT,
"borders.size_effect");
/* section: research */
game.info.tech_upkeep_style
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_TECH_UPKEEP_STYLE,
RS_MIN_TECH_UPKEEP_STYLE,
RS_MAX_TECH_UPKEEP_STYLE,
"research.tech_upkeep_style");
game.info.tech_upkeep_divider
= secfile_lookup_int_default_min_max(file,
RS_DEFAULT_TECH_UPKEEP_DIVIDER,
RS_MIN_TECH_UPKEEP_DIVIDER,
RS_MAX_TECH_UPKEEP_DIVIDER,
"research.tech_upkeep_divider");
/* section: calendar */
game.info.calendar_skip_0
= secfile_lookup_bool_default(file, RS_DEFAULT_CALENDAR_SKIP_0,
"calendar.skip_year_0");
game.server.start_year
= secfile_lookup_int_default(file, GAME_START_YEAR,
"calendar.start_year");
sz_strlcpy(game.info.positive_year_label,
_(secfile_lookup_str_default(file,
RS_DEFAULT_POS_YEAR_LABEL,
"calendar.positive_label")));
sz_strlcpy(game.info.negative_year_label,
_(secfile_lookup_str_default(file,
RS_DEFAULT_NEG_YEAR_LABEL,
"calendar.negative_label")));
/* section playercolors */
{
struct rgbcolor *prgbcolor = NULL;
bool read = TRUE;
/* Check if the player list is defined and empty. */
fc_assert_ret(playercolor_count() == 0);
i = 0;
while (read) {
prgbcolor = NULL;
read = rgbcolor_load(file, &prgbcolor, "playercolors.colorlist%d", i);
if (read) {
playercolor_add(prgbcolor);
}
i++;
}
if (playercolor_count() == 0) {
ruleset_error(LOG_FATAL, "No player colors defined!");
}
if (game.plr_bg_color != NULL) {
rgbcolor_destroy(game.plr_bg_color);
game.plr_bg_color = NULL;
}
if (!rgbcolor_load(file, &game.plr_bg_color, "playercolors.background")) {
ruleset_error(LOG_FATAL, "No background player color defined! (%s)",
secfile_error());
}
}
/* section: teams */
svec = secfile_lookup_str_vec(file, &teams, "teams.names");
if (team_slot_count() < teams) {
teams = team_slot_count();
}
for (i = 0; i < teams; i++) {
team_slot_set_defined_name(team_slot_by_number(i), svec[i]);
}
free(svec);
settings_ruleset(file, "settings");
secfile_check_unused(file);
secfile_destroy(file);
}
/**************************************************************************
Send the units ruleset information (all individual unit classes) to the
specified connections.
**************************************************************************/
static void send_ruleset_unit_classes(struct conn_list *dest)
{
struct packet_ruleset_unit_class packet;
unit_class_iterate(c) {
packet.id = uclass_number(c);
sz_strlcpy(packet.name, untranslated_name(&c->name));
sz_strlcpy(packet.rule_name, rule_name(&c->name));
packet.move_type = c->move_type;
packet.min_speed = c->min_speed;
packet.hp_loss_pct = c->hp_loss_pct;
packet.hut_behavior = c->hut_behavior;
packet.flags = c->flags;
lsend_packet_ruleset_unit_class(dest, &packet);
} unit_class_iterate_end;
}
/**************************************************************************
Send the units ruleset information (all individual units) to the
specified connections.
**************************************************************************/
static void send_ruleset_units(struct conn_list *dest)
{
struct packet_ruleset_unit packet;
int i;
unit_type_iterate(u) {
packet.id = utype_number(u);
sz_strlcpy(packet.name, untranslated_name(&u->name));
sz_strlcpy(packet.rule_name, rule_name(&u->name));
sz_strlcpy(packet.sound_move, u->sound_move);
sz_strlcpy(packet.sound_move_alt, u->sound_move_alt);
sz_strlcpy(packet.sound_fight, u->sound_fight);
sz_strlcpy(packet.sound_fight_alt, u->sound_fight_alt);
sz_strlcpy(packet.graphic_str, u->graphic_str);
sz_strlcpy(packet.graphic_alt, u->graphic_alt);
packet.unit_class_id = uclass_number(utype_class(u));
packet.build_cost = u->build_cost;
packet.pop_cost = u->pop_cost;
packet.attack_strength = u->attack_strength;
packet.defense_strength = u->defense_strength;
packet.move_rate = u->move_rate;
packet.tech_requirement = u->require_advance
? advance_number(u->require_advance) : -1;
packet.impr_requirement = u->need_improvement
? improvement_number(u->need_improvement) : -1;
packet.gov_requirement = u->need_government
? government_number(u->need_government) : -1;
packet.vision_radius_sq = u->vision_radius_sq;
packet.transport_capacity = u->transport_capacity;
packet.hp = u->hp;
packet.firepower = u->firepower;
packet.obsoleted_by = u->obsoleted_by
? utype_number(u->obsoleted_by) : -1;
packet.converted_to = u->converted_to
? utype_number(u->converted_to) : -1;
packet.fuel = u->fuel;
packet.flags = u->flags;
packet.roles = u->roles;
packet.happy_cost = u->happy_cost;
output_type_iterate(o) {
packet.upkeep[o] = u->upkeep[o];
} output_type_iterate_end;
packet.paratroopers_range = u->paratroopers_range;
packet.paratroopers_mr_req = u->paratroopers_mr_req;
packet.paratroopers_mr_sub = u->paratroopers_mr_sub;
packet.bombard_rate = u->bombard_rate;
packet.city_size = u->city_size;
packet.cargo = u->cargo;
packet.targets = u->targets;
if (u->veteran == NULL) {
/* Use the default veteran system. */
packet.veteran_levels = 0;
} else {
/* Per unit veteran system definition. */
packet.veteran_levels = utype_veteran_levels(u);
for (i = 0; i < packet.veteran_levels; i++) {
const struct veteran_level *vlevel = utype_veteran_level(u, i);
sz_strlcpy(packet.veteran_name[i], untranslated_name(&vlevel->name));
packet.power_fact[i] = vlevel->power_fact;
packet.move_bonus[i] = vlevel->move_bonus;
}
}
PACKET_STRVEC_COMPUTE(packet.helptext, u->helptext);
lsend_packet_ruleset_unit(dest, &packet);
} unit_type_iterate_end;
}
/**************************************************************************
Send the specialists ruleset information (all individual specialist
types) to the specified connections.
**************************************************************************/
static void send_ruleset_specialists(struct conn_list *dest)
{
struct packet_ruleset_specialist packet;
specialist_type_iterate(spec_id) {
struct specialist *s = specialist_by_number(spec_id);
int j;
packet.id = spec_id;
sz_strlcpy(packet.plural_name, untranslated_name(&s->name));
sz_strlcpy(packet.rule_name, rule_name(&s->name));
sz_strlcpy(packet.short_name, untranslated_name(&s->abbreviation));
j = 0;
requirement_vector_iterate(&s->reqs, preq) {
packet.reqs[j++] = *preq;
} requirement_vector_iterate_end;
packet.reqs_count = j;
PACKET_STRVEC_COMPUTE(packet.helptext, s->helptext);
lsend_packet_ruleset_specialist(dest, &packet);
} specialist_type_iterate_end;
}
/**************************************************************************
Send the techs ruleset information (all individual advances) to the
specified connections.
**************************************************************************/
static void send_ruleset_techs(struct conn_list *dest)
{
struct packet_ruleset_tech packet;
advance_iterate(A_NONE, a) {
packet.id = advance_number(a);
sz_strlcpy(packet.name, untranslated_name(&a->name));
sz_strlcpy(packet.rule_name, rule_name(&a->name));
sz_strlcpy(packet.graphic_str, a->graphic_str);
sz_strlcpy(packet.graphic_alt, a->graphic_alt);
packet.req[AR_ONE] = a->require[AR_ONE]
? advance_number(a->require[AR_ONE]) : -1;
packet.req[AR_TWO] = a->require[AR_TWO]
? advance_number(a->require[AR_TWO]) : -1;
packet.root_req = a->require[AR_ROOT]
? advance_number(a->require[AR_ROOT]) : -1;
packet.flags = a->flags;
packet.preset_cost = a->preset_cost;
packet.num_reqs = a->num_reqs;
PACKET_STRVEC_COMPUTE(packet.helptext, a->helptext);
lsend_packet_ruleset_tech(dest, &packet);
} advance_iterate_end;
}
/**************************************************************************
Send the buildings ruleset information (all individual improvements and
wonders) to the specified connections.
**************************************************************************/
static void send_ruleset_buildings(struct conn_list *dest)
{
improvement_iterate(b) {
struct packet_ruleset_building packet;
int j;
packet.id = improvement_number(b);
packet.genus = b->genus;
sz_strlcpy(packet.name, untranslated_name(&b->name));
sz_strlcpy(packet.rule_name, rule_name(&b->name));
sz_strlcpy(packet.graphic_str, b->graphic_str);
sz_strlcpy(packet.graphic_alt, b->graphic_alt);
j = 0;
requirement_vector_iterate(&b->reqs, preq) {
packet.reqs[j++] = *preq;
} requirement_vector_iterate_end;
packet.reqs_count = j;
packet.obsolete_by = b->obsolete_by
? advance_number(b->obsolete_by) : -1;
packet.replaced_by = b->replaced_by
? improvement_number(b->replaced_by) : -1;
packet.build_cost = b->build_cost;
packet.upkeep = b->upkeep;
packet.sabotage = b->sabotage;
packet.flags = b->flags;
sz_strlcpy(packet.soundtag, b->soundtag);
sz_strlcpy(packet.soundtag_alt, b->soundtag_alt);
PACKET_STRVEC_COMPUTE(packet.helptext, b->helptext);
lsend_packet_ruleset_building(dest, &packet);
} improvement_iterate_end;
}
/**************************************************************************
Send the terrain ruleset information (terrain_control, and the individual
terrain types) to the specified connections.
**************************************************************************/
static void send_ruleset_terrain(struct conn_list *dest)
{
struct packet_ruleset_terrain packet;
lsend_packet_ruleset_terrain_control(dest, &terrain_control);
terrain_type_iterate(pterrain) {
struct resource **r;
packet.id = terrain_number(pterrain);
packet.native_to = pterrain->native_to;
sz_strlcpy(packet.name, untranslated_name(&pterrain->name));
sz_strlcpy(packet.rule_name, rule_name(&pterrain->name));
sz_strlcpy(packet.graphic_str, pterrain->graphic_str);
sz_strlcpy(packet.graphic_alt, pterrain->graphic_alt);
packet.movement_cost = pterrain->movement_cost;
packet.defense_bonus = pterrain->defense_bonus;
output_type_iterate(o) {
packet.output[o] = pterrain->output[o];
} output_type_iterate_end;
packet.num_resources = 0;
for (r = pterrain->resources; *r; r++) {
packet.resources[packet.num_resources++] = resource_number(*r);
}
packet.road_trade_incr = pterrain->road_trade_incr;
packet.road_time = pterrain->road_time;
packet.irrigation_result = (pterrain->irrigation_result
? terrain_number(pterrain->irrigation_result)
: terrain_count());
packet.irrigation_food_incr = pterrain->irrigation_food_incr;
packet.irrigation_time = pterrain->irrigation_time;
packet.mining_result = (pterrain->mining_result
? terrain_number(pterrain->mining_result)
: terrain_count());
packet.mining_shield_incr = pterrain->mining_shield_incr;
packet.mining_time = pterrain->mining_time;
packet.transform_result = (pterrain->transform_result
? terrain_number(pterrain->transform_result)
: terrain_count());
packet.transform_time = pterrain->transform_time;
packet.rail_time = pterrain->rail_time;
packet.clean_pollution_time = pterrain->clean_pollution_time;
packet.clean_fallout_time = pterrain->clean_fallout_time;
packet.flags = pterrain->flags;
packet.color_red = pterrain->rgb->r;
packet.color_green = pterrain->rgb->g;
packet.color_blue = pterrain->rgb->b;
PACKET_STRVEC_COMPUTE(packet.helptext, pterrain->helptext);
lsend_packet_ruleset_terrain(dest, &packet);
} terrain_type_iterate_end;
}
/****************************************************************************
Send the resource ruleset information to the specified connections.
****************************************************************************/
static void send_ruleset_resources(struct conn_list *dest)
{
struct packet_ruleset_resource packet;
resource_type_iterate (presource) {
packet.id = resource_number(presource);
sz_strlcpy(packet.name, untranslated_name(&presource->name));
sz_strlcpy(packet.rule_name, rule_name(&presource->name));
sz_strlcpy(packet.graphic_str, presource->graphic_str);
sz_strlcpy(packet.graphic_alt, presource->graphic_alt);
output_type_iterate(o) {
packet.output[o] = presource->output[o];
} output_type_iterate_end;
lsend_packet_ruleset_resource(dest, &packet);
} resource_type_iterate_end;
}
/**************************************************************************
Send the base ruleset information (all individual base types) to the
specified connections.
**************************************************************************/
static void send_ruleset_bases(struct conn_list *dest)
{
struct packet_ruleset_base packet;
base_type_iterate(b) {
int j;
packet.id = base_number(b);
sz_strlcpy(packet.name, untranslated_name(&b->name));
sz_strlcpy(packet.rule_name, rule_name(&b->name));
sz_strlcpy(packet.graphic_str, b->graphic_str);
sz_strlcpy(packet.graphic_alt, b->graphic_alt);
sz_strlcpy(packet.activity_gfx, b->activity_gfx);
packet.buildable = b->buildable;
packet.pillageable = b->pillageable;
j = 0;
requirement_vector_iterate(&b->reqs, preq) {
packet.reqs[j++] = *preq;
} requirement_vector_iterate_end;
packet.reqs_count = j;
packet.native_to = b->native_to;
packet.gui_type = b->gui_type;
packet.build_time = b->build_time;
packet.defense_bonus = b->defense_bonus;
packet.border_sq = b->border_sq;
packet.vision_main_sq = b->vision_main_sq;
packet.vision_invis_sq = b->vision_invis_sq;
packet.flags = b->flags;
packet.conflicts = b->conflicts;
PACKET_STRVEC_COMPUTE(packet.helptext, b->helptext);
lsend_packet_ruleset_base(dest, &packet);
} base_type_iterate_end;
}
/**************************************************************************
Send the government ruleset information to the specified connections.
One packet per government type, and for each type one per ruler title.
**************************************************************************/
static void send_ruleset_governments(struct conn_list *dest)
{
struct packet_ruleset_government gov;
struct packet_ruleset_government_ruler_title title;
int j;
governments_iterate(g) {
/* send one packet_government */
gov.id = government_number(g);
j = 0;
requirement_vector_iterate(&g->reqs, preq) {
gov.reqs[j++] = *preq;
} requirement_vector_iterate_end;
gov.reqs_count = j;
sz_strlcpy(gov.name, untranslated_name(&g->name));
sz_strlcpy(gov.rule_name, rule_name(&g->name));
sz_strlcpy(gov.graphic_str, g->graphic_str);
sz_strlcpy(gov.graphic_alt, g->graphic_alt);
PACKET_STRVEC_COMPUTE(gov.helptext, g->helptext);
lsend_packet_ruleset_government(dest, &gov);
/* Send one packet_government_ruler_title per ruler title. */
ruler_titles_iterate(government_ruler_titles(g), pruler_title) {
const struct nation_type *pnation = ruler_title_nation(pruler_title);
title.gov = government_number(g);
title.nation = (NULL != pnation ? nation_number(pnation) : -1);
sz_strlcpy(title.male_title,
ruler_title_male_untranslated_name(pruler_title));
sz_strlcpy(title.female_title,
ruler_title_female_untranslated_name(pruler_title));
lsend_packet_ruleset_government_ruler_title(dest, &title);
} ruler_titles_iterate_end;
} governments_iterate_end;
}
/**************************************************************************
Send the nations ruleset information (info on each nation) to the
specified connections.
**************************************************************************/
static void send_ruleset_nations(struct conn_list *dest)
{
struct packet_ruleset_nation packet;
struct packet_ruleset_nation_groups groups_packet;
int i;
groups_packet.ngroups = nation_group_count();
i = 0;
nation_groups_iterate(pgroup) {
sz_strlcpy(groups_packet.groups[i++],
nation_group_untranslated_name(pgroup));
} nation_groups_iterate_end;
lsend_packet_ruleset_nation_groups(dest, &groups_packet);
nations_iterate(n) {
packet.id = nation_number(n);
sz_strlcpy(packet.adjective, untranslated_name(&n->adjective));
sz_strlcpy(packet.rule_name, rule_name(&n->adjective));
sz_strlcpy(packet.noun_plural, untranslated_name(&n->noun_plural));
sz_strlcpy(packet.graphic_str, n->flag_graphic_str);
sz_strlcpy(packet.graphic_alt, n->flag_graphic_alt);
i = 0;
nation_leader_list_iterate(nation_leaders(n), pleader) {
sz_strlcpy(packet.leader_name[i], nation_leader_name(pleader));
packet.leader_is_male[i] = nation_leader_is_male(pleader);
i++;
} nation_leader_list_iterate_end;
packet.leader_count = i;
packet.city_style = n->city_style;
packet.is_playable = n->is_playable;
packet.is_available = n->is_available;
packet.barbarian_type = n->barb_type;
sz_strlcpy(packet.legend, n->legend);
i = 0;
nation_group_list_iterate(n->groups, pgroup) {
packet.groups[i++] = nation_group_number(pgroup);
} nation_group_list_iterate_end;
packet.ngroups = i;
packet.init_government_id = government_number(n->init_government);
fc_assert(ARRAY_SIZE(packet.init_techs) == ARRAY_SIZE(n->init_techs));
for (i = 0; i < MAX_NUM_TECH_LIST; i++) {
packet.init_techs[i] = n->init_techs[i];
}
fc_assert(ARRAY_SIZE(packet.init_units) == ARRAY_SIZE(n->init_units));
for (i = 0; i < MAX_NUM_UNIT_LIST; i++) {
const struct unit_type *t = n->init_units[i];
packet.init_units[i] = t ? utype_number(t) : U_LAST;
}
fc_assert(ARRAY_SIZE(packet.init_buildings)
== ARRAY_SIZE(n->init_buildings));
for (i = 0; i < MAX_NUM_BUILDING_LIST; i++) {
/* Impr_type_id to int */
packet.init_buildings[i] = n->init_buildings[i];
}
lsend_packet_ruleset_nation(dest, &packet);
} nations_iterate_end;
}
/**************************************************************************
Send the city-style ruleset information (each style) to the specified
connections.
**************************************************************************/
static void send_ruleset_cities(struct conn_list *dest)
{
struct packet_ruleset_city city_p;
int k, j;
for (k = 0; k < game.control.styles_count; k++) {
city_p.style_id = k;
city_p.replaced_by = city_styles[k].replaced_by;
j = 0;
requirement_vector_iterate(&city_styles[k].reqs, preq) {
city_p.reqs[j++] = *preq;
} requirement_vector_iterate_end;
city_p.reqs_count = j;
sz_strlcpy(city_p.name, untranslated_name(&city_styles[k].name));
sz_strlcpy(city_p.rule_name, rule_name(&city_styles[k].name));
sz_strlcpy(city_p.graphic, city_styles[k].graphic);
sz_strlcpy(city_p.graphic_alt, city_styles[k].graphic_alt);
sz_strlcpy(city_p.oceanic_graphic, city_styles[k].oceanic_graphic);
sz_strlcpy(city_p.oceanic_graphic_alt, city_styles[k].oceanic_graphic_alt);
sz_strlcpy(city_p.citizens_graphic, city_styles[k].citizens_graphic);
sz_strlcpy(city_p.citizens_graphic_alt,
city_styles[k].citizens_graphic_alt);
lsend_packet_ruleset_city(dest, &city_p);
}
}
/**************************************************************************
Send information in packet_ruleset_game (miscellaneous rules) to the
specified connections.
**************************************************************************/
static void send_ruleset_game(struct conn_list *dest)
{
struct packet_ruleset_game misc_p;
int i;
fc_assert_ret(game.veteran != NULL);
/* Per unit veteran system definition. */
misc_p.veteran_levels = game.veteran->levels;
for (i = 0; i < misc_p.veteran_levels; i++) {
const struct veteran_level *vlevel = game.veteran->definitions + i;
sz_strlcpy(misc_p.veteran_name[i], untranslated_name(&vlevel->name));
misc_p.power_fact[i] = vlevel->power_fact;
misc_p.move_bonus[i] = vlevel->move_bonus;
}
fc_assert(sizeof(misc_p.global_init_techs)
== sizeof(game.rgame.global_init_techs));
fc_assert(ARRAY_SIZE(misc_p.global_init_techs)
== ARRAY_SIZE(game.rgame.global_init_techs));
memcpy(misc_p.global_init_techs, game.rgame.global_init_techs,
sizeof(misc_p.global_init_techs));
fc_assert(ARRAY_SIZE(misc_p.global_init_buildings)
== ARRAY_SIZE(game.rgame.global_init_buildings));
for (i = 0; i < MAX_NUM_BUILDING_LIST; i++) {
/* Impr_type_id to int */
misc_p.global_init_buildings[i] =
game.rgame.global_init_buildings[i];
}
misc_p.default_specialist = DEFAULT_SPECIALIST;
fc_assert_ret(game.plr_bg_color != NULL);
misc_p.background_red = game.plr_bg_color->r;
misc_p.background_green = game.plr_bg_color->g;
misc_p.background_blue = game.plr_bg_color->b;
lsend_packet_ruleset_game(dest, &misc_p);
}
/**************************************************************************
Send all team names defined in the ruleset file(s) to the
specified connections.
**************************************************************************/
static void send_ruleset_team_names(struct conn_list *dest)
{
struct packet_team_name_info team_name_info_p;
team_slots_iterate(tslot) {
const char *name = team_slot_defined_name(tslot);
if (NULL == name) {
/* End of defined names. */
break;
}
team_name_info_p.team_id = team_slot_index(tslot);
sz_strlcpy(team_name_info_p.team_name, name);
lsend_packet_team_name_info(dest, &team_name_info_p);
} team_slots_iterate_end;
}
/**************************************************************************
Loads the ruleset currently given in game.rulesetdir.
This may be called more than once and it will free any stale data.
**************************************************************************/
void load_rulesets(void)
{
struct section_file *techfile, *unitfile, *buildfile, *govfile, *terrfile;
struct section_file *cityfile, *nationfile, *effectfile;
log_normal(_("Loading rulesets."));
game_ruleset_free();
/* Reset the list of available player colors. */
playercolor_free();
playercolor_init();
game_ruleset_init();
server.playable_nations = 0;
techfile = openload_ruleset_file("techs");
load_tech_names(techfile);
buildfile = openload_ruleset_file("buildings");
load_building_names(buildfile);
govfile = openload_ruleset_file("governments");
load_government_names(govfile);
unitfile = openload_ruleset_file("units");
load_unit_names(unitfile);
terrfile = openload_ruleset_file("terrain");
load_terrain_names(terrfile);
cityfile = openload_ruleset_file("cities");
load_citystyle_names(cityfile);
nationfile = openload_ruleset_file("nations");
load_nation_names(nationfile);
effectfile = openload_ruleset_file("effects");
load_ruleset_techs(techfile);
load_ruleset_cities(cityfile);
load_ruleset_governments(govfile);
load_ruleset_terrain(terrfile); /* terrain must precede nations and units */
load_ruleset_units(unitfile);
load_ruleset_buildings(buildfile);
load_ruleset_nations(nationfile);
load_ruleset_effects(effectfile);
load_ruleset_game();
/* Init nations we just loaded. */
init_available_nations();
sanity_check_ruleset_data();
precalc_tech_data();
if (base_sections) {
free(base_sections);
base_sections = NULL;
}
if (resource_sections) {
free(resource_sections);
resource_sections = NULL;
}
if (terrain_sections) {
free(terrain_sections);
terrain_sections = NULL;
}
script_server_free();
script_server_init();
openload_script_file("default");
openload_script_file("script");
/* Build advisors unit class cache corresponding to loaded rulesets */
adv_units_ruleset_init();
CALL_FUNC_EACH_AI(units_ruleset_init);
/* We may need to adjust the number of AI players
* if the number of available nations changed. */
if (game.info.aifill > server.playable_nations) {
log_normal(_("Reducing aifill because there "
"are not enough playable nations."));
game.info.aifill = server.playable_nations;
aifill(game.info.aifill);
}
}
/**************************************************************************
Reload the game settings saved in the ruleset file.
**************************************************************************/
void reload_rulesets_settings(void)
{
struct section_file *file;
file = openload_ruleset_file("game");
settings_ruleset(file, "settings");
secfile_destroy(file);
}
/**************************************************************************
Send all ruleset information to the specified connections.
**************************************************************************/
void send_rulesets(struct conn_list *dest)
{
conn_list_compression_freeze(dest);
/* ruleset_control also indicates to client that ruleset sending starts. */
send_ruleset_control(dest);
send_ruleset_game(dest);
send_ruleset_team_names(dest);
send_ruleset_techs(dest);
send_ruleset_governments(dest);
send_ruleset_unit_classes(dest);
send_ruleset_units(dest);
send_ruleset_specialists(dest);
send_ruleset_resources(dest);
send_ruleset_terrain(dest);
send_ruleset_bases(dest);
send_ruleset_buildings(dest);
send_ruleset_nations(dest);
send_ruleset_cities(dest);
send_ruleset_cache(dest);
/* Indicate client that all rulesets have now been sent. */
conn_list_iterate(dest, pconn) {
if (has_capability("rules_finished", pconn->capability)) {
lsend_packet_rulesets_ready(pconn->self);
}
} conn_list_iterate_end;
/* changed game settings will be send in
* connecthand.c:establish_new_connection() */
conn_list_compression_thaw(dest);
}
/**************************************************************************
Does nation have tech initially?
**************************************************************************/
static bool nation_has_initial_tech(struct nation_type *pnation,
struct advance *tech)
{
int i;
/* See if it's given as global init tech */
for (i = 0; i < MAX_NUM_TECH_LIST
&& game.rgame.global_init_techs[i] != A_LAST; i++) {
if (game.rgame.global_init_techs[i] == advance_number(tech)) {
return TRUE;
}
}
/* See if it's given as national init tech */
for (i = 0;
i < MAX_NUM_TECH_LIST && pnation->init_techs[i] != A_LAST;
i++) {
if (pnation->init_techs[i] == advance_number(tech)) {
return TRUE;
}
}
return FALSE;
}
/**************************************************************************
Helper function for sanity_check_req_list() and sanity_check_req_vec()
**************************************************************************/
static bool sanity_check_req_set(int reqs_of_type[], int local_reqs_of_type[],
struct requirement *preq,
int max_tiles, const char *list_for)
{
int rc;
fc_assert_ret_val(universals_n_is_valid(preq->source.kind), FALSE);
/* Add to counter */
reqs_of_type[preq->source.kind]++;
rc = reqs_of_type[preq->source.kind];
if (preq->range == REQ_RANGE_LOCAL) {
local_reqs_of_type[preq->source.kind]++;
switch (preq->source.kind) {
case VUT_TERRAINCLASS:
if (local_reqs_of_type[VUT_TERRAIN] > 0) {
log_error("%s: Requirement list has both local terrain and terrainclass requirement",
list_for);
return FALSE;
}
break;
case VUT_TERRAIN:
if (local_reqs_of_type[VUT_TERRAINCLASS] > 0) {
log_error("%s: Requirement list has both local terrain and terrainclass requirement",
list_for);
return FALSE;
}
break;
default:
break;
}
}
if (rc > 1) {
/* Multiple requirements of the same type */
switch (preq->source.kind) {
case VUT_GOVERNMENT:
case VUT_NATION:
case VUT_UTYPE:
case VUT_UCLASS:
case VUT_OTYPE:
case VUT_SPECIALIST:
case VUT_MINSIZE: /* Breaks nothing, but has no sense either */
case VUT_MINYEAR:
case VUT_AI_LEVEL:
case VUT_TERRAINALTER: /* Local range only */
case VUT_CITYTILE:
/* There can be only one requirement of these types (with current
* range limitations)
* Requirements might be identical, but we consider multiple
* declarations error anyway. */
log_error("%s: Requirement list has multiple %s requirements",
list_for, universal_type_rule_name(&preq->source));
return FALSE;
break;
case VUT_TERRAIN:
/* There can be only up to max_tiles requirements of these types */
if (max_tiles != -1 && rc > max_tiles) {
log_error("%s: Requirement list has more %s requirements than "
"can ever be fullfilled.", list_for,
universal_type_rule_name(&preq->source));
return FALSE;
}
break;
case VUT_TERRAINCLASS:
if (rc > 2 || (max_tiles != -1 && rc > max_tiles)) {
log_error("%s: Requirement list has more %s requirements than "
"can ever be fullfilled.", list_for,
universal_type_rule_name(&preq->source));
return FALSE;
}
break;
case VUT_SPECIAL:
case VUT_BASE:
/* Note that there can be more than 1 special or base / tile. */
case VUT_NONE:
case VUT_ADVANCE:
case VUT_IMPROVEMENT:
case VUT_UTFLAG:
case VUT_UCFLAG:
/* Can have multiple requirements of these types */
break;
case VUT_COUNT:
/* Should never be in requirement vector */
fc_assert(FALSE);
return FALSE;
break;
/* No default handling here, as we want compiler warning
* if new requirement type is added to enum and it's not handled
* here. */
}
}
return TRUE;
}
/**************************************************************************
Check if requirement list is free of conflicting requirements.
max_tiles is number of tiles that can provide requirement. Value -1
disables checking based on number of tiles.
Returns TRUE iff everything ok.
TODO: This is based on current hardcoded range limitations.
- There should be method of automatically determining these
limitations for each requirement type
- This function should check also problems caused by defining
range to less than hardcoded max for requirement type
**************************************************************************/
static bool sanity_check_req_list(const struct requirement_list *preqs,
int max_tiles,
const char *list_for)
{
int reqs_of_type[VUT_COUNT];
int local_reqs_of_type[VUT_COUNT];
/* Initialize requirement counters */
memset(reqs_of_type, 0, sizeof(reqs_of_type));
memset(local_reqs_of_type, 0, sizeof(local_reqs_of_type));
requirement_list_iterate(preqs, preq) {
if (!sanity_check_req_set(reqs_of_type, local_reqs_of_type, preq, max_tiles, list_for)) {
return FALSE;
}
} requirement_list_iterate_end;
return TRUE;
}
/**************************************************************************
Requirement vector version of requirement sanity checking. See
retuirement list version for comments.
**************************************************************************/
static bool sanity_check_req_vec(const struct requirement_vector *preqs,
int max_tiles,
const char *list_for)
{
int reqs_of_type[VUT_COUNT];
int local_reqs_of_type[VUT_COUNT];
/* Initialize requirement counters */
memset(reqs_of_type, 0, sizeof(reqs_of_type));
memset(local_reqs_of_type, 0, sizeof(local_reqs_of_type));
requirement_vector_iterate(preqs, preq) {
if (!sanity_check_req_set(reqs_of_type, local_reqs_of_type, preq, max_tiles, list_for)) {
return FALSE;
}
} requirement_vector_iterate_end;
return TRUE;
}
/**************************************************************************
Check that requirement list and negated requirements list do not have
confliciting requirements.
Returns TRUE iff everything ok.
**************************************************************************/
static bool sanity_check_req_nreq_list(const struct requirement_list *preqs,
const struct requirement_list *pnreqs,
int one_tile,
const char *list_for)
{
/* Check internal sanity of requirement list */
if (!sanity_check_req_list(preqs, one_tile, list_for)) {
return FALSE;
}
/* There is no pnreqs in all cases */
if (pnreqs != NULL) {
/* Check sanity between reqs and nreqs */
requirement_list_iterate(preqs, preq) {
requirement_list_iterate(pnreqs, pnreq) {
if (are_requirements_equal(preq, pnreq)) {
log_error("%s: Identical %s requirement in requirements and "
"negated requirements.", list_for,
universal_type_rule_name(&preq->source));
return FALSE;
}
} requirement_list_iterate_end;
} requirement_list_iterate_end;
}
return TRUE;
}
/**************************************************************************
Sanity check callback for iterating effects cache.
**************************************************************************/
static bool effect_list_sanity_cb(const struct effect *peffect)
{
int one_tile = -1; /* TODO: Determine correct value from effect.
* -1 disables checking */
return sanity_check_req_nreq_list(peffect->reqs, peffect->nreqs, one_tile,
effect_type_name(peffect->type));
}
/**************************************************************************
Some more sanity checking once all rulesets are loaded. These check
for some cross-referencing which was impossible to do while only one
party was loaded in load_ruleset_xxx()
Returns TRUE iff everything ok.
**************************************************************************/
static bool sanity_check_ruleset_data(void)
{
int num_utypes;
int i;
bool ok = TRUE; /* Store failures to variable instead of returning
* immediately so all errors get printed, not just first
* one. */
/* Check that all players can have their initial techs */
nations_iterate(pnation) {
int i;
/* Check global initial techs */
for (i = 0; i < MAX_NUM_TECH_LIST
&& game.rgame.global_init_techs[i] != A_LAST; i++) {
Tech_type_id tech = game.rgame.global_init_techs[i];
struct advance *a = valid_advance_by_number(tech);
if (!a) {
ruleset_error(LOG_FATAL,
"Tech %s does not exist, but is initial "
"tech for everyone.",
advance_rule_name(advance_by_number(tech)));
}
if (advance_by_number(A_NONE) != a->require[AR_ROOT]
&& !nation_has_initial_tech(pnation, a->require[AR_ROOT])) {
/* Nation has no root_req for tech */
ruleset_error(LOG_FATAL,
"Tech %s is initial for everyone, but %s has "
"no root_req for it.",
advance_rule_name(a),
nation_rule_name(pnation));
}
}
/* Check national initial techs */
for (i = 0;
i < MAX_NUM_TECH_LIST && pnation->init_techs[i] != A_LAST;
i++) {
Tech_type_id tech = pnation->init_techs[i];
struct advance *a = valid_advance_by_number(tech);
if (!a) {
ruleset_error(LOG_FATAL,
"Tech %s does not exist, but is tech for %s.",
advance_rule_name(advance_by_number(tech)),
nation_rule_name(pnation));
ok = FALSE;
}
if (advance_by_number(A_NONE) != a->require[AR_ROOT]
&& !nation_has_initial_tech(pnation, a->require[AR_ROOT])) {
/* Nation has no root_req for tech */
ruleset_error(LOG_FATAL,
"Tech %s is initial for %s, but they have "
"no root_req for it.",
advance_rule_name(a),
nation_rule_name(pnation));
ok = FALSE;
}
}
} nations_iterate_end;
/* Check against unit upgrade loops */
num_utypes = game.control.num_unit_types;
unit_type_iterate(putype) {
int chain_length = 0;
struct unit_type *upgraded = putype;
while(upgraded != NULL) {
upgraded = upgraded->obsoleted_by;
chain_length++;
if (chain_length > num_utypes) {
ruleset_error(LOG_FATAL,
"There seems to be obsoleted_by loop in update "
"chain that starts from %s", utype_rule_name(putype));
ok = FALSE;
}
}
} unit_type_iterate_end;
/* Check requirement sets against conflicting requirements.
* Effects use requirement lists */
if (!iterate_effect_cache(effect_list_sanity_cb)) {
ruleset_error(LOG_FATAL, "Effects have conflicting requirements!");
ok = FALSE;
}
/* Others use requirement vectors
* Buildings */
improvement_iterate(pimprove) {
if (!sanity_check_req_vec(&pimprove->reqs, -1,
improvement_rule_name(pimprove))) {
ruleset_error(LOG_FATAL, "Buildings have conflicting requirements!");
ok = FALSE;
}
} improvement_iterate_end;
/* Governments */
governments_iterate(pgov) {
if (!sanity_check_req_vec(&pgov->reqs, -1,
government_rule_name(pgov))) {
ruleset_error(LOG_FATAL, "Governments have conflicting requirements!");
ok = FALSE;
}
} governments_iterate_end;
/* Specialists */
specialist_type_iterate(sp) {
struct specialist *psp = specialist_by_number(sp);
if (!sanity_check_req_vec(&psp->reqs, -1,
specialist_rule_name(psp))) {
ruleset_error(LOG_FATAL, "Specialists have conflicting requirements!");
ok = FALSE;
}
} specialist_type_iterate_end;
/* Bases */
base_type_iterate(pbase) {
if (!sanity_check_req_vec(&pbase->reqs, -1,
base_rule_name(pbase))) {
ruleset_error(LOG_FATAL, "Bases have conflicting requirements!");
ok = FALSE;
}
} base_type_iterate_end
/* City styles */
for (i = 0; i < game.control.styles_count; i++) {
if (!sanity_check_req_vec(&city_styles[i].reqs, -1,
city_style_rule_name(i))) {
ruleset_error(LOG_FATAL, "City styles have conflicting requirements!");
ok = FALSE;
}
}
terrain_type_iterate(pterr) {
unit_class_iterate(uc) {
if (BV_ISSET(pterr->native_to, uclass_index(uc))) {
if (is_ocean(pterr) && uc->move_type == UMT_LAND) {
ruleset_error(LOG_FATAL,
"Oceanic %s is native to land units.",
terrain_rule_name(pterr));
ok = FALSE;
} else if (!is_ocean(pterr) && uc->move_type == UMT_SEA) {
ruleset_error(LOG_FATAL,
"Non-oceanic %s is native to sea units.",
terrain_rule_name(pterr));
ok = FALSE;
}
}
} unit_class_iterate_end;
} terrain_type_iterate_end;
return ok;
}
| Java |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebMvc.App.Views.Default.Common.Public
{
public partial class Footer : System.Web.UI.UserControl
{
public App.Common.UserControl.Footer FooterViewBag { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
}
}
} | Java |
<?php
class UpdateCartAction extends Action{
public function execute() {
$quantities = getParam('ProductQuantity');
$cart = new Cart();
foreach($quantities as $productId => $quantities){
if($quantities > 0){
$cart->updateQuantity($productId, $quantities);
}
}
$this->getController()->redirect('view_cart.php');
}
}
?>
| Java |
#
# Copyright (c) 2013 The Linux Foundation. All rights reserved.
# Copyright (C) 2008-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
JFFS2_BLOCKSIZE = 64k 128k 256k
define imgname
$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
endef
define rootfs_align
$(patsubst %-256k,0x40000,$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs-%,0x4,$(1)))))
endef
define sysupname
$(call imgname,$(1),$(2))-sysupgrade.bin
endef
define factoryname
$(call imgname,$(1),$(2))-factory.bin
endef
COMMA:=,
define mkcmdline
$(if $(1),board=$(1) )$(if $(2),console=$(2)$(COMMA)$(3))$(if $(4), fdt=$(4))
endef
SINGLE_PROFILES:=
define SingleProfile
define Image/Build/Profile/$(3)
$$(call Image/Build/Template/$(2)/$$(1),$(1),$(4),$$(call mkcmdline,$(5),$(6),$(7),$(13)),$(8),$(9),$(10),$(11),$(12))
endef
SINGLE_PROFILES += $(3)
endef
define MultiProfile
define Image/Build/Profile/$(1)
$(foreach p,$(2),
$$(call Image/Build/Profile/$p,$$(1))
)
endef
endef
LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
KDIR_TMP:=$(KDIR)/tmp
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
fs_squash:=squashfs-only
fs_64k:=64k
fs_64kraw:=64kraw
fs_128k:=128k
fs_256k:=256k
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
fs_squash:=initramfs
fs_64k:=initramfs
fs_64kraw:=initramfs
fs_128k:=initramfs
fs_256k:=initramfs
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs
endif
define CompressLzma
$(STAGING_DIR_HOST)/bin/lzma e $(1) -lc1 -lp2 -pb2 $(3) $(2)
endef
define PatchKernelLzma
cp $(KDIR)/vmlinux $(KDIR_TMP)/vmlinux-$(1)
$(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR_TMP)/vmlinux-$(1) "$(strip $(2))"
$(call CompressLzma,$(KDIR_TMP)/vmlinux-$(1),$(KDIR_TMP)/vmlinux-$(1).bin.lzma,$(3))
endef
define PatchKernelGzip
cp $(KDIR)/vmlinux $(KDIR_TMP)/vmlinux-$(1)
$(STAGING_DIR_HOST)/bin/patch-cmdline $(KDIR_TMP)/vmlinux-$(1) "$(strip $(2))"
gzip -9 -c $(KDIR_TMP)/vmlinux-$(1) > $(KDIR_TMP)/vmlinux-$(1).bin.gz
endef
define MkuImage
mkimage -A mips -O linux -T multi -a 0x80060000 -C $(1) $(2) \
-e 0x80060000 -n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
-d $(3) $(4)
endef
define MkuImageLzma
$(call PatchKernelLzma,$(1),$(2),$(3))
$(call MkuImage,lzma,,$(KDIR_TMP)/vmlinux-$(1).bin.lzma,$(KDIR_TMP)/vmlinux-$(1).uImage)
endef
define MkuImageLzma/initramfs
$(call PatchKernelLzma,$(1),$(2))
$(call MkuImage,lzma,,$(KDIR_TMP)/vmlinux-$(1).bin.lzma,$(call imgname,initramfs,$(1))-uImage.bin)
endef
define MkuImageGzip
$(call PatchKernelGzip,$(1),$(2))
$(call MkuImage,gzip,,$(KDIR_TMP)/vmlinux-$(1).bin.gz,$(KDIR_TMP)/vmlinux-$(1).uImage)
endef
define MkuImageGzip/initramfs
$(call PatchKernelGzip,$(1),$(2))
$(call MkuImage,gzip,,$(KDIR_TMP)/vmlinux-$(1).bin.gz,$(call imgname,initramfs,$(1))-uImage.bin)
endef
define MkuImageOKLI
$(call MkuImage,lzma,-M 0x4f4b4c49,$(KDIR)/vmlinux.bin.lzma,$(KDIR_TMP)/vmlinux-$(1).okli)
endef
define CatFiles
if [ `stat -c%s "$(1)"` -gt $(2) ]; then \
echo "Warning: $(1) is too big"; \
else if [ `stat -c%s $(3)` -gt $(4) ]; then \
echo "Warning: $(3) is too big"; \
else \
( dd if=$(1) bs=$(2) conv=sync; dd if=$(3) ) > $(5); \
fi; fi
endef
define Sysupgrade/KR
$(call CatFiles,$(2),$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(5)))
endef
define Sysupgrade/KRuImage
$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,$(3),$(KDIR)/root.$(1),$(4),$(call sysupname,$(1),$(2)))
endef
define Sysupgrade/RKuImage
$(call CatFiles,$(KDIR)/root.$(1),$(4),$(KDIR_TMP)/vmlinux-$(2).uImage,$(3),$(call sysupname,$(1),$(2)))
endef
define Image/BuildLoader
-rm -rf $(KDIR)/lzma-loader
$(LOADER_MAKE) LOADER=loader-$(1).$(2) KERNEL_CMDLINE="$(3)"\
LZMA_TEXT_START=0x80a00000 LOADADDR=0x80060000 \
LOADER_DATA="$(KDIR)/vmlinux.bin.lzma" BOARD="$(1)" \
compile loader.$(2)
endef
define Image/BuildLoaderAlone
-rm -rf $(KDIR)/lzma-loader
$(LOADER_MAKE) LOADER=loader-$(1).$(2) KERNEL_CMDLINE="$(3)" \
LZMA_TEXT_START=0x80a00000 LOADADDR=0x80060000 \
BOARD="$(1)" FLASH_OFFS=$(4) FLASH_MAX=$(5) \
compile loader.$(2)
endef
define Build/Clean
$(LOADER_MAKE) clean
endef
alfa_ap96_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,256k(u-boot-env)ro,13312k(rootfs),2048k(kernel),512k(caldata)ro,15360k@0x80000(firmware)
alfa_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1600k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
all0258n_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),1024k(kernel),5248k(rootfs),1536k(failsafe),64k(art),6272k@0x50000(firmware)
all0315n_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,256k(u-boot-env),1024k(kernel),12544k(rootfs),2048k(failsafe),256k(art)ro,13568k@0x80000(firmware)
ap96_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1728k(kernel),64k(art)ro,7872k@0x40000(firmware)
ap113_mtd_layout=mtdparts=spi0.0:64k(u-boot),3008k(rootfs),896k(uImage),64k(NVRAM),64k(ART),3904k@0x10000(firmware)
ap121_mtdlayout_2M=mtdparts=spi0.0:64k(u-boot)ro,1216k(rootfs),704k(kernel),64k(art)ro,1920k@0x10000(firmware)
ap121_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs),896k(kernel),64k(nvram),64k(art)ro,3648k@0x50000(firmware)
ap121_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),6336k(rootfs),1408k(kernel),64k(mib0),64k(art)ro,7744k@0x50000(firmware)
ap121_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
ap135_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
ap135dual_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,15936k@0x50000(firmware);ath79-nand:256m(rootfs_data)
rubberduck_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
ap136_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1472k(kernel),64k(art)ro,7744k@0x50000(firmware)
ap143_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1472k(kernel),64k(art)ro,7744k@0x50000(firmware)
ap152_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1472k(kernel),64k(art)ro,7744k@0x50000(firmware)
cameo7240_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(nvram)ro,960k(kernel),2752k(rootfs),64k(mac)ro,64k(art)ro,3712k@0x40000(firmware)
cameo913x_mtdlayout=mtdparts=spi0.0:128k(u-boot)ro,64k(config)ro,960k(kernel),2880k(rootfs),64k(art)ro,3840k@0x30000(firmware)
cameo933x_mtdlayout=mtdparts=spi0.0:64k(u-boot)ro,64k(art)ro,64k(mac)ro,64k(nvram)ro,192k(language)ro,896k(kernel),2752k(rootfs),3648k@0x70000(firmware)
cap4200ag_mtdlayout=mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),320k(custom)ro,1536k(kernel),12096k(rootfs),2048k(failsafe),64k(art),13632k@0xa0000(firmware)
db120_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6336k(rootfs),1408k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware)
dir825b1_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),5184k(rootfs),64k(caldata)ro,1600k(unknown)ro,6208k@0x50000(firmware),64k@0x7f0000(caldata_copy)
dir825b1_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),6784k(rootfs),64k(caldata)ro,7808k@0x50000(firmware),64k@0x660000(caldata_orig),6208k@0x50000(firmware_orig)
ew-dorin_mtdlayout_4M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),1024k(kernel),2688k(rootfs),64k(art),3712k@0x50000(firmware)
dlrtdev_mtdlayout=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),5184k(rootfs),64k(caldata)ro,640k(certs),960k(unknown)ro,6208k@0x50000(firmware),64k@0x7f0000(caldata_copy)
dlrtdev_mtdlayout_fat=mtdparts=spi0.0:256k(uboot)ro,64k(config)ro,1024k(kernel),6544k(rootfs),640k(certs),64k(caldata)ro,7168k@0x50000(firmware),64k@0x660000(caldata_orig),6208k@0x50000(firmware_orig)
pb92_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,2752k(rootfs),896k(kernel),64k(nvram),64k(art)ro,3648k@0x50000(firmware)
planex_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,960k(kernel),6784k(rootfs),128k(art)ro,7744k@0x50000(firmware)
ubntxm_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1024k(kernel),6528k(rootfs),256k(cfg)ro,64k(EEPROM)ro,7552k@0x50000(firmware)
ubdev_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1024k(kernel),6464k(rootfs),64k(certs),256k(cfg)ro,64k(EEPROM)ro,7488k@0x50000(firmware)
whrhpg300n_mtdlayout=mtdparts=spi0.0:248k(u-boot)ro,8k(u-boot-env)ro,960k(kernel),2816k(rootfs),64k(art)ro,3712k@0x40000(firmware)
wndr3700_mtdlayout=mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,1024k(kernel),6656k(rootfs),64k(art)ro,7680k@0x70000(firmware)
wndr3700v2_mtdlayout=mtdparts=spi0.0:320k(u-boot)ro,128k(u-boot-env)ro,1024k(kernel),14848k(rootfs),64k(art)ro,15872k@0x70000(firmware)
zcn1523h_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6208k(rootfs),1472k(kernel),64k(configure)ro,64k(mfg)ro,64k(art)ro,7680k@0x50000(firmware)
define Image/BuildKernel
cp $(KDIR)/vmlinux.elf $(VMLINUX).elf
cp $(KDIR)/vmlinux $(VMLINUX).bin
dd if=$(KDIR)/vmlinux.bin.lzma of=$(VMLINUX).lzma bs=65536 conv=sync
dd if=$(KDIR)/vmlinux.bin.gz of=$(VMLINUX).gz bs=65536 conv=sync
$(call MkuImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(UIMAGE)-gzip.bin)
$(call MkuImage,lzma,,$(KDIR)/vmlinux.bin.lzma,$(UIMAGE)-lzma.bin)
cp $(KDIR)/loader-generic.elf $(VMLINUX)-lzma.elf
-mkdir -p $(KDIR_TMP)
$(call Image/Build/Initramfs)
endef
define Image/Build/WRT400N
$(call MkuImageLzma,$(2),$(3))
$(call Sysupgrade/KRuImage,$(1),$(2),1310720,6488064)
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
wrt400n $(KDIR_TMP)/vmlinux-$(2).uImage $(KDIR)/root.$(1) $(call factoryname,$(1),$(2)); \
fi
endef
define Image/Build/DIR825B1
$(call MkuImageLzma,$(2),$(3) $(dir825b1_mtdlayout))
$(call Sysupgrade/KRuImage,$(1),$(2),1048576,5308416)
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
( \
dd if=$(call sysupname,$(1),$(2)); \
echo -n "$(4)"; \
) > $(call imgname,$(1),$(2))-backup-loader.bin; \
if [ `stat -c%s $(call sysupname,$(1),$(2))` -gt 4194304 ]; then \
echo "Warning: $(call sysupname,$(1),$(2)) is too big"; \
else \
( \
dd if=$(call sysupname,$(1),$(2)) bs=4096k conv=sync; \
echo -n "$(5)"; \
) > $(call factoryname,$(1),$(2)); \
fi; \
fi
$(call MkuImageLzma,$(2)-fat,$(3) $(dir825b1_mtdlayout_fat))
$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2)-fat.uImage,1048576,$(KDIR)/root.$(1),6946816,$(KDIR_TMP)/$(2)-fat.bin)
if [ -e "$(KDIR_TMP)/$(2)-fat.bin" ]; then \
echo -n "" > $(KDIR_TMP)/$(2)-fat.dummy; \
sh $(TOPDIR)/scripts/combined-image.sh \
"$(KDIR_TMP)/$(2)-fat.bin" \
"$(KDIR_TMP)/$(2)-fat.dummy" \
$(call sysupname,$(1),$(2)-fat); \
fi
endef
define Image/Build/DLRTDEV
$(call MkuImageLzma,$(2),$(3) $(dlrtdev_mtdlayout))
$(call Sysupgrade/KRuImage,$(1),$(2),1048576,5308416)
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
( \
dd if=$(call sysupname,$(1),$(2)); \
echo -n "$(4)"; \
) > $(call imgname,$(1),$(2))-backup-loader.bin; \
if [ `stat -c%s $(call sysupname,$(1),$(2))` -gt 4194304 ]; then \
echo "Warning: $(call sysupname,$(1),$(2)) is too big"; \
else \
( \
dd if=$(call sysupname,$(1),$(2)) bs=4096k conv=sync; \
echo -n "$(5)"; \
) > $(call factoryname,$(1),$(2)); \
fi; \
fi
$(call MkuImageLzma,$(2)-fat,$(3) $(dlrtdev_mtdlayout_fat))
$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2)-fat.uImage,1048576,$(KDIR)/root.$(1),6946816,$(KDIR_TMP)/$(2)-fat.bin)
if [ -e "$(KDIR_TMP)/$(2)-fat.bin" ]; then \
echo -n "" > $(KDIR_TMP)/$(2)-fat.dummy; \
sh $(TOPDIR)/scripts/combined-image.sh \
"$(KDIR_TMP)/$(2)-fat.bin" \
"$(KDIR_TMP)/$(2)-fat.dummy" \
$(call sysupname,$(1),$(2)-fat); \
fi
endef
define Image/Build/WZRHPG30XNH
$(call MkuImageLzma,$(2),$(3))
$(call Sysupgrade/KRuImage,$(1),$(2),1048576,31850496)
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
( \
echo -n -e "# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
dd if=$(call sysupname,$(1),$(2)); \
) > $(call imgname,$(1),$(2))-tftp.bin; \
buffalo-enc -p $(4) -v 1.99 \
-i $(call sysupname,$(1),$(2)) \
-o $(KDIR_TMP)/$(2).enc; \
buffalo-tag -b $(4) -p $(4) -a ath -v 1.99 -m 1.01 -l mlang8 \
-w 3 -c 0x80041000 -d 0x801e8000 -f 1 -r M_ \
-i $(KDIR_TMP)/$(2).enc \
-o $(call factoryname,$(1),$(2)); \
fi
endef
define Image/Build/WZRHPG30XNH/initramfs
$(call MkuImageLzma/initramfs,$(2),$(3) $(4))
endef
define Image/Build/WHRHPG300N
$(call MkuImageLzma,$(2),$(3) $(4))
$(call Sysupgrade/KRuImage,$(1),$(2),983040,2883584)
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
( \
echo -n -e "# Airstation Public Fmt1\x00\x00\x00\x00\x00\x00\x00\x00"; \
dd if=$(call sysupname,$(1),$(2)); \
) > $(call imgname,$(1),$(2))-tftp.bin; \
buffalo-enc -p $(5) -v 1.99 \
-i $(call sysupname,$(1),$(2)) \
-o $(KDIR_TMP)/$(2).enc; \
buffalo-tag -b $(5) -p $(5) -a ath -v 1.99 -m 1.01 -l mlang8 \
-w 3 -c 0x80041000 -d 0x801e8000 -f 1 -r M_ \
-i $(KDIR_TMP)/$(2).enc \
-o $(call factoryname,$(1),$(2)); \
fi
endef
define Image/Build/WHRHPG300N/initramfs
$(call MkuImageLzma/initramfs,$(2),$(3) $(4))
endef
define Image/Build/Cameo
$(call MkuImageLzma,$(2),$(3) $(4))
$(call Sysupgrade/KRuImage,$(1),$(2),$(5),$(6))
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
( \
dd if=$(KDIR_TMP)/vmlinux-$(2).uImage bs=$(5) conv=sync; \
dd if=$(KDIR)/root.$(1) bs=$(6) conv=sync; \
echo -n $(7); \
) > $(call factoryname,$(1),$(2)); \
fi
endef
define Image/Build/CameoHornet
$(call MkuImageLzma,$(2),$(3) $(4))
$(call Sysupgrade/KRuImage,$(1),$(2),$(5),$(6))
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
mkcameofw -M HORNET -R "DEF" -S $(7) -V "1.99" \
-K $(5) -I $$$$(($(5)+$(6))) \
-k $(KDIR_TMP)/vmlinux-$(2).uImage \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call factoryname,$(1),$(2)); \
fi
endef
define Image/Build/Cameo913x
$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo913x_mtdlayout),983040,2949120,$(4))
endef
define Image/Build/Cameo913x/initramfs
$(call MkuImageLzma/initramfs,$(2),$(3) $(cameo913x_mtdlayout))
endef
define Image/Build/Cameo7240
$(call Image/Build/Cameo,$(1),$(2),$(3),$(cameo7240_mtdlayout),983040,2818048,$(4))
endef
define Image/Build/Cameo7240/initramfs
$(call MkuImageLzma/initramfs,$(2),$(3) $(cameo7240_mtdlayout))
endef
define Image/Build/Cameo933x
$(call Image/Build/CameoHornet,$(1),$(2),$(3),$(cameo933x_mtdlayout),917504,2818048,$(4))
endef
define Image/Build/Cameo933x/initramfs
$(call MkuImageLzma/initramfs,$(2),$(3) $(cameo933x_mtdlayout))
endef
define Image/Build/Ath
$(call Sysupgrade/$(7),$(1),$(2),$(5),$(6))
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
dd if=$(KDIR_TMP)/vmlinux-$(2).uImage \
of=$(call imgname,kernel,$(2)).bin bs=64k conv=sync; \
dd if=$(KDIR)/root.$(1) \
of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync; \
fi
endef
define Image/Build/AthGzip
$(call MkuImageGzip,$(2),$(3) $(4))
$(call Image/Build/Ath,$(1),$(2),$(3),$(4),$(5),$(6),$(7))
endef
define Image/Build/AthGzip/initramfs
$(call MkuImageGzip/initramfs,$(2),$(3) $(4))
endef
define Image/Build/AthLzma
$(call MkuImageLzma,$(2),$(3) $(4))
$(call Image/Build/Ath,$(1),$(2),$(3),$(4),$(5),$(6),$(7))
endef
define Image/Build/AthLzma/initramfs
$(call MkuImageLzma/initramfs,$(2),$(3) $(4))
endef
define Image/Build/PB4X
$(call PatchKernelLzma,$(2),$(3))
dd if=$(KDIR_TMP)/vmlinux-$(2).bin.lzma \
of=$(call imgname,kernel,$(2)).bin bs=64k conv=sync
dd if=$(KDIR)/root.$(1) \
of=$(call imgname,$(1),$(2)-rootfs).bin bs=128k conv=sync
-sh $(TOPDIR)/scripts/combined-image.sh \
"$(call imgname,kernel,$(2)).bin" \
"$(call imgname,$(1),$(2)-rootfs).bin" \
$(call sysupname,$(1),$(2))
endef
define Image/Build/MyLoader
$(call PatchKernelLzma,$(2),$(3))
-$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) \
-p0x030000:0xe0000:al:0x80060000:kernel:$(KDIR_TMP)/vmlinux-$(2).bin.lzma \
-p0x110000:0:::rootfs:$(KDIR)/root.$(1) \
$(call imgname,$(1),$(2))-$(5)-factory.img
endef
define Image/Build/UBNTXM
$(call MkuImageLzma,$(2),$(3) $(ubntxm_mtdlayout))
$(call Sysupgrade/KRuImage,$(1),$(2),1048576,6684672)
dd if=$(KDIR_TMP)/vmlinux-$(2).uImage of=$(KDIR_TMP)/vmlinux-$(2).uImage.bin bs=1024k conv=sync
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(4) -v $(5).$(6).v6.0.0-OpenWrt-$(REVISION) \
-k $(KDIR_TMP)/vmlinux-$(2).uImage.bin \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call factoryname,$(1),$(2))
endef
define Image/Build/UBDEV
$(call MkuImageLzma,$(2),$(3) $(ubdev_mtdlayout))
$(call Sysupgrade/KRuImage,$(1),$(2),1048576,6684672)
dd if=$(KDIR_TMP)/vmlinux-$(2).uImage of=$(KDIR_TMP)/vmlinux-$(2).uImage.bin bs=1024k conv=sync
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(4) -v $(5).$(6).v6.0.0-OpenWrt-$(REVISION) \
-k $(KDIR_TMP)/vmlinux-$(2).uImage.bin \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call factoryname,$(1),$(2))
endef
define Image/Build/UBNT
$(call PatchKernelLzma,$(2),$(3))
dd if=$(KDIR_TMP)/vmlinux-$(2).bin.lzma of=$(KDIR_TMP)/vmlinux-$(2).lzma bs=64k conv=sync
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
-k $(KDIR_TMP)/vmlinux-$(2).lzma \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call factoryname,$(1),$(2))
-sh $(TOPDIR)/scripts/combined-image.sh \
"$(KDIR_TMP)/vmlinux-$(2).lzma" \
"$(BIN_DIR)/$(IMG_PREFIX)-root.$(1)" \
$(call sysupname,$(1),$(2))
endef
define Image/Build/Planex/loader
$(call Image/BuildLoaderAlone,$(1),gz,$(2) $(planex_mtdlayout),0x52000,0)
endef
define Image/Build/Planex
[ -e "$(KDIR)/loader-$(2).gz" ]
$(call MkuImage,gzip,,$(KDIR)/loader-$(2).gz,$(KDIR_TMP)/vmlinux-$(2).uImage)
$(call MkuImageOKLI,$(2))
( \
dd if=$(KDIR_TMP)/vmlinux-$(2).uImage bs=8k count=1 conv=sync; \
dd if=$(KDIR_TMP)/vmlinux-$(2).okli; \
) > $(KDIR_TMP)/kernel-$(2).bin
$(call Sysupgrade/KR,$(1),$(KDIR_TMP)/kernel-$(2).bin,983040,6815744,$(2))
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
$(STAGING_DIR_HOST)/bin/mkplanexfw \
-B $(2) \
-v 2.00.00 \
-i $(call sysupname,$(1),$(2)) \
-o $(call factoryname,$(1),$(2)); \
fi
endef
define Image/Build/ALFA
$(call MkuImageLzma,$(2),$(3) $(4))
$(call Sysupgrade/RKuImage,$(1),$(2),$(5),$(6))
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
rm -rf $(KDIR)/$(1); \
mkdir -p $(KDIR)/$(1); \
cd $(KDIR)/$(1); \
cp $(KDIR_TMP)/vmlinux-$(2).uImage $(KDIR)/$(1)/$(7); \
cp $(KDIR)/root.$(1) $(KDIR)/$(1)/$(8); \
$(TAR) zcf $(call factoryname,$(1),$(2)) -C $(KDIR)/$(1) $(7) $(8); \
( \
echo WRM7222C | dd bs=32 count=1 conv=sync; \
echo -ne '\xfe'; \
) >> $(call factoryname,$(1),$(2)); \
fi
endef
define Image/Build/ALFA/initramfs
$(call MkuImageLzma/initramfs,$(2),$(3) $(4))
endef
define Image/Build/TPLINKOLD/loader
$(call Image/BuildLoaderAlone,$(1),gz,$(2),0x22000,0)
endef
define Image/Build/TPLINKOLD
[ -e "$(KDIR)/loader-$(2).gz" ]
$(call MkuImageOKLI,$(2))
( \
dd if=$(KDIR)/loader-$(2).gz bs=7680 count=1 conv=sync; \
dd if=$(KDIR_TMP)/vmlinux-$(2).okli conv=sync; \
) > $(KDIR_TMP)/kernel-$(2).bin
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION)\
-k $(KDIR_TMP)/kernel-$(2).bin \
-r $(KDIR)/root.$(1) \
-o $(call factoryname,$(1),$(2))
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
-k $(KDIR_TMP)/kernel-$(2).bin \
-r $(KDIR)/root.$(1) \
-o $(call sysupname,$(1),$(2))
endef
define Image/Build/TPLINKOLD/initramfs
$(call Image/BuildLoader,$(2),gz,$(3),0x80060000)
-$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
-k $(KDIR)/loader-$(2).gz \
-o $(call imgname,$(1),$(2))-uImage.bin
endef
define Image/Build/TPLINK/loader
$(call Image/BuildLoaderAlone,$(1),gz,$(2),0x22000,0)
endef
define Image/Build/TPLINK
[ -e "$(KDIR)/loader-$(2).gz" ]
$(call MkuImageOKLI,$(2))
( \
dd if=$(KDIR)/loader-$(2).gz bs=7680 count=1 conv=sync; \
dd if=$(KDIR_TMP)/vmlinux-$(2).okli conv=sync; \
) > $(KDIR_TMP)/kernel-$(2).bin
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION)\
-k $(KDIR_TMP)/kernel-$(2).bin \
-r $(KDIR)/root.$(1) \
-a $(call rootfs_align,$(1)) -j \
-o $(call factoryname,$(1),$(2))
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
-k $(KDIR_TMP)/kernel-$(2).bin \
-r $(KDIR)/root.$(1) \
-a $(call rootfs_align,$(1)) -j \
-o $(call sysupname,$(1),$(2))
endef
define Image/Build/TPLINK/initramfs
$(call Image/BuildLoader,$(2),gz,$(3),0x80060000)
-$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) -s\
-k $(KDIR)/loader-$(2).gz \
-o $(call imgname,$(1),$(2))-uImage.bin
endef
define Image/Build/TPLINK-LZMA
$(call PatchKernelLzma,$(2),$(3))
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) \
-k $(KDIR_TMP)/vmlinux-$(2).bin.lzma \
-r $(KDIR)/root.$(1) \
-a $(call rootfs_align,$(1)) -j \
-o $(call factoryname,$(1),$(2))
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) -s \
-k $(KDIR_TMP)/vmlinux-$(2).bin.lzma \
-r $(KDIR)/root.$(1) \
-a $(call rootfs_align,$(1)) -j \
-o $(call sysupname,$(1),$(2))
endef
define Image/Build/TPLINK-LZMA/initramfs
$(call PatchKernelLzma,$(2),$(3))
-$(STAGING_DIR_HOST)/bin/mktplinkfw -c \
-H $(4) -W $(5) -F $(6) -N OpenWrt -V $(REVISION) $(7) -s \
-k $(KDIR_TMP)/vmlinux-$(2).bin.lzma \
-o $(call imgname,$(1),$(2))-uImage.bin
endef
define Image/Build/CyberTAN
$(call MkuImageGzip,$(2),$(3))
$(STAGING_DIR_HOST)/bin/trx -o $(KDIR)/image.tmp -f $(KDIR_TMP)/vmlinux-$(2).uImage \
-x 32 -a 0x10000 -x -32 -f $(KDIR)/root.$(1)
-$(STAGING_DIR_HOST)/bin/addpattern -B $(2) -v v$(4) \
-i $(KDIR)/image.tmp \
-o $(call sysupname,$(1),$(2))
-$(STAGING_DIR_HOST)/bin/addpattern -B $(2) -v v$(4) -g \
-i $(KDIR)/image.tmp \
-o $(call factoryname,$(1),$(2))
rm $(KDIR)/image.tmp
endef
define Image/Build/Netgear/Build_uImage
$(call MkuImageLzma,$(1),$(2) $(3),-d20)
-rm -rf $(KDIR)/$(1)
mkdir -p $(KDIR)/$(1)/image
$(STAGING_DIR_HOST)/bin/wndr3700 \
$(KDIR_TMP)/vmlinux-$(1).uImage \
$(KDIR)/$(1)/image/uImage \
$(4)
$(STAGING_DIR_HOST)/bin/mksquashfs-lzma \
$(KDIR)/$(1) $(KDIR_TMP)/vmlinux-$(1).uImage.squashfs.tmp \
-nopad -noappend -root-owned -be
-rm -rf $(KDIR)/$(1)
mkimage -A mips -O linux -T filesystem -C none \
-a 0xbf070000 -e 0xbf070000 \
-n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR_TMP)/vmlinux-$(1).uImage.squashfs.tmp \
$(KDIR_TMP)/vmlinux-$(1).uImage.squashfs.tmp2
$(STAGING_DIR_HOST)/bin/wndr3700 \
$(KDIR_TMP)/vmlinux-$(1).uImage.squashfs.tmp2 \
$(KDIR_TMP)/vmlinux-$(1).uImage.squashfs \
$(4)
-rm -f $(KDIR_TMP)/vmlinux-$(1).uImage.squashfs.tmp*
endef
define Image/Build/Netgear/Estimate_uImage
$(call Image/Build/Netgear/Build_uImage,$(1)_est,$(2),$(3),$(4))
( \
set -e; \
kk=`echo '$(3)' | sed -e 's/.*[:,]\([0-9]*\)k(kernel).*/\1/'`; \
rk=`echo '$(3)' | sed -e 's/.*[:,]\([0-9]*\)k(rootfs).*/\1/'`; \
let 'tk = kk + rk'; \
s=`stat -c'%s' '$(KDIR_TMP)/vmlinux-$(1)_est.uImage.squashfs'`; \
c=`echo '$(3)' | wc -c`; \
let 'kk = (((s + c) / (64 * 1024) + 1) * 64)'; \
let 'rk = tk - kk'; \
echo '$(3)' | sed -e "s/[0-9]*k(kernel)/$$$${kk}k(kernel)/" \
-e "s/[0-9]*k(rootfs)/$$$${rk}k(rootfs)/" > \
'$(KDIR_TMP)/$(1)_mtdparts'; \
let 'k = kk * 1024'; \
echo "$$$${k}" > '$(KDIR_TMP)/$(1)_kernel_maxsize'; \
let 'r = rk * 1024'; \
echo "$$$${r}" > '$(KDIR_TMP)/$(1)_rootfs_maxsize'; \
)
-rm -f $(KDIR_TMP)/vmlinux-$(1)_est \
$(KDIR_TMP)/vmlinux-$(1)_est.bin.lzma \
$(KDIR_TMP)/vmlinux-$(1)_est.uImage \
$(KDIR_TMP)/vmlinux-$(1)_est.uImage.squashfs
endef
define Image/Build/Netgear
$(call Image/Build/Netgear/Estimate_uImage,$(2),$(3),$(4),$(5))
$(call Image/Build/Netgear/Build_uImage,$(2),$(3),`cat $(KDIR_TMP)/$(2)_mtdparts`,$(5))
if [ `stat -c%s '$(KDIR_TMP)/vmlinux-$(2).uImage.squashfs'` -gt \
`cat '$(KDIR_TMP)/$(2)_kernel_maxsize'` ]; then \
echo "$(KDIR_TMP)/vmlinux-$(2).uImage.squashfs is too big" >& 2; \
else if [ `stat -c%s '$(KDIR)/root.$(1)'` -gt \
`cat '$(KDIR_TMP)/$(2)_rootfs_maxsize'` ]; then \
echo "$(KDIR)/root.$(1) is too big" >& 2; \
else \
( \
set -e; \
dd if=$(KDIR_TMP)/vmlinux-$(2).uImage.squashfs \
bs=`cat '$(KDIR_TMP)/$(2)_kernel_maxsize'` conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k; \
) > $(call sysupname,$(1),$(2)); \
for r in $(7) ; do \
[ -n "$$$$r" ] && dashr="-$$$$r" || dashr= ; \
$(STAGING_DIR_HOST)/bin/mkdniimg \
-B $(6) -v OpenWrt.$(REVISION) -r "$$$$r" $(8) \
-i $(call sysupname,$(1),$(2)) \
-o $(call imgname,$(1),$(2))-factory$$$$dashr.img; \
done; \
fi; fi
endef
define Image/Build/Netgear/initramfs
$(call MkuImageLzma,$(2),$(3) $(4))
$(STAGING_DIR_HOST)/bin/wndr3700 \
$(KDIR_TMP)/vmlinux-$(2).uImage \
$(call imgname,$(1),$(2))-uImage.bin \
$(5)
endef
ifdef CONFIG_PACKAGE_uboot-ar71xx-nbg460n_550n_550nh
define Image/Build/ZyXEL
$(call MkuImageLzma,$(2),$(3))
$(call Sysupgrade/KRuImage,$(1),$(2),917504,2752512)
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
if [ ! -f $(BIN_DIR)/$(IMG_PREFIX)-$(2)-u-boot.bin ]; then \
echo "Warning: $(IMG_PREFIX)-$(2)-u-boot.bin not found"; \
else \
$(STAGING_DIR_HOST)/bin/mkzynfw \
-B $(4) \
-b $(BIN_DIR)/$(IMG_PREFIX)-$(2)-u-boot.bin \
-r $(call sysupname,$(1),$(2)):0x10000 \
-o $(call factoryname,$(1),$(2)); \
fi; fi
endef
endif
define Image/Build/OpenMesh
$(call MkuImageLzma,$(2))
-sh $(TOPDIR)/scripts/om-fwupgradecfg-gen.sh \
"$(4)" \
"$(BUILD_DIR)/fwupgrade.cfg-$(4)" \
"$(KDIR_TMP)/vmlinux-$(2).uImage" \
"$(KDIR)/root.$(1)"
-sh $(TOPDIR)/scripts/combined-ext-image.sh \
"$(4)" "$(call factoryname,$(1),$(2))" \
"$(BUILD_DIR)/fwupgrade.cfg-$(4)" "fwupgrade.cfg" \
"$(KDIR_TMP)/vmlinux-$(2).uImage" "kernel" \
"$(KDIR)/root.$(1)" "rootfs"
endef
define Image/Build/Zcomax
$(call MkuImageLzma,$(2),$(3) $(4))
$(call Sysupgrade/RKuImage,$(1),$(2),1507328,6356992)
if [ -e "$(call sysupname,$(1),$(2))" ]; then \
$(STAGING_DIR_HOST)/bin/mkzcfw \
-B $(2) \
-k $(KDIR_TMP)/vmlinux-$(2).uImage \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call imgname,$(1),$(2))-factory.img; \
fi
endef
define Image/Build/Zcomax/initramfs
$(call MkuImageLzma/initramfs,$(2),$(3) $(4))
endef
define Image/Build/Template/initramfs/initramfs
$(call Image/Build/$(1)/initramfs,initramfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/all/squashfs
$(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/all/jffs2-64k
$(call Image/Build/$(1),jffs2-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/all/jffs2-128k
$(call Image/Build/$(1),jffs2-128k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/all/jffs2-256k
$(call Image/Build/$(1),jffs2-256k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/squashfs-only/loader
$(call Image/Build/$(1)/loader,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/squashfs-only/squashfs
$(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/64k/loader
$(call Image/Build/$(1)/loader,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/64k/squashfs
$(call Image/Build/$(1),squashfs-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/64k/jffs2-64k
$(call Image/Build/$(1),jffs2-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/64kraw/loader
$(call Image/Build/$(1)/loader,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/64kraw/squashfs
$(call Image/Build/$(1),squashfs-raw,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/64kraw/jffs2-64k
$(call Image/Build/$(1),jffs2-64k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/128k/squashfs
$(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/128k/jffs2-128k
$(call Image/Build/$(1),jffs2-128k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/256k/squashfs
$(call Image/Build/$(1),squashfs,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
define Image/Build/Template/256k/jffs2-256k
$(call Image/Build/$(1),jffs2-256k,$(2),$(3),$(4),$(5),$(6),$(7),$(8))
endef
$(eval $(call SingleProfile,ALFA,$(fs_64k),ALFANX,alfa-nx,ALFA-NX,ttyS0,115200,$$(alfa_mtdlayout_8M),1638400,6291456,vmlinux.gz.uImage,pb9x-2.6.31-jffs2))
$(eval $(call SingleProfile,ALFA,$(fs_64k),HORNETUB,hornet-ub,HORNET-UB,ttyATH0,115200,$$(alfa_mtdlayout_8M),1638400,6291456,kernel_image,rootfs_image))
$(eval $(call SingleProfile,AthGzip,$(fs_64k),AP81,ap81,AP81,ttyS0,115200,,1310720,6619136,KRuImage))
$(eval $(call SingleProfile,AthGzip,$(fs_64k),AP83,ap83,AP83,ttyS0,115200,,1310720,6619136,KRuImage))
$(eval $(call SingleProfile,AthGzip,$(fs_64k),AP96,ap96,AP96,ttyS0,115200,$$(ap96_mtdlayout),1769472,6291456,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),ALFAAP96,alfa-ap96,ALFA-AP96,ttyS0,115200,$$(alfa_ap96_mtdlayout),2097152,13631488,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),ALL0258N,all0258n,ALL0258N,ttyS0,115200,$$(all0258n_mtdlayout),1048576,5373952,KRuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_256k),ALL0315N,all0315n,ALL0315N,ttyS0,115200,$$(all0315n_mtdlayout),1048576,12845056,KRuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP113,ap113,AP113,ttyS0,115200,$$(ap113_mtd_layout),917504,3080192,RK))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP121_2M,ap121-2M,AP121,ttyATH0,115200,$$(ap121_mtdlayout_2M),720896,1245184,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP121_4M,ap121-4M,AP121,ttyATH0,115200,$$(ap121_mtdlayout_4M),917504,2818048,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP121_8M,ap121-8M,AP121,ttyATH0,115200,$$(ap121_mtdlayout_8M),1441792,6488064,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP121_16M,ap121-16M,AP121,ttyATH0,115200,$$(ap121_mtdlayout_16M),1507328,14876672,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP121MINI,ap121-mini,AP121-MINI,ttyATH0,115200,$$(ap121_mtdlayout_4M),917504,2818048,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP135,ap135,AP135,ttyS0,115200,$$(ap135_mtdlayout),1507328,14876672,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP135DUAL,ap135-dual,AP135-DUAL,ttyS0,115200,$$(ap135dual_mtdlayout),1507328,14876672,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP136,ap136,AP136,ttyS0,115200,$$(ap136_mtdlayout),1507328,6488064,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP143,ap143,AP143,ttyS0,115200,$$(ap143_mtdlayout),1507328,6488064,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),AP152,ap152,AP152,ttyS0,115200,$$(ap152_mtdlayout),1507328,6488064,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),RUBBERDUCK,rubberduck,RUBBERDUCK,ttyS0,115200,$$(rubberduck_mtdlayout),1507328,14876672,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),CAP4200AG,cap4200ag,CAP4200AG,ttyS0,115200,$$(cap4200ag_mtdlayout),1572864,12386304,KRuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),DB120,db120,DB120,ttyS0,115200,$$(db120_mtdlayout),1441792,6488064,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),DB120TB388,db120tb388,DB120TB388,ttyS0,115200,$$(db120_mtdlayout),1441792,6488064,RKuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),EWDORINAP,ew-dorin,EW-DORIN,ttyATH0,115200,$$(ew-dorin_mtdlayout_4M),1048576,2752512,KRuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),EWDORINRT,ew-dorin-router,EW-DORIN-ROUTER,ttyATH0,115200,$$(ew-dorin_mtdlayout_4M),1048576,2752512,KRuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),PB92,pb92,PB92,ttyS0,115200,$$(pb92_mtdlayout),917504,2818048,KRuImage))
$(eval $(call SingleProfile,AthLzma,$(fs_64k),DT,dt,GENERIC-DT,ttyS0,115200,,1507328,14876672,RKuImage,,0x81000000))
$(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR600A1,dir-600-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-00"))
$(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR601A1,dir-601-a1,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-02"))
$(eval $(call SingleProfile,Cameo7240,$(fs_64k),DIR615E4,dir-615-e4,DIR-615-E4,ttyS0,115200,"AP99-AR7240-RT-091105-05"))
$(eval $(call SingleProfile,Cameo7240,$(fs_64k),FR54RTR,fr-54rtr,DIR-600-A1,ttyS0,115200,"AP91-AR7240-RT-090223-01"))
$(eval $(call SingleProfile,Cameo913x,$(fs_squash),A02RBW300N,a02-rb-w300n,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-070614-03"))
$(eval $(call SingleProfile,Cameo913x,$(fs_squash),DIR615C1,dir-615-c1,DIR-615-C1,ttyS0,115200,"AP81-AR9130-RT-070614-02"))
$(eval $(call SingleProfile,Cameo913x,$(fs_squash),TEW632BRP,tew-632brp,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-070614-00"))
$(eval $(call SingleProfile,Cameo913x,$(fs_squash),TEW652BRP_FW,tew-652brp,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-080609-05"))
$(eval $(call SingleProfile,Cameo913x,$(fs_squash),TEW652BRP_RECOVERY,tew-652brp-recovery,TEW-632BRP,ttyS0,115200,"AP81-AR9130-RT-070614-02"))
$(eval $(call SingleProfile,Cameo933x,$(fs_squash),TEW712BR,tew-712br,TEW-712BR,ttyATH0,115200,"HORNET-RT-TEW712BR-3"))
$(eval $(call SingleProfile,CyberTAN,$(fs_64k),WRT160NL,wrt160nl,WRT160NL,ttyS0,115200,1.00.01))
$(eval $(call SingleProfile,DIR825B1,$(fs_64k),DIR825B1,dir-825-b1,DIR-825-B1,ttyS0,115200,01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00))
$(eval $(call SingleProfile,DIR825B1,$(fs_64k),TEW673GRU,tew-673gru,TEW-673GRU,ttyS0,115200,01AP94-AR7161-RT-080619-01,00AP94-AR7161-RT-080619-01))
$(eval $(call SingleProfile,DLRTDEV,$(fs_64k),DLRTDEV01,dlrtdev01,DIR-825-B1,ttyS0,115200,01AP94-AR7161-RT-080619-00,00AP94-AR7161-RT-080619-00))
$(eval $(call SingleProfile,MyLoader,$(fs_64k),WP543_2M,wp543,,ttyS0,115200,0x200000,2M))
$(eval $(call SingleProfile,MyLoader,$(fs_64k),WP543_4M,wp543,,ttyS0,115200,0x400000,4M))
$(eval $(call SingleProfile,MyLoader,$(fs_64k),WP543_8M,wp543,,ttyS0,115200,0x800000,8M))
$(eval $(call SingleProfile,MyLoader,$(fs_64k),WP543_16M,wp543,,ttyS0,115200,0x1000000,16M))
$(eval $(call SingleProfile,MyLoader,$(fs_64k),WPE72_4M,wpe72,,ttyS0,115200,0x400000,4M))
$(eval $(call SingleProfile,MyLoader,$(fs_64k),WPE72_8M,wpe72,,ttyS0,115200,0x800000,8M))
$(eval $(call SingleProfile,MyLoader,$(fs_64k),WPE72_16M,wpe72,,ttyS0,115200,0x1000000,16M))
$(eval $(call SingleProfile,Netgear,$(fs_64k),WNDR3700V1,wndr3700,WNDR3700,ttyS0,115200,$$(wndr3700_mtdlayout),3700,WNDR3700,"" NA,))
$(eval $(call SingleProfile,Netgear,$(fs_64k),WNDR3700V2,wndr3700v2,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),3701,WNDR3700v2,"",-H 29763654+16+64))
$(eval $(call SingleProfile,Netgear,$(fs_64k),WNDR3800,wndr3800,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),3701,WNDR3800,"",-H 29763654+16+128))
$(eval $(call SingleProfile,Netgear,$(fs_64k),WNDRMAC,wndrmac,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),3701,WNDRMAC,"",-H 29763654+16+64))
$(eval $(call SingleProfile,Netgear,$(fs_64k),WNDRMACV2,wndrmacv2,WNDR3700,ttyS0,115200,$$(wndr3700v2_mtdlayout),3701,WNDRMACv2,"",-H 29763654+16+128))
$(eval $(call SingleProfile,OpenMesh,$(fs_squash),OM2P,om2p,,,,OM2P))
$(eval $(call SingleProfile,OpenMesh,$(fs_squash),MR600,mr600,,,,MR600))
$(eval $(call SingleProfile,PB4X,$(fs_128k),ALL0305,all0305,ALL0305,ttyS0,115200))
$(eval $(call SingleProfile,PB4X,$(fs_128k),EAP7660D,eap7660d,EAP7660D,ttyS0,115200))
$(eval $(call SingleProfile,PB4X,$(fs_64k),JA76PF,ja76pf,JA76PF,ttyS0,115200))
$(eval $(call SingleProfile,PB4X,$(fs_64k),JA76PF2,ja76pf2,JA76PF2,ttyS0,115200))
$(eval $(call SingleProfile,PB4X,$(fs_64k),JWAP003,jwap003,JWAP003,ttyS0,115200))
$(eval $(call SingleProfile,PB4X,$(fs_64k),PB42,pb42,PB42,ttyS0,115200))
$(eval $(call SingleProfile,PB4X,$(fs_64k),PB44,pb44,PB44,ttyS0,115200))
$(eval $(call SingleProfile,Planex,$(fs_64k),MZKW04NU,mzk-w04nu,MZK-W04NU,ttyS0,115200))
$(eval $(call SingleProfile,Planex,$(fs_64k),MZKW300NH,mzk-w300nh,MZK-W300NH,ttyS0,115200))
$(eval $(call SingleProfile,TPLINKOLD,$(fs_squash),TLWR841NV15,tl-wr841nd-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3220,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3420,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA901NV1,tl-wa901nd-v1,TL-WA901ND,ttyS0,115200,0x09010001,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA901NV2,tl-wa901nd-v2,TL-WA901ND-v2,ttyS0,115200,0x09010002,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR740NV1,tl-wr740n-v1,TL-WR741ND,ttyS0,115200,0x07400001,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR740NV3,tl-wr740n-v3,TL-WR741ND,ttyS0,115200,0x07400003,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR741NV1,tl-wr741nd-v1,TL-WR741ND,ttyS0,115200,0x07410001,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR741NV2,tl-wr741nd-v2,TL-WR741ND,ttyS0,115200,0x07410001,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR743,tl-wr743nd-v1,TL-WR741ND,ttyS0,115200,0x07430001,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR841NV3,tl-wr841nd-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR841NV5,tl-wr841nd-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR841NV7,tl-wr841nd-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR842,tl-wr842n-v1,TL-MR3420,ttyS0,115200,0x08420001,1,8M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV2,tl-wr941nd-v2,TL-WR941ND,ttyS0,115200,0x09410002,2,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV3,tl-wr941nd-v3,TL-WR941ND,ttyS0,115200,0x09410002,2,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV4,tl-wr941nd-v4,TL-WR741ND,ttyS0,115200,0x09410004,1,4M))
$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR1043,tl-wr1043nd-v1,TL-WR1043ND,ttyS0,115200,0x10430001,1,8M))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR11U,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3020,tl-mr3020-v1,TL-MR3020,ttyATH0,115200,0x30200001,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3040,tl-mr3040-v1,TL-MR3040,ttyATH0,115200,0x30400001,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR740NV4,tl-wr740n-v4,TL-WR741ND-v4,ttyATH0,115200,0x07400004,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR741NV4,tl-wr741nd-v4,TL-WR741ND-v4,ttyATH0,115200,0x07410004,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV8,tl-wr841n-v8,TL-WR841N-v8,ttyS0,115200,0x08410008,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR3600V1,tl-wdr3600-v1,TL-WDR4300,ttyS0,115200,0x36000001,1,8Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR4300V1,tl-wdr4300-v1,TL-WDR4300,ttyS0,115200,0x43000001,1,8Mlzma))
$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR4310V1,tl-wdr4310-v1,TL-WDR4300,ttyS0,115200,0x43100001,1,8Mlzma))
$(eval $(call SingleProfile,UBDEV,$(fs_64k),UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,XM,XM,ar7240))
$(eval $(call SingleProfile,UBNT,$(fs_64k),UBNTRS,ubnt-rs,UBNT-RS,ttyS0,115200,RS,RSx,ar7100))
$(eval $(call SingleProfile,UBNT,$(fs_64k),UBNTRSPRO,ubnt-rspro,UBNT-RSPRO,ttyS0,115200,RSPRO,RSPRO,ar7100pro))
$(eval $(call SingleProfile,UBNT,$(fs_64k),UBNTLSSR71,ubnt-ls-sr71,UBNT-LS-SR71,ttyS0,115200,LS-SR71,LS-SR71,ar7100))
$(eval $(call SingleProfile,UBNTXM,$(fs_64k),RW2458N,rw2458n,RW2458N,ttyS0,115200,XM,XM,ar7240))
$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTAIRROUTER,ubnt-airrouter,UBNT-AR,ttyS0,115200,XM,XM,ar7240))
$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTBULLETM,ubnt-bullet-m,UBNT-BM,ttyS0,115200,XM,XM,ar7240))
$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTROCKETM,ubnt-rocket-m,UBNT-RM,ttyS0,115200,XM,XM,ar7240))
$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTNANOM,ubnt-nano-m,UBNT-NM,ttyS0,115200,XM,XM,ar7240))
$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTUNIFI,ubnt-unifi,UBNT-UF,ttyS0,115200,XM,XM,ar7240))
$(eval $(call SingleProfile,UBNTXM,$(fs_64k),UBNTUNIFIOUTDOOR,ubnt-unifi-outdoor,UBNT-U20,ttyS0,115200,XM,XM,ar7240))
$(eval $(call SingleProfile,WHRHPG300N,$(fs_64k),WHRG301N,whr-g301n,WHR-G301N,ttyS0,115200,$$(whrhpg300n_mtdlayout),WHR-G301N))
$(eval $(call SingleProfile,WHRHPG300N,$(fs_64k),WHRHPG300N,whr-hp-g300n,WHR-HP-G300N,ttyS0,115200,$$(whrhpg300n_mtdlayout),WHR-HP-G300N))
$(eval $(call SingleProfile,WHRHPG300N,$(fs_64k),WHRHPGN,whr-hp-gn,WHR-HP-GN,ttyS0,115200,$$(whrhpg300n_mtdlayout),WHR-HP-GN))
$(eval $(call SingleProfile,WHRHPG300N,$(fs_64k),WLAEAG300N,wlae-ag300n,WLAE-AG300N,ttyS0,115200,$$(whrhpg300n_mtdlayout),WLAE-AG300N))
$(eval $(call SingleProfile,WRT400N,$(fs_64k),WRT400N,wrt400n,WRT400N,ttyS0,115200))
$(eval $(call SingleProfile,WZRHPG30XNH,$(fs_128k),WZRHPG300NH,wzr-hp-g300nh,WZR-HP-G300NH,ttyS0,115200,WZR-HP-G300NH))
$(eval $(call SingleProfile,WZRHPG30XNH,$(fs_64k),WZRHPG300NH2,wzr-hp-g300nh2,WZR-HP-G300NH2,ttyS0,115200,WZR-HP-G300NH2))
$(eval $(call SingleProfile,WZRHPG30XNH,$(fs_64k),WZRHPAG300H,wzr-hp-ag300h,WZR-HP-AG300H,ttyS0,115200,WZR-HP-AG300H))
$(eval $(call SingleProfile,WZRHPG30XNH,$(fs_64k),WZRHPG450H,wzr-hp-g450h,WZR-HP-G450H,ttyS0,115200,WZR-HP-AG450H))
$(eval $(call SingleProfile,Zcomax,$(fs_64k),ZCN1523H28,zcn-1523h-2-8,ZCN-1523H-2,ttyS0,115200,$$(zcn1523h_mtdlayout)))
$(eval $(call SingleProfile,Zcomax,$(fs_64k),ZCN1523H516,zcn-1523h-5-16,ZCN-1523H-5,ttyS0,115200,$$(zcn1523h_mtdlayout)))
$(eval $(call SingleProfile,ZyXEL,$(fs_64k),NBG_460N_550N_550NH,nbg460n_550n_550nh,NBG460N,ttyS0,115200,NBG-460N))
$(eval $(call MultiProfile,AP121,AP121_2M AP121_4M))
$(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT))
$(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
$(eval $(call MultiProfile,TLWA901,TLWA901NV1 TLWA901NV2))
$(eval $(call MultiProfile,TLWA7510,TLWA7510NV1))
$(eval $(call MultiProfile,TLWR740,TLWR740NV1 TLWR740NV3 TLWR740NV4))
$(eval $(call MultiProfile,TLWR741,TLWR741NV1 TLWR741NV2 TLWR741NV4))
$(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7 TLWR841NV8))
$(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4))
$(eval $(call MultiProfile,TLWDR4300,TLWDR3600V1 TLWDR4300V1 TLWDR4310V1))
$(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTUNIFI UBNTUNIFIOUTDOOR))
$(eval $(call MultiProfile,WNDR3700,WNDR3700V1 WNDR3700V2 WNDR3800 WNDRMAC WNDRMACV2))
$(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
$(eval $(call MultiProfile,WPE72,WPE72_4M WPE72_8M WPE72_16M))
$(eval $(call MultiProfile,Default,$(SINGLE_PROFILES)))
$(eval $(call MultiProfile,Minimal,$(SINGLE_PROFILES)))
$(eval $(call MultiProfile,Madwifi,EAP7660D UBNTRS UBNTRSPRO UBNTLSSR71 WP543))
define Image/Build/squashfs
cp $(KDIR)/root.squashfs $(KDIR)/root.squashfs-raw
cp $(KDIR)/root.squashfs $(KDIR)/root.squashfs-64k
$(STAGING_DIR_HOST)/bin/padjffs2 $(KDIR)/root.squashfs-64k 64
cp $(KDIR)/root.squashfs-64k $(BIN_DIR)/$(IMG_PREFIX)-root.squashfs-64k
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
endef
define Image/Build/Initramfs
$(call Image/Build/Profile/$(PROFILE),initramfs)
endef
define Image/Prepare
gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
$(call CompressLzma,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.lzma)
$(call Image/BuildLoader,generic,elf)
$(call Image/Build/Profile/$(if $(CONFIG_IB),Default,$(PROFILE)),loader)
endef
define Image/Build
$(call Image/Build/$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
$(call Image/Build/Profile/$(PROFILE),$(1))
endef
cus227_cmdline=
cus227_mtdlayout=
define Image/Build/Profile/CUS227/squashfs
$(call PatchKernelLzma,cus227,$(cus227_cmdline) $(cus227_mtdlayout))
dd if=$(KDIR_TMP)/vmlinux-cus227.bin.lzma of=$(KDIR_TMP)/vmlinux-cus227.bin.lzma.tmp bs=1441716 conv=sync
$(call MkuImage,lzma,,$(KDIR_TMP)/vmlinux-cus227.bin.lzma.tmp:$(KDIR)/root.squashfs-raw,image.release.tmp)
dd if=image.release.tmp of=$(call imgname,firmware,cus227) bs=128k conv=sync
rm image.release.tmp
{ \
md5sumstr=`dd if=$(call imgname,firmware,cus227) 2>/dev/null | md5sum - | cut -d ' ' -f 1 | sed -e 's/../\\\\x&/g'`; \
printf $$$${md5sumstr} | dd bs=512 conv=sync; \
cat $(call imgname,firmware,cus227); \
} > $(call sysupname,$(1),cus227).release
mv $(call sysupname,$(1),cus227).release $(call sysupname,$(1),cus227)
$(LINUX_DIR)/scripts/dtc/dtc -O dtb -o $(BIN_DIR)/cus227.dtb -I dts $(PLATFORM_DIR)/cus227.dts
endef
define Image/Build/Profile/CUS227
$(Image/Build/Profile/CUS227/$(1))
endef
SINGLE_PROFILES += CUS227
define Image/Build/Profile/QSDK_Wired_Router
$(call Image/Build/Profile/AP135,$(1))
$(call Image/Build/Profile/AP136,$(1))
$(call Image/Build/Profile/RUBBERDUCK,$(1))
endef
define Image/Build/Profile/QSDK_Premium_Router
$(call Image/Build/Profile/AP135,$(1))
$(call Image/Build/Profile/AP135DUAL,$(1))
endef
define Image/Build/Profile/QSDK_Open_Router
$(call Image/Build/Profile/AP121_16M,$(1))
endef
$(eval $(call BuildImage))
| Java |
<?php
/*
* FileCtrl.class.php -- file system control
*
* Copyright 2011 World Three Technologies, Inc.
* 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
*
* Written by Yaxing Chen <Yaxing@masxaro.com>
*
*/
class FileCtrl{
}
?> | Java |
/*
* Copyright 2006-2020 The MZmine Development Team
*
* This file is part of MZmine.
*
* MZmine 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.
*
* MZmine 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 MZmine; if not,
* write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
package io.github.mzmine.parameters.parametertypes.ranges;
import java.text.NumberFormat;
import java.util.Collection;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import com.google.common.collect.Range;
import io.github.mzmine.parameters.UserParameter;
public class DoubleRangeParameter implements UserParameter<Range<Double>, DoubleRangeComponent> {
private final String name, description;
protected final boolean valueRequired;
private final boolean nonEmptyRequired;
private NumberFormat format;
private Range<Double> value;
private Range<Double> maxAllowedRange;
public DoubleRangeParameter(String name, String description, NumberFormat format) {
this(name, description, format, true, false, null);
}
public DoubleRangeParameter(String name, String description, NumberFormat format,
Range<Double> defaultValue) {
this(name, description, format, true, false, defaultValue);
}
public DoubleRangeParameter(String name, String description, NumberFormat format,
boolean valueRequired, Range<Double> defaultValue) {
this(name, description, format, valueRequired, false, defaultValue);
}
public DoubleRangeParameter(String name, String description, NumberFormat format,
boolean valueRequired, boolean nonEmptyRequired, Range<Double> defaultValue) {
this(name, description, format, valueRequired, nonEmptyRequired, defaultValue, null);
}
public DoubleRangeParameter(String name, String description, NumberFormat format,
boolean valueRequired, boolean nonEmptyRequired, Range<Double> defaultValue, Range<Double> maxAllowedRange) {
this.name = name;
this.description = description;
this.format = format;
this.valueRequired = valueRequired;
this.nonEmptyRequired = nonEmptyRequired;
this.value = defaultValue;
this.maxAllowedRange = maxAllowedRange;
}
/**
* @see io.github.mzmine.data.Parameter#getName()
*/
@Override
public String getName() {
return name;
}
/**
* @see io.github.mzmine.data.Parameter#getDescription()
*/
@Override
public String getDescription() {
return description;
}
public boolean isValueRequired() {
return valueRequired;
}
@Override
public DoubleRangeComponent createEditingComponent() {
return new DoubleRangeComponent(format);
}
public Range<Double> getValue() {
return value;
}
@Override
public void setValue(Range<Double> value) {
this.value = value;
}
@Override
public DoubleRangeParameter cloneParameter() {
DoubleRangeParameter copy = new DoubleRangeParameter(name, description, format);
copy.setValue(this.getValue());
return copy;
}
@Override
public void setValueFromComponent(DoubleRangeComponent component) {
value = component.getValue();
}
@Override
public void setValueToComponent(DoubleRangeComponent component, Range<Double> newValue) {
component.setValue(newValue);
}
@Override
public void loadValueFromXML(Element xmlElement) {
NodeList minNodes = xmlElement.getElementsByTagName("min");
if (minNodes.getLength() != 1)
return;
NodeList maxNodes = xmlElement.getElementsByTagName("max");
if (maxNodes.getLength() != 1)
return;
String minText = minNodes.item(0).getTextContent();
String maxText = maxNodes.item(0).getTextContent();
double min = Double.valueOf(minText);
double max = Double.valueOf(maxText);
value = Range.closed(min, max);
}
@Override
public void saveValueToXML(Element xmlElement) {
if (value == null)
return;
Document parentDocument = xmlElement.getOwnerDocument();
Element newElement = parentDocument.createElement("min");
newElement.setTextContent(String.valueOf(value.lowerEndpoint()));
xmlElement.appendChild(newElement);
newElement = parentDocument.createElement("max");
newElement.setTextContent(String.valueOf(value.upperEndpoint()));
xmlElement.appendChild(newElement);
}
@Override
public boolean checkValue(Collection<String> errorMessages) {
if (valueRequired && (value == null)) {
errorMessages.add(name + " is not set properly");
return false;
}
if (value != null) {
if (!nonEmptyRequired && value.lowerEndpoint() > value.upperEndpoint()) {
errorMessages.add(name + " range maximum must be higher than minimum, or equal");
return false;
}
if (nonEmptyRequired && value.lowerEndpoint() >= value.upperEndpoint()) {
errorMessages.add(name + " range maximum must be higher than minimum");
return false;
}
}
if (value != null && maxAllowedRange != null) {
if (maxAllowedRange.intersection(value) != value) {
errorMessages.add(name + " must be within " + maxAllowedRange.toString());
return false;
}
}
return true;
}
}
| Java |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CRAN - Package PoiClaClu</title>
<link rel="stylesheet" type="text/css" href="../../CRAN_web.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
table td { vertical-align: top; }
</style>
</head>
<body>
<h2>PoiClaClu: Classification and clustering of sequencing data based on a
Poisson model</h2>
<p>Implements the methods described in the paper, Witten (2011) Classification and Clustering of Sequencing Data using a Poisson Model, Annals of Applied Statistics 5(4) 2493-2518.</p>
<table summary="Package PoiClaClu summary">
<tr>
<td>Version:</td>
<td>1.0.2</td>
</tr>
<tr>
<td>Published:</td>
<td>2013-12-02</td>
</tr>
<tr>
<td>Author:</td>
<td>Daniela Witten</td>
</tr>
<tr>
<td>Maintainer:</td>
<td>Daniela Witten <dwitten at u.washington.edu></td>
</tr>
<tr>
<td>License:</td>
<td><a href="../../licenses/GPL-2">GPL-2</a></td>
</tr>
<tr>
<td>NeedsCompilation:</td>
<td>no</td>
</tr>
<tr>
<td>CRAN checks:</td>
<td><a href="../../checks/check_results_PoiClaClu.html">PoiClaClu results</a></td>
</tr>
</table>
<h4>Downloads:</h4>
<table summary="Package PoiClaClu downloads">
<tr>
<td> Reference manual: </td>
<td> <a href="PoiClaClu.pdf"> PoiClaClu.pdf </a> </td>
</tr>
<tr>
<td> Package source: </td>
<td> <a href="../../../src/contrib/PoiClaClu_1.0.2.tar.gz"> PoiClaClu_1.0.2.tar.gz </a> </td>
</tr>
<tr>
<td> Windows binaries: </td>
<td> r-devel: <a href="../../../bin/windows/contrib/3.5/PoiClaClu_1.0.2.zip">PoiClaClu_1.0.2.zip</a>, r-release: <a href="../../../bin/windows/contrib/3.4/PoiClaClu_1.0.2.zip">PoiClaClu_1.0.2.zip</a>, r-oldrel: <a href="../../../bin/windows/contrib/3.3/PoiClaClu_1.0.2.zip">PoiClaClu_1.0.2.zip</a> </td>
</tr>
<tr>
<td> OS X El Capitan binaries: </td>
<td> r-release: <a href="../../../bin/macosx/el-capitan/contrib/3.4/PoiClaClu_1.0.2.tgz">PoiClaClu_1.0.2.tgz</a> </td>
</tr>
<tr>
<td> OS X Mavericks binaries: </td>
<td> r-oldrel: <a href="../../../bin/macosx/mavericks/contrib/3.3/PoiClaClu_1.0.2.tgz">PoiClaClu_1.0.2.tgz</a> </td>
</tr>
<tr>
<td> Old sources: </td>
<td> <a href="../../../src/contrib/Archive/PoiClaClu"> PoiClaClu archive </a> </td>
</tr>
</table>
<h4>Reverse dependencies:</h4>
<table summary="Package PoiClaClu reverse dependencies">
<tr>
<td>Reverse imports:</td>
<td><a href="../RNAseqNet/index.html">RNAseqNet</a></td>
</tr>
</table>
<h4>Linking:</h4>
<p>Please use the canonical form
<a href="https://CRAN.R-project.org/package=PoiClaClu"><samp>https://CRAN.R-project.org/package=PoiClaClu</samp></a>
to link to this page.</p>
</body>
</html>
| Java |
//----------------------------------------------------------------------------
#pragma hdrstop
#include <stdio.h>
#include <memory>
#include "uCM.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma classgroup "Vcl.Controls.TControl"
#pragma resource "*.dfm"
TCM *CM;
//---------------------------------------------------------------------------
__fastcall TCM::TCM(TComponent* Owner)
: TDataModule(Owner)
{
FInstanceOwner = true;
}
__fastcall TCM::~TCM()
{
delete FSMClient;
}
TSMClient* TCM::GetSMClient(void)
{
if (FSMClient == NULL)
FSMClient= new TSMClient(DSRestConnection1, FInstanceOwner);
return FSMClient;
};
| Java |
# testrepository
this is a test repository
| Java |
package Lacuna::DB::Result::Building::SSLa;
use Moose;
use utf8;
no warnings qw(uninitialized);
extends 'Lacuna::DB::Result::Building';
use Lacuna::Constants qw(ORE_TYPES INFLATION);
around 'build_tags' => sub {
my ($orig, $class) = @_;
return ($orig->($class), qw(Construction Ships));
};
use constant university_prereq => 20;
use constant max_instances_per_planet => 1;
use constant controller_class => 'Lacuna::RPC::Building::SSLa';
use constant image => 'ssla';
use constant name => 'Space Station Lab (A)';
use constant food_to_build => 230;
use constant energy_to_build => 350;
use constant ore_to_build => 370;
use constant water_to_build => 260;
use constant waste_to_build => 100;
use constant time_to_build => 60 * 2;
use constant food_consumption => 5;
use constant energy_consumption => 20;
use constant ore_consumption => 15;
use constant water_consumption => 6;
use constant waste_production => 20;
before 'can_demolish' => sub {
my $self = shift;
my $sslb = $self->body->get_building_of_class('Lacuna::DB::Result::Building::SSLb');
if (defined $sslb) {
confess [1013, 'You have to demolish your Space Station Lab (B) before you can demolish your Space Station Lab (A).'];
}
};
before can_build => sub {
my $self = shift;
if ($self->x == 5 || $self->y == -5 || (($self->y == 1 || $self->y == 0) && ($self->x == -1 || $self->x == 0))) {
confess [1009, 'Space Station Lab cannot be placed in that location.'];
}
};
sub makeable_plans {
return {
command => 'Lacuna::DB::Result::Building::Module::StationCommand',
ibs => 'Lacuna::DB::Result::Building::Module::IBS',
art => 'Lacuna::DB::Result::Building::Module::ArtMuseum',
opera => 'Lacuna::DB::Result::Building::Module::OperaHouse',
food => 'Lacuna::DB::Result::Building::Module::CulinaryInstitute',
parliament => 'Lacuna::DB::Result::Building::Module::Parliament',
warehouse => 'Lacuna::DB::Result::Building::Module::Warehouse',
policestation => 'Lacuna::DB::Result::Building::Module::PoliceStation',
};
}
sub makeable_plans_formatted {
my $self = shift;
my @out;
my $makeable_plans = $self->makeable_plans;
while (my ($type, $class) = each %{$makeable_plans}) {
push @out, {
image => $class->image,
name => $class->name,
url => $class->controller_class->app_url,
type => $type,
};
}
return \@out;
}
sub level_costs_formatted {
my $self = shift;
my $max = $self->max_level;
return [] if $max == 0;
my @costs;
my $resource_cost = $self->plan_resource_cost;
my $time_cost = $self->plan_time_cost;
foreach my $level (1..$max) {
my $resource = $self->plan_cost_at_level($level, $resource_cost);
push @costs, {
level => $level,
ore => $resource,
water => $resource,
energy => $resource,
food => $resource,
waste => sprintf('%.0f', $resource/4),
time => $self->plan_time_at_level($level, $time_cost),
};
}
return \@costs;
}
has plan_resource_cost => (
is => 'rw',
lazy => 1,
default => sub {
my $self = shift;
return 40000 * ((100 - (5 * $self->body->empire->research_affinity)) / 100);
}
);
has plan_time_cost => (
is => 'rw',
lazy => 1,
default => sub {
my $self = shift;
return 1200 * ((100 - (5 * $self->body->empire->management_affinity)) / 100);
}
);
sub plan_time_at_level {
my ($self, $level, $base) = @_;
my $time_cost = sprintf('%.0f', $base * (INFLATION ** $level));
$time_cost = 15 if ($time_cost < 15);
$time_cost = 5184000 if ($time_cost > 5184000);
return $time_cost;
}
sub plan_cost_at_level {
my ($self, $level, $base) = @_;
my $cost = sprintf('%.0f', $base * (INFLATION ** $level));
return $cost;
}
has max_level => (
is => 'rw',
lazy => 1,
default => sub {
my $self = shift;
my $level = $self->level;
my $body = $self->body;
foreach my $part (qw(b c d)) {
my $building = $body->get_building_of_class('Lacuna::DB::Result::Building::SSL'.$part);
if (defined $building) {
$level = ($level > $building->level) ? $building->level : $level;
}
else {
$level = 0;
last;
}
}
return $level;
},
);
sub can_make_plan {
my ($self, $type, $level) = @_;
if ($self->is_working) {
confess [1010, 'The Space Station Lab is already making a plan.'];
}
$level ||= 1;
if ($level > $self->max_level) {
confess [1013, 'This Space Station Lab is not a high enough level to make that plan.'];
}
my $makeable = $self->makeable_plans;
unless ($type ~~ [keys %{$makeable}]) {
confess [1009, 'Cannot make that type of plan.'];
}
my $resource_cost = $self->plan_cost_at_level($level, $self->plan_resource_cost);
my $fraction = sprintf('%.0f',$resource_cost * 0.01);
my $body = $self->body;
foreach my $ore (ORE_TYPES) {
if ($body->type_stored($ore) < $fraction) {
confess [1011, 'Not enough '.$ore.' in storage. You need at least '.$fraction.'.'];
}
}
foreach my $resource (qw(ore water food energy)) {
if ($body->type_stored($resource) < $resource_cost) {
confess [1011, 'Not enough '.$resource.' in storage. You need at least '.$resource_cost.'.'];
}
}
return 1;
}
sub make_plan {
my ($self, $type, $level) = @_;
$level ||= 1;
my $makeable = $self->makeable_plans;
my $resource_cost = $self->plan_cost_at_level($level, $self->plan_resource_cost);
my $time_cost = $self->plan_time_at_level($level, $self->plan_time_cost);
my $body = $self->body;
$body->spend_ore($resource_cost);
$body->spend_water($resource_cost);
$body->spend_food($resource_cost, 0);
$body->spend_energy($resource_cost);
$body->add_waste($resource_cost/4);
$body->update;
$self->start_work({
class => $makeable->{$type},
level => $level,
}, $time_cost)->update;
}
before finish_work => sub {
my $self = shift;
my $planet = $self->body;
$planet->add_plan($self->work->{class}, $self->work->{level});
};
no Moose;
__PACKAGE__->meta->make_immutable(inline_constructor => 0);
| Java |
/* HexChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
* 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 St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef HEXCHAT_ASCII_HPP
#define HEXCHAT_ASCII_HPP
void ascii_open (void);
#endif
| Java |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title>Local Test</title>
</head>
<body>
<h2>Tutorial/Prototype</h2>
<ol>
<li><a href="minigames/tutorial/lock/index.html">Lock</a></li>
<li><a href="minigames/tutorial/click_and_drag/index.html">Click and Drag</a></li>
<li><a href="minigames/bioinfo/whereis/index.html">Where is ?</a></li>
<li><a href="minigames/bioinfo/to/index.html">to</a></li>
</ol>
</body>
</html>
| Java |
<?php
/*******************************************************************************
Copyright 2021 Whole Foods Co-op
This file is part of CORE-POS.
IT CORE 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.
IT CORE 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
in the file license.txt along with IT CORE; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*********************************************************************************/
/**
@class MercatoOrdersModel
*/
class MercatoNotesModel extends BasicModel
{
protected $name = "MercatoNotes";
protected $columns = array(
'mercatoNoteID' => array('type'=>'INT', 'primary_key'=>true, 'increment'=>true),
'name' => array('type'=>'VARCHAR(255)', 'index'=>true),
'modified' => array('type'=>'DATETIME'),
'note' => array('type'=>'TEXT'),
);
}
| Java |
/*
* RapidMiner
*
* Copyright (C) 2001-2008 by Rapid-I and the contributors
*
* Complete list of developers available at our web site:
*
* http://rapid-i.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
package com.rapidminer.gui.tools;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Frame;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.SwingUtilities;
import javax.swing.Timer;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
/**
* Some utils for the creation of a modal progress monitor dialog.
*
* @author Santhosh Kumar, Ingo Mierswa
* @version $Id: ProgressUtils.java,v 1.3 2008/05/09 19:22:59 ingomierswa Exp $
*/
public class ProgressUtils {
static class MonitorListener implements ChangeListener, ActionListener {
private ProgressMonitor monitor;
private Window owner;
private Timer timer;
private boolean modal;
public MonitorListener(Window owner, ProgressMonitor monitor, boolean modal) {
this.owner = owner;
this.monitor = monitor;
this.modal = modal;
}
public void stateChanged(ChangeEvent ce) {
ProgressMonitor monitor = (ProgressMonitor) ce.getSource();
if (monitor.getCurrent() != monitor.getTotal()) {
if (timer == null) {
timer = new Timer(monitor.getWaitingTime(), this);
timer.setRepeats(false);
timer.start();
}
} else {
if (timer != null && timer.isRunning())
timer.stop();
monitor.removeChangeListener(this);
}
}
public void actionPerformed(ActionEvent e) {
monitor.removeChangeListener(this);
ProgressDialog dlg = owner instanceof Frame ? new ProgressDialog((Frame) owner, monitor, modal) : new ProgressDialog((Dialog) owner, monitor, modal);
dlg.pack();
dlg.setLocationRelativeTo(null);
dlg.setVisible(true);
}
}
/** Create a new (modal) progress monitor dialog. Please note the the value for total (the maximum
* number of possible steps) is greater then 0 even for indeterminate progresses. The value
* of waitingTime is used before the dialog is actually created and shown. */
public static ProgressMonitor createModalProgressMonitor(Component owner, int total, boolean indeterminate, int waitingTimeBeforeDialogAppears, boolean modal) {
ProgressMonitor monitor = new ProgressMonitor(total, indeterminate, waitingTimeBeforeDialogAppears);
Window window = owner instanceof Window ? (Window) owner : SwingUtilities.getWindowAncestor(owner);
monitor.addChangeListener(new MonitorListener(window, monitor, modal));
return monitor;
}
}
| Java |
#pragma once
// Description:
// Notification interface for loading and saving configuration.
//
// Copyright (C) 2001 Frank Becker
//
// 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
//
#include <string>
#include <fstream>
class ConfigHandler
{
public:
//when reading the config file, registered ConfigHandlers
//will be notified for each line read.
virtual void handleLine( const std::string line) = 0;
//when writing the config file, registered ConfigHandlers
//will be notified with the out file stream
virtual void save( std::ofstream &of) = 0;
virtual ~ConfigHandler() {}
};
| Java |
#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;
}
| Java |
/* 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);
}
| Java |
<?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>
| Java |
/***************************************************************************
* 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;
}
| Java |
-- 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 ;
| Java |
#-------------------------------------------------------------------------------
# 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] | Java |
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);
}
| Java |
<?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' )
)
)
) );
| Java |
/*
* *************************************************************************************
* 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]);
}
}
| Java |
/*
* 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
);
| Java |
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;
}
}
}
| Java |
<?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`)');
?>
| Java |
/* 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, ¶meter_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, ¶meter_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, ¶meter_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);
}
| Java |
/* $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;
}
| Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.