The following description is written in ESTELLE.
10.1. グローバル定数, 変数, 型
default individual queue;
timescale ...;
type
PDU_type = ... ; (* format of a Protocol Data Unit:
String of variable length *)
HW_addr_type = ... ; (* format of a 48 bit MAC address *)
PR_addr_type = ... ; (* General: format of a protocol address
in an ARP or DMARP frame *)
IP_addr_type = ... ; (* General: format of an IP address *)
QoS_type = ... ; (* General: format of a Quality-of-
-Service statement *)
timer_name_type = ... ; (* Type for the name of a system timer *)
flag = (reset,set);
var
(*
The values of these variables are set in the initialization part or
by external management functions.
*)
My_P_MAC_addr : HW_addr_type; (* Address of the MAC, placed on
the primary ring *)
My_S_MAC_addr : HW_addr_type; (* Address of the MAC, placed on
the secondary ring *)
My_IP_address : IP_addr_type; (* IP address of this station *)
Broadcast_HW_addr : HW_addr_type; (* Broadcast MAC address (48 bit) *)
Broadcast_IP_addr : IP_addr_type; (* Broadcast IP address *)
dmarp_QoS : QoS_type; (* Quality_of_Service-statement
for DMARP frames *)
ethernet : integer; (* Type statement in DMARP frames *)
ip : integer; (* Number for IP as protocol type *)
fddi_addr_length : integer; (* Length of a MAC address in octetts *)
ip_addr_length : integer; (* Length of a IP address in octetts *)
OR_set_timeout : integer; (* Parameter for the OR-Entry-Timer *)
Query_time : integer; (* Parameter for the Hold-Timer *)
Hold_time : integer; (* Parameter for the Query-Timer *)
10.2. チャネル
channel SAPchn(User,Provider);
by User :
UNITDATA_request
(
Source_addr : HW_addr_type;
Dest_addr : HW_addr_type;
QoS : QoS_type;
PDU : PDU_type;
)
by Provider :
UNITDATA_indication
(
Source_addr : HW_addr_type;
Dest_addr : HW_addr_type;
QoS : QoS_type;
PDU : PDU_type;
)
channel System_Access_Point_chn(User,Provider);
by User:
TIMER_request(Time : integer;
Timer_id : timer_name_type;
subscript : integer);
TIMER_cancel(Timer_id : timer_name_type;
subscript : integer);
by Provider:
TIMER_response(Timer_id : timer_name_type;
subscript : integer);
10.3. モジュールヘッダと相互作用点
module LS_module systemprocess;
ip LS_ARPSAP : SAPchn(Provider);
LS_IPSAP : SAPchn(Provider);
SNAP1_ARPSAP : SAPchn(User);
SNAP1_LSSAP : SAPchn(User);
SNAP1_IPSAP : SAPchn(User);
SNAP2_ARPSAP : SAPchn(User);
SNAP2_LSSAP : SAPchn(User);
SNAP2_IPSAP : SAPchn(User);
LS_System_Access_Point : System_Access_Point_chn(User);
end;
10.4. ロードシェアリング実体のモジュール本体
body LS_body for LS_module;
module multiplexer_module process;
ip LS_IPSAP : SAPchn(Provider);
SNAP1_IPSAP : SAPchn(User);
SNAP2_IPSAP : SAPchn(User);
end;
module cache_administration_module process;
ip LS_ARPSAP : SAPchn(Provider);
SNAP1_ARPSAP : SAPchn(User);
SNAP1_LSSAP : SAPchn(User);
SNAP2_ARPSAP : SAPchn(User);
SNAP2_LSSAP : SAPchn(User);
LS_System_Access_Point : System_Access_Point_chn(User);
end;
body cache_administration_body for cache_administration_module;
(* defined later *)
end;
body multiplexer_body for multiplexer_module;
(* defined later *)
end;
modvar
cache_administration : cache_administration_module;
multiplexer : multiplexer_module;
initialize
begin
ethernet := 1;
ip := 2048;
fddi_addr_length := 6;
ip_addr_length := 4;
init cache_administration with cache_administration_body;
init multiplexer with multiplexer_body;
attach LS_IPSAP to multiplexer.LS_IPSAP;
attach SNAP1_IPSAP to multiplexer.SNAP1_IPSAP;
attach SNAP2_IPSAP to multiplexer.SNAP2_IPSAP;
attach LS_ARPSAP to cache_administration.LS_ARPSAP;
attach SNAP1_ARPSAP to cache_administration.SNAP1_ARPSAP;
attach SNAP1_LSSAP to cache_administration.SNAP1_LSSAP;
attach SNAP2_ARPSAP to cache_administration.SNAP2_ARPSAP;
attach SNAP2_LSSAP to cache_administration.SNAP2_LSSAP;
attach LS_System_Access_Point to cache_administration.
LS_System_Access_Point;
end; end;
10.5. 多重化器のモジュール本体
body multiplexer_body for multiplexer_module;
type
Type_of_addr_type = (individual, multi, broad);
ring_type = (primary, secondary);
var
act_S_MAC_addr : HW_addr_type;
function determ_addrtype(HW_addr: HW_addr_type): Type_of_addr_type;
primitive;
(*
Returns the type of a hardware address.
(Individual, multicast or broadcast address)
*)
function get_cacheentry(prtype: integer; P_MAC_addr: HW_addr_type;
var S_MAC_addr : HW_addr_type): boolean;
primitive;
(*
Returns the associated secondary MAC address for a given primary MAC
address and protocol type. If an entry exists, the value TRUE is
returned.
*)
function ls_criteria : ring_type;
(*
Returns the ring on which the actual frame should be transmitted.
*)
primitive;
trans
when LS_IPSAP.UNITDATA_request(Source_addr,Dest_addr,QoS,PDU) begin
if determ_addrtype(Dest_addr) <> individual then
output SNAP1_IPSAP.UNITDATA_request(Source_addr,Dest_addr,QoS,PDU);
else begin
if get_cacheentry(ip,Dest_addr,act_S_MAC_addr) and
(ls_criteria=secondary) then
output SNAP2_IPSAP.UNITDATA_request(My_S_MAC_addr,
act_S_MAC_addr,QoS,PDU);
else
output SNAP1_IPSAP.UNITDATA_request(Source_addr,Dest_addr,QoS,PDU);
end;
end;
when SNAP1_IPSAP.UNITDATA_indication(Source_addr,Dest_addr,QoS,PDU)
begin
output LS_IPSAP.UNITDATA_indication(Source_addr,Dest_addr,QoS,PDU);
end;
when SNAP2_IPSAP.UNITDATA_indication(Source_addr,Dest_addr,QoS,PDU)
begin
if determ_addrtype(Dest_addr) = individual then begin
Dest_addr := My_P_MAC_addr;
output LS_IPSAP.UNITDATA_indication(Source_addr,Dest_addr,QoS,PDU);
end;
end;
10.6. キャッシュ管理のモジュール本体
body cache_administration_body for cache_administration_module;
type
arp_pdu_type = record
hwtype : integer;
prtype : integer;
HW_length : integer;
PR_length : integer;
operation : (request,reply);
HW_sender : HW_addr_type;
PR_sender : PR_addr_type;
HW_receiver : HW_addr_type;
PR_receiver : PR_addr_type;
end;
dmarp_operation_type = (request,reply,error,search,found,query,hold);
dmarp_pdu_type = record
hwtype : integer;
prtype : integer;
HW_length : integer;
PR_length : integer;
operation : dmarpoperation_type;
HW_1 : HW_addr_type;
HW_2 : HW_addr_type;
PR_sender : PR_addr_type;
PR_receiver : PR_addr_type;
end;
var
arp_pdu : arp_pdu_type;
dmarp_pdu : dmarp_pdu_type;
send_pdu : dmarp_pdu_type;
act_P_MAC_addr : HW_addr_type;
function my_pr_address(prtype : integer ; praddr : PR_addr_type):
boolean;
(*
Returns TRUE, if praddr is my station address, the protocol type is
prtype. (2048d for the Internet protocol)
*)
primitive;
function get_my_pr_addr(prtype : integer) : PR_addr_type;
(*
Returns my station address, the protocol has the number prtype.
*)
function extract_arp_pdu(PDU : PDU_type) : arp_pdu_type;
(*
Returns the data contained in an ARP PDU as a record.
*)
primitive;
function extract_dmarp_pdu(PDU : PDU_type) : dmarp_pdu_type;
(*
Returns the data contained in an DMARP PDU as a record.
*)
primitive;
function assemble_dmarp_pdu(dmarp_pdu : dmarp_pdu_type): PDU;
(*
Returns a DMARP PDU from the data in the record.
*)
primitive;
procedure create_entry(prtype: integer; P_MAC_addr: HW_addr_type;
S_MAC_addr: HW_addr_type; LS_Bit: flag; OR_Bit: flag;
H_Bit: flag; Q_Bit: flag; R_Bit: flag; V_Bit: flag);
(*
Creates a new entry in the address cache, if no entry with the given
primary MAC address or R-bit set to one exists. The protocol type has
the number prtype. The control bits are set as given in the parameters,
the LS-bit is set last.
*)
primitive;
function search_entry(prtype : integer; P_MAC_addr : HW_addr_type):
boolean;
(*
Returns TRUE if an entry with the primary MAC address P_MAC_addr and
the given protocol type was found in the address cache.
*)
primitive;
procedure update_entry(prtype: integer; P_MAC_addr: HW_addr_type;
S_MAC_addr: HW_addr_type);
(*
Searches an entry with the given primary MAC address P_MAC_address and
updates the secondary MAC address in the entry if the R-bit is set to
zero.
*)
primitive;
procedure reset_LS_bit(prtype: integer; P_MAC_addr : HW_addr_type);
(*
Searches an entry with the given primary MAC address P_MAC_address and
resets the LS-bit if the R-bit is reset.
*)
primitive;
procedure set_Q_bit(prtype: integer; P_MAC_addr : HW_addr_type);
(*
Searches an entry with the given primary MAC address P_MAC_address and
sets the Q-bit if the R-bit is reset.
*)
primitive;
function H_bit_set(prtype: integer; P_MAC_addr : HW_addr_type):
boolean;
(*
Returns TRUE if an entry exists with H-bit set to one and the given
P-MAC address.
*)
primitive;
function OR_bit_set(prtype: integer; P_MAC_addr : HW_addr_type):
boolean;
(*
Returns TRUE if an entry exists with OR-bit set to one and the given
P-MAC address.
*)
primitive;
function LS_bit_set(prtype: integer; P_MAC_addr : HW_addr_type):
boolean;
(*
Returns TRUE if an entry exists with LS-bit set to one and the given
P-MAC address.
*)
primitive;
function Q_bit_set(prtype: integer; P_MAC_addr : HW_addr_type):
boolean;
(*
Returns TRUE if an entry exists with Q-bit set to one and the given
P-MAC address.
*)
primitive;
function get_subscript(prtype: integer; P_MAC_addr : HW_addr_type):
integer;
(*
Returns the subscipt number of an entry with the given primary MAC
address.
*)
primitive;
function get_broadcast_addr(prtype : integer): PR_addr_type;
(*
Returns the broadcast protocol address for the given protocol type.
*)
function get_P_MAC_addr(subscript : integer) : HW_addr_type;
(*
Returns the primary MAC address of the entry with the given subscript
number.
*)
primitive;
function get_S_MAC_addr(prtype: integer; P_MAC_addr: HW_addr_type):
HW_addr_type;
(*
Returns the secondary MAC address of the station with the given primary
MAC address.
*)
primitive;
procedure delete_entry(subscript : integer);
(*
Deletes the entry with the given subscript number if the R-bit is
reset.
*)
primitive;
function get_pr_type(subscript : integer) : integer;
(*
Returns the protocol type for the entry with the given subscript
number.
*)
primitive;
function get_pr_length(prtype : integer) : integer;
(*
Returns the length of a protocol address.
*)
primitive;
trans
when LS_ARPSAP.UNITDATA_request(Source_addr,Dest_addr,QoS,PDU)
begin
arp_pdu := extract_arp_pdu(PDU);
output SNAP1_ARPSAP.UNITDATA_request(Source_addr,Dest_addr,QoS,PDU);
dmarp_pdu.hwtype := ethernet;
dmarp_pdu.prtype := arp_pdu.prtype;
dmarp_pdu.HW_length := fddi_addr_length;
dmarp_pdu.PR_length := arp_pdu.PR_length;
dmarp_pdu.operation := reply;
dmarp_pdu.HW_1 := My_P_MAC_addr;
dmarp_pdu.HW_2 := My_S_MAC_addr;
dmarp_pdu.PR_sender := arp_pdu.PR_sender;
dmarp_pdu.PR_receiver := arp_pdu.PR_receiver;
PDU := assemble_dmarp_pdu(dmarp_pdu);
output SNAP2_LSSAP.UNITDATA_request(My_S_MAC_addr,Broadcast_HW_addr,
dmarp_QoS,PDU);
end;
when SNAP1_ARPSAP.UNITDATA_indication(Source_addr,Dest_addr,QoS,PDU)
begin
output LS_ARPSAP.UNITDATA_indication(Source_addr,Dest_addr,QoS,PDU);
end;
when SNAP2_ARPSAP.UNITDATA_indication(Source_addr,Dest_addr,QoS,PDU)
begin end;
when SNAP1_LSSAP.UNITDATA_indication(Source_addr,Dest_addr,QoS,PDU)
begin
dmarp_pdu := extract_dmarp_pdu(PDU);
if ((dmarp_pdu.operation = error) or (dmarp_pdu.operation = reply))
then begin
if my_pr_address(dmarp_pdu.prtype,dmarp_pdu.PR_receiver) then begin
if not H_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) then begin
if not OR_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) then begin
if LS_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) then begin
output LS_System_Access_point.TIMER_cancel(
"Hold_Timer",get_subscript(dmarp_pdu.prtype,dmarp_pdu.HW_1));
create_entry(dmarp_pdu.prtype,dmarp_pdu.HW_1,dmarp_pdu.HW_2,
reset,set,reset,reset,reset,set);
end;
output LS_System_Access_point.TIMER_request(
OR_set_timeout,"OR_Entry_Timer",
get_subscript(dmarp_pdu.prtype,dmarp_pdu.HW_1));
send_pdu.hwtype := ethernet;
send_pdu.prtype := dmarp_pdu.prtype;
send_pdu.HW_length := fddi_addr_length;
send_pdu.PR_length := dmarp_pdu.PR_length;
send_pdu.operation := search;
send_pdu.HW_1 := My_P_MAC_addr;
send_pdu.HW_2 := dmarp_pdu.HW_1;
send_pdu.PR_sender := get_my_pr_addr(dmarp_pdu.prtype);
send_pdu.PR_receiver := get_broadcast_addr(dmarp_pdu.prtype);
PDU := assemble_dmarp_pdu(dmarp_pdu);
output SNAP2_LSSAP.UNITDATA_request(
My_S_MAC_addr,Broadcast_HW_addr,dmarp_QoS,PDU);
end else begin
if dmarp_pdu.operation=error then
update_entry(dmarp_pdu.prtype,dmarp_pdu.HW_1,dmarp_pdu.HW_2);
end;
end else begin
if dmarp_pdu.operation = error then
update_entry(dmarp_pdu.prtype,dmarp_pdu.HW_1,dmarp_pdu.HW_2);
end;
end else begin
if my_pr_address(dmarp_pdu.prtype,dmarp_pdu.PR_sender) and
(dmarp_pdu.operation = reply) then begin
dmarp_pdu.operation := error;
PDU := assemble_dmarp_pdu(dmarp_pdu);
output SNAP1_LSSAP.UNITDATA_request(
My_P_MAC_addr,Broadcast_HW_addr,dmarp_QoS,PDU);
end else begin
if dmarp_pdu.operation=error and
search_entry(dmarp_pdu.prtype,dmarp_pdu.HW_1) then
update_entry(dmarp_pdu.prtype,dmarp_pdu.HW_1,dmarp_pdu.HW_2);
end; end; end; end;
when SNAP2_LSSAP.UNITDATA_indication(Source_addr,Dest_addr,QoS,PDU)
begin
dmarp_pdu := extract_dmarp_pdu(PDU);
if (dmarp_pdu.operation = found) and
my_pr_address(dmarp_pdu.prtype,dmarp_pdu.PR_receiver) then begin
if not H_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) then begin
if OR_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) then begin
output LS_System_Access_Point.
TIMER_cancel("OR_Entry_Timer",
get_subscript(dmarp_pdu.prtype,dmarp_pdu.HW_1));
end;
if LS_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) then begin
output LS_System_Access_Point.
TIMER_cancel("Hold_Timer",
get_subscript(dmarp_pdu.prtype,dmarp_pdu.HW_1));
end;
create_entry(dmarp_pdu.prtype,dmarp_pdu.HW_1,dmarp_pdu.HW_2,
set,reset,set,reset,reset,set);
output LS_System_Access_Point.TIMER_request(Query_time,"Query_Timer",
get_subscript(dmarp_pdu.prtype,dmarp_pdu.HW_1));
end;
end else begin
if (dmarp_pdu.operation = reply) or
(dmarp_pdu.operation = request) then begin
if search_entry(dmarp_pdu.prtype,dmarp_pdu.HW_1) then
update_entry(dmarp_pdu.prtype,dmarp_pdu.HW_1,dmarp_pdu.HW_2);
end;
if (dmarp_pdu.operation=request) and
my_pr_address(dmarp_pdu.prtype,dmarp_pdu.PR_receiver) then begin
send_pdu.hwtype := dmarp_pdu.hwtype;
send_pdu.prtype := dmarp_pdu.prtype;
send_pdu.HW_length := fddi_addr_length;
send_pdu.PR_length := dmarp_pdu.PR_length;
send_pdu.operation := reply;
send_pdu.HW_1 := My_P_MAC_addr;
send_pdu.HW_2 := My_S_MAC_addr;
send_pdu.PR_sender := get_my_pr_addr(dmarp_pdu.prtype);
send_pdu.PR_receiver := dmarp_pdu.PR_sender;
PDU := assemble_dmarp_pdu(dmarp_pdu);
output SNAP2_LSSAP.UNITDATA_request(
My_S_MAC_addr,Broadcast_HW_addr,dmarp_QoS,PDU);
end else begin
if my_pr_address(dmarp_pdu.prtype,dmarp_pdu.pr_receiver) then begin
case dmarp_pdu.operation of
reply: begin
if not ( OR_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) or
LS_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) )then begin
create_entry(dmarp_pdu.prtype,dmarp_pdu.HW_1,dmarp_pdu.HW_2,
set,reset,reset,reset,reset,set);
output LS_System_Access_Point.TIMER_request(Hold_time,
"Hold_Timer",get_subscript(dmarp_pdu.prtype,dmarp_pdu.HW_1));
end;
end;
error: begin
if not ( OR_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) or
H_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) ) then begin
if LS_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) then
output LS_System_access_point.TIMER_cancel(
"Hold_Timer",get_subscript(dmarp_pdu.prtype,dmarp_pdu.HW_1));
create_entry(dmarp_pdu.prtype,dmarp_pdu.HW_1,dmarp_pdu.HW_2,
reset,set,reset,reset,reset,set);
output LS_System_access_point.TIMER_request(
OR_set_timeout,"OR_Entry_Timer",
get_subscript(dmarp_pdu.prtype,dmarp_pdu.HW_1));
send_pdu.hwtype := ethernet;
send_pdu.prtype := dmarp_pdu.prtype;
send_pdu.HW_length := fddi_addr_length;
send_pdu.PR_length := dmarp_pdu.PR_length;
send_pdu.operation := search;
send_pdu.HW_1 := My_P_MAC_addr;
send_pdu.HW_2 := dmarp_pdu.HW_1;
send_pdu.PR_sender := get_my_pr_addr(dmarp_pdu.prtype);
send_pdu.PR_receiver := get_broadcast_addr(dmarp_pdu.prtype);
PDU := assemble_dmarp_pdu(dmarp_pdu);
output SNAP2_LSSAP.UNITDATA_request(
My_S_MAC_addr,Broadcast_HW_addr,dmarp_QoS,PDU);
end;
end;
search: begin
if not (dmarp_pdu.HW_1=My_P_MAC_addr or
dmarp_pdu.HW_2=My_P_MAC_addr) then begin
if H_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) and
H_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_2) then begin
send_pdu.hwtype := ethernet;
send_pdu.prtype := dmarp_pdu.prtype;
send_pdu.HW_length := fddi_addr_length;
send_pdu.PR_length := dmarp_pdu.PR_length;
send_pdu.operation := found;
send_pdu.HW_1 := dmarp_pdu.HW_2;
send_pdu.HW_2 := get_S_MAC_addr(dmarp_pdu.prtype,
dmarp_pdu.HW_2);
send_pdu.PR_sender := get_my_pr_addr(dmarp_pdu.prtype);
send_pdu.PR_receiver := get_broadcast_addr(dmarp_pdu.prtype);
PDU := assemble_dmarp_pdu(send_pdu);
output SNAP2_LSSAP.UNITDATA_request(My_S_MAC_addr,
get_S_MAC_addr(dmarp_pdu.prtype,dmarp_pdu.HW_1),dmarp_QoS,PDU);
send_pdu.HW_1 := dmarp_pdu.HW_1;
send_pdu.HW_2 := get_S_MAC_addr(dmarp_pdu.prtype,
dmarp_pdu.HW_1);
PDU := assemble_dmarp_pdu(send_pdu);
output SNAP2_LSSAP.UNITDATA_request(My_S_MAC_addr,
get_S_MAC_addr(dmarp_pdu.prtype,dmarp_pdu.HW_2),dmarp_QoS,PDU);
end;
end;
end;
Query: begin
if dmarp_pdu.HW_2 = My_P_MAC_addr then begin
send_pdu.hwtype := ethernet;
send_pdu.prtype := dmarp_pdu.prtype;
send_pdu.HW_length := dmarp_pdu.HW_length;
send_pdu.PR_length := dmarp_pdu.PR_length;
send_pdu.operation := hold;
send_pdu.HW_1 := My_P_MAC_addr;
send_pdu.HW_2 := My_S_MAC_addr;
send_pdu.PR_sender := get_my_pr_addr(dmarp_pdu.prtype);
send_pdu.PR_receiver := dmarp_pdu.PR_sender;
PDU := assemble_dmarp_pdu(send_pdu);
output SNAP2_LSSAP.UNITDATA_request(
My_S_MAC_addr,dmarp_pdu.HW_1,dmarp_QoS,PDU);
end;
end;
Hold: begin
if H_bit_set(dmarp_pdu.prtype,dmarp_pdu.HW_1) then
reset_Q_bit(dmarp_pdu.prtype,dmarp_pdu.HW_1);
end;
end;
end;
end;
end;
end;
when LS_System_Access_Point.TIMER_response(Timer_name,subscript) begin
case Timer_name of
"OR_Entry_Timer": begin
act_P_MAC_addr := get_P_MAC_addr(subscript);
if OR_bit_set(get_pr_type(subscript),act_P_MAC_addr) then begin
send_pdu.hwtype := ethernet;
send_pdu.prtype := get_pr_type(subscript);
send_pdu.HW_length := fddi_addr_length;
send_pdu.PR_length := get_pr_length(send_pdu.prtype);
send_pdu.operation := request;
send_pdu.HW_1 := My_P_MAC_addr;
send_pdu.HW_2 := My_S_MAC_addr;
send_pdu.PR_sender := get_my_pr_addr(send_pdu.prtype);
send_pdu.PR_receiver := get_broadcast_addr(send_pdu.prtype);
PDU := assemble_dmarp_pdu(send_pdu);
output SNAP2_LSSAP.UNITDATA_request(
My_S_MAC_addr,get_S_MAC_addr(send_pdu.prtype,act_P_MAC_addr),
dmarp_QoS,PDU);
delete_entry(subscript);
end;
end;
"Hold_Timer": begin
act_P_MAC_addr := get_P_MAC_addr(subscript);
if (not H_bit_set(get_pr_type(subscript),act_P_MAC_addr)) and
LS_bit_set(get_pr_type(subscript),act_P_MAC_addr) then begin
set_H_bit(get_pr_type(subscript),act_P_MAC_addr);
output LS_System_Access_point.TIMER_request(
Query_time,"Query_Timer",subscript);
end;
end;
"Query_Timer": begin
act_P_MAC_addr := get_P_MAC_addr(subscript);
send_pdu.hwtype := ethernet;
send_pdu.prtype := get_pr_type(subscript);
send_pdu.HW_length := fddi_addr_length;
send_pdu.PR_length := get_pr_length(send_pdu.prtype);
send_pdu.PR_sender := get_my_pr_addr(send_pdu.prtype);
send_pdu.PR_receiver := get_broadcast_addr(send_pdu.prtype);
if Q_bit_set(get_pr_type(subscript),act_P_MAC_addr) then begin
send_pdu.HW_1 := My_P_MAC_addr;
send_pdu.HW_2 := My_S_MAC_addr;
send_pdu.operation := request;
PDU := assemble_dmarp_pdu(send_pdu);
output SNAP2_LSSAP.UNITDATA_request(
My_S_MAC_addr,get_S_MAC_addr(send_pdu.prtype,act_P_MAC_addr),
dmarp_QoS,PDU);
delete_entry(subscript);
end else begin
send_pdu.HW_1 := My_S_MAC_addr;
send_pdu.HW_2 := get_P_MAC_addr(subscript);
send_pdu.operation := query;
PDU := assemble_dmarp_pdu(send_pdu);
output SNAP2_LSSAP.UNITDATA_request(
My_S_MAC_addr,get_S_MAC_addr(send_pdu.prtype,send_pdu.HW_2),
dmarp_QoS,PDU);
set_Q_bit(send_pdu.prtype,send_pdu.HW_2);
end; end; end; end; end; (* body *)