-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHOW-TO
More file actions
73 lines (55 loc) · 2.53 KB
/
HOW-TO
File metadata and controls
73 lines (55 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
IUCV HOW-TO
-----------
This device driver provides the user with the ability to write applications that use
the open/close/read/write/ioctl APIs to drive IUCV connections between users and CP
system services.
The driver will check for the presence of VM when loaded and will return -EACCES if
it's not detected.
The driver accepts a parameter "maxconn" at load time. This will define how many IUCV
device nodes are to be created. The default is 1.
Building Device Driver
----------------------
Issue the following command to build the driver module:
make -C /lib/modules/`uname -r`/build M=`pwd` SUBDIRS=`pwd` modules
Building Tools
---------------
Issue the following command to build the commands like hcp:
make tools
Prop Jr Command (propjr)
------------------------
The Prop Jr. application simply connects to the *MSG system service and listens for
incoming messages. It will display the message on the console as well as writing it
to syslog(). To run it use "make tools" to build the application, load the device
driver, and issue:
echo "*MSG" >/sys/devices/iucv/iucv0/target_user
sysfs Interaction
-----------------
The device driver creates several entries in the sysfs tree. Under the directory
/sys/devices/iucv there will be directories for every IUCV defined by the hotplug
agent. Under the directory will be files:
File Access Value Purpose
------------ ------ ----- --------------------------------
local r/w [0 | 1] Specifies whether only local connections are supported
msglimit r/w 0-255 Specifies the message limit for the connection
parmdata r/w [0 | 1] Specifies whether parameter data is supported
path ro Numeric Path ID of the connection
priority r/w [0 | 1] Specifies whether priority messages are supported
target_node r/w AlphaNum Node name of IUCV destination (or blank)
target_user r/w AlphaNum The target name of the user or service
An example of a typical interaction with these files is when an application wishes to
connect to a specific user. Prior to the application starting an entry is written to
target_user:
echo "*MSG" >/sys/devices/iucv/iucv0/target_user
The device driver will retrieve this information when the application opens the iucv
device and use it to connect to or accept connections from the target.
Files in this filesystem may only be written to by the superuser.
IOCTL Options
-------------
There are several IOCTL operations that may be performed:
- Set target class
- Get target class
- Set source class
- Get source class
- Set message tag
- Get message tag
- Set answer buffer size