Portmapping Example
CommPortIdentifier enumeration:
In the above portmap.conf configuration (based on the hypothetical architecture diagram),
javax.comm clients would get a different view (shown below) of comm. ports, depending upon whether
the user was logged into a Sun Ray or logged into the srver via the console or by ssh, rsh or telnet
to the server. Also affecting the ports revealled would be whether the application was running as
root, or as non-root. The following depicts various views of available ports as seen from various
client contexts. See the Portmapping C onfiguration Guide for more information.
* Using the 'spillover' feature is not advised under normal circumstances because it depends on
the order of enumeration of dongles, which can vary, depending upon vendor name for the
device, and upon which USB ports and which hubs dongles are connected to. Thus when
multiple dongles are connected to a single Sun Ray DTU, they may be prone to unwanted
distruption (ie. movement by the user), and will require significantly more work to determine
the order of their enumeration. With a single dongle of sufficient capacity, there is no ambiguity.
IMPORTANT NOTE: Currently portmapping of Sun Ray ports depends on $UTDEVROOT environment
Variable, which is setup by Sun Ray Server Software when a session is created. If $UTDEVROOT
has an incorrect value or is removed due to using 'su -', or 'sudo', or for any other reason,
portmapping may not work properly. Dependency on $UTDEVROOT may go away with a future
patch to Sun Ray server (SRSS) software.
Data Logger
Sun Ray
“Teller2”
00:03:ba:3c:0f:2d
Server
/dev/term/a /dev/ecpp0
C entral
Printer
Sun Ray
“Teller1”
00:03:ba:44:e6:6b
4-serport
1-parport
dongle “xyz”
2-port
dongle
1 2
2-port
dongle
1 2
C ash
Drawer
SigPad
Sig Pad
C ash
Drawer
Printer
Hypothetical Architecture
31 2 14
**
* utcom5 ALN 'spills over' to port 3 of 2
nd
dongle
** Even though the Data Logging device is connected to
the server, in this hypothetical scenario, imagine that
the wire is long so that it sits next to Teller1
*
Server
Printer
/dev/term/a
Server (root)
Printer
/dev/term/a
Teller1_cash
Teller1_sigpad
Teller2_cash
Teller2_sigpad
Teller2_printer
Teller1
C entral_Printer
Data_logger
local_cash
local_sigpad
Teller1 (root)
C entral_Printer
Data_logger
local_cash
local_sigpad
Teller1_cash
Teller1_sigpad
Teller2_cash
Teller2_sigpad
Teller2_printer
Teller2
C entral_Printer
local_cash
local_sigpad
local_printer
local_spillover
xyzdongle@1
xyzdongle@2
xyzdongle@4
Teller2 (root)
C entral_Printer
local_cash
local_sigpad
local_printer
local_spillover
xyzdongle@1
xyzdongle@2
xyzdongle@4
Teller1_cash
Teller1_sigpad
Teller2_cash
Teller2_sigpad
Teller2_printer
# portmap.conf
# -------------------------------------------------
# DTU Aliases
Teller1 = IEEE802.0003ba44e65b
Teller2 = 00:03:ba:3c:0f:2d
# Globally visible (to Sun Rays) server side port
C entral_Printer = *:/dev/ecpp0
# Sun Ray Session independent Path Aliases
Printer = /dev/ecpp0
# DTU Assigned server side port
Data_Logger = Teller1:/dev/term/a
# DTU Specific ALNs for DTU named 'Teller1'
Teller1_cash = Teller1:utcom1
Teller1_sigpad = Teller1:utcom2
# DTU Specific ALNs for DTU named 'Teller2'
Teller2_cash = Teller2:utcom1
Teller2_sigpad = Teller2:utcom2
Teller2_printer = Teller2:utprt1
# Session Local ALNs (unbound to specific DTU):
local_cash = utcom1
local_sigpad = utcom2
local_spillover = utcom5
local_printer = utprt1
评论1