Permalink
Browse files

*** empty log message ***

  • Loading branch information...
1 parent 52e5e02 commit 8597c131be7b06a23d3980e424dd67250b0d7b71 lukeg committed Feb 21, 2003
Showing with 35,685 additions and 3 deletions.
  1. +12 −3 lib/Makefile
  2. +2 −0 lib/ermacs/src/Makefile
  3. +97 −0 lib/rpc/examples/bootparam/bootparam_prot.x
  4. +94 −0 lib/rpc/examples/epmd/epmd.erl
  5. +41 −0 lib/rpc/examples/epmd/epmd.x
  6. +132 −0 lib/rpc/examples/epmd/epmd_server.erl
  7. +5 −0 lib/rpc/examples/epmd/epmd_test.erl
  8. +41 −0 lib/rpc/examples/erl/erl.x
  9. +26 −0 lib/rpc/examples/erl/erl2xdr.erl
  10. +132 −0 lib/rpc/examples/klm/klm_prot.x
  11. +161 −0 lib/rpc/examples/mount/mount.x
  12. +161 −0 lib/rpc/examples/mount2/mount2.x
  13. +249 −0 lib/rpc/examples/mount3/mount3.x
  14. +355 −0 lib/rpc/examples/nfs2/nfs_prot.x
  15. +935 −0 lib/rpc/examples/nfs3/nfs_prot3.x
  16. +179 −0 lib/rpc/examples/nlm/nlm_prot.x
  17. +229 −0 lib/rpc/examples/r-commands/rex.x
  18. +61 −0 lib/rpc/examples/r-commands/rquota.x
  19. +145 −0 lib/rpc/examples/r-commands/rstat.x
  20. +223 −0 lib/rpc/examples/r-commands/rusers.x
  21. +22 −0 lib/rpc/examples/simple/simple.x
  22. +116 −0 lib/rpc/examples/sm_inter/sm_inter.x
  23. +84 −0 lib/rpc/examples/spray/spray.x
  24. +46 −0 lib/rpc/examples/stack/makefile.stack
  25. +169 −0 lib/rpc/examples/stack/stack.c
  26. +102 −0 lib/rpc/examples/stack/stack.erl
  27. +15 −0 lib/rpc/examples/stack/stack.x
  28. +65 −0 lib/rpc/examples/stack/stack_client.erl
  29. +49 −0 lib/rpc/examples/stack/stack_program.c
  30. +41 −0 lib/rpc/examples/test/test3.x
  31. +66 −0 lib/rpc/examples/test/test3_tester.c
  32. +126 −0 lib/rpc/examples/test/test_prog1_2.erl
  33. +37 −0 lib/rpc/examples/yp/inet_yp.erl
  34. +291 −0 lib/rpc/examples/yp/yp.x
  35. +12 −0 lib/rpc/examples/yp/yp_dom.c
  36. +69 −0 lib/rpc/examples/yp/yppasswd.x
  37. +82 −0 lib/rpc/examples/yp/ypupdate_prot.x
  38. +61 −0 lib/rpc/src/Makefile
  39. +10 −0 lib/rpc/src/erpcgen.app.src
  40. +791 −0 lib/rpc/src/erpcgen.erl
  41. +8 −0 lib/rpc/src/erpcgen.rel.src
  42. +89 −0 lib/rpc/src/erpcgen.src
  43. +115 −0 lib/rpc/src/pmap.erl
  44. +65 −0 lib/rpc/src/pmap.x
  45. +10 −0 lib/rpc/src/rpc.app.src
  46. +136 −0 lib/rpc/src/rpc.x
  47. +700 −0 lib/rpc/src/rpc_client.erl
  48. +429 −0 lib/rpc/src/rpc_server.erl
  49. +184 −0 lib/rpc/src/xdr.yrl
  50. +78 −0 lib/rpc/src/xdr_auth.erl
  51. +157 −0 lib/rpc/src/xdr_scan.erl
  52. +1,047 −0 lib/rpc/src/xdrgen.erl
  53. +121 −0 lib/rpc/test/test.erl
  54. +51 −0 lib/rpc/test/test.x
  55. 0 lib/xmerl/ebin/.empty
  56. +214 −0 lib/xmerl/inc/xmerl.hrl
  57. +26 −0 lib/xmerl/inc/xmerl_xlink.hrl
  58. +17 −0 lib/xmerl/priv/testdata/a_and_c.xml
  59. +7,023 −0 lib/xmerl/priv/testdata/all_well.xml
  60. +11,568 −0 lib/xmerl/priv/testdata/femdygnsprognos.xml
  61. +7 −0 lib/xmerl/priv/testdata/m1.erl
  62. +7 −0 lib/xmerl/priv/testdata/m2.erl
  63. +7 −0 lib/xmerl/priv/testdata/m3.erl
  64. +7 −0 lib/xmerl/priv/testdata/m4.erl
  65. +27 −0 lib/xmerl/priv/testdata/play.dtd
  66. +20 −0 lib/xmerl/priv/testdata/simple.xml
  67. +6 −0 lib/xmerl/priv/testdata/test.xml
  68. +8 −0 lib/xmerl/priv/testdata/test2.xml
  69. +8 −0 lib/xmerl/priv/testdata/test3.xml
  70. +9 −0 lib/xmerl/priv/testdata/test4.xml
  71. +9 −0 lib/xmerl/priv/testdata/test5.xml
  72. +17 −0 lib/xmerl/priv/testdata/testdtd.dtd
  73. +111 −0 lib/xmerl/priv/testdata/topic_maps.dtd
  74. +102 −0 lib/xmerl/src/Makefile
  75. +55 −0 lib/xmerl/src/test.erl
  76. +225 −0 lib/xmerl/src/test_html.erl
  77. +6 −0 lib/xmerl/src/xmerl.app.src
  78. +265 −0 lib/xmerl/src/xmerl.erl
  79. +177 −0 lib/xmerl/src/xmerl_eventp.erl
  80. +122 −0 lib/xmerl/src/xmerl_html.erl
  81. +166 −0 lib/xmerl/src/xmerl_lib.erl
  82. +2,665 −0 lib/xmerl/src/xmerl_scan.erl
  83. +54 −0 lib/xmerl/src/xmerl_text.erl
  84. +61 −0 lib/xmerl/src/xmerl_xlate.erl
  85. +65 −0 lib/xmerl/src/xmerl_xml.erl
  86. +704 −0 lib/xmerl/src/xmerl_xpath.erl
  87. +313 −0 lib/xmerl/src/xmerl_xpath_parse.yrl
  88. +668 −0 lib/xmerl/src/xmerl_xpath_pred.erl
  89. +319 −0 lib/xmerl/src/xmerl_xpath_scan.erl
  90. +310 −0 lib/xmlrpc/doc/xmlrpc.3
  91. +253 −0 lib/xmlrpc/doc/xmlrpc.txt
  92. 0 lib/xmlrpc/ebin/.empty
  93. +39 −0 lib/xmlrpc/examples/DateClient.java
  94. +17 −0 lib/xmlrpc/examples/EchoClient.java
  95. +20 −0 lib/xmlrpc/examples/FibClient.java
  96. +27 −0 lib/xmlrpc/examples/Makefile
  97. +154 −0 lib/xmlrpc/examples/README
  98. +59 −0 lib/xmlrpc/examples/date_server.erl
  99. +12 −0 lib/xmlrpc/examples/echo_server.erl
  100. +16 −0 lib/xmlrpc/examples/fib_server.erl
  101. +47 −0 lib/xmlrpc/examples/validator.erl
  102. +14 −0 lib/xmlrpc/src/Makefile
  103. +106 −0 lib/xmlrpc/src/tcp_serv.erl
  104. +191 −0 lib/xmlrpc/src/xmlrpc.erl
  105. +38 −0 lib/xmlrpc/src/xmlrpc.hrl
  106. +209 −0 lib/xmlrpc/src/xmlrpc_decode.erl
  107. +148 −0 lib/xmlrpc/src/xmlrpc_encode.erl
  108. +206 −0 lib/xmlrpc/src/xmlrpc_http.erl
  109. +37 −0 lib/xmlrpc/src/xmlrpc_util.erl
View
@@ -1,8 +1,17 @@
-LIBS := tuntap lersp slang ermacs
+LIBS := \
+ enfs \
+ ermacs \
+ slang \
+ lersp \
+ msc \
+ rpc \
+ tuntap \
+ xmerl \
+ xmlrpc
all: $(LIBS)
-clean conf:
+clean:
@for dir in $(LIBS); do \
if [ ! -e $@/SKIP ]; then \
(cd $$dir; $(MAKE) $@) \
@@ -16,7 +25,7 @@ $(LIBS):
# Dependencies between programs.
-ermacs: slang
+ermacs: slang msc
.PHONY: $(LIBS)
View
@@ -19,3 +19,5 @@ clean:
-rm -f $(ERL_OBJECTS)
-rm -f ../bin/ermacs
+$(ERL_OBJECTS): $(ERL_HEADERS)
+
@@ -0,0 +1,97 @@
+/* @(#)bootparam_prot.x 2.1 88/08/01 4.0 RPCSRC */
+/* @(#)bootparam_prot.x 1.2 87/06/24 Copyr 1987 Sun Micro */
+
+/*
+ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+ * unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part. Users
+ * may copy or modify Sun RPC without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun RPC is provided with no support and without any obligation on the
+ * part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+/*
+ * RPC for bootparms service.
+ * There are two procedures:
+ * WHOAMI takes a net address and returns a client name and also a
+ * likely net address for routing
+ * GETFILE takes a client name and file identifier and returns the
+ * server name, server net address and pathname for the file.
+ * file identifiers typically include root, swap, pub and dump
+ */
+
+#ifdef RPC_HDR
+%#include <rpc/types.h>
+%#include <sys/time.h>
+%#include <sys/errno.h>
+%#include <nfs/nfs.h>
+#endif
+
+const MAX_MACHINE_NAME = 255;
+const MAX_PATH_LEN = 1024;
+const MAX_FILEID = 32;
+const IP_ADDR_TYPE = 1;
+
+typedef string bp_machine_name_t<MAX_MACHINE_NAME>;
+typedef string bp_path_t<MAX_PATH_LEN>;
+typedef string bp_fileid_t<MAX_FILEID>;
+
+struct ip_addr_t {
+ char net;
+ char host;
+ char lh;
+ char impno;
+};
+
+union bp_address switch (int address_type) {
+ case IP_ADDR_TYPE:
+ ip_addr_t ip_addr;
+};
+
+struct bp_whoami_arg {
+ bp_address client_address;
+};
+
+struct bp_whoami_res {
+ bp_machine_name_t client_name;
+ bp_machine_name_t domain_name;
+ bp_address router_address;
+};
+
+struct bp_getfile_arg {
+ bp_machine_name_t client_name;
+ bp_fileid_t file_id;
+};
+
+struct bp_getfile_res {
+ bp_machine_name_t server_name;
+ bp_address server_address;
+ bp_path_t server_path;
+};
+
+program BOOTPARAMPROG {
+ version BOOTPARAMVERS {
+ bp_whoami_res BOOTPARAMPROC_WHOAMI(bp_whoami_arg) = 1;
+ bp_getfile_res BOOTPARAMPROC_GETFILE(bp_getfile_arg) = 2;
+ } = 1;
+} = 100026;
@@ -0,0 +1,94 @@
+%%% Copyright (c) 2000, 2001 Sendmail, Inc. All rights reserved.
+%%% File : epmd.erl
+%%% Author : Tony Rogvall <tony@erix.ericsson.se>
+%%% Purpose : EPMD interface
+%%% Created : 20 Aug 1997 by Tony Rogvall <tony@erix.ericsson.se>
+
+-module(epmd).
+-author('tony@erix.ericsson.se').
+
+-export([clnt_open/1, clnt_open/2, clnt_close/1]).
+-export([null/1, getport/4, set/5, unset/5, dump/1, dump_fmt/1]).
+
+-include("epmd.hrl").
+
+
+clnt_open(Host) ->
+ clnt_open(Host, tcp).
+
+clnt_open(Host, Proto) ->
+ case pmap:clnt_open(Host) of
+ {ok, Clnt} ->
+ case pmap:getport(Clnt, ?EPMD_PROG, ?EPMD_VERS, Proto) of
+ {ok, Port} ->
+ clnt_open(Host, Port, Proto);
+ Error ->
+ pmap:close(Clnt),
+ Error
+ end;
+ Error -> Error
+ end.
+
+clnt_open(Host, Port, Proto) ->
+ rpc_clnt:open(tcp, {Host,Port}, null).
+
+clnt_close(Clnt) ->
+ rpc_clnt:close(Clnt).
+
+proto(tcp) -> ?IPPROTO_TCP;
+proto(udp) -> ?IPPROTO_UDP.
+
+null(Clnt) ->
+ epmd_clnt:epmdproc_null(Clnt).
+
+getport(Clnt, Prog, Vers, Proto) ->
+ NProto = proto(Proto),
+ epmd_clnt:epmdproc_getport_2(Clnt,{Prog, Vers, NProto,0}).
+
+set(Clnt,Prog,Vers,Proto,Port) ->
+ NProto = proto(Proto),
+ epmd_clnt:epmdproc_set_2(Clnt,{Prog, Vers, NProto, Port}).
+
+unset(Clnt, Prog,Vers,Proto,Port) ->
+ NProto = proto(Proto),
+ epmd_clnt:epmdproc_unset_2(Clnt,{Prog, Vers, NProto, Port}).
+
+dump(Clnt) ->
+ case epmd_clnt:epmdproc_dump_2(Clnt) of
+ {ok, Map} -> {ok, dump_list(Map)};
+ Error -> Error
+ end.
+
+dump_fmt(Clnt) ->
+ case dump(Clnt) of
+ {ok, List} -> fmt_list(List);
+ Error -> Error
+ end.
+
+fmt_list(List) ->
+ io:format(" ~-10s -10s ~-10s ~-5s ~-5s~n",
+ ["node", "service", "version", "proto", "port"]),
+ io:format(" ~s~n", [lists:duplicate(33,$-)]),
+ lists:foreach(
+ fun({Node,Service,Ver,Proto,Port}) ->
+ io:format(" ~-10s ~-10s ~-10w ~-5s ~-5w~n",
+ [Node, Service, Ver, Proto, Port])
+ end, List).
+
+dump_list({Mapping, Next}) ->
+ case Mapping of
+ {Node, Service, Ver, ?IPPROTO_TCP, Port} ->
+ [ {Node, Service, Ver,tcp, Port} | dump_list(Next) ];
+ {Node, Service, Ver,?IPPROTO_UDP, Port} ->
+ [ {Node, Service, Ver,udp,Port} | dump_list(Next) ];
+ _ ->
+ [Mapping | dump_list(Next)]
+ end;
+dump_list(void) ->
+ [].
+
+
+
+
+
+
@@ -0,0 +1,41 @@
+/*
+** Erlang port mapper deamon (EPMD) protocol
+** Copyright (c) 2000, 2001 Sendmail, Inc. All rights reserved.
+*/
+
+struct mapping {
+ string node<>;
+ string service<>;
+ unsigned int vers;
+ unsigned int prot;
+ unsigned int port;
+};
+
+/*
+ * Supported values for the "prot" field
+ */
+const IPPROTO_TCP = 6; /* protocol number for TCP/IP */
+const IPPROTO_UDP = 17; /* protocol number for UDP/IP */
+
+/*
+** A list of mappings
+*/
+struct *pmaplist {
+ mapping map;
+ pmaplist next;
+};
+
+/*
+** EPMD procedures (NOTE change program number when registered!!!)
+*/
+
+program EPMD_PROG {
+ version EPMD_VERS {
+ void EPMDPROC_NULL(void) = 0;
+ bool EPMDPROC_SET(mapping) = 1;
+ bool EPMDPROC_UNSET(mapping) = 2;
+ unsigned int EPMDPROC_GETPORT(mapping) = 3;
+ pmaplist EPMDPROC_DUMP(void) = 4;
+ } = 1;
+} = 0x20000002;
+
Oops, something went wrong.

0 comments on commit 8597c13

Please sign in to comment.