diff options
Diffstat (limited to 'bootstrap/lib/kernel')
-rw-r--r-- | bootstrap/lib/kernel/ebin/kernel.app | 120 | ||||
-rw-r--r-- | bootstrap/lib/kernel/ebin/kernel.appup | 1 | ||||
-rw-r--r-- | bootstrap/lib/kernel/egen/.gitignore | 0 | ||||
-rw-r--r-- | bootstrap/lib/kernel/include/dist.hrl | 38 | ||||
-rw-r--r-- | bootstrap/lib/kernel/include/dist_util.hrl | 87 | ||||
-rw-r--r-- | bootstrap/lib/kernel/include/net_address.hrl | 28 |
6 files changed, 153 insertions, 121 deletions
diff --git a/bootstrap/lib/kernel/ebin/kernel.app b/bootstrap/lib/kernel/ebin/kernel.app deleted file mode 100644 index 59e4aa8055..0000000000 --- a/bootstrap/lib/kernel/ebin/kernel.app +++ /dev/null @@ -1,120 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. -%% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% %CopyrightEnd% -%% -%% This is an -*- erlang -*- file. -%% -{application, kernel, - [ - {description, "ERTS CXC 138 10"}, - {vsn, "2.15"}, - {modules, [application, - application_controller, - application_master, - application_starter, - auth, - code, - packages, - code_server, - dist_util, - erl_boot_server, - erl_distribution, - erl_reply, - error_handler, - error_logger, - file, - file_server, - file_io_server, - global, - global_group, - global_search, - group, - heart, - hipe_unified_loader, - inet6_tcp, - inet6_tcp_dist, - inet6_udp, - inet6_sctp, - inet_config, - inet_hosts, - inet_gethost_native, - inet_tcp_dist, - kernel, - kernel_config, - net, - net_adm, - net_kernel, - os, - ram_file, - rpc, - user, - user_drv, - user_sup, - disk_log, - disk_log_1, - disk_log_server, - disk_log_sup, - dist_ac, - erl_ddll, - erl_epmd, - erts_debug, - gen_tcp, - gen_udp, - gen_sctp, - inet, - inet_db, - inet_dns, - inet_parse, - inet_res, - inet_tcp, - inet_udp, - inet_sctp, - pg2, - seq_trace, - standard_error, - wrap_log_reader]}, - {registered, [application_controller, - erl_reply, - auth, - boot_server, - code_server, - disk_log_server, - disk_log_sup, - erl_prim_loader, - error_logger, - file_server_2, - fixtable_server, - global_group, - global_name_server, - heart, - init, - kernel_config, - kernel_sup, - net_kernel, - net_sup, - rex, - user, - os_server, - ddll_server, - erl_epmd, - inet_db, - pg2]}, - {applications, []}, - {env, [{error_logger, tty}]}, - {mod, {kernel, []}} - ] -}. diff --git a/bootstrap/lib/kernel/ebin/kernel.appup b/bootstrap/lib/kernel/ebin/kernel.appup deleted file mode 100644 index 96f6e27774..0000000000 --- a/bootstrap/lib/kernel/ebin/kernel.appup +++ /dev/null @@ -1 +0,0 @@ -{"2.15",[],[]}. diff --git a/bootstrap/lib/kernel/egen/.gitignore b/bootstrap/lib/kernel/egen/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 --- a/bootstrap/lib/kernel/egen/.gitignore +++ /dev/null diff --git a/bootstrap/lib/kernel/include/dist.hrl b/bootstrap/lib/kernel/include/dist.hrl new file mode 100644 index 0000000000..aea1ab81ba --- /dev/null +++ b/bootstrap/lib/kernel/include/dist.hrl @@ -0,0 +1,38 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 1999-2009. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% + +%% +%% Distribution capabilities flags (corresponds with dist.h). +%% + +-define(DFLAG_PUBLISHED,1). +-define(DFLAG_ATOM_CACHE,2). +-define(DFLAG_EXTENDED_REFERENCES,4). +-define(DFLAG_DIST_MONITOR,8). +-define(DFLAG_FUN_TAGS,16#10). +-define(DFLAG_DIST_MONITOR_NAME,16#20). +-define(DFLAG_HIDDEN_ATOM_CACHE,16#40). +-define(DFLAG_NEW_FUN_TAGS,16#80). +-define(DFLAG_EXTENDED_PIDS_PORTS,16#100). +-define(DFLAG_EXPORT_PTR_TAG,16#200). +-define(DFLAG_BIT_BINARIES,16#400). +-define(DFLAG_NEW_FLOATS,16#800). +-define(DFLAG_UNICODE_IO,16#1000). +-define(DFLAG_DIST_HDR_ATOM_CACHE,16#2000). +-define(DFLAG_SMALL_ATOM_TAGS, 16#4000). diff --git a/bootstrap/lib/kernel/include/dist_util.hrl b/bootstrap/lib/kernel/include/dist_util.hrl new file mode 100644 index 0000000000..f2b0598532 --- /dev/null +++ b/bootstrap/lib/kernel/include/dist_util.hrl @@ -0,0 +1,87 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 1999-2009. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +%% uncomment this if tracing of handshake etc is wanted +%%-define(dist_trace, true). +%%-define(dist_debug, true). + + +-ifdef(dist_debug). +-define(debug(Term), erlang:display(Term)). +-else. +-define(debug(Term), ok). +-endif. + +-ifdef(dist_trace). +-define(trace(Fmt,Args), io:format("~p ~p:~s",[erlang:now(),node(),lists:flatten(io_lib:format(Fmt, Args))])). +% Use the one below for config-file (early boot) connection tracing +%-define(trace(Fmt,Args), erlang:display([erlang:now(),node(),lists:flatten(io_lib:format(Fmt, Args))])). +-define(trace_factor,8). +-else. +-define(trace(Fmt,Args), ok). +-define(trace_factor,1). +-endif. + +-define(shutdown(Data), dist_util:shutdown(?MODULE, ?LINE, Data)). +-define(shutdown2(Data, Reason), dist_util:shutdown(?MODULE, ?LINE, Data, Reason)). + +%% Handshake state structure +-record(hs_data, { + kernel_pid, %% Pid of net_kernel + other_node, %% Name of peer + this_node, %% my nodename + socket, %% The connection "socket" + timer, %% The setup timer + %% (stream_dist_handshake:start_timer) + this_flags, %% Flags my node should use + allowed, %% Allowed nodes list + other_version, %% The other nodes distribution version + other_flags, %% The other nodes flags. + other_started, %% True if the other node initiated. + f_send, %% Fun that behaves like gen_tcp:send + f_recv, %% Fun that behaves like gen_tcp:recv + f_setopts_pre_nodeup, %% Sets "socket" options before + %% nodeup is delivered to net_kernel + f_setopts_post_nodeup, %% Sets "socket" options after + %% nodeup is delivered + f_getll, %% Get low level port or pid. + f_address, %% The address of the "socket", + %% generated from Socket,Node + %% These two are used in the tick loop, + %% so they are not fun's to avoid holding old code. + mf_tick, %% Takes the socket as parameters and + %% sends a tick, this is no fun, it + %% is a tuple {M,F}. + %% Is should place {tcp_closed, Socket} + %% in the message queue on failure. + mf_getstat, %% Returns + %% {ok, RecvCnt, SendCnt, SendPend} for + %% a given socket. This is a {M,F}, + %% returning {error, Reason on failure} + request_type = normal +}). + + +%% The following should be filled in upon enter of... +%% - handshake_we_started: +%% kernel_pid, other_node, this_node, socket, timer, +%% this_flags, other_version, All fun's/mf's. +%% - handshake_other_started: +%% kernel_pid, this_node, socket, timer, +%% this_flags, allowed, All fun's/mf's. + diff --git a/bootstrap/lib/kernel/include/net_address.hrl b/bootstrap/lib/kernel/include/net_address.hrl new file mode 100644 index 0000000000..5342076507 --- /dev/null +++ b/bootstrap/lib/kernel/include/net_address.hrl @@ -0,0 +1,28 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 1997-2009. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% + +%% Generic address format + +-record(net_address, + { + address, %% opaque address + host, %% host name + protocol, %% protocol + family %% address family + }). |