The IP over ATM Mailing List Archive by date[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index][Thread Index][Author Index][Subject Index] No Subject
1.1 Initilization
Read config file.
Allocate message queues.
Allocate internal tables.
Set up passive open VC connection.
Set up redirect_map timer.
Establish logging.
1.2 Message Processing
Forever {
If the message has a TLV then {
If TLV is unsupported then {
process as defined in TLV type field.
} /* unknown TLV */
} /* TLV present */
Place incoming message in the queue.
For (all messages in the queue) {
If (ar$pro.type is not supported) or
(the ATM source address is missing) then {
Continue.
}
Determine type of message.
If an ERR_L_RELEASE arrives on ClusterControlVC then {
Remove the endpoints ATM address from all groups for which
it has joined.
Release the CMI.
Continue.
} /* error on CCVC */
Call specific message handling routine.
If redirect_map timer pops {
Call MARS_REDIRECT_MAP message handling routine.
} /* redirect timer pop */
} /* all msgs in the queue */
} /* forever loop */
2. Message Handler
2.1 Messages:
- MARS_REQUEST
Indicate no MARS_MULTI support of TLV.
If the supported TLV is not NULL then {
Indicate MARS_MULTI support of TLV.
Process as required.
} else { /* TLV NULL */
If a server map does not exist then { /* no server map */
If (a host map does not exist) or
(the source is not a registered member) then {
Indicate no message to be sent.
Drop the message.
} else { /* only a host map */
If the group does not exist then {
Call MARS_NAK message routine.
Indicate message to be sent on Private VC.
} else { /* group exists */
Call MARS_MULTI message routine with host map.
Indicate message to be sent on ClusterControlVC
} /* group exists */
} /* only a host map */
} else { /* server map exists */
If a host map does not exist then {
Indicate no message to be sent.
Drop the message.
} else { /* host map exists */
If the group does not exist then {
Call MARS_NAK message routine.
Indicate message to be sent on Private VC.
} else { /* group exists */
If the source is a member of the server map then {
Call MARS_MULTI with host map.
Indicate message to be sent on ServerControlVC
} else { /* src is a member of host map */
Call MARS_MULTI with server map.
Indicate message to be sent on ClusterControlVC
} /* src is a member of host map */
} /* group exists */
} /* host map exists */
} /* server map exists */
} /* TLV NULL */
If a message exists then {
Send message as indicated.
}
Return.
- MARS_MULTI
Construct a MARS_MULTI for the specified map.
If the param indicates TLV support then {
Process the TLV as required.
}
Return.
- MARS_JOIN
If ar$flags.copy != 0 silently ignore the message.
Ignore ar$flags.layer3grp.
If more than a single <min,max> pair is specified then
ignore the 2nd and subsequent pairs.
Indicate message to be sent on private VC.
If ar$flags.register == 1 then {
If the node is already a registered member of the cluster
associated with the protocol type then { /* previous register */
Copy the existing CMI into the MARS_JOIN.
} else { /* new register */
Add the node to ClusterControlVC.
ar$cmi = obtain CMI.
} /* new register */
} else { /* not a register */
If the node is not registered then {
Ignore the message.
}
If a server map exists for the group then {
Call the Modified JOIN/LEAVE Processing routine.
Indicate no message to be sent.
} else { /* server map does not exist */
Update internal tables.
Indicate message to be sent on ClusterControlVC.
} /* server map does not exist */
} /* not a register */
ar$flags.copy = 1.
Send message as indicated.
Return.
- MARS_LEAVE
If ar$flags.copy != 0 silently ignore the message.
Ignore ar$flags.layer3grp.
Indicate message to be sent on ClusterControlVC.
If group address is 224.0.0.1 then {
All references to this node must be eliminated from
any other groups for which it is a member.
} /* group is 224.0.0.1 */
If ar$flags.register == 1 then { /* deregistration */
If the node is not registered then {
Ignore the message.
}
Update internal tables to remove the member's ATM addr
from all groups it has joined.
Drop the endpoint from ClusterControlVC.
Release the CMI.
ar$flags.register = 0.
Indicate message to be sent on private VC.
} else { /* not a deregistration */
If a server map exists for the group then {
Call the Modified JOIN/LEAVE Processing routine.
Indicate no message to be sent.
} else { /* server map does not exist */
Update internal tables.
Indicate message to be sent on ClusterControlVC.
}
} /* not a deregistration */
If a message exists then {
ar$flags.copy = 1.
Send message as indicated.
}
Return.
- MARS_MSERV
If (the group has a non-null host map) && (no server map) then {
Silently drop the message.
Indicate no message to be sent.
} else {
If ar$flags.register == 1 then { /* server register */
Add the endpoint as a leaf node to ServerControlVC.
Add the endpoint to the server map.
Indicate the message to be sent on Private VC.
ar$cmi = 0.
} else { /* not a register */
If the source has not registered then {
Drop and ignore the message.
Indicate no message to be sent.
} else { /* source is registered */
Add the server ATM addr to the server map for the group.
Indicate the message to be sent on ServerControlVC.
Send message as indicated.
Make a copy of the message.
Change the op code to MARS_JOIN.
Indicate the message to be sent on ClusterControlVC.
ar$flags.layer3grp = 0.
ar$flags.copy = 1.
} /* source is registered */
} /* not a register */
}
If a message exists then {
Send message as indicated.
}
Return.
- MARS_UNSERV
If ar$flags.register == 1 then { /* deregister */
Remove the ATM addr of the MCS from all server maps.
If a server map is null then delete it.
Remove the endpoint as a leaf of ServerControlVC.
Indicate no message to be sent.
} else { /* not a deregister */
If the source has not registered then {
Drop and ignore the message.
Indicate no message to be sent.
} else { /* source is registered */
Remove the ATM addr of the MCS from each server map indicated.
If a server map is null then delete it.
Indicate the message to be sent on ServerControlVC.
Send message as indicated.
Make a copy of the message.
Change the op code to MARS_LEAVE.
Indicate the message (copy) to be sent on ClusterControlVC.
ar$flags.layer3grp = 0;
ar$flags.copy = 1.
} /* source is registered */
} /* not a deregister */
If a message exists then {
Send message as indicated.
}
Return.
- MARS_NAK
Build command.
Return.
- MARS_GROUPLIST_REQUEST
If ar$pnum != 1 then Return.
Call MARS_GROUPLIST_REPLY with the range and output VC.
Return.
- MARS_GROUPLIST_REPLY
Build command for specified range.
Indicate message to be sent on specified VC.
Send message as indicated.
Return.
- MARS_REDIRECT_MAP
Include the MARSs own address in the message.
If there are backup MARSs then include their addresses.
Indicate MARS_REDIRECT_MAP is to be sent on ClusterControlVC.
Send message back as indicated.
Return.
3. Send Message Handler
If the message is going out ClusterControlVC then {
ar$msn = obtain a CSN
}
If the message is going out ServerControlVC then {
ar$msn = obtain a SSN
}
Return.
4. Number Generator
4.1 Cluster Sequence Number
Generate the next sequence number.
Return.
4.2 Server Sequence Number
Generate the next sequence number.
Return.
4.3 CMI
A single node may register multiple times if it supports
multiple layer 3 protocols.
The CMIs allocated for each such registration may or may
not be the same.
Generate a CMI for this protocol.
Return.
5. Modified JOIN/LEAVE Processing
This routine processes JOIN/LEAVE when a server map exists.
Make a copy of the message.
Change the type of the copy to MARS_SJOIN.
If the message is a MARS_LEAVE then {
Change the type of the copy to MARS_SLEAVE.
}
ar$flags.copy = 1 (copy).
Indicate the message to be sent on ServerControlVC.
Send message (copy) as indicated.
If the number of groups == 1 then {
ar$flags.punched = 0 in the original message.
Indicate the message to be sent on Private VC.
} else { /* multiple groups */
Hole punch the <min,max> group by excluding
from the range those groups that are served by MCSs.
Indicate the (original) message to be sent on ClusterControlVC.
If number of holes punched > 0 then { /* punched holes */
In original message do {
ar$flags.punched = 1.
old punched list <- new punched list.
}
} /* punched holes */
} /* multiple groups */
ar$flags.copy = 1.
Send message as indicated.
Return.
|
|