[White Paper]
T-Engine Forum
Ubiquitous ID Center
Document
DRAFT
910-S202-01.A0.01/UID-00005-1.A0.01
2008-10-23

Simplified ucode Resolution Protocol

T-Engine Forum
Ubiquitous ID Center Specification

Number:Title:
Status:Date:

910-S202-01.A0.01/UID-00005-1.A0.01

910-S202-01.A0.01/UID-00005-1.A0.010
Simplified ucode Resolution Protocol[X ] Working Draft, [ ] Final Draft for Voting, [ ] Standard
2008/10/23

Copyright (C) 2008, T-Engine Forum, Ubiquitous ID Center, all rights reserved.

2

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Table of Content
Introduction........................................................................................................................................................................ 4
Scope................................................................................................................................................................................ 4
Position of this Document ....................................................................................................................................... 4
Reference Documents ............................................................................................................................................... 4
Definition of Terms......................................................................................................................................................... 4
1. Objective ....................................................................................................................................................................... 6
1.1. Definition................................................................................................................................................................. 6
1.2. Objective................................................................................................................................................................. 6
2. ucode Resolution Server ...................................................................................................................................... 7
2.1. ucode Resolution Server .................................................................................................................................. 7
2.2. ucode Resolution Database............................................................................................................................. 7
2.2.1. Data Model..................................................................................................................................................... 7
2.3. ucode Resolution ...............................................................................................................................................112.3.1. Basic Behavior ...........................................................................................................................................112.3.2. Search Algorithm.......................................................................................................................................122.3.3. Cascade Search.........................................................................................................................................13
2.3.4. Cache Search .............................................................................................................................................15
2.3.5. Proxy Server...............................................................................................................................................15
2.3.6. ucode Resolution Gateway....................................................................................................................15
2.4. Retrieval Content ..............................................................................................................................................16
3. Packet Structure and Commands of ucode Resolution Protocol...................................................173.1. Overview ...............................................................................................................................................................173.2. Command..............................................................................................................................................................173.3. Packet Structure...............................................................................................................................................173.4. Code Definition...................................................................................................................................................18
3.5. Command Specification ..................................................................................................................................18
3.5.1. res_ucd...........................................................................................................................................................18

3

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Simplified ucode Resolution Protocol
Introduction
ScopeThis document specifies a simplified ucode resolution protocol to retrieve
the storage location or access method of information associated with “objects”
or “locations” (called “ucode resolution information”) according to ucodes(ubiquitous codes) assigned to “objects” and “locations.”

Position of this Document
This document specifies a simplified ucode resolution protocol.

Pleaserefer to [2] on the “ucode resolution protocol (standard version)” based on“ubiquitous ID architecture” [1].

Reference Documents[1] T-Engine Forum, Ubiquitous ID Center, “Ubiquitous ID Architecture,”
910-S002/UID-00002, 2006.
[2] T-Engine Forum, Ubiquitous ID Center, “ucode Resolution Protocol(Standard version),” 910-S221/UID-00008, 2006.
[3] T-Engine Forum, Ubiquitous ID Center, "Ubiquitous Code: ucode,"
930-S101/UID-00010, 2006.
[4] T-Engine Forum, Ubiquitous ID Center, “ucode Resolution Gateway, "930-S204/UID-00007, 2006.
[5] RFC3986, “Uniform Resource Idnetifier (URI) : Generic Syntax, " 2005.
[6] RFC952, “DOD Internet Host Table Specification, " 1985.

Definition of Termszucode
An identifier (ID) for the purpose of identifying "objects" and "locations" inthe real world.

z

Ubiquitous Communicator (UC)A user terminal that communicates with ucode tags and that provides afunction of information services based on ucodes.
4T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

5

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

1. Objective
1.1. Definition
The ucode resolution protocol (ucodeRP) is defined as a database search
protocol for retrieving the storage location or access method of information
associated with the identified 'objects' or 'locations' from the ucodes which
identify 'objects' or 'locations' in the real world.

This “information” includes

IPv4 and IPv6 addresses, a URL, an e-mail address, a telephone number, andetc.

1.2. Objective
In the ubiquitous ID architecture, the ucode written in the ucode tag realizes
the identification of 'objects' or 'locations.'

The realization of the identification

is not goal in itself. The large number of applications identify 'objects' or'locations', and then they will go on to look for the information associated with
the identified 'object' or 'location' (for example, the contentuch as 'how to use
the object' or 'a map of the location').

As the ucode tag does not have a large

storage capacity in general, contents are often stored outside of the tag, forexample, in a server with a large storage capacity on the network. The ucode
resolution server manages a mapping database to associate ucodes withstorage locations of content called a ucode resolution database and provides amechanism to resolve content locations by ucodes. The ucode resolution
protocol (ucodeRP) is specified as an access protocol to the ucode resolution
server.
The user can access the ucode resolution server using the ucodeRP,
retrieve location information and an access method of the content stored
outside the tag, and access the actual content based on the retrieved
information.

6

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

2. ucode Resolution Server
2.1. ucode Resolution Server
The ucode resolution server takes an important role in the ubiquitous ID
architecture, which manages association between each ucode and content
location.

Due to the ucode characteristic of identifying the “objects” or“locations”, the ucode resolution server needs to manage a unlimitedly large
number of ucodes.

The ucode resolution server consequently offrers themechanism to support the explosive increase of ucodes by multiple servers'
distributed management.

The ucode resolution servers have a multi-layered

tree configuration, and upper servers are assumed to be operated by countries
or the ISO, and lower servers by enterprises or individuals.
Note that association between the ucode and its content location is referred
to as ucode resolution information in this document.

The ucode resolution

information is stored in a ucode resolution database.

2.2. ucode Resolution Database
2.2.1. Data Model
The ucode resolution database, which manages the ucode resolution
information, consists of two elements: “data file” and its record, namely, “dataentry.”The ucode space to be each managed is allocated to the respectve
distributed ucode resolution servers.

Each ucode resolution server has a“data file” which indicates a ucode space to be managed, and specific ucode
resolution information is registered in a record called a “data entry,” in the data
file (Figure 1).

One or more data entries are registered in the data file, andthe ucode resolution information of each data entry should be within the ucode
space of the data file.
Data File #1
Data Entry #1-1
Data Entry #1-2
Data Entry #1-3.....

Figure 1: Relationship between Data File and Data Entry

7

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

In the ucode resolution database, the management of a large ucode spaceis decentralized with a hierarchical tree consisting of “data files” (Figure 2).
For example, data files managing a larger ucode space such as a top leveldomain (TLD) are placed in the upper layer, and data files managing smallerucode spaces such as a class code (CC), a second level domain (SLD), or
identification code (IC) are placed in the lower layer.

Each ucode resolution

server can manage one or more data files.
ucode Space
Data File #1
Management Space

Data File #3
Management Space

Data File #2
Management Space

Figure 2: Layering of Data Files
Table 1 shows an example of data file which the ucode resolution server
manages. In this example, the server manages two data files. In addition,
Table 2 shows data entries registered within the data file shown in Table 1. In
this example, three data entries are registered.
Table 1: Example of Data File
(1)
(2)
*1

dbucode0efffec000000000
0000000000040000
0efffec000000000
0000000000050000

dbmaskcascade_mode
ffffffffffffffff UIDC_NOCSC
ffffffffffff0000
ffffffffffffffff UIDC_CSC
ffffffffffff0000

Each record indicates one data file.

Table 2: Example of Data Entry (registered within the data file shown in Table 1)
ucode

ucodemask

attributever ttl(1) 0efffec000000000 ffffffffffffffff UIDC_ATTR_SS 1

00000000000050100 ffffffffffffff00(2) 0efffec000000000 ffffffffffffffff UIDC_ATTR_RS 1

data
http://www.uidcenter.org/

TYPE_URL

getinfo.cgi

3600 UIDC_DATA

192.168.10.1

TYPE_IPV40000000000050200 ffffffffffffff00(3) 0efffec000000000 ffffffffffffffff UIDC_ATTR_RS 2

0

UIDC_DATATYPE_IPV40000000000050300 ffffffffffffff00*2

datatype
UIDC_DATA

Each record indicates one data entry.

8

192.168.10.2

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

In the data file, the ucode space to be managed is specified by two values: adbucode and dbmask.

The value of dbucode & dbmask (& hereinaftermeans a bitwise logical AND) indicates the ucode space.

For example, thedata file shown in Table 1 indicates managing the ucode with the space of
0efffec00...0040000 - 0efffec00...004ffff.
In the data entry, similarly, the ucode space which the entry points is
specified by two values of the ucode and ucodemask.
ucodemask indicates the ucode space.

The value of ucode &For example, the data entry shown in

Table 2 indicates the ucode with the space of 0efffec00...0050200 0efffec00...00502ff.

ucode resolution information for the ucode space

specified by ucode & ucodemask is registered for each attribute from“attribute” to “data.”

In this manner, ucode resolution information is registeredin the data entry not for each ucode but for the ucode space.
Table 3 and Table 4 show the definition of a data file attribute and attributevalue.

Table 5 and Table 6 show the definition of a data entry attribute andattribute value.
Table 3: List of Data File Attributes
Data File Attribute
dbucodedbmaskcascade_mode

Meaning
ucode managed by data fileBitmask value indicating the effective bit of dbucode
Supporting mode in cascade connection

Table 4: Definition of Data File Attribute Values
Data File Attribute
cascade_mode

Attribute
Value
0x01

Macro

Meaning

UIDC_NOCSC

0x02

UIDC_CSC

Does not provide cascade searchfunction
Provides cascade search function
for the ucode resolution server

9T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Table 5: List of Data Entry Attributes
Data Entry Attribute
ucode
ucodemask
attribute
versionttl
datatype
data

Meaning
ucode indicated by data entry
Bitmask value indicating the effective bit of ucode
Type of the node which the data points
Data entry version
Cache expiration date of data entry (seconds)
Data display style
Storage location or access method of information
associated with the ucode

↑
|
ucode
resolution
information|↓

Table 6: Definition of Data Entry Attribute Values
Data
Entry
Attribute
attributedatatype

Attribute
Value

Macro

Meaning

0x0001

UIDC_ATTR_RS

0x00020x00030x00ff0x00010x00020x00030x00040x00110x00120x00130x00140x00210x0031
0x00fe0x00ff

UIDC_ATTR_SS
UIDC_ATTR_SIGS
UIDC_ATTR_USER
UIDC_DATATYPE_UCODE_128
UIDC_DATATYPE_UCODE_256
UIDC_DATATYPE_UCODE_384
UIDC_DATATYPE_UCODE_512
UIDC_DATATYPE_IPV4
UIDC_DATATYPE_IPV6
UIDC_DATATYPE_URL
UIDC_DATATYPE_HOST
UIDC_DATATYPE_EMAILUIDC_DATATYPE_PHONE
UIDC_DATATYPE_TXT
UIDC_DATATYPE_USER

ucode resolution server
address
Information server address
Signature server address
User defined address
128bit type ucode
256bit type ucode384bit type ucode
512bit type ucode
IPv4 address
IPv6 address
URL
Hostname
E-mail address
Telephone number
Text information
User-defined typeThe ucode resolution information registered in the data entry is mapping
information to associate with the ucode and its content location, typicallyholding the address of the server where content is stored.

This server iscalled an information server in this document.
As the data file is managed in the multilevel hierarchical structure, theinformation server address is not necessarily registered directly in the data
entry.

The ucode resolution server address which manages the data file of alower layer to be searched next may be registered in the data file of an upper
layer.
Thus, the ucode resolution database can be managed in the multilevel
hierarchical structure and uses a dynamic structure which does not assign
fixed information to a specific bit.

In addition, the database is logicallyindependent of the ucode allocation structure.
10T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

2.3. ucode Resolution
2.3.1. Basic Behavior
In the ubiquitous ID architecture, the ubiquitous communicator (UC)retrieves the ucode and then gets the information server address by searching
the ucode resolution database, and accesses content.

Therefore, thefunction to retrieve the ucode resolution database via network is required.
This section describes a search mechanism of the ucode resolution databaseusing the ucode as a search key.
Figure 3 shows the basic behavior of ucode resolution.

If the ucode

resolution server is in the multilevel hierarichical structure, UC recursively
queries the ucode resolution server while the ucode resolution server address
is returned.

Figure 3 shows the behavior when the ucode space consists ofthree levels of a TLD, CC field, and SLD.
Tag

UC
ucode
<1>----->

Server groupucode<2>-----------------------------><---------------------------------192.168.1.1

ucode resolution server
for managing a TLD
192.168.0.1

ucode<3>-----------------------------><-------------------------------192.168.2.1

ucode resolution server
for managing a CC field
192.168.1.1

ucode<4>-----------------------------><-------------------------------http://www.uidcenter.org/
getinfo.cgi

ucode resolution server
for managing an SLD
192.168.2.1

ucode
Information server<5>----------------------------->
http://www.uidcenter.org/<-------------------------------getinfo.cgi
Content<1> UC reads a ucode from a tag.
<2> UC sends the ucode to the ucode resolution server for managing a TLD and gets thelocation information (192.168.1.1) of the ucode resolution server for managing a CC field.
<3> UC sends the ucode to the ucode resolution server for managing a CC field and getsthe location information (192.168.2.1) of the ucode resolution server for managing an SLD.
<4> UC sends the ucode to the ucode resolution server for managing an SLD and gets thelocation information (http://www.uidcenter.org/getinfo.cgi) of the information server.
<5> UC sends the ucode to the information server and gets content.

Figure 3: Example of the Basic Behavior of ucode Resolution
The behavior of <2>-<4> is in accordance with the ucodeRP specification.

The ucode resolution server matches the received ucode with the holding
11

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

data file. If it is within the ucode space managed by the data file, then theserver searches the data entry and returns the search result to UC.

If thereturned ucode resolution information is another ucode resolution server
address, UC sends a ucode resolution request to the second ucode resolution
server (<3>, <4>).

if the returned ucode resolution information is an

information server address, UC gets the content from the information server(<5>).

Of these, the access protocol of <2>-<4> is specified as a ucodeRP.

2.3.2. Search Algorithm
This section describes a search algorithm for a data file and data entry when
the ucode resolution server receives a ucode resolution request from UC.
UC sends three parameters shown in Table 7 as part of ucode resolution
requests to the ucode resolution server.

Similar to a data file and data entry,

the ucode and maskbit should be specified for a search request.
Table 7: Parameters of a ucode Resolution Request
Parameter Namequeryucode
querymask
queryattribute

Meaning
Target ucode to be resolved
Bitmask which indicates the effective bit of a queryucode
ucode resolution information attribute to be acquired

When the ucode resolution server receives a ucode resolution request, firstit retrieves the target data file and then retrieves the data entry in the retrieved
data file.

The matching criteria are as follows:

1. Matching criteria of a data file
• A data file is chosen if (queryucode & querymask & dbmask) equals (dbucode &querymask & dbmask).
2. Matching criteria of a data entry (all of the following conditions should be met.)• A data entry is chosen for further matching if (queryucode & querymask & ucodemask)
equals (ucode & querymask & ucodemask) and (querymask & ucodemask) equals
ucodemask.
• A data entry is chosen as a final result if the queryattribute is equal to the attribute. If
there is no data entry whose attribute equals queryattribute, a data entry is chosen as a
final result if the attribute equals to UIDC_ATTR_RS. However, if the queryattribute is
UIDC_ATTR_ANONYMOUS, this data entry is unconditionally chosen.

The server returns a search failure if data file search fails.

If data filesearch is successful, but data entry search produces no results in the data file,the server returns a search failure.
12T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

If data entry search is successful, the ucode resolution server returns ucode
resolution information including the parameters shown in Table 8 to the client.
Table 8: Parameters of ucode Resolution Information
Parameter Namedataattributedataversion
ttl
datatype
data
returnmask
resolvemode

Meaning
Attribute of retrieved location information
Version of ucode resolution information
Effective period of ucode resolution information (seconds)
Type and format of retrieved location information
Retrieved location information
Bitmask value which indicates the bit used for resolution
Search mode of retrieved ucode resolution databaseucode resolution information involves the returnmask indicative of the bit
used for the resolution and the resolvemode indicative of the search mode as
well as ucode resolution information in the data entry.
Furthermore, if the search fails, the server may return the address of theserver (higher-level server, etc.) with which another search attempt may
succeed.

This document does not specify the selection criteria when multiple

data entries are retrieved.

2.3.3. Cascade Search
The ucode resolution server can support a cascade search function as wellas basic behaviors.

In the cascade search, the ucode resolution server

retrieves the ucode resolution databases, allowing the client with a poor
throughput speed or network connectivity to reduce the load.

This section

specifies the cascade search for the ucode resolution server.
Figure 4 shows an example of the behavior when the ucode resolution
server for managing a CC field executes the cascade search.

In the cascadesearch, UC can acquire an information server address with only one ucode
resolution request.

Tag

UC

Server group

13

T-Engine Forum
Ubiquitous ID Center Specificationucode<1>--------->

910-S202-01.A0.01/UID-00005-1.A0.01

ucode<2>------------------------------><------------------------------<5>
http://www.uidcenter.org/
getinfo.cgi

ucode resolution server
for managing a CC field
192.168.1.1<3>ucode
http://www.uidcenter.org/
getinfo.cgi<4>ucode resolution server
for managing an SLD
192.168.2.1

ucode<6>------------------------------><--------------------------------Content

Information server
http://www.uidcenter.org/
getinfo.cgi<1> UC reads a ucode from a tag.
<2> UC sends the ucode to the ucode resolution server for managing a CC field. Whenthe ucode resolution server for managing a CC field performs ucode resolution by using theucode, the server gets the address (192.168.2.1) of the ucode resolution server for
managing an SLD.
<3> The ucode resolution server for managing a CC field sends the ucode to the ucode
resolution server for managing an SLD. When the ucode resolution server for managing
an SLD performs ucode resolution by using the ucode, the server gets the location
information (http://www.uidcenter.org/getinfo.cgi) of the information server.
[4] The ucode resolution server for managing an SLD returns the search result(http://www.uidcenter.org/getinfo.cgi) to the ucode resolution server for managing a CC
field.
[5] The ucode resolution server for managing a CC field returns the search result(http://www.uidcenter.org/getinfo.cgi) to UC.
[6] UC sends the ucode to the information server and gets content.

Figure 4: Example of Cascade Search
The process from <2> to <5> is in accordance with ucodeRP specification.

The ucode resolution server for managing a CC field directly sends a searchrequest to the next ucode resolution server for managing an SLD to be queried(<3>).

Then, the ucode resolution server for managing a CC field simply

behaves as a resolution client against the ucode resolution server for
managing an SLD.

Note that Figure 4 shows an example that the ucode

resolution server is cascaded in two-tier configuration, but in general, an-tiered (n: positive integers) cascade is possible.
The ucode resolution server executes the cascade search if the following
conditions (logical conjunction) are satisfied:

14

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

1. A cascade connection is demanded in the search request.
2. Target data file to be searched supports the cascade connection function. That is, thevalue of cascade_mode is UIDC_CSC.
3. The address retrieved as a search result is a ucode resolution server address.

If an error response is returned from the resolution server which performs
the cascade search, the error response can be transferred to UC, or assuming
the cascade search is not executed, a usual search result can be returned.
Note that this document does not specify a cascade connection to theinformation server.

2.3.4. Cache Search
For an efficient search, the ucode resolution server or UC can cache theucode resolution information retrieved as a search result.

Furthermore,cache-only nodes such as a cache server can be installed.
However, when returning a cached response, it should be clearly indicatedthat it is a cached response.

In addition, the ttl field of each data entry

indicates a usable period of its cache, so the cache should not be utilized after
the valid period expires.

Note that the entry with ttl = 0 indicates anoncachable entry.
The client can specify whether or not returning a cached response ispermitted. A ucode resolution server should not return a cached response
against a search request that prohibits a cache response.

2.3.5. Proxy Server
In order to keep a UC network address, etc. confidential, you can access theucode resolution server through a proxy server.

This document does not

specify a proxy server.

2.3.6. ucode Resolution Gateway
The ucode resolution gateway can be installed to reduce the load on theclient with a poor throughput speed or network.

The ucode resolution

gateway receives a resolution request from the client, and after a series ofsearches are executed on the ucode resolution server or information server,
the last search result is returned to the client.

Functions and accessprotocols for the ucode resolution gateway are defined on [4].

15

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

2.4. Retrieval Content
UC accesses the content, based on the information server address retrievedby the ucode resolution.

UC can sometimes determine the access protocol

from the ucode resolution information.

For example, when the resolution

information is a URL type, an access protocol can be determined by thescheme information such as "http://."
In many cases, it is expected that the content varies depending on theucode, so the ucode can be passed as part of the query to the information
server.

The use of a CGI argument is one example of passing ucodes, etc.

For example, UC can send the following HTTP request to the information
server.
http://www.uidcenter.org/getinfo.cgi?ucode=0efffec0000000000000000000050123

16

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

3. Packet Structure and Commands of ucode Resolution Protocol
3.1. Overview
ucodeRP is a protocol that provides access to the ucode resolution
database. By using ucodeRP, UC can access the ucode resolution server
and get the ucode resolution information.

ucodeRP is a protocol at an

application layer and is designed to be independent of the protocols at lower
layers.

3.2. Command
Table 9 shows the list of ucodeRP commands defined in this document.
Table 9: List of ucodeRP Command
Commandnameres_ucd

Function
Retrieves a resolution result from the ucode resolution database

3.3. Packet Structure
The definition of the ucodeRP query packet structure is given in Figure 5,
and a ucodeRP return packet structure in Figure 6.

Parameters in all fields

are stored in a network byte order.
D0
Ver

D1
Serial
No

D2

D3

D4

Command ID

D5

Reserved

D6

D7

PL length

DATA
･･･

･･･

･･･

DATA

Field
Ver
Serial No

Meaning
Version of ucodeRP Fixed to 1
Identification number of a ucodeRP request A sender side canset it freely.
Command ID ucodeRP command code.
PL length
Total length of a ucodeRP packet (in 8 octet blocks) For
example, if it is 48 octets, PL length is 0x06.
DATA
Command parameter specified for each command.
Reserved
Fixed to zero.

Figure 5: ucodeRP Query Packet

17

T-Engine Forum
Ubiquitous ID Center Specification

D0
Ver

D1
SerialNo

D2

910-S202-01.A0.01/UID-00005-1.A0.01

D3

D4

Error Code

D5

Reserved

D6

D7

PL length

DATA
...

...

...

DATA

Field
Ver
Serial No

Meaning
Version of ucodeRP Fixed to 1.
Identification number of a ucodeRP response It should be
the value of Serial No. + 1 of a corresponding ucodeRP
request.
Termination status of a ucodeRP command.
Total length of a ucodeRP packet (in 8 octet blocks) For
example, if it is 48 octets, PL length is 0x0006.
Response parameter specified for each command.
Fixed to zero.

Error CodePL length
DATA
Reserved

Figure 6: ucodeRP Recieve Packet

3.4. Code Definition(1) Command CodeThe list of ucodeRP command codes is given in Table 10.
Table 10: List of a ucodeRP Command CodeCommand code
0x0001

Command nameres_ucd(2) Error code
The list of ucodeRP error codes is given Table 11.
Table 11: List of ucodeRP Error Codes
State
Normaltermination
Abort

Value
0x0000Macro
E_UIDC_OK

Meaning
Resolved successfully

0xffef0xffdf0xffcc

E_UIDC_NOSPTE_UIDC_PAR
E_UIDC_NOEXS

Unsupported function
Parameter error
Entry nonexistent* If resolvemode == UIDC_RSMODE_CASCADE, error code is returned from the resolution
server which performs the cascade search.

3.5. Command Specification
3.5.1. res_ucd(1) Function Overview
18

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

This function queries the ucode resolution database using by the specified
ucode as a key and returns the ucode resolution information.

(2) Query Parameters
Figure 7 shows the definition of the query packet structure of a res_ucd
command; Table 12 the list of query parameters; and Table 13 the parametervalue definition.
D0
Ver

D1
Serial
No

D2

D3

D4

D5

D7

Command ID

Reserved

PL length

queryattributeucodetype

Reserveducodelengthtquerymode

D6

queryucode(0)queryucode(1)
･･･

･･･

･･･

querymask(0)querymask(1)
･･･

･･･

･･･

Figure 7: Query Packet of a res_ucd Command
Table 12: List of Query Parameters
Fieldtquerymodequeryattributeucodetypeucodelength
queryucode
querymask
Reserved

Meaning
Command send time (cumulative seconds since 0:00 AM,
Jan. 1, 2000) (Greenwich Mean Time)
Search mode of the ucode resolution database
Data attribute to be retrieved
ucode type to be retrieved
Total length of a queryucode/querymask (byte)
ucode to be retrieved
Bitmask value which indicates the effective bit of the ucode
fixed to zero19

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Table 13: Definition of Query Parameter Values
Parameter
querymode(specified by logicaldisjunction)
queryattributeucodetype

queryucode
querymask

Value
0x00000x0001Macro
UIDC_RSMODE_RESOLUTIONUIDC_RSMODE_CACHE

Description
Instructs ucode resolution
Permits a cache search

0x00020x00000x0001

UIDC_RSMODE_CASCADEUIDC_ATTR_ANONYMOUSUIDC_ATTR_RS

0x0002

UIDC_ATTR_SS

0x00030x00ff0x00010x00020x00030x0004<ucodebinary><ucodebinary>UIDC_ATTR_SIGS
UID_USER
UID_128
UID_256
UID_384
UID_512-Permits a cascade search
Attribute not specified
ucode resolution server
address
Information
serveraddress
Signature server address
User defined address
128bit type ucode
256bit type ucode384bit type ucode
512bit type ucode
ucode binary value-

bitmask binary value<ucode binary> ::= 16(%x00-ff)*1 *2*1 : n<element> represents that a same element is repeated a specific decimal numberof times*2 : %x represents the hexadecimal value.

(3) Response Parameter
Figure 10 shows the definition of the response packet structure of a res_ucd
command; Table 14 the list of response parameters; and Table 15 theparameter value definition.

20

T-Engine Forum
Ubiquitous ID Center Specification

D0
Ver

D1
Serial
No

910-S202-01.A0.01/UID-00005-1.A0.01

D2

D3

D4

D6

D7

Error CodeReserved

PL length

dataattribute

Reserved
datatype

dataversion
datalengthttl
resolvemodeD5

data(0)...

...
data(N)...
0 paddingReserved

masklength

returnmask(0)returnmask(1)
...

...

...

Figure 8: Recieve Packet of a res_ucd Command
Table 14: List of Recieve Parameters
Field
ttl
dataversion
resolvemodedataattributedatatype
datalengthdatamasklength
returnmask
Reserved

Meaning
Expiration date of retrieved data (seconds)
Search data version
Search mode of the retrieved database
Retrieved data attribute
Retrieved data type and format
Retrieved data length
Retrieved data
Number of bytes of a returnmask
Bitmask value which indicates the bit used for resolution
Fixed to zero21

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Table 15: Definition of Recieve Parameter Values
Parameter
resolvemodeValue
0x0000Macro
UIDC_RSMODE_RESOLUTION(specified by logicaldisjunction)

0x0001

UIDC_RSMODE_CACHE

0x0002

UIDC_RSMODE_CASCADE

0x0001

UIDC_ATTR_RS

0x0002

UIDC_ATTR_SS

0x0003

UIDC_ATTR_SIGS

0x00ff

UID_USER

0x00010x00020x00030x00040x00110x00120x00130x00140x00210x0031
0x00fe0x00ff<data
value>

UIDC_DATATYPE_UCODE_128
UIDC_DATATYPE_UCODE_256
UIDC_DATATYPE_UCODE_384
UIDC_DATATYPE_UCODE_512
UIDC_DATATYPE_IPV4
UIDC_DATATYPE_IPV6
UIDC_DATATYPE_URL
UIDC_DATATYPE_HOST
UIDC_DATATYPE_EMAILUIDC_DATATYPE_PHONE
UIDC_DATATYPE_TXT
UIDC_DATATYPE_USER-

dataattributedatatypedata<data value> ::=<ucode binary> |<IPv4 address binary> |<IPv6 address binary> |<URI notation ASCII *1> |<Host notation ASCII *2> |*CHAR<IPv4 address binary> ::= 4(%x00-ff)<IPv6 address binary> ::= 16(%x00-ff)
CHAR = <US-ASCII character>*1 : Refer to [5]*2 : Refer to [6]22Description
Usual ucode
resolution response
Response by acache search
Response by acascade searchucode resolution
server address
Information server
address
Signature
serveraddressUser
definedaddress
128bit type ucode
256bit type ucode384bit type ucode
512bit type ucode
IPv4 address
IPv6 address
URL
Hostname
E-mail address
Telephone number
Text information
User defined type
Retrieved data itself; for UIDC_DATATYPE_UCODE_*; for UIDC_DATATYPE_IPV4; for UIDC_DATATYPE_IPV6; for UIDC_DATATYPE_URL; for UIDC_DATATYPE_HOST; for other types

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Appendix A. Construction/Behavior Example of ucode Resolution
Server
A.1. Construction Example of ucode Resolution Server
Here is an example of configuration when a ucode space is managed in thethree layers of a TLD (upper 20bits), CC field (Class Code: upper 24bits), and
SLD (upper 112bits), which respective data files are managed in different
ucode resolution servers. The hierarchical structure of the server group is
given in Figure 9.
ucode resolution
server for
managing a TLD(192.168.0.1)

Managing the field of TLD=0x0efff(0efff000...000 - 0effffff...fff)

ucode resolution
server for managing Managing the field of TLD=0x0efff/CC=0xe(0efffe000...000 - 0efffefff...fff)
a CC field(192.168.1.1)

ucode resolution
server for
managing an SLD(192.168.2.1)

Managing the field of
TLD=0x0efff/CC=0xe/SLD=0xc0
0...005(0efffec00...0050000 0efffec00...005ffff)

Information server

Providing content
http://www.uidcenter.org/
getinfo.cgi

Figure 9: Hierarchical Structure of the Server Group/(1) ucode Resolution Server for Managing a TLD
Shown is an example of construction of a data file managed by the ucode
resolution server for managing a TLD.

This data file manages the ucode

space of 0efff000...000 - 0effffff...fff.

In the data entry, the ucode

space of 0efffe000...000 - 0efffefff...fff is associated with the IPv4
address "192.168.1.1" which points at an IP address of the ucode resolution
server at a lower layer.

23

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Data Filedbucodedbmaskcascade_mode= 0efff000000000000000000000000000= fffff000000000000000000000000000= UIDC_NOCSC

Data Entry
ucode
ucodemask
attribute
versionttl
datatypedata= 0efffe00000000000000000000000000= ffffff00000000000000000000000000= 0x0001 (UIDC_ATTR_RS)= 0x0001= 0x00015180= 0x0011 (UIDC_DATATYPE_IPV4)= 0xC0A80101// Binary notation of "192.168.1.1"(2) ucode Resolution Server for Managing a CC field
Next is an example of construction of a data file managed by the ucode
resolution server for managing a CC field.

This data file manages the ucode

space of 0efffe000...0000 - 0efffefff...ffff.

In the data entry, theucode space of 0efffec00...0050000 - 0efffec00...005ffff is associatedwith the IPv4 address "192.168.2.1" which points at the ucode resolution
server of at a lower layer.
Data Filedbucodedbmaskcascade_mode= 0efffe00000000000000000000000000= ffffff00000000000000000000000000= UIDC_NOCSC

Data Entry
ucode
ucodemask
attribute
versionttl
datatypedata= 0efffec0000000000000000000050000= ffffffffffffffffffffffffffff0000= 0x0001 (UIDC_ATTR_RS)= 0x0001= 0x00015180= 0x0011 (UIDC_DATATYPE_IPV4)= 0xC0A80201// Binary notation of "192.168.2.1"(3) ucode Resolution Server for Managing an SLD
Here is an example of construction of a data file managed by the ucode
resolution server for managing an SLD.

This data file manages the ucode

space of 0efffec00... 0050000 - 0efffec00...005ffff.

In the data

entry, the ucode space of 0efffec00...0050100 - 0efffec00... 00501ff isassociated with the URL "http://www.uidcenter.org/getinfo.cgi" which is a CGI
script of the information server.

24

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Data Filedbucode = 0efffec0000000000000000000050000
dbmask = ffffffffffffffffffffffffffff0000
cascade = UIDC_NOCSC
Data Entry
ucode
ucodemask
attribute
versionttl
datatypedata= 0efffec0000000000000000000050100= ffffffffffffffffffffffffffffff00= 0x0002 (UIDC_ATTR_SS)= 0x0001= 0x00000000= 0x0013 (UIDC_DATATYPE_URL)= "http://www.uidcenter.org/getinfo.cgi"

A.2. Example of Behaviors of ucode Resolution
Here is an example of behaviors of ucode resolution of the configuration in
Figure 9.

The ucode to be passed to the resolution server is0efffec0000000000000000000050123.

(1) ucode Resolution Server for Managing a TLD
Here is an example of sending a ucode resolution request to the ucode
resolution server for managing a TLD and getting the address of the ucode
resolution server for managing a CC field.
Data Entry
ucode
ucodemask
attribute
versionttl
datatypedata= 0efffe00000000000000000000000000= ffffff00000000000000000000000000= 0x0001 (UIDC_ATTR_RS)= 0x0001= 0x00015180= 0x0011 (UIDC_DATATYPE_IPV4)= 0xC0A80101// Binary notation of "192.168.1.1"

Search Request
queryucode= 0efffec0000000000000000000050123

querymask= ffffffffffffffffffffffffffffffff

Search Result
attribute
versionttl
datatype
data
returnmask
resolvemode= 0x0001 (UIDC_ATTR_RS)= 0x0001= 0x00015180= 0x0011 (UIDC_DATATYPE_IPV4)= 0xC0A80101= ffffff00000000000000000000000000= 0x0000 (UIDC_RSMODE_RESOLUTION)

25

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

The ucode resolution is performed using the upper 24bit, and the IPv4
address "192.168.1.1" of the ucode resolution server for managing a CC fieldis returned as a search result.

(2) ucode Resolution Server for Managing a CC Field
Here is an example of sending a ucode resolution request to the ucode
resolution server for managing a CC, and getting the address of the ucode
resolution server for managing an SLD.
Data Entry
ucode
ucodemask
attribute
versionttl
datatypedata= 0efffec0000000000000000000050000= ffffffffffffffffffffffffffff0000= 0x0001 (UIDC_ATTR_RS)= 0x0001= 0x00015180= 0x0011 (UIDC_DATATYPE_IPV4)= 0xC0A80201// Binary notation of "192.168.2.1"

Search Request
queryucode
querymask= 0efffec0000000000000000000050123= ffffffffffffffffffffffffffffffff

Search Result
attribute
versionttl
datatype
data
returnmask
resolvemode= 0x0001 (UIDC_ATTR_RS)= 0x0001= 0x00015180= 0x0011 (UIDC_DATATYPE_IPV4)= 0xC0A80201= ffffffffffffffffffffffffffff0000= 0x0000 (UIDC_RSMODE_RESOLUTION)

The ucode resolution is performed using the upper 112bit, and the IPv4
address "192.168.2.1" of the ucode resolution server for managing an SLD isreturned as a search result.

(3) ucode Resolution Server for Managing an SLD
Here is an example of sending a ucode resolution request to the ucode
resolution server for managing an SLD and getting the address of theinformation server.

26

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Data Entry
ucode
ucodemask
attribute
versionttl
datatypedata= 0efffec0000000000000000000050100= ffffffffffffffffffffffffffffff00= 0x0002 (UIDC_ATTR_SS)= 0x0001= 0x00015180= 0x0013 (UIDC_DATATYPE_URL)= "http://www.uidcenter.org/getinfo.cgi"

Search Request
queryucode
querymask= 0efffec0000000000000000000050123= ffffffffffffffffffffffffffffffff

Search Result
attribute
versionttl
datatype
data
returnmask
resolvemode= 0x0002 (UIDC_ATTR_SS)= 0x0001= 0x00015180= 0x0013 (UIDC_DATATYPE_URL)= "http://www.uidcenter.org/getinfo.cgi"= ffffffffffffffffffffffffffffff00= 0x0000 (UIDC_RSMODE_RESOLUTION)

The ucode resolution is performed using the upper 120bit, and the URL,
"http://www.uidcenter.org/getinfo.cgi" of the information server is returned as asearch result.

27

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Index
Ｃ

Ｐ

Cascade Search ....................................................................13

Proxy Server...........................................................................15

ＤＵdata entry .................................................................................. 7

ucode Resolution Database ............................................... 7

data file....................................................................................... 7

ucode Resolution Gateway...............................................15
ucode Resolution Protocol.............................................. 6
ucode Resolution Server ................................................. 728

T-Engine Forum
Ubiquitous ID Center Specification

910-S202-01.A0.01/UID-00005-1.A0.01

Copyright (C) 2008, T-Engine Forum, Ubiquitous ID Center, all rights
reserved.
29