aboutsummaryrefslogtreecommitdiff
path: root/sys/ki/kisend.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/ki/kisend.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/ki/kisend.x')
-rw-r--r--sys/ki/kisend.x33
1 files changed, 33 insertions, 0 deletions
diff --git a/sys/ki/kisend.x b/sys/ki/kisend.x
new file mode 100644
index 00000000..5b3f17d4
--- /dev/null
+++ b/sys/ki/kisend.x
@@ -0,0 +1,33 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <mach.h>
+include "ki.h"
+
+# KI_SEND -- Encode the packet in the kii common in a machine independent form
+# and send it over the network.
+
+int procedure ki_send (server, opcode, subcode)
+
+int server # node index of server process
+int opcode # function opcode
+int subcode # function subcode (for drivers)
+
+int status
+include "kii.com"
+
+begin
+ p_opcode = opcode
+ p_subcode = subcode
+
+ # Encode the packet in machine independent form, i.e., LEN_INTFIELDS
+ # 32 bit MII integers followed by p_sbuflen chars, one char per byte.
+
+ call miipak32 (FIRSTINTFIELD, p_packet, LEN_INTFIELDS, TY_INT)
+ call chrpak (p_sbuf, 1, p_packet, LEN_INTFIELDS * 4 + 1, p_sbuflen + 1)
+
+ # Transmit the packet.
+ call ks_awrite (server, p_packet, SZB_PACKET)
+ call ks_await (server, status)
+
+ return (status)
+end