standard concepts to describe network behavior?



hi everyone!


i try to define (something like) a concept to describe the behavior
(or a protocol) of a p2p network. i tried the following (using pseudo-
code):

================================================
legend:
C->S:[name] client to server message [name]
C<-S:[name] server to client message [name]

every peer is server AND client at the same time, depending on the
current aspect.

================================================
scenario: connection:

C->S:ConnectionRequest();
if(C<-S:ConnectionReject(Reason:enum{...})){
end;
}else if(C<-S:ConnectionAccept(RandomNumber:byte[])){
C-
S:AuthentificationRequest(CryptoHashForRandomNumber:byte[]);
if(C<-S:AuthentificationReject()){
end;
}else if(C<-S:AuthentificationAccept(RandomNumbers:byte[][])){
C:enterClientLoop;
S:enterServerLoop;
}
}

C:loop{
C->S:OperationRequest(Operation:SomeType);
if(C<-S:OperationReject(Reason:enum{...})){
C:beVerySad(...);
}else if(C<-S:OperationAccept()){
C->S:SendData(Data:byte[]);
}
}

S:loop{
....
}

================================================

i'm sure, it's going to be complicated to implement this, because it's
surely not the 'usual' technique to define a protocol.
so, allow me few questions concerning this:

1) are there some 'usual' or standardized ways to define a network
protocol?

2) if not, what do you think about my 'concept'?

3) i'm going to use c#. it is better to use just a state-machine
inside a loop, or it is better to define events? what is your
opinion / experience?


thanks in advice!

.



Relevant Pages

  • Re: 2503/WS-1103 intermittant ping
    ... blade installed on my network. ... The router seems to perform OK except ... when I ping the ethernet connection, I only get back every other ping. ... BRI0 is administratively down, line protocol is down ...
    (comp.dcom.sys.cisco)
  • 2503/WS-1103 intermittant ping
    ... I installed a 2503/WS-1103 which is a catalyst 3200 with a router ... blade installed on my network. ... BRI0 is administratively down, line protocol is down ... IP fast switching on the same interface is disabled ...
    (comp.dcom.sys.cisco)
  • Re: tcp/ip hardware offload
    ... new hp direct cards with corrected firmware released over the years, ... several vendors are developing network adapters ... > gigabit network adapters with full protocol offload. ...
    (Vuln-Dev)
  • Book Review: "The TCP/IP Guide", Charles M. Kozierok
    ... guide to the TCP/IP (Transmission Control Protocol/Internet Protocol) ... II-1 examines the network interface layer, ...
    (comp.dcom.telecom)
  • REVIEW: "The TCP/IP Guide", Charles M. Kozierok
    ... guide to the TCP/IP (Transmission Control Protocol/Internet Protocol) ... II-1 examines the network interface layer, ...
    (rec.arts.books.reviews)