Active Router Transport Protocol (ARTP) Reference

Manual

1.0

Generated by Doxygen 1.2.15

Fri May 21 08:02:47 2004

Contents

1 Active Router Transport Protocol (ARTP) Data Structure Index  1
1.1 Active Router Transport Protocol (ARTP) Data Structures . . . . . . . 1
2 Active Router Transport Protocol (ARTP) File Index  3
2.1 Active Router Transport Protocol (ARTP) File List . . . . . . . . . . 3
3 Active Router Transport Protocol (ARTP) Data Structure Documentation  5
3.1 artp dgram Struct Reference . . . . . . . . . . . . . . . . . . . . . . 5
3.2 artp receiver Union Reference . . . . . . . . . . . . . . . . . . . . . 7
3.3 control type Struct Reference . . . . . . . . . . . . . . . . . . . . . . 8
3.4 dead zero sessions Struct Reference . . . . . . . . . . . . . . . . . . 9
3.5 ext item Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . 10
3.6 fragment item Struct Reference . . . . . . . . . . . . . . . . . . . . . 12
3.7 item Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.8 payload CTRL Struct Reference . . . . . . . . . . . . . . . . . . . . 16
3.9 payload DATA Struct Reference . . . . . . . . . . . . . . . . . . . . 17
3.10 payload type Union Reference . . . . . . . . . . . . . . . . . . . . . 19
3.11 session item Struct Reference . . . . . . . . . . . . . . . . . . . . . 20
3.12 Tabuffers Struct Reference . . . . . . . . . . . . . . . . . . . . . . . 24
3.13 Tdupple Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . 26
3.14 Trcving buffers Struct Reference . . . . . . . . . . . . . . . . . . . . 28
3.15 Tsending buffers Struct Reference . . . . . . . . . . . . . . . . . . . 30
3.16 Tsetting Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . 32
4 Active Router Transport Protocol (ARTP) File Documentation  35
4.1 abuffers.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . 35

4.2 abuffers.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . 39
4.3 artp.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.4 artp.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.5 config.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.6 errors.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.7 errors.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.8 net.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.9 net.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.10 options.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . 68
4.11 options.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . 71
4.12 packet.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.13 rbuffers.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . 77
4.14 rbuffers.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . 81
4.15 rwlocks.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . 85
4.16 sbuffers.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . 88
4.17 sbuffers.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . 95
4.18 setting.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.19 setting.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.20 structs.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 107
4.21 types.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . 109

Chapter 1

Active Router Transport Protocol (ARTP) Data Structure Index

1.1 Active Router Transport Protocol (ARTP) Data

Structures

Here are the data structures with brief descriptions:

artp dgram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
artp receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
control type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
dead zero sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
ext item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
fragment item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
payload CTRL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
payload DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
payload type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
session item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Tabuffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Tdupple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Trcving buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Tsending buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Tsetting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

2  Active Router Transport Protocol (ARTP) Data Structure Index

Chapter 2

Active Router Transport Protocol (ARTP) File Index

2.1 Active Router Transport Protocol (ARTP) File List

Here is a list of all documented files with brief descriptions:

abuffers.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
abuffers.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
artp.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
artp.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
config.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
errors.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
errors.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
net.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
net.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
options.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
options.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
packet.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
rbuffers.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
rbuffers.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
rwlocks.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
sbuffers.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
sbuffers.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
setting.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
setting.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
structs.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
types.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

4  Active Router Transport Protocol (ARTP) File Index

Active Router Transport Protocol (ARTP) Data Structure Documentation

3.1 artp dgram Struct Reference

#include <packet.h>

Data Fields

• enum packet type type

• payload type payload

3.1.1 Detailed Description

ARTP packet structure

3.1.2 Field Documentation

3.1.2.1 union payload type artp dgram::payload packet payload

6  Active Router Transport Protocol (ARTP) Data Structure Documentation

3.1.2.2 enum packet type artp dgram::type packet type The documentation for this struct was generated from the following file:

• packet.h

3.2 artp receiver Union Reference

#include <net.h>

Data Fields

• sockaddr in ip

• sockaddr in6 ip6

3.2.1 Detailed Description

Supported address families structure. This structure is used for storing senders and receivers - it MUST contain all supported address families structures (alocated size is the maximal size of all specified structures).

3.2.2 Field Documentation

3.2.2.1 struct sockaddr in artp receiver::ip IPv4 address family 3.2.2.2 struct sockaddr in6 artp receiver::ip6 IPv6 address family The documentation for this union was generated from the following file:

• net.h

3.3 control type Struct Reference

#include <packet.h>

Data Fields

• enum ctrl type type

• CTRL OPTID TYPE optid

• char ∗ value

• CTRL VALUE SZ TYPE valuesize

3.3.1 Detailed Description

ARTP control packet structure (its items)

3.3.2 Field Documentation

3.3.2.1 CTRL OPTID TYPE control type::optid the option identification

3.3.2.2 enum ctrl type control type::type the option type

3.3.2.3 char∗ control type::value the option value

3.3.2.4 CTRL VALUE SZ TYPE control type::valuesize the option value size The documentation for this struct was generated from the following file:

• packet.h

3.4 dead zero sessions Struct Reference

#include <structs.h>

Data Fields

• SID TYPE sid

• artp receiver receiver

• int invalid

• dead zero sessions ∗ next

3.4.1 Detailed Description

Structure for undeliverable sessions. This structure is used to store sessions whose initial packets cannot be delivered.

3.4.2 Field Documentation

3.4.2.1 int dead zero sessions::invalid slipper sign

3.4.2.2 struct dead zero sessions∗ dead zero sessions::next next item in this structure

3.4.2.3 union artp receiver dead zero sessions::receiver session’s receiver

3.4.2.4 SID TYPE dead zero sessions::sid session identification number The documentation for this struct was generated from the following file:

• structs.h

3.5 ext item Struct Reference

Data Fields

• item main item
• artp receiver sender

• SID TYPE sid

• item main item
• artp receiver receiver

3.5.1 Detailed Description

Structure for buffer identified by 0. This structure is used for saving information about non-established sessions - we must remember some more information about each datagram.

3.5.2 Field Documentation

3.5.2.1 struct item ext item::main item generic packet structure

3.5.2.2 struct item ext item::main item generic datagram structure

3.5.2.3 union artp receiver ext item::receiver packet’s receiver

3.5.2.4 union artp receiver ext item::sender datagram’s sender

3.5.2.5 SID TYPE ext item::sid datagram’s session identifier The documentation for this struct was generated from the following files:

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

3.5 ext item Struct Reference  11

• rbuffers.c
• sbuffers.c

3.6 fragment item Struct Reference

Data Fields

• FRAGMENTS TYPE frag id

• char ∗ payload

• int payload size

• fragment item ∗ next fragment

• fragment item ∗ last fragment

3.6.1 Detailed Description

Structure for saving incoming data fragments

3.6.2 Field Documentation

3.6.2.1 FRAGMENTS TYPE fragment item::frag id fragment id (it’s equal to 1 if we’re saving control packet

3.6.2.2 struct fragment item∗ fragment item::last fragment last fragment

3.6.2.3 struct fragment item∗ fragment item::next fragment next fragment

3.6.2.4 char∗ fragment item::payload fragment payload

3.6.2.5 int fragment item::payload size fragment payload size The documentation for this struct was generated from the following file:

• rbuffers.c

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

3.7 item Struct Reference

Data Fields

• DSEQ TYPE dseq

• FRAGMENTS TYPE act frag

• FRAGMENTS TYPE frag count

• enum packet type dgram type

• int invalid

• fragment item ∗ fragments start

• fragment item ∗ fragments end

• item ∗ next

• item ∗ last

• char ∗ packet

• Tsending buffers ∗ buffer info

• int length

• SEQ TYPE seq

• double first send time

• double time to resend

• int retr counter

• item ∗ next

• item ∗ last

• item ∗ next to resend

• item ∗ last to resend

3.7.1 Detailed Description

Structure for saving whole datagram information.

3.7.2 Field Documentation

3.7.2.1 FRAGMENTS TYPE item::act frag

actual fragments count (count of saved fragments from this datagram).

3.7.2.2 struct Tsending buffers ∗ item::buffer info

the pointer to the buffer whose packet it is

14  Active Router Transport Protocol (ARTP) Data Structure Documentation

3.7.2.3 enum packet type item::dgram type datagram type

3.7.2.4 DSEQ TYPE item::dseq data sequence number

3.7.2.5 double item::first send time packet first sending time

3.7.2.6 FRAGMENTS TYPE item::frag count total fragments count

3.7.2.7 struct fragment item ∗ item::fragments end fragments end

3.7.2.8 struct fragment item ∗ item::fragments start fragments start

3.7.2.9 int item::invalid item validity sign

3.7.2.10 struct item∗ item::last last packet in buffer

3.7.2.11 struct item∗ item::last last item in buffer

3.7.2.12 struct item∗ item::last to resend last packet in structure for retransmissions

3.7.2.13 int item::length packet payload length (size)

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

3.7 item Struct Reference  15

3.7.2.14 struct item∗ item::next next packet in buffer

3.7.2.15 struct item∗ item::next next item in buffer

3.7.2.16 struct item∗ item::next to resend next packet in structure for retransmissions

3.7.2.17 char∗ item::packet packet payload

3.7.2.18 int item::retr counter packet retransmit counter

3.7.2.19 SEQ TYPE item::seq packet sequence number

3.7.2.20 double item::time to resend packet time to resend The documentation for this struct was generated from the following files:

• rbuffers.c
• sbuffers.c

3.8 payload CTRL Struct Reference

#include <packet.h>

Data Fields

• int count

• control type ∗ control

3.8.1 Detailed Description

Structure describing ARTP control payload.

3.8.2 Field Documentation

3.8.2.1 struct control type ∗ payload CTRL::control control elements 3.8.2.2 int payload CTRL::count total count of control elements The documentation for this struct was generated from the following file:

• packet.h

3.9 payload DATA Struct Reference

#include <packet.h>

Data Fields

• DSEQ TYPE dseq

• char ∗ sigdata

• SIGSZ TYPE sigsz

• char ∗ encdata

• ENCDATA SIZE TYPE encsz

3.9.1 Detailed Description

Structure describing ARTP data payload.

3.9.2 Field Documentation

3.9.2.1 DSEQ TYPE payload DATA::dseq data sequence number

3.9.2.2 char∗ payload DATA::encdata encrypted data

3.9.2.3 ENCDATA SIZE TYPE payload DATA::encsz encrypted data size

3.9.2.4 char∗ payload DATA::sigdata data signature

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

18  Active Router Transport Protocol (ARTP) Data Structure Documentation

3.9.2.5 SIGSZ TYPE payload DATA::sigsz data signature size The documentation for this struct was generated from the following file:

• packet.h

3.10 payload type Union Reference

#include <packet.h>

Data Fields

• payload DATA data
• payload CTRL ctrl

3.10.1 Detailed Description

ARTP packet payload

3.10.2 Field Documentation

3.10.2.1 struct payload CTRL payload type::ctrl control payload

3.10.2.2 struct payload DATA payload type::data data payload The documentation for this union was generated from the following file:

• packet.h

3.11 session item Struct Reference

#include <structs.h>

Data Fields

• SID TYPE session sid

• artp receiver session receiver

• SEQ TYPE current seq

• int buffers id

• enum Tsession status session status

• enum Tsession type session type

• void ∗ options [OPTIONS COUNT]

• void ∗ partner options [OPTIONS COUNT]

• unsigned long int cwnd

• unsigned long int flight

• MSS TYPE mss

• unsigned int max acks count

• unsigned long int sbuffer max size

• unsigned long int rbuffer max size

• unsigned long int rbuffer red limit

• int rbuffer red prob

• double rtt

• double srtt

• double rto

• double ts delta

• RETR TIMEOUT TYPE retries timeout

• TS TYPE expiration time

• double last send time

• unsigned int ref counter

• pthread mutex t ref counter mutex

• pthread mutex t session mutex

3.11.1 Detailed Description

Structure for storing session information.

3.11.2 Field Documentation

3.11 session item Struct Reference  21

3.11.2.1 int session item::buffers id the identification number of session buffers

3.11.2.2 SEQ TYPE session item::current seq next packet sequence number

3.11.2.3 unsigned long int session item::cwnd session congestion window size

3.11.2.4 TS TYPE session item::expiration time packets expiration time that belong to this session

3.11.2.5 unsigned long int session item::flight the size of unacknowledged packets for this session

3.11.2.6 double session item::last send time last link activity time

3.11.2.7 unsigned int session item::max acks count current maximal acks count

3.11.2.8 MSS TYPE session item::mss current maximal segment size

3.11.2.9 void∗ session item::options[OPTIONS COUNT] options which this session sends

3.11.2.10 void∗ session item::partner options[OPTIONS COUNT] options which this session receives

3.11.2.11 unsigned long int session item::rbuffer max size current maximal receive buffer size

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

22  Active Router Transport Protocol (ARTP) Data Structure Documentation

3.11.2.12 unsigned long int session item::rbuffer red limit current R.E.D. limit

3.11.2.13 int session item::rbuffer red prob current R.E.D. dropping probability

3.11.2.14 unsigned int session item::ref counter session reference counter

3.11.2.15 pthread mutex t session item::ref counter mutex mutex used for mutual exclusion of threads changing reference counter

3.11.2.16 RETR TIMEOUT TYPE session item::retries timeout maximal retries timeout for session

3.11.2.17 double session item::rto current retransmit timeout

3.11.2.18 double session item::rtt current session round trip time

3.11.2.19 unsigned long int session item::sbuffer max size current maximal send buffer size

3.11.2.20 pthread mutex t session item::session mutex mutex used for mutual exclusion of threads changing some session critical parameters.

3.11.2.21 union artp receiver session item::session receiver session’s receiver

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

3.11 session item Struct Reference  23

3.11.2.22 SID TYPE session item::session sid session identification number

3.11.2.23 enum Tsession status session item::session status session status

3.11.2.24 enum Tsession type session item::session type session type

3.11.2.25 double session item::srtt current sessin smooth round trip time

3.11.2.26 double session item::ts delta current difference between session’s time and its partner’s time The documentation for this struct was generated from the following file:

• structs.h

3.12 Tabuffers Struct Reference

Data Fields

• char acks [MAX ARTP PACKET SIZE]

• int acks count

• double latest send time

• SID TYPE sid

• artp receiver receiver

• Tabuffers ∗ next

• Tabuffers ∗ last

3.12.1 Detailed Description

Ack buffers’ main structure.

3.12.2 Field Documentation

3.12.2.1 char Tabuffers::acks[MAX ARTP PACKET SIZE] Place for storing sequence numbers to be acknowledged.

3.12.2.2 int Tabuffers::acks count Actual acks (sequence numbers to be acknowledged) count

3.12.2.3 struct Tabuffers∗ Tabuffers::last Last element in structure for sending ack packets (last ack buffer).

3.12.2.4 double Tabuffers::latest send time The latest time when this acknowledgement must be sent.

3.12.2.5 struct Tabuffers∗ Tabuffers::next Next element in structure for sending ack packets (next ack buffer).

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

3.12 Tabuffers Struct Reference  25

3.12.2.6 union artp receiver Tabuffers::receiver Receiver of the session which this acknowledgement belongs to.

3.12.2.7 SID TYPE Tabuffers::sid Identification number of the session which this acknowledgement belongs to. The documentation for this struct was generated from the following file:

• abuffers.c

3.13 Tdupple Struct Reference

Data Fields

• SEQ TYPE min seq

• SEQ TYPE max seq

• double max seq time

• Tdupple ∗ last

• Tdupple ∗ next

3.13.1 Detailed Description

Structure for determining duplicities. The items of this structure consist of minimal and maximal incoming sequence number (it means that all sequence numbers between this values already came). These items are joined to the list ordered by their minimal sequence number.

3.13.2 Field Documentation

3.13.2.1 struct Tdupple∗ Tdupple::last last item

3.13.2.2 SEQ TYPE Tdupple::max seq maximal incoming seq

3.13.2.3 double Tdupple::max seq time incoming time of maximal seq

3.13.2.4 SEQ TYPE Tdupple::min seq minimal seq

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

3.13 Tdupple Struct Reference  27

3.13.2.5 struct Tdupple∗ Tdupple::next next item The documentation for this struct was generated from the following file:

• rbuffers.c

3.14 Trcving buffers Struct Reference

Data Fields

• item ∗ complete start

• item ∗ complete end

• item ∗ incomplete start

• item ∗ incomplete end

• Tdupple ∗ dupple start

• Tdupple ∗ dupple end

• unsigned long int buffer size

• pthread mutex t buffer size mutex

• pthread mutex t complete start mutex

3.14.1 Detailed Description

receive buffers structure

3.14.2 Field Documentation

3.14.2.1 unsigned long int Trcving buffers::buffer size

counter of buffer size

3.14.2.2 pthread mutex t Trcving buffers::buffer size mutex

mutex used for mutual exclusion of threads manipulating with buffer size counter

3.14.2.3 struct item∗ Trcving buffers::complete end

complete buffer end

3.14.2.4 struct item∗ Trcving buffers::complete start

complete buffer start

3.14.2.5 pthread mutex t Trcving buffers::complete start mutex

mutex used for mutual exclusion of threads reading from complete buffer

3.14 Trcving buffers Struct Reference  29

3.14.2.6 struct Tdupple ∗ Trcving buffers::dupple end end of structure for determining duplicities

3.14.2.7 struct Tdupple ∗ Trcving buffers::dupple start start of structure for determining duplicities

3.14.2.8 struct item∗ Trcving buffers::incomplete end incomplete buffer end

3.14.2.9 struct item∗ Trcving buffers::incomplete start incomplete buffer start The documentation for this struct was generated from the following file:

• rbuffers.c

3.15 Tsending buffers Struct Reference

Data Fields

• artp receiver receiver

• item ∗ sent start

• item ∗ sent end

• item ∗ to send

• item ∗ end

• unsigned long int buffer size

• pthread mutex t buffer size mutex

• pthread mutex t sent start mutex

• pthread mutex t sent end mutex

• pthread mutex t to send mutex

• pthread mutex t end mutex

3.15.1 Detailed Description

Send buffers main structure

3.15.2 Field Documentation

3.15.2.1 unsigned long int Tsending buffers::buffer size

counter of buffer size

3.15.2.2 pthread mutex t Tsending buffers::buffer size mutex

mutex used for mutual exclusion of threads manipulating with buffer size counter

3.15.2.3 struct item∗ Tsending buffers::end

the end of buffer for packets to be sent

3.15.2.4 pthread mutex t Tsending buffers::end mutex

mutex used for mutual exclusion of threads writing to to send packets buffer end

3.15 Tsending buffers Struct Reference  31

3.15.2.5 union artp receiver Tsending buffers::receiver session receiver

3.15.2.6 struct item∗ Tsending buffers::sent end buffer for sent packets (its end)

3.15.2.7 pthread mutex t Tsending buffers::sent end mutex mutex used for mutual exclusion of threads writing to sent packets buffer end

3.15.2.8 struct item∗ Tsending buffers::sent start buffer for sent packets (its start)

3.15.2.9 pthread mutex t Tsending buffers::sent start mutex mutex used for mutual exclusion of threads reading from sent packets buffer.

3.15.2.10 struct item∗ Tsending buffers::to send the beginning of buffer for packets to be sent

3.15.2.11 pthread mutex t Tsending buffers::to send mutex mutex used for mutual exclusion of threads reading from to send packets buffer The documentation for this struct was generated from the following file:

• sbuffers.c

3.16 Tsetting Struct Reference

#include <setting.h>

Data Fields

• unsigned int initial mss

• TS TYPE initial exp time

• double initial rto time

• unsigned int default retries timeout

• unsigned long int initial sbuffers max size

• unsigned long int initial rbuffers max size

• unsigned long int initial rbuffers red limit

• int default red drop probability

• unsigned int default max acks count

3.16.1 Detailed Description

Type of a structure for saving global ARTP settings

3.16.2 Field Documentation

3.16.2.1 unsigned int Tsetting::default max acks count

maximal sequence numbers count in one acknowledgement packet

3.16.2.2 int Tsetting::default red drop probability

R.E.D. dropping probability

3.16.2.3 unsigned int Tsetting::default retries timeout

retries (for retransmissions) timeout

3.16.2.4 TS TYPE Tsetting::initial exp time

expiration time

3.16 Tsetting Struct Reference  33

3.16.2.5 unsigned int Tsetting::initial mss maximum segment size

3.16.2.6 unsigned long int Tsetting::initial rbuffers max size maximal receiving buffer size

3.16.2.7 unsigned long int Tsetting::initial rbuffers red limit the random early detection (R.E.D.) limit

3.16.2.8 double Tsetting::initial rto time retransmit timeout

3.16.2.9 unsigned long int Tsetting::initial sbuffers max size maximal sending buffer size The documentation for this struct was generated from the following file:

• setting.h

34  Active Router Transport Protocol (ARTP) Data Structure Documentation

Active Router Transport Protocol (ARTP) File Documentation

4.1 abuffers.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "abuffers.h"
#include "config.h"
#include "net.h"

Data Structures

• struct Tabuffers

Functions

• int abuffers init (void)

• int abuffers create (int id buffer, SID TYPE sid, struct sockaddr ∗receiver)

• int abuffers destroy (int id buffer)

• int abuffers add seq (int id buffer, SID TYPE sid, struct sockaddr ∗receiver, SEQ TYPE seq, double latest send time, int max count)

• int abuffers get ack (double actual time, SID TYPE ∗sid, struct sockaddr ∗∗receiver, char ∗∗value, int ∗size)

4.1.1 Detailed Description

ARTP library for ack buffers.

Author: Tomas Rebok

Date:2004

4.1.2 Function Documentation

4.1.2.1 int abuffers add seq (int id buffer, SID TYPE sid, struct sockaddr ∗ sender, SEQ TYPE seq, double latest send time, int maximal count)

Store incoming sequence number to relevant buffer. This function adds sequence number of incoming packet to given buffer identified by its id. If it’s the first sequence number saving for this session, it inserts the pointer of this session to the right place in structure for sending ack packets (depending on its latest time to send).

Parameters: id buffer the identification number of ack buffer.

sid the identification number of session that this sequence number relates to (used when this session isn’t created).

sender pointer to the place where the information about actual packet’s sender is stored (it’s the same as above - used when this session isn’t created).

seq the sequence number that has to be stored.

latest send time the latest time when the ack packet must be sent.

maximal count the maximal count of sequence numbers in one ack packet (after reaching this count the ack packet is immediately sent).

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.1.2.2 int abuffers create (int id buffer, SID TYPE sid, struct sockaddr ∗ sender)

Create ack buffer. This function allocates place for relevant buffer and initializes its parameters.

Parameters: id buffer the identification number of buffer to be created.

sid the identification number of session which this buffer will be created for.

sender pointer to the place where the sender of received packets is stored.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.1.2.3 int abuffers destroy (int id buffer)

Destroy ack buffer. This function destroys relevant ack buffer. It unallocates place used by that buffer and makes some other clearing steps (e.g. removes this buffer from structure for sending ack packets, etc.).

Parameters: id buffer identification number of buffer to be destroyed.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.1.2.4 int abuffers get ack (double time, SID TYPE ∗ sid, struct sockaddr ∗∗ receiver, char ∗∗ value, int ∗ size)

Get next ack packet which should be sent. This function looks whether there’s any ack packet which should be sent in specified time. If there’s any it returns all information about that packet and removes related buffer from structure for sending ack packets.

Parameters: time actual time sid the pointer to the place where session’s identification number will be stored.

receiver the relevant pointer which will be moved to the place where the receiver of returned ack packet will be stored.

value the relevant pointer which will be moved to the place where the payload of returned ack packet will be stored.

size the pointer to the place where the size of ack packet payload will be stored.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.1.2.5 int abuffers init (void)

Initialize ack buffers. This function doesn’t include any code this time. It is defined for further purposes.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.2 abuffers.h File Reference

#include <netinet/in.h>
#include <sys/socket.h>
#include "types.h"
#include "errors.h"

Defines

• #define ARTP ABUFFERS H 1

Functions

• int abuffers init (void)

• int abuffers create (int id buffer, SID TYPE sid, struct sockaddr ∗sender)

• int abuffers destroy (int id buffer)

• int abuffers add seq (int id buffer, SID TYPE sid, struct sockaddr ∗sender, SEQ TYPE seq, double latest send time, int maximal count)

• int abuffers get ack (double time, SID TYPE ∗sid, struct sockaddr ∗∗receiver, char ∗∗value, int ∗size)

4.2.1 Detailed Description

ARTP library for ack buffers.

Author: Tomas Rebok

Date:2004

4.2.2 Function Documentation

4.2.2.1 int abuffers add seq (int id buffer, SID TYPE sid, struct sockaddr ∗ sender, SEQ TYPE seq, double latest send time, int maximal count)

Store incoming sequence number to relevant buffer. This function adds sequence number of incoming packet to given buffer identified by its id. If it’s the first sequence number saving for this session, it inserts the pointer of this session to the right place in structure for sending ack packets (depending on its latest time to send).

Parameters: id buffer the identification number of ack buffer.

sid the identification number of session that this sequence number relates to (used when this session isn’t created).

sender pointer to the place where the information about actual packet’s sender is stored (it’s the same as above - used when this session isn’t created).

seq the sequence number that has to be stored.

latest send time the latest time when the ack packet must be sent.

maximal count the maximal count of sequence numbers in one ack packet (after reaching this count the ack packet is immediately sent).

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.2.2.2 int abuffers create (int id buffer, SID TYPE sid, struct sockaddr ∗ sender)

Create ack buffer. This function allocates place for relevant buffer and initializes its parameters.

Parameters: id buffer the identification number of buffer to be created.

sid the identification number of session which this buffer will be created for.

sender pointer to the place where the sender of received packets is stored.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.2.2.3 int abuffers destroy (int id buffer)

Destroy ack buffer. This function destroys relevant ack buffer. It unallocates place used by that buffer and makes some other clearing steps (e.g. removes this buffer from structure for sending ack packets, etc.).

Parameters: id buffer identification number of buffer to be destroyed.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.2.2.4 int abuffers get ack (double time, SID TYPE ∗ sid, struct sockaddr ∗∗ receiver, char ∗∗ value, int ∗ size)

Get next ack packet which should be sent. This function looks whether there’s any ack packet which should be sent in specified time. If there’s any it returns all information about that packet and removes related buffer from structure for sending ack packets.

Parameters: time actual time sid the pointer to the place where session’s identification number will be stored. receiver the relevant pointer which will be moved to the place where the receiver

of returned ack packet will be stored. value the relevant pointer which will be moved to the place where the payload of

returned ack packet will be stored. size the pointer to the place where the size of ack packet payload will be stored.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.2.2.5 int abuffers init (void)

Initialize ack buffers. This function doesn’t include any code this time. It is defined for further purposes.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3 artp.c File Reference

#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/wait.h>
#include <stdarg.h>
#include <stdlib.h>
#include "artp.h"
#include "structs.h"
#include "options.h"
#include "setting.h"
#include "config.h"
#include "rbuffers.h"
#include "sbuffers.h"
#include "abuffers.h"
#include "rwlocks.h"
#include "net.h"

Functions

• int artp prepare connection (SID TYPE sid, struct sockaddr ∗receiver)

• int artp destroy connection (SID TYPE sid, struct sockaddr ∗receiver)

• int artp send dgram (struct artp dgram ∗dgram, SID TYPE sid, struct sockaddr ∗receiver)

• int artp free dgram (struct artp dgram ∗dgram)

• int artp receive dgram (SID TYPE sid, struct sockaddr ∗sender, struct artp dgram ∗dgram)

• int artp receive any dgram (SID TYPE ∗sid, struct sockaddr ∗∗sender, struct artp dgram ∗dgram)

• int artp get undlvr session (SID TYPE ∗sid, struct sockaddr ∗receiver)

• int artp get sid (struct sockaddr ∗receiver, SID TYPE ∗sid)

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

• int artp set session options (SID TYPE sid, struct sockaddr ∗receiver, int use, enum artp session options option,...)

• int artp set session params (SID TYPE sid, struct sockaddr ∗receiver, enum artp session params param,...)

• int artp init (int socket, char ∗filename)

4.3.1 Detailed Description

Active router transport protocol’s (ARTP) main library.

Author: Tomas Rebok

Date:2004

4.3.2 Function Documentation

4.3.2.1 int artp destroy connection (SID TYPE sid, struct sockaddr ∗ receiver)

Destroy session. This function destroys previously created session (all its structures and buffers are destroyed, too). This session destroying is made like a garbage collector

- each session knows the count of pointers that points to it. When this count is equal to 0, the session is deleted.

Parameters: sid session identification number of deleted session receiver the pointer to the place where destroying session’s receiver is stored

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3.2.2 int artp free dgram (struct artp dgram ∗ dgram)

Free ARTP datagram. This function unallocates space taken by ARTP dgram (the space where points ARTP dgram pointers).

Parameters: dgram the pointer to the space where ARTP dgram is stored Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3.2.3 int artp get sid (struct sockaddr ∗ receiver, SID TYPE ∗ sid)

Get available session identification number. This function finds out available session identification number for given receiver.

Parameters: receiver the pointer to the place where receiver address is stored

sid the pointer to the place where found session identification number could be stored

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3.2.4 int artp get undlvr session (SID TYPE ∗ sid, struct sockaddr ∗ receiver)

Get undeliverable session. This function returns the non-established session whose packet couldn’t be sent.

Parameters: sid the pointer to the place where session identification number could be stored

receiver the relevant pointer which will be moved to the place where the packet’s receiver is stored.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3.2.5 int artp init (int sckt, char ∗ filename)

Initialize ARTP library. This function makes necessary initialization steps for proper function of ARTP protocol (starts threads, buffers and other structures initialization, etc.). It MUST be called as a first function! (Before any using of this protocol).

Parameters: sckt socket where this protocol should listen on.

filename the name of a config file (or NULL if no config file is required).

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3.2.6 int artp prepare connection (SID TYPE sid, struct sockaddr ∗ receiver)

Prepare new connection. This function prepares new connection to be established (all necessary structures and buffers are created). Then this new session is inserted to its right position in array of pointers to sessions.

Parameters: sid session identification number of creating session.

receiver the pointer to the place where new session’s receiver is stored

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3.2.7 int artp receive any dgram (SID TYPE ∗ sid, struct sockaddr ∗∗ sender, struct artp dgram ∗ dgram)

Receive ARTP datagram from non-established sessions. This function receives ARTP dgram from non-established session.

Parameters: sid the pointer to the place where session identification number could be stored

sender the relevant pointer which will be moved to the place where the dgram sender is stored.

dgram the pointer to the place where ARTP dgram information could be saved.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3.2.8 int artp receive dgram (SID TYPE sid, struct sockaddr ∗ sender, struct artp dgram ∗ dgram)

Receive ARTP datagram from established sessions. This function receives ARTP datagram from given sender (sent through given session). This session must be previously established.

Parameters: sid session identification number

sender the pointer to the place where session’s sender/receiver is stored

dgram the pointer to the place where ARTP dgram information could be saved.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3.2.9 int artp send dgram (struct artp dgram ∗ dgram, SID TYPE sid, struct sockaddr ∗ receiver)

Send ARTP datagram. This function sends ARTP datagram to specified receiver through given session. It creates packet header and copies there its payload (the payload is fragmented if necessary). Then it’s stored to proper session buffer.

Parameters: dgram the pointer to the sending datagram.

sid session identification number

receiver the pointer to the place where session receiver is stored

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3.2.10 int artp set session options (SID TYPE sid, struct sockaddr ∗ receiver, int use, enum artp session options option, ...)

Set session options. This function sets defined session options. The option value is taken from variable options list (there’s taken the first one only). By proper parameter we can say if we want to use this option or not.

Parameters: sid the identification number of proper session receiver the pointer to the place where session’s receiver is stored use indicates whether we have to use this option or not. (0 = do not use, 1 = use) option the option identifier that we want to set ... option value

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.3.2.11 int artp set session params (SID TYPE sid, struct sockaddr ∗ sender, enum artp session params param, ...)

Set session parameters. This function sets defined session parameters. The parameter value is taken from variable options list (there’s taken the first one only).

Parameters: sid the identification number of proper session receiver the pointer to the place where session’s receiver is stored param the parameter identifier that we want to set ... parameter value

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4 artp.h File Reference

#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "packet.h"
#include "options.h"
#include "errors.h"

Defines

• #define ARTP H 1

Enumerations

• enum artp session params { RETRIES TIMEOUT, MSS, EXP TIME, MAX ACKS COUNT, MAX SBUFFER SIZE, MAX RBUFFER SIZE, MAX RBUFFER RED LIMIT, MAX RBUFFER RED PROBABILITY }

Functions

• int artp init (int sckt, char ∗filename)

• int artp prepare connection (SID TYPE sid, struct sockaddr ∗receiver)

• int artp destroy connection (SID TYPE sid, struct sockaddr ∗receiver)

• int artp send dgram (struct artp dgram ∗dgram, SID TYPE sid, struct sockaddr ∗receiver)

• int artp receive dgram (SID TYPE sid, struct sockaddr ∗sender, struct artp dgram ∗dgram)

• int artp receive any dgram (SID TYPE ∗sid, struct sockaddr ∗∗sender, struct artp dgram ∗dgram)

• int artp free dgram (struct artp dgram ∗dgram)

• int artp get undlvr session (SID TYPE ∗sid, struct sockaddr ∗receiver)

• int artp get sid (struct sockaddr ∗receiver, SID TYPE ∗sid)

• int artp set session options (SID TYPE sid, struct sockaddr ∗receiver, int use, enum artp session options option,...)

• int artp set session params (SID TYPE sid, struct sockaddr ∗sender, enum artp session params param,...)

4.4.1 Detailed Description

Active router transport protocol’s (ARTP) main library.

Author: Tomas Rebok

Date:2004

4.4.2 Enumeration Type Documentation

4.4.2.1 enum artp session params

Available session’s parameters (which could be set by application)

Enumeration values: RETRIES TIMEOUT maximal retries timeout Defines the maximal retries timeout for each packet – when acknowledgement doesn’t come until this time is reached, session is said to be dead. (in seconds)

MSS maximal segment size Maximal size of packet that could be sent to the network. (in bytes)

EXP TIME expiration time The expiration time for all sent packets. (in microseconds)

MAX ACKS COUNT maximal seq. numbers count (in acks) Defines the maximal count of sequence numbers that could be sent in one ack packet.

MAX SBUFFER SIZE maximal send buffer size Maximal size that could be occupied by send buffer. If it’s set to 0, buffer size is unlimited. (in bytes)

MAX RBUFFER SIZE maximal receive buffer size Maximal size that could be occupied by receive buffer. If it’s set to 0, buffer size is unlimited. (in bytes)

MAX RBUFFER RED LIMIT maximal receive buffer R.E.D. limit The receive buffer size when random early detection (R.E.D.) takes place. Every incoming packet is then dropped by defined probability. If it’s set to 0 and buffer size is limited, buffer’s behavior is like normal tail drop buffer.

MAX RBUFFER RED PROBABILITY maximal receive buffer R.E.D. probability of packet’s dropping Each incoming packet is dropped by this probability (if R.E.D. buffer is used.

4.4.3 Function Documentation

4.4.3.1 int artp destroy connection (SID TYPE sid, struct sockaddr ∗ receiver)

Destroy session. This function destroys previously created session (all its structures and buffers are destroyed, too). This session destroying is made like a garbage collector - each session knows the count of pointers that points to it. When this count is equal to 0, the session is deleted.

Parameters: sid session identification number of deleted session

receiver the pointer to the place where destroying session’s receiver is stored

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4.3.2 int artp free dgram (struct artp dgram ∗ dgram)

Free ARTP datagram. This function unallocates space taken by ARTP dgram (the space where points ARTP dgram pointers).

Parameters: dgram the pointer to the space where ARTP dgram is stored

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4.3.3 int artp get sid (struct sockaddr ∗ receiver, SID TYPE ∗ sid)

Get available session identification number. This function finds out available session identification number for given receiver.

Parameters: receiver the pointer to the place where receiver address is stored

sid the pointer to the place where found session identification number could be stored Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4.3.4 int artp get undlvr session (SID TYPE ∗ sid, struct sockaddr ∗ receiver)

Get undeliverable session. This function returns the non-established session whose packet couldn’t be sent.

Parameters: sid the pointer to the place where session identification number could be stored

receiver the relevant pointer which will be moved to the place where the packet’s receiver is stored.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4.3.5 int artp init (int sckt, char ∗ filename)

Initialize ARTP library. This function makes necessary initialization steps for proper function of ARTP protocol (starts threads, buffers and other structures initialization, etc.). It MUST be called as a first function! (Before any using of this protocol).

Parameters: sckt socket where this protocol should listen on.

filename the name of a config file (or NULL if no config file is required).

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4.3.6 int artp prepare connection (SID TYPE sid, struct sockaddr ∗ receiver)

Prepare new connection. This function prepares new connection to be established (all necessary structures and buffers are created). Then this new session is inserted to its right position in array of pointers to sessions.

Parameters: sid session identification number of creating session.

receiver the pointer to the place where new session’s receiver is stored

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4.3.7 int artp receive any dgram (SID TYPE ∗ sid, struct sockaddr ∗∗ sender, struct artp dgram ∗ dgram)

Receive ARTP datagram from non-established sessions. This function receives ARTP dgram from non-established session.

Parameters: sid the pointer to the place where session identification number could be stored

sender the relevant pointer which will be moved to the place where the dgram sender is stored.

dgram the pointer to the place where ARTP dgram information could be saved.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4.3.8 int artp receive dgram (SID TYPE sid, struct sockaddr ∗ sender, struct artp dgram ∗ dgram)

Receive ARTP datagram from established sessions. This function receives ARTP datagram from given sender (sent through given session). This session must be previously established.

Parameters: sid session identification number

sender the pointer to the place where session’s sender/receiver is stored

dgram the pointer to the place where ARTP dgram information could be saved.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4.3.9 int artp send dgram (struct artp dgram ∗ dgram, SID TYPE sid, struct sockaddr ∗ receiver)

Send ARTP datagram. This function sends ARTP datagram to specified receiver through given session. It creates packet header and copies there its payload (the payload is fragmented if necessary). Then it’s stored to proper session buffer.

Parameters: dgram the pointer to the sending datagram.

sid session identification number

receiver the pointer to the place where session receiver is stored

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4.3.10 int artp set session options (SID TYPE sid, struct sockaddr ∗ receiver, int use, enum artp session options option, ...)

Set session options. This function sets defined session options. The option value is taken from variable options list (there’s taken the first one only). By proper parameter we can say if we want to use this option or not.

Parameters: sid the identification number of proper session

receiver the pointer to the place where session’s receiver is stored

use indicates whether we have to use this option or not. (0 = do not use, 1 = use) option the option identifier that we want to set ... option value

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.4.3.11 int artp set session params (SID TYPE sid, struct sockaddr ∗ sender, enum artp session params param, ...)

Set session parameters. This function sets defined session parameters. The parameter value is taken from variable options list (there’s taken the first one only).

Parameters: sid the identification number of proper session receiver the pointer to the place where session’s receiver is stored param the parameter identifier that we want to set ... parameter value

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.5 config.h File Reference

Defines

• #define ARTP CONFIG H 1

• #define ARTP VERSION 1

• #define LINK IDLE(rto) (2 ∗ (rto))

• #define INITIAL WINDOW SIZE(mss) (3 ∗ (mss))

• #define CWND ACK(mss, old cwnd) ((mss) ∗ (mss)) / (old cwnd)

• #define CWND DOWN MULTIPLIER 0.7

• #define CWND RETRANS(mss, old cwnd)

• #define RTO COMPUTE(srtt, init resend time) (srtt > 0) ? (4 ∗ (srtt)) : init - resend time

• #define LATEST ACKS SEND(srtt) ((srtt) / 2.0)

• #define SRTT ALPHA 0.875

• #define SRTT COMPUTE(rtt, old srtt)

• #define TS DELTA ALPHA 0.875

• #define TS DELTA COMPUTE(current time, sent time, srtt, old ts delta)

• #define MAX ARTP PACKET SIZE 2048

• #define DUPPLE SEQ COUNT 100000

• #define MAX CONFIG LINE LENGTH 1000

4.5.1 Detailed Description

ARTP's configuraton file.

Author: Tomas Rebok

Date:2004

4.5.2 Define Documentation

4.5.2.1 #define ARTP VERSION 1

Constant that define the ARTP’s version.

56  Active Router Transport Protocol (ARTP) File Documentation

4.5.2.2 #define CWND ACK(mss, old cwnd) ((mss) ∗ (mss)) / (old cwnd) Congestion window change after incoming acknowledgement. This macro says how to change congestion window size when any acknowledgement came.

Parameters: mss current maximum segment size old cwnd old size of congestion window

4.5.2.3 #define CWND DOWN MULTIPLIER 0.7 Congestion window multiplier after packet loss. This constant defines multiplier when retransmission took place (packet loss was detected).

4.5.2.4 #define CWND RETRANS(mss, old cwnd) Value:

(CWND_DOWN_MULTIPLIER * (old_cwnd) >= INITIAL_WINDOW_SIZE(mss)) \
         ? CWND_DOWN_MULTIPLIER * (old_cwnd) \
         : INITIAL_WINDOW_SIZE(mss);

Congestion window change after packet loss. This macro says how to compute new congestion window size after retransmission of any packet.

Parameters: mss current maximum segment size old cwnd old size of congestion window

4.5.2.5 #define DUPPLE SEQ COUNT 100000 Maximal count of sequence numbers in one item of structure for searching duplicities.

4.5.2.6 #define INITIAL WINDOW SIZE(mss) (3 ∗ (mss)) Initial congestion window size

Parameters: mss actual maximum segment size

4.5 config.h File Reference  57

4.5.2.7 #define LATEST ACKS SEND(srtt) ((srtt) / 2.0) Latest acknowledgement packet send time. This macro says how to compute time when given acknowledgement packet has to be sent (lately).

Parameters: srtt actual smooth round trip time

4.5.2.8 #define LINK IDLE(rto) (2 ∗ (rto)) Link idle computing. This macro says how to compute time when we want to decrease congestion window size when connection is idle more than computed time.

Parameters: rto actual retransmit timeout

4.5.2.9 #define MAX ARTP PACKET SIZE 2048 Maximal incoming ARTP packet size

4.5.2.10 #define MAX CONFIG LINE LENGTH 1000 Maximal read line length from config file

4.5.2.11 #define RTO COMPUTE(srtt, init resend time) (srtt > 0) ? (4 ∗ (srtt))

: init resend time

Retransmit timeout computing. This macro says how to compute packets’ retransmit timeout after incoming ackwnowledgement packet.

Parameters: srtt actual smooth round trip time init resend time initial retransmit timeout

4.5.2.12 #define SRTT ALPHA 0.875 Smooth round trip time computing constant.

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

4.5.2.13 #define SRTT COMPUTE(rtt, old srtt)

Value:

((old_srtt) == 0) ? rtt \
                         : (SRTT_ALPHA * (old_srtt)) + ((1 - SRTT_ALPHA) * (rtt));

Smooth round trip time computing. This macro says how to compute smooth round trip time when actual round trip time and old smooth round trip time are given.

Parameters: rtt actual round trip time

old srtt old value of smooth round trip time

4.5.2.14 #define TS DELTA ALPHA 0.875

Time stamp delta computing constant (see below)

4.5.2.15 #define TS DELTA COMPUTE(current time, sent time, srtt, old ts delta)

Value:

((old_ts_delta) == 0) ? (current_time) - ((sent_time) + (srtt) / 2.0) \
                              : (TS_DELTA_ALPHA * (old_ts_delta)) + \
                              ((1 - TS_DELTA_ALPHA) * ((current_time) \
                                                  - ((sent_time) + (srtt) / 2.0)))

Timestamp delta computing. This macro says how to compute the difference between our time and our partner’s time (timestamp delta).

Parameters: current time actual time

sent time sent time of given acknowledgement packet

srtt actual smooth round trip time

old ts delta old value of timestamp delta

4.6 errors.c File Reference

#include "stdlib.h"
#include "errors.h"

Functions

• char ∗ artp error str (enum artp errors error code)

4.6.1 Detailed Description

ARTP possible error codes. Author: Tomas Rebok Date:2004

4.6.2 Function Documentation

4.6.2.1 char∗ artp error str (enum artp errors error code) Returns string describing given error. This function finds out relevant description for given ARTP error code and returns it as a string. Parameters: error code relevant error code Returns: NULL given error code is bad Returns: string error description

4.7 errors.h File Reference

Defines

• #define ARTP ERRORS H 1

Enumerations

• enum artp errors { E GENERIC ERROR = -1, E MEMORY FAIL = -2, E EMPTY BUFFER = -3, E FULL BUFFER = -4, E DEAD SESSION = -5, E START THREADS = -6, E BUF INIT ERROR = -7, E OPENING FILE = - 8, E SYNTAX ERROR = -9, E BAD VALUE = -10, E INVALID BUFFER ID = -11, E NO AVAIL SID = -12, E NONEST SESSION = - 13, E SESSION EXISTS = -14, E PACKET NOT FOUND = - 15, E DUPLICITY PACKET = -16, E INVALID OPTION = -17, E INVALID OPT SIZE = -18, E INVALID OPT VALUE = -19, E BAD OPT USE = -20, E SENDING ERROR = -21, E FULL CWND = -22, E INVALID PARAMETER = -23, E BAD PARAM VALUE = -24, E NO ACK = -25, E NULL PTR = -26, E UNSUPPORTED AF = -27, E DIFF ADDR = -28, E BAD DGRAM = -29, E BIG DGRAM = -30, E SMALL MSS = -31, E PARTNER MSS = -32, E BAD PACKET TYPE = -33 }

Functions

• char ∗ artp error str (enum artp errors error code)

4.7.1 Detailed Description

ARTP possible error codes.

Author: Tomas Rebok

Date:2004

4.7.2 Enumeration Type Documentation

4.7.2.1 enum artp errors

Enumeration of possible ARTP functions error codes

Enumeration values: E GENERIC ERROR Generic error (not specified) E MEMORY FAIL Memory error (error in allocation or something else E EMPTY BUFFER Empty buffer E FULL BUFFER Full buffer E DEAD SESSION Session is dead (connection lost) E START THREADS Error in starting ARTP necessary threads E BUF INIT ERROR Error in buffer initialization E OPENING FILE Error in opening config file E SYNTAX ERROR Syntax error in config file E BAD VALUE Bad value in config file E INVALID BUFFER ID Invalid buffer identification number E NO AVAIL SID There’s no available session identification for that receiver E NONEST SESSION Refering to non-established session E SESSION EXISTS Wanted session already exists E PACKET NOT FOUND Refering packet wasn’t found E DUPLICITY PACKET Duplicity packet E INVALID OPTION Invalid option E INVALID OPT SIZE Invalid option size E INVALID OPT VALUE Invalid option value E BAD OPT USE Badly specified option using E SENDING ERROR Error in packet sending E FULL CWND Full congestion window E INVALID PARAMETER Invalid parameter E BAD PARAM VALUE Invalid parameter value E NO ACK No acknowledgement packet to send E NULL PTR Given pointer points to NULL E UNSUPPORTED AF Unsupported address family E DIFF ADDR Different addresses E BAD DGRAM Given datagram is bad E BIG DGRAM Given datagram is too big E SMALL MSS Set MSS is too small - packet cannot be sent E PARTNER MSS Our partner wishes smaller MSS than we want E BAD PACKET TYPE Badly specified packet type

4.7.3 Function Documentation

4.7.3.1 char∗ artp error str (enum artp errors error code) Returns string describing given error. This function finds out relevant description for given ARTP error code and returns it as a string. Parameters: error code relevant error code Returns: NULL given error code is bad Returns: string error description

4.8 net.c File Reference

#include <string.h>
#include "net.h"
#include "errors.h"

Functions

• int rcvrcmp (struct sockaddr ∗r1, struct sockaddr ∗r2)

• int rcvrcpy (struct sockaddr ∗dest rcvr, struct sockaddr ∗source rcvr)

• int rcvrsz (struct sockaddr ∗rcvr)

4.8.1 Detailed Description

ARTP socket address manipulating functions. Author: Tomas Rebok Date:2004

4.8.2 Function Documentation

4.8.2.1 int rcvrcmp (struct sockaddr ∗ r1, struct sockaddr ∗ r2) Compare two socket addresses. This function is used for comparing two socket addresses. Structures are compared depending on their address family. Parameters: r1 the pointer to the place where the first address information is stored

r2 the pointer to the place where the second address information is stored Returns: zero addresses are equal Returns: nonzero addresses are different or some error happened (for further information

see documentation of file errors.h).

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

4.8.2.2 int rcvrcpy (struct sockaddr ∗ dest rcvr, struct sockaddr ∗ source rcvr)

Copy socket address. This function copies socket address pointed by source rcvr parameter into the place pointed by dest rcvr parameter.

Parameters: source rcvr the pointer to the place where the source socket address is stored.

dest rcvr the pointer to the place where the source socket address will be copied to.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.8.2.3 int rcvrsz (struct sockaddr ∗ rcvr)

Find out the size of the socket address. This function finds out the size occupied by given socket address.

Parameters: rcvr the pointer to the place where the socket address information is stored.

rcvr len the pointer to the place where the size of given socket address will be stored.

Returns: below zero related error code if something failed (for further information see documentation of file errors.h).

Returns: above zero the size occupied by given socket address.

4.9 net.h File Reference

#include <sys/socket.h>
#include <sys/types.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h>

Data Structures

• union artp receiver

Defines

• #define ARTP NET H 1

Functions

• int rcvrcmp (struct sockaddr ∗r1, struct sockaddr ∗r2)

• int rcvrcpy (struct sockaddr ∗dest rcvr, struct sockaddr ∗source rcvr)

• int rcvrsz (struct sockaddr ∗rcvr)

4.9.1 Detailed Description

ARTP socket address manipulating functions. Author: Tomas Rebok Date:2004

4.9.2 Function Documentation

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

4.9.2.1 int rcvrcmp (struct sockaddr ∗ r1, struct sockaddr ∗ r2)

Compare two socket addresses. This function is used for comparing two socket addresses. Structures are compared depending on their address family.

Parameters: r1 the pointer to the place where the first address information is stored

r2 the pointer to the place where the second address information is stored

Returns: zero addresses are equal

Returns: nonzero addresses are different or some error happened (for further information see documentation of file errors.h).

4.9.2.2 int rcvrcpy (struct sockaddr ∗ dest rcvr, struct sockaddr ∗ source rcvr)

Copy socket address. This function copies socket address pointed by source rcvr parameter into the place pointed by dest rcvr parameter.

Parameters: source rcvr the pointer to the place where the source socket address is stored.

dest rcvr the pointer to the place where the source socket address will be copied to.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.9.2.3 int rcvrsz (struct sockaddr ∗ rcvr)

Find out the size of the socket address. This function finds out the size occupied by given socket address.

Parameters: rcvr the pointer to the place where the socket address information is stored.

rcvr len the pointer to the place where the size of given socket address will be stored.

Returns: below zero related error code if something failed (for further information see documentation of file errors.h).

Returns: above zero the size occupied by given socket address.

4.10 options.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "options.h"
#include "config.h"
#include "errors.h"

Functions

• int options init ()

• int set global option (char ∗option name, char ∗option value, int use)

• int set default options (struct session item ∗session)

• int get session options (struct session item ∗session, struct artp dgram ∗dgram, char ∗∗options, int ∗size)

• int parse session options (struct session item ∗session, char ∗options, int size)

• int use options (struct session item ∗session, int use, enum artp session options option id, va list ∗ap)

4.10.1 Detailed Description

definitions of ARTP options and their manipulating functions.

Author: Tomas Rebok

Date:2004

4.10.2 Function Documentation

4.10.2.1 int get session options (struct session item ∗ session, struct artp dgram ∗ dgram, char ∗∗ options, int ∗ size)

Find out session options. This function finds out options which has to be sent as a part of ARTP packet. There’re returned no options for non-established sessions.

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

Parameters: session the pointer to the place where session information is stored.

packet the pointer to the place where currently send packet is stored (currently

unused - for further purposes). options the relevant pointer which will be moved to the place where returned op-

tions will be stored. size the pointer to the place where size of returned options will be stored.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.10.2.2 int options init ()

Initialize options. This function initializes options - creates necessary structure and sets default options which has to be set for each session.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.10.2.3 int parse session options (struct session item ∗ session, char ∗ options, int size)

Parse session options. This function is used for parsing received options and saving their values to relevant structure. Previously saved (and allocated) options which wasn’t covered in parsed string will be unallocated.

Parameters: session the pointer to the place where session information is stored.

options the pointer to the place where options to parse are stored.

size given options size.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.10.2.4 int set default options (struct session item ∗ session)

Set default session options. This function is used for setting defaultly set options for given session.

Parameters: session the pointer to the place where session information is stored.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.10.2.5 int set global option (char ∗ option name, char ∗ option value, int use)

Set global sessions options. This function sets global sessions options as read from config file.

Parameters: option name the pointer to the space where option name is stored.

option value the pointer to the space where option value is stored.

use indicates whether this option has to be used or not (0 = don’t use, 1 = use).

4.10.2.6 int use options (struct session item ∗ session, int use, enum artp session options option id, va list ∗ ap)

Set options using. This function is used for setting using of defined options (and their values).

Parameters: session the pointer to the place where session information is stored.

use indicates whether this option will be used or not (0 = don’t use, 1 = use). option id option identification number. ap the pointer to the place where variable parameters list is stored (the option

value is obtained from this list).

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.11 options.h File Reference

#include <stdarg.h>
#include "structs.h"
#include "packet.h"

Defines

• #define ARTP OPTIONS H 1

• #define OPTIONS COUNT 3

Enumerations

• enum artp session options { MAX MSS, MAX DGRAM LEN, RETRANSMITS TIMEOUT }

Functions

• int options init ()

• int set global option (char ∗option name, char ∗option value, int use)

• int set default options (struct session item ∗session)

• int get session options (struct session item ∗session, struct artp dgram ∗dgram, char ∗∗options, int ∗size)

• int parse session options (struct session item ∗session, char ∗options, int size)

• int use options (struct session item ∗session, int use, enum artp session options option id, va list ∗ap)

4.11.1 Detailed Description

ARTP options definition and their manipulating functions.

Author: Tomas Rebok

Date:2004

4.11.2 Define Documentation

4.11.2.1 #define OPTIONS COUNT 3

The total options count.

4.11.3 Enumeration Type Documentation

4.11.3.1 enum artp session options

The list of available options.

Enumeration values: MAX MSS maximal MSS Send this option to your partner when you want to receive packets that has to be lesser than given size.

MAX DGRAM LEN maximal datagram size Send this option to your partner when you want to receive datagrams that has to be lesser than given size.

RETRANSMITS TIMEOUT retransmits’ timeout This option is used for receiver’s determining too old information in his packets history (history used for determining duplicities). NOTE: If you’re sure that you will send less than 2^{∧}32 packets you may not use this option.

4.11.4 Function Documentation

4.11.4.1 int get session options (struct session item ∗ session, struct artp dgram ∗ dgram, char ∗∗ options, int ∗ size)

Find out session options. This function finds out options which has to be sent as a part of ARTP packet. There’re returned no options for non-established sessions.

Parameters: session the pointer to the place where session information is stored.

packet the pointer to the place where currently send packet is stored (currently unused - for further purposes).

options the relevant pointer which will be moved to the place where returned options will be stored.

size the pointer to the place where size of returned options will be stored.

Returns: zero success Returns: nonzero related error code if something failed (for further information see docu-

mentation of file errors.h).

4.11.4.2 int options init ()

Initialize options. This function initializes options - creates necessary structure and sets default options which has to be set for each session.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.11.4.3 int parse session options (struct session item ∗ session, char ∗ options, int size)

Parse session options. This function is used for parsing received options and saving their values to relevant structure. Previously saved (and allocated) options which wasn’t covered in parsed string will be unallocated.

Parameters: session the pointer to the place where session information is stored.

options the pointer to the place where options to parse are stored.

size given options size.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.11.4.4 int set default options (struct session item ∗ session)

Set default session options. This function is used for setting defaultly set options for given session.

Parameters: session the pointer to the place where session information is stored.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.11.4.5 int set global option (char ∗ option name, char ∗ option value, int use)

Set global sessions options. This function sets global sessions options as read from config file.

Parameters: option name the pointer to the space where option name is stored.

option value the pointer to the space where option value is stored.

use indicates whether this option has to be used or not (0 = don’t use, 1 = use).

4.11.4.6 int use options (struct session item ∗ session, int use, enum artp session options option id, va list ∗ ap)

Set options using. This function is used for setting using of defined options (and their values).

Parameters: session the pointer to the place where session information is stored.

use indicates whether this option will be used or not (0 = don’t use, 1 = use).

option id option identification number.

ap the pointer to the place where variable parameters list is stored (the option value is obtained from this list).

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.12 packet.h File Reference

#include "types.h"

Data Structures

• struct artp dgram

• struct control type

• struct payload CTRL

• struct payload DATA

• union payload type

Defines

• #define ARTP PACKET H 1

Enumerations

• enum packet type { DATA, CTRL, ACK }

• enum ctrl type { REQUEST, REPLY }

4.12.1 Detailed Description

ARTP packet structure definition. Author: Tomas Rebok Date:2004

4.12.2 Enumeration Type Documentation

4.12.2.1 enum ctrl type ARTP control packet possible types. Enumeration values: REQUEST request packet

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

REPLY reply packet

4.12.2.2 enum packet type

ARTP packet possible types.

Enumeration values: DATA data packet CTRL control packet ACK acknowledgement packet

4.13 rbuffers.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "rbuffers.h"
#include "setting.h"
#include "net.h"
#include "errors.h"
#include "config.h"

Data Structures

• struct ext item

• struct fragment item

• struct item

• struct Tdupple

• struct Trcving buffers

Functions

• int rbuffers init (void)

• int rbuffers create (int id buffer)

• int rbuffers destroy (int id buffer)

• int rbuffers get size (int id buffer, unsigned long int ∗buffer size)

• int rbuffers add packet (int id buffer, char ∗value, int payload size, struct sockaddr ∗sender, SID TYPE sid, enum packet type type, SEQ TYPE seq, DSEQ - TYPE dseq, FRAGMENTS TYPE frag id, FRAGMENTS TYPE frag count, double current time, unsigned int retransmits timeout)

• int rbuffers get dgram (int id buffer, char ∗∗value, int ∗payload size, enum packet type ∗type, DSEQ TYPE ∗dseq, struct sockaddr ∗∗sender, SID TYPE ∗sid)

4.13.1 Detailed Description

ARTP library for receive buffers.

Author: Tomas Rebok Date:2004

4.13.2 Function Documentation

4.13.2.1 int rbuffers add packet (int id buffer, char ∗ value, int payload size, struct sockaddr ∗ sender, SID TYPE sid, enum packet type type, SEQ TYPE seq, DSEQ TYPE dseq, FRAGMENTS TYPE frag id, FRAGMENTS TYPE frag count, double current time, unsigned int retransmits timeout)

Add incoming packet payload into receive buffer. This function adds packet payload into receive buffer. If the whole datagram consists of 1 fragment, it’s immediately saved into complete datagrams buffer. If that datagram consists of more than one fragment, the packet is saved into incomplete datagrams buffer. After coming of the last fragment the whole datagram is moved to complete datagrams buffer.

Parameters: id buffer identification number of receive buffer.

value the pointer to the place where the packet payload is stored. payload size payload size of adding packet. sender the pointer to the place where the information about packet’s sender is

stored (used for non-established sessions). sid session identification number type packet type seq packet sequence number dseq packet data sequence (or arbitrary value if adding control packet). frag id data datagram fragment identification number (if adding control packet, it

MUST be set to 1). frag count data datagram fragments count (if adding control packet, it MUST be

set to 1). current time current time (it’s equal to packet incoming time) retransmits timeout retransmits timeout sent by our partner to determine old

packets in structure for duplicity check. Set it to 0 if our partner doesn’t send this option.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.13.2.2 int rbuffers create (int id buffer)

Create receive buffer. This function allocates place for relevant buffer and initializes its parameters.

Parameters: id buffer identification number of creating buffer.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.13.2.3 int rbuffers destroy (int id buffer)

Destroy receive buffer. This function destroys relevant receive buffer. It unallocates place used by that buffer and makes some other clearing steps (deletes all completely and incompletely received datagrams, destroys all its structures, etc.).

Parameters: id buffer identification number of destroyed buffer.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.13.2.4 int rbuffers get dgram (int id buffer, char ∗∗ value, int ∗ size, enum packet type ∗ type, DSEQ TYPE ∗ dseq, struct sockaddr ∗∗ sender, SID TYPE ∗ sid)

Obtain completely received datagram. This functions gets one completely received datagram (if any). If that datagram consists of more than one fragment it will be assembled from all its fragments.

Parameters: id buffer identification number of receive buffer.

value the relevant pointer which will be moved to the place where the datagram payload will be saved. size the pointer to the place where the payload size could be stored. type the pointer to the place where the datagram type could be stored. dseq the pointer to the place where the payload data sequence number could be

stored. sender the relevant pointer which will be moved to the place where the datagram’s

sender is stored. sid the pointer to the place where the session identification number could be

stored.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.13.2.5 int rbuffers get size (int id buffer, unsigned long int ∗ buffer size)

Return identified receive buffer size. This function finds out receive buffer size and returns it.

Parameters: id buffer identification number of receive buffer.

buffer size the pointer to the place where buffer size could be stored.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.13.2.6 int rbuffers init (void)

Initialize receive buffers. This function doesn’t include any code this time. It is defined for further purposes.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.14 rbuffers.h File Reference

#include <netinet/in.h>
#include <sys/socket.h>
#include "packet.h"

Defines

• #define ARTP RBUFFERS H 1

Functions

• int rbuffers init (void)

• int rbuffers create (int id buffer)

• int rbuffers destroy (int id buffer)

• int rbuffers get size (int id buffer, unsigned long int ∗buffer size)

• int rbuffers add packet (int id buffer, char ∗value, int payload size, struct sockaddr ∗sender, SID TYPE sid, enum packet type type, SEQ TYPE seq, DSEQ - TYPE dseq, FRAGMENTS TYPE frag id, FRAGMENTS TYPE frag count, double current time, unsigned int retransmits timeout)

• int rbuffers get dgram (int id buffer, char ∗∗value, int ∗size, enum packet type ∗type, DSEQ TYPE ∗dseq, struct sockaddr ∗∗sender, SID TYPE ∗sid)

4.14.1 Detailed Description

ARTP library for receive buffers.

Author: Tomas Rebok

Date:2004

4.14.2 Function Documentation

4.14.2.1 int rbuffers add packet (int id buffer, char ∗ value, int payload size, struct sockaddr ∗ sender, SID TYPE sid, enum packet type type, SEQ TYPE seq, DSEQ TYPE dseq, FRAGMENTS TYPE frag id, FRAGMENTS TYPE frag count, double current time, unsigned int retransmits timeout)

Add incoming packet payload into receive buffer. This function adds packet payload into receive buffer. If the whole datagram consists of 1 fragment, it’s immediately saved into complete datagrams buffer. If that datagram consists of more than one fragment, the packet is saved into incomplete datagrams buffer. After coming of the last fragment the whole datagram is moved to complete datagrams buffer.

Parameters: id buffer identification number of receive buffer.

value the pointer to the place where the packet payload is stored.

payload size payload size of adding packet.

sender the pointer to the place where the information about packet’s sender is stored (used for non-established sessions).

sid session identification number

type packet type

seq packet sequence number

dseq packet data sequence (or arbitrary value if adding control packet).

frag id data datagram fragment identification number (if adding control packet, it MUST be set to 1).

frag count data datagram fragments count (if adding control packet, it MUST be set to 1).

current time current time (it’s equal to packet incoming time)

retransmits timeout retransmits timeout sent by our partner to determine old packets in structure for duplicity check. Set it to 0 if our partner doesn’t send this option.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.14.2.2 int rbuffers create (int id buffer)

Create receive buffer. This function allocates place for relevant buffer and initializes its parameters.

Parameters: id buffer identification number of creating buffer.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.14.2.3 int rbuffers destroy (int id buffer)

Destroy receive buffer. This function destroys relevant receive buffer. It unallocates place used by that buffer and makes some other clearing steps (deletes all completely and incompletely received datagrams, destroys all its structures, etc.).

Parameters: id buffer identification number of destroyed buffer.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.14.2.4 int rbuffers get dgram (int id buffer, char ∗∗ value, int ∗ size, enum packet type ∗ type, DSEQ TYPE ∗ dseq, struct sockaddr ∗∗ sender, SID TYPE ∗ sid)

Obtain completely received datagram. This functions gets one completely received datagram (if any). If that datagram consists of more than one fragment it will be assembled from all its fragments.

Parameters: id buffer identification number of receive buffer.

value the relevant pointer which will be moved to the place where the datagram payload will be saved.

size the pointer to the place where the payload size could be stored.

type the pointer to the place where the datagram type could be stored.

dseq the pointer to the place where the payload data sequence number could be stored. sender the relevant pointer which will be moved to the place where the datagram’s

sender is stored.

sid the pointer to the place where the session identification number could be stored.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.14.2.5 int rbuffers get size (int id buffer, unsigned long int ∗ buffer size)

Return identified receive buffer size. This function finds out receive buffer size and returns it.

Parameters: id buffer identification number of receive buffer.

buffer size the pointer to the place where buffer size could be stored.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.14.2.6 int rbuffers init (void)

Initialize receive buffers. This function doesn’t include any code this time. It is defined for further purposes.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.15 rwlocks.h File Reference

Defines

• #define ARTP RWLOCKS H 1

• #define RW INIT(x, y, z, wsem, rsem, wcount, rcount)

• #define READERS LOCK(x, y, z, wsem, rsem, wcount, rcount)

• #define READERS UNLOCK(x, y, z, wsem, rsem, wcount, rcount)

• #define WRITERS LOCK(x, y, z, wsem, rsem, wcount, rcount)

• #define WRITERS UNLOCK(x, y, z, wsem, rsem, wcount, rcount)

4.15.1 Detailed Description

Help macros for readers/writers problem.

Author: Tomas Rebok

Date:2004

4.15.2 Define Documentation

4.15.2.1 #define READERS LOCK(x, y, z, wsem, rsem, wcount, rcount)

Value:

{\
 pthread_mutex_lock(&z);\
     pthread_mutex_lock(&rsem);\
          pthread_mutex_lock(&x);\
               (rcount)++;\
               if ((rcount) == 1)\
                   pthread_mutex_lock(&wsem);\
          pthread_mutex_unlock(&x);\
     pthread_mutex_unlock(&rsem);\
 pthread_mutex_unlock(&z);\
}

Readers lock. This macro is used for readers. There can be more than one reader simultaneously, but first writer stops new readers till the end of the writer(s) code.

4.15.2.2 #define READERS UNLOCK(x, y, z, wsem, rsem, wcount, rcount)

Value:

{\
     pthread_mutex_lock(&x);\
         (rcount)--;\
         if ((rcount) == 0)\
              pthread_mutex_unlock(&wsem);\
     pthread_mutex_unlock(&x);\
}

Readers unlock. This macro unlocks previously locked readers lock. It decreases the count of readers, too.

4.15.2.3 #define RW INIT(x, y, z, wsem, rsem, wcount, rcount)

Value:

{\
     if ((pthread_mutex_init(&x, NULL) != 0)\
              || (pthread_mutex_init(&y, NULL) != 0)\
              || (pthread_mutex_init(&z, NULL) != 0)\
              || (pthread_mutex_init(&wsem, NULL) != 0)\
              || (pthread_mutex_init(&rsem, NULL) != 0))\
         return E_MEMORY_FAIL;\
     wcount = 0;\
     rcount = 0;\
}

Initialize all necessary structures. This macro initializes all necessary mutexes and counters.

4.15.2.4 #define WRITERS LOCK(x, y, z, wsem, rsem, wcount, rcount)

Value:

{\
     pthread_mutex_lock(&y);\
         (wcount)++;\
         if ((wcount) == 1)\
              pthread_mutex_lock(&rsem);\
     pthread_mutex_unlock(&y);\
     pthread_mutex_lock(&wsem);\
}

Writers lock. This macro is used for writers to lock. There can be only one writer at the moment, no readers are accepted, too. Waiting writer stops all new readers till its end.

4.15.2.5 #define WRITERS UNLOCK(x, y, z, wsem, rsem, wcount, rcount)

Value:

{\
     pthread_mutex_unlock(&wsem);\
     pthread_mutex_lock(&y);\
         (wcount)--;\
         if ((wcount) == 0)\
              pthread_mutex_unlock(&rsem);\
     pthread_mutex_unlock(&y);\
}

Writers unlock. This macro unlocks previously locked writers lock. It decreases the count of writers, too.

4.16 sbuffers.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "sbuffers.h"
#include "setting.h"
#include "net.h"
#include "errors.h"

Data Structures

• struct ext item

• struct item

• struct Tsending buffers

Functions

• int sbuffers init (void)

• int sbuffers create (struct sockaddr ∗receiver)

• int sbuffers destroy (int id buffer)

• int sbuffers get size (int id buffer, unsigned long int ∗buffer size)

• int sbuffers add packet (int id buffer, struct sockaddr ∗receiver, SID TYPE sid, char ∗value, int size, SEQ TYPE seq)

• int sbuffers get packet (int id buffer, char ∗∗value, int ∗size, struct sockaddr ∗∗receiver)

• int sbuffers send event (int id buffer, char ∗bitstream, int size, double sent time, double time to resend)

• int sbuffers resend event (double time to resend)

• int sbuffers ack event (int id buffer, struct sockaddr ∗sender, SID TYPE sid, SEQ TYPE seq, int ∗size, double ∗time)

• double sbuffers get top rsnd time (void)

• int sbuffers get rsnd packet (char ∗∗value, int ∗size, struct sockaddr ∗∗receiver, double ∗first send time)

• int sbuffers ignore first rsnd (char ∗value)

4.16.1 Detailed Description

ARTP library for send buffers.

Author: Tomas Rebok

Date:2004

4.16.2 Function Documentation

4.16.2.1 int sbuffers ack event (int id buffer, struct sockaddr ∗ sender, SID TYPE sid, SEQ TYPE seq, int ∗ size, double ∗ time)

Delete packet from sent packets buffer. This function deletes packet from sent buffer after incoming acknowledgement packet. Packet is searched depending on its sequence number (for established sessions) or depending on its sequence number, sender and session identifier (for non-established sessions). It’s deleted from structure for retransmissions, too. If deleted packet wasn’t resent, its sent time is returned, too (for computing round trip time). Its size is returned, too.

Parameters: id buffer the identification number of send buffer.

sender the pointer to the place where sender’s address is stored.

sid the session identification number which this packet belongs to.

seq packet sequence number.

size the pointer to the place where deleted packet size will be stored.

time the pointer to the place where deleted packet sent time could be stored.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.16.2.2 int sbuffers add packet (int id buffer, struct sockaddr ∗ receiver, SID TYPE sid, char ∗ value, int size, SEQ TYPE seq)

Add packet to send. This function adds packet which has to be sent. This adding is a bit complicated because of slipper (this is made for mutual exclusion of reading and adding threads). First of all new item is inserted to the end of complete buffer (after slipper) and its signed as a new slipper. Then all necessary information is copied to the old slipper and then it’s signed (the old slipper) as a new valid item.

Parameters: id buffer the identification number of send buffer.

receiver the pointer to the place where the packet’s receiver is stored. It’s used for

non-established sessions only. Otherwise it could be NULL. sid the session identification number. It’s used for non-established sessions only.

Otherwise it could be any value. value the pointer to the place where the packet value is stored. size the size of packet payload. seq the packet sequence number.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.16.2.3 int sbuffers create (struct sockaddr ∗ receiver)

Create send buffer. At the beginning this function searches first free space for creating new buffer in the array of pointers to all allocated buffers. If there’s any, it’s used. If there isn’t, the array is resized and last pointer is used. Then all slippers are made and all buffer’s parameters are set to its default values.

Parameters: receiver the pointer to the place where session receiver is stored.

Returns: above or equal zero success. Creating buffer identification number is returned.

Returns: below zero related error code if something failed (for further information see documentation of file errors.h).

4.16.2.4 int sbuffers destroy (int id buffer)

Destroy send buffers. This function destroys relevant send buffer. It unallocates place used by that buffer and makes some other clearing steps (deletes all sent and unsent packets, destroys all its help structures and semaphores, etc.).

Parameters: id buffer the identification number of destroying buffer.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.16.2.5 int sbuffers get packet (int id buffer, char ∗∗ value, int ∗ size, struct sockaddr ∗∗ receiver)

Get packet dedicated to send. This function returns packet which has to be sent (and its other information if necessary).

Parameters: id buffer the identification number of send buffer.

value the relevant pointer which will be moved to the place where the packet payload will be saved.

size the pointer to the place where the packet size will be stored.

receiver the relevant pointer which will be moved to the place where the packet receiver is stored.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.16.2.6 int sbuffers get rsnd packet (char ∗∗ value, int ∗ size, struct sockaddr ∗∗ receiver, double ∗ first send time)

Return packet to resend. This function returns packet which has to be resent (it’s taken from the head of structure for retransmissions).

Parameters: valuethe relevant pointer which will be moved to the place where the packet payload will be saved.

size the pointer to the place where the packet size will be stored.

receiver the relevant pointer which will be moved to the place where the packet’s receiver is stored. first send time the pointer to the place where the packet’s first send time could be

stored (used for detecting connection errors).

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.16.2.7 int sbuffers get size (int id buffer, unsigned long int ∗ buffer size)

Return identified send buffer size. This function finds out send buffer size and returns it.

Parameters: id buffer the identification number of send buffer.

buffer size the pointer to the place where buffer size could be stored.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.16.2.8 double sbuffers get top rsnd time (void)

Return the smallest time to resend. This function looks to the head of structure for retransmissions and returns the minimal time when some packet has to be resend (if any).

Returns: above zero the minimal packet resend time.

Returns: below zero related error code if something failed (for further information see documentation of file errors.h).

4.16.2.9 int sbuffers init (void)

Initialize send buffers. This function makes some initial steps - currently it initializes mutex used for retransmit structure.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.16.2.10 int sbuffers resend event (double time to resend)

Move last resend packet to its new position in retransmit structure. This function has to be called after retransmitting some packet. It moves that packet to its new position (depending on its next time to resend) in structure for retransmissions.

Parameters: time to resend time when was this packet should be resend next.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.16.2.11 int sbuffers send event (int id buffer, char ∗ bitstream, int size, double sent time, double time to resend)

Move packet from send packets buffer to sent packets buffer. This function moves defined acket from send packets buffer to sent packets buffer. This function has to be called after packet sending. If the packet is different from the one stored in buffer, it won’t do any steps (this situation may appear when two threads sent the same packet simultaneously). The adding is a bit complicated again (because of threads mutual exclusion). The moved packet is inserted at the end of sent packets buffer (after the old slipper) and is signed as a slipper, too. All its values are copied to the old one (pointers are moved only). Now we have to insert this new packet into the structure for retransmissions (it’s sorted by packet next retransmission time). Then the moved packet is signed as a valid item.

Parameters: id buffer the identification number of send buffer. bitstream the pointer to the place where the moved packet value is stored. size the size of moved packet payload. sent time the time when moved packet was sent. time to resend the time when this packet should be resent (if no acknowledge will

come).

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.17 sbuffers.h File Reference

#include <netinet/in.h>
#include <sys/socket.h>
#include "types.h"

Defines

• #define ARTP SBUFFERS H 1

Functions

• int sbuffers init (void)

• int sbuffers create (struct sockaddr ∗receiver)

• int sbuffers destroy (int id buffer)

• int sbuffers get size (int id buffer, unsigned long int ∗buffer size)

• int sbuffers add packet (int id buffer, struct sockaddr ∗receiver, SID TYPE sid, char ∗value, int size, SEQ TYPE seq)

• int sbuffers get packet (int id buffer, char ∗∗value, int ∗size, struct sockaddr ∗∗receiver)

• int sbuffers send event (int id buffer, char ∗bitstream, int size, double sent time, double time to resend)

• int sbuffers resend event (double time to resend)

• int sbuffers ack event (int id buffer, struct sockaddr ∗sender, SID TYPE sid, SEQ TYPE seq, int ∗size, double ∗time)

• double sbuffers get top rsnd time (void)

• int sbuffers get rsnd packet (char ∗∗value, int ∗size, struct sockaddr ∗∗receiver, double ∗first send time)

• int sbuffers ignore first rsnd()

4.17.1 Detailed Description

ARTP library for send buffers.

Author: Tomas Rebok

Date:2004

4.17.2 Function Documentation

4.17.2.1 int sbuffers ack event (int id buffer, struct sockaddr ∗ sender, SID TYPE sid, SEQ TYPE seq, int ∗ size, double ∗ time)

Delete packet from sent packets buffer. This function deletes packet from sent buffer after incoming acknowledgement packet. Packet is searched depending on its sequence number (for established sessions) or depending on its sequence number, sender and session identifier (for non-established sessions). It’s deleted from structure for retransmissions, too. If deleted packet wasn’t resent, its sent time is returned, too (for computing round trip time). Its size is returned, too.

Parameters: id buffer the identification number of send buffer.

sender the pointer to the place where sender’s address is stored.

sid the session identification number which this packet belongs to.

seq packet sequence number.

size the pointer to the place where deleted packet size will be stored.

time the pointer to the place where deleted packet sent time could be stored.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.2 int sbuffers add packet (int id buffer, struct sockaddr ∗ receiver, SID TYPE sid, char ∗ value, int size, SEQ TYPE seq)

Add packet to send. This function adds packet which has to be sent. This adding is a bit complicated because of slipper (this is made for mutual exclusion of reading and adding threads). First of all new item is inserted to the end of complete buffer (after slipper) and its signed as a new slipper. Then all necessary information is copied to the old slipper and then it’s signed (the old slipper) as a new valid item.

Parameters: id buffer the identification number of send buffer.

receiver the pointer to the place where the packet’s receiver is stored. It’s used for non-established sessions only. Otherwise it could be NULL.

sid the session identification number. It’s used for non-established sessions only. Otherwise it could be any value. value the pointer to the place where the packet value is stored. size the size of packet payload. seq the packet sequence number.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.3 int sbuffers create (struct sockaddr ∗ receiver)

Create send buffer. At the beginning this function searches first free space for creating new buffer in the array of pointers to all allocated buffers. If there’s any, it’s used. If there isn’t, the array is resized and last pointer is used. Then all slippers are made and all buffer’s parameters are set to its default values.

Parameters: receiver the pointer to the place where session receiver is stored.

Returns: above or equal zero success. Creating buffer identification number is returned.

Returns: below zero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.4 int sbuffers destroy (int id buffer)

Destroy send buffers. This function destroys relevant send buffer. It unallocates place used by that buffer and makes some other clearing steps (deletes all sent and unsent packets, destroys all its help structures and semaphores, etc.).

Parameters: id buffer the identification number of destroying buffer.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.5 int sbuffers get packet (int id buffer, char ∗∗ value, int ∗ size, struct sockaddr ∗∗ receiver)

Get packet dedicated to send. This function returns packet which has to be sent (and its other information if necessary).

Parameters: id buffer the identification number of send buffer.

value the relevant pointer which will be moved to the place where the packet payload will be saved.

size the pointer to the place where the packet size will be stored.

receiver the relevant pointer which will be moved to the place where the packet receiver is stored.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.6 int sbuffers get rsnd packet (char ∗∗ value, int ∗ size, struct sockaddr ∗∗ receiver, double ∗ first send time)

Return packet to resend. This function returns packet which has to be resent (it’s taken from the head of structure for retransmissions).

Parameters: valuethe relevant pointer which will be moved to the place where the packet payload will be saved.

size the pointer to the place where the packet size will be stored.

receiver the relevant pointer which will be moved to the place where the packet’s receiver is stored.

first send time the pointer to the place where the packet’s first send time could be stored (used for detecting connection errors).

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.7 int sbuffers get size (int id buffer, unsigned long int ∗ buffer size)

Return identified send buffer size. This function finds out send buffer size and returns it.

Parameters: id buffer the identification number of send buffer.

buffer size the pointer to the place where buffer size could be stored.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.8 double sbuffers get top rsnd time (void)

Return the smallest time to resend. This function looks to the head of structure for retransmissions and returns the minimal time when some packet has to be resend (if any).

Returns: above zero the minimal packet resend time.

Returns: below zero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.9 int sbuffers ignore first rsnd ()

Skip the top packet in structure for retransmissions. This function skips the leading packet in structure for retransmissions. It’s used when connection fail is detected - no other packets which belongs to that connection are retransmitted any more.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.10 int sbuffers init (void)

Initialize send buffers. This function makes some initial steps - currently it initializes mutex used for retransmit structure.

Returns: zero success

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.11 int sbuffers resend event (double time to resend)

Move last resend packet to its new position in retransmit structure. This function has to be called after retransmitting some packet. It moves that packet to its new position (depending on its next time to resend) in structure for retransmissions.

Parameters: time to resend time when was this packet should be resend next.

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.17.2.12 int sbuffers send event (int id buffer, char ∗ bitstream, int size, double sent time, double time to resend)

Move packet from send packets buffer to sent packets buffer. This function moves defined acket from send packets buffer to sent packets buffer. This function has to be called after packet sending. If the packet is different from the one stored in buffer, it won’t do any steps (this situation may appear when two threads sent the same packet simultaneously). The adding is a bit complicated again (because of threads mutual exclusion). The moved packet is inserted at the end of sent packets buffer (after the old slipper) and is signed as a slipper, too. All its values are copied to the old one (pointers are moved only). Now we have to insert this new packet into the structure for retransmissions (it’s sorted by packet next retransmission time). Then the moved packet is signed as a valid item.

Parameters: id buffer the identification number of send buffer. bitstream the pointer to the place where the moved packet value is stored. size the size of moved packet payload. sent time the time when moved packet was sent. time to resend the time when this packet should be resent (if no acknowledge will

come).

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.18 setting.c File Reference

#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include "setting.h"
#include "options.h"
#include "errors.h"
#include "config.h"

Defines

• #define INITIAL MSS 2048

• #define INITIAL EXP TIME 10000000

• #define INITIAL RTO TIME 3

• #define INITIAL SBUFFERS MAX SIZE 0

• #define INITIAL RBUFFERS MAX SIZE 0

• #define INITIAL RBUFFERS RED LIMIT 0

• #define DEFAULT RED DROP PROBABILITY 20 • #define DEFAULT RETRIES TIMEOUT 15

• #define DEFAULT MAX ACKS COUNT 50

Functions

• int setting set defaults (void)

• int setting read file(char ∗filename)

4.18.1 Detailed Description

ARTP library for reading and setting ARTP main settings.

Author: Tomas Rebok

Date:2004

4.18.2 Define Documentation

4.18.2.1 #define DEFAULT MAX ACKS COUNT 50 initial maximal sequence numbers count in one acknowledgement packet 4.18.2.2 #define DEFAULT RED DROP PROBABILITY 20 initial R.E.D. dropping probability (in percent) 4.18.2.3 #define DEFAULT RETRIES TIMEOUT 15 default timeout for retransmissions (maximal time for tries) (in seconds) 4.18.2.4 #define INITIAL EXP TIME 10000000 Initial expiration time (in microseconds) 4.18.2.5 #define INITIAL MSS 2048 Initial maximum segment size 4.18.2.6 #define INITIAL RBUFFERS MAX SIZE 0 initial maximal receive buffers size. When set to 0, buffer size will be unlimited. (in bytes) 4.18.2.7 #define INITIAL RBUFFERS RED LIMIT 0 initial random early detection (R.E.D.) limit. This limit says when we want to applicate random packet dropping. It has no sense when maximal count is unlimited. When it’s set to 0 or it’s greater than maximal receive buffer size, it’s not applied (buffer works as usual tail drop buffer). 4.18.2.8 #define INITIAL RTO TIME 3 initial retransmit timeout (in seconds) 4.18.2.9 #define INITIAL SBUFFERS MAX SIZE 0 initial maximal send buffers size. When set to 0, buffer size will be unlimited. (in bytes)

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

4.18.3 Function Documentation

4.18.3.1 int setting read file (char ∗ filename) Read setting from a file. This function reads setting from given file. Parameters: filename the file name to be read (or NULL if no config file is required) Returns: zero success. Returns: nonzero related error code if something failed (for further information see docu-

mentation of file errors.h).

4.18.3.2 int setting set defaults (void) Set default setting. This functions sets the default setting to the relevant structure (global setting). Returns: zero success. Returns: nonzero related error code if something failed (for further information see docu-

mentation of file errors.h).

4.19 setting.h File Reference

#include <stdint.h>
#include "types.h"

Data Structures

• struct Tsetting

Defines

• #define ARTP SETTING H 1

Functions

• int setting set defaults (void)

• int setting read file(char ∗filename)

Variables

• Tsetting global setting

4.19.1 Detailed Description

ARTP library for reading and setting ARTP settings. Author: Tomas Rebok Date:2004

4.19.2 Function Documentation

4.19.2.1 int setting read file (char ∗ filename) Read setting from a file. This function reads setting from given file.

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

Parameters: filename the file name to be read (or NULL if no config file is required)

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.19.2.2 int setting set defaults (void)

Set default setting. This functions sets the default setting to the relevant structure (global setting).

Returns: zero success.

Returns: nonzero related error code if something failed (for further information see documentation of file errors.h).

4.19.3 Variable Documentation

4.19.3.1 struct Tsetting global setting

Structure for saving global ARTP settings

4.20 structs.h File Reference

#include <sys/socket.h>
#include <sys/types.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>
#include "net.h"
#include "options.h"

Data Structures

• struct dead zero sessions

• struct session item

Defines

• #define ARTP STRUCTS H 1

Enumerations

• enum Tsession status { LIVE, DEAD }

• enum Tsession type { NON EST, EST }

4.20.1 Detailed Description

ARTP structures for storing session information.

Author: Tomas Rebok

Date:2004

4.20.2 Enumeration Type Documentation

108  Active Router Transport Protocol (ARTP) File Documentation

4.20.2.1 enum Tsession status Enumeration of available session status states.

Enumeration values: LIVE connection lives DEAD connection lost

4.20.2.2 enum Tsession type Enumeration of available session types

Enumeration values: NON EST non-established session EST established session

4.21 types.h File Reference

Defines

• #define ARTP TYPES H 1

• #define OPTS OPTID TYPE uint16 t

• #define OPTS SZ TYPE uint16 t

• #define SIGSZ TYPE uint32 t

• #define ENCDATA SIZE TYPE uint32 t

• #define DSEQ TYPE uint32 t

• #define CTRL OPTID TYPE uint8 t

• #define CTRL SZ TYPE uint16 t

• #define CTRL VALUE SZ TYPE int

• #define SID TYPE uint8 t

• #define SID MAX UINT8 MAX

• #define SEQ TYPE uint32 t

• #define SEQ MAX UINT32 MAX

• #define TS TYPE uint32 t

• #define OPTSZ TYPE uint16 t

• #define FRAGMENTS TYPE uint16 t

• #define MSS TYPE uint16 t

• #define MAX DGRAM LEN TYPE uint32 t

• #define RETR TIMEOUT TYPE uint16 t

4.21.1 Detailed Description

ARTP datagram’s types.

Author: Tomas Rebok

Date:2004

4.21.2 Define Documentation

4.21.2.1 #define CTRL OPTID TYPE uint8 t

control packet option identifier type

110  Active Router Transport Protocol (ARTP) File Documentation

4.21.2.2 #define CTRL SZ TYPE uint16 t one control item size type

4.21.2.3 #define CTRL VALUE SZ TYPE int control value size type

4.21.2.4 #define DSEQ TYPE uint32 t packet data sequence type

4.21.2.5 #define ENCDATA SIZE TYPE uint32 t encrypted packet payload size type

4.21.2.6 #define FRAGMENTS TYPE uint16 t packet fragments count type

4.21.2.7 #define MAX DGRAM LEN TYPE uint32 t packet option - maximum datagram length

4.21.2.8 #define MSS TYPE uint16 t packet option - maximum segment size

4.21.2.9 #define OPTS OPTID TYPE uint16 t option identification type (options sent in headers of packets)

4.21.2.10 #define OPTS SZ TYPE uint16 t option size type (options sent in headers of packets)

4.21.2.11 #define OPTSZ TYPE uint16 t packet option size type

4.21.2.12 #define RETR TIMEOUT TYPE uint16 t packet option - retransmits timeout

Generated on Fri May 21 08:02:47 2004 for Active Router Transport Protocol (ARTP) by Doxygen

4.21 types.h File Reference  111

4.21.2.13 #define SEQ MAX UINT32 MAX sequence numbers maximal value

4.21.2.14 #define SEQ TYPE uint32 t sequence numbers type

4.21.2.15 #define SID MAX UINT8 MAX session identification max value

4.21.2.16 #define SID TYPE uint8 t session identification type

4.21.2.17 #define SIGSZ TYPE uint32 t signed packet payload size type

4.21.2.18 #define TS TYPE uint32 t packet timestamps type

Index

abuffers.c, 35 abuffers add seq, 36 abuffers create, 36 abuffers destroy, 37 abuffers get ack, 37 abuffers init, 38

abuffers.h, 39 abuffers add seq, 39 abuffers create, 40 abuffers destroy, 40 abuffers get ack, 41 abuffers init, 41 ARTP ABUFFERS H, 39

abuffers add seq abuffers.c, 36 abuffers.h, 39

abuffers create abuffers.c, 36 abuffers.h, 40

abuffers destroy abuffers.c, 37 abuffers.h, 40

abuffers get ack abuffers.c, 37 abuffers.h, 41

abuffers init abuffers.c, 38 abuffers.h, 41

ACK

packet.h, 76 acks

Tabuffers, 24 acks count

Tabuffers, 24 act frag

item, 13 artp.c, 42

artp destroy connection, 43 artp free dgram, 43 artp get sid, 44 artp get undlvr session, 44 artp init, 44 artp prepare connection, 45 artp receive any dgram, 45 artp receive dgram, 46 artp send dgram, 46 artp set session options, 47 artp set session params, 47

artp.h, 48 artp destroy connection, 49 artp free dgram, 50 artp get sid, 50 artp get undlvr session, 51 ARTP H, 48 artp init, 51 artp prepare connection, 51 artp receive any dgram, 52 artp receive dgram, 52 artp send dgram, 53 artp session params, 49 artp set session options, 53 artp set session params, 54 EXP TIME, 49 MAX ACKS COUNT, 49 MAX RBUFFER RED LIMIT,

49 MAX RBUFFER RED -

PROBABILITY, 49 MAX RBUFFER SIZE, 49 MAX SBUFFER SIZE, 49 MSS, 49 RETRIES TIMEOUT, 49

ARTP ABUFFERS H

abuffers.h, 39 ARTP CONFIG H

config.h, 55 artp destroy connection

artp.c, 43 artp.h, 49

\underline{INDEX 113}

artp dgram, 5 payload, 5 type, 5 artp error str

errors.c, 59 errors.h, 62

artp errors

errors.h, 60 ARTP ERRORS H

errors.h, 60 artp free dgram

artp.c, 43 artp.h, 50

artp get sid artp.c, 44 artp.h, 50

artp get undlvr session artp.c, 44 artp.h, 51

ARTP H

artp.h, 48 artp init

artp.c, 44 artp.h, 51

ARTP NET H

net.h, 65 ARTP OPTIONS H

options.h, 71 ARTP PACKET H

packet.h, 75 artp prepare connection

artp.c, 45 artp.h, 51

ARTP RBUFFERS H

rbuffers.h, 81 artp receive any dgram

artp.c, 45 artp.h, 52

artp receive dgram artp.c, 46 artp.h, 52

artp receiver, 7 ip, 7 ip6, 7

ARTP RWLOCKS H

rwlocks.h, 85 ARTP SBUFFERS H

sbuffers.h, 95 artp send dgram

artp.c, 46 artp.h, 53

artp session options options.h, 72 artp session params

artp.h, 49 artp set session options

artp.c, 47 artp.h, 53

artp set session params artp.c, 47 artp.h, 54

ARTP SETTING H

setting.h, 105 ARTP STRUCTS H

structs.h, 107 ARTP TYPES H

types.h, 109 ARTP VERSION

config.h, 55

buffer info

item, 13 buffer size

Trcving buffers, 28 Tsending buffers, 30

buffer size mutex Trcving buffers, 28 Tsending buffers, 30

buffers id session item, 20

complete end

Trcving buffers, 28 complete start

Trcving buffers, 28 complete start mutex

Trcving buffers, 28 config.h, 55

ARTP CONFIG H, 55 ARTP VERSION, 55 CWND ACK, 55 CWND DOWN MULTIPLIER,

56 CWND RETRANS, 56 DUPPLE SEQ COUNT, 56 INITIAL WINDOW SIZE, 56 LATEST ACKS SEND, 56 LINK IDLE, 57 MAX ARTP PACKET SIZE, 57 MAX CONFIG LINE -

\underline{114 INDEX}

LENGTH, 57 RTO COMPUTE, 57 SRTT ALPHA, 57 SRTT COMPUTE, 57 TS DELTA ALPHA, 58 TS DELTA COMPUTE, 58

control

payload CTRL, 16 control type, 8

optid, 8 type, 8 value, 8 valuesize, 8

count

payload CTRL, 16 CTRL

packet.h, 76 ctrl

payload type, 19 CTRL OPTID TYPE

types.h, 109 CTRL SZ TYPE

types.h, 109 ctrl type

packet.h, 75 CTRL VALUE SZ TYPE

types.h, 110 current seq

session item, 21 cwnd

session item, 21 CWND ACK

config.h, 55 CWND DOWN MULTIPLIER

config.h, 56 CWND RETRANS

config.h, 56

DATA

packet.h, 76 data

payload type, 19 DEAD

structs.h, 108 dead zero sessions, 9

invalid, 9 next, 9 receiver, 9 sid, 9

DEFAULT MAX ACKS COUNT

setting.c, 103 default max acks count

Tsetting, 32 DEFAULT RED DROP -

PROBABILITY setting.c, 103 default red drop probability

Tsetting, 32 DEFAULT RETRIES TIMEOUT

setting.c, 103 default retries timeout Tsetting, 32

dgram type

item, 13 dseq

item, 14

payload DATA, 17 DSEQ TYPE

types.h, 110 dupple end

Trcving buffers, 28 DUPPLE SEQ COUNT config.h, 56

dupple start Trcving buffers, 29

E BAD DGRAM errors.h, 61 E BAD OPT USE errors.h, 61 E BAD PACKET TYPE errors.h, 61 E BAD PARAM VALUE errors.h, 61 E BAD VALUE errors.h, 61 E BIG DGRAM errors.h, 61 E BUF INIT ERROR errors.h, 61 E DEAD SESSION errors.h, 61 E DIFF ADDR errors.h, 61 E DUPLICITY PACKET errors.h, 61 E EMPTY BUFFER errors.h, 61 E FULL BUFFER errors.h, 61 E FULL CWND errors.h, 61 E GENERIC ERROR

errors.h, 61 E INVALID BUFFER ID

errors.h, 61 E INVALID OPT SIZE

errors.h, 61 E INVALID OPT VALUE

errors.h, 61 E INVALID OPTION

errors.h, 61 E INVALID PARAMETER

errors.h, 61 E MEMORY FAIL

errors.h, 61 E NO ACK

errors.h, 61 E NO AVAIL SID

errors.h, 61 E NONEST SESSION

errors.h, 61 E NULL PTR

errors.h, 61 E OPENING FILE

errors.h, 61 E PACKET NOT FOUND

errors.h, 61 E PARTNER MSS

errors.h, 61 E SENDING ERROR

errors.h, 61 E SESSION EXISTS

errors.h, 61 E SMALL MSS

errors.h, 61 E START THREADS

errors.h, 61 E SYNTAX ERROR

errors.h, 61 E UNSUPPORTED AF

errors.h, 61 encdata

payload DATA, 17 ENCDATA SIZE TYPE

types.h, 110 encsz

payload DATA, 17 end

Tsending buffers, 30 end mutex

Tsending buffers, 30 errors.c, 59

artp error str, 59 errors.h, 60

artp error str, 62 artp errors, 60 ARTP ERRORS H, 60 E BAD DGRAM, 61 E BAD OPT USE, 61 E BAD PACKET TYPE, 61 E BAD PARAM VALUE, 61 E BAD VALUE, 61 E BIG DGRAM, 61 E BUF INIT ERROR, 61 E DEAD SESSION, 61 E DIFF ADDR, 61 E DUPLICITY PACKET, 61 E EMPTY BUFFER, 61 E FULL BUFFER, 61 E FULL CWND, 61 E GENERIC ERROR, 61 E INVALID BUFFER ID, 61 E INVALID OPT SIZE, 61 E INVALID OPT VALUE, 61 E INVALID OPTION, 61 E INVALID PARAMETER, 61 E MEMORY FAIL, 61 E NO ACK, 61 E NO AVAIL SID, 61 E NONEST SESSION, 61 E NULL PTR, 61 E OPENING FILE, 61 E PACKET NOT FOUND, 61 E PARTNER MSS, 61 E SENDING ERROR, 61 E SESSION EXISTS, 61 E SMALL MSS, 61 E START THREADS, 61 E SYNTAX ERROR, 61 E UNSUPPORTED AF, 61

EST

structs.h, 108 EXP TIME

artp.h, 49 expiration time

session item, 21 ext item, 10

main item, 10 receiver, 10 sender, 10 sid, 10 first send time

item, 14 flight

session item, 21 frag count

item, 14 frag id

fragment item, 12 fragment item, 12

frag id, 12 last fragment, 12 next fragment, 12 payload, 12 payload size, 12

fragments end

item, 14 fragments start

item, 14 FRAGMENTS TYPE

types.h, 110

get session options options.c, 68 options.h, 72

global setting setting.h, 106

incomplete end

Trcving buffers, 29 incomplete start

Trcving buffers, 29 INITIAL EXP TIME

setting.c, 103 initial exp time

Tsetting, 32 INITIAL MSS

setting.c, 103 initial mss

Tsetting, 32 INITIAL RBUFFERS MAX SIZE

setting.c, 103 initial rbuffers max size

Tsetting, 33 INITIAL RBUFFERS RED LIMIT

setting.c, 103 initial rbuffers red limit

Tsetting, 33 INITIAL RTO TIME

setting.c, 103 initial rto time

Tsetting, 33 INITIAL SBUFFERS MAX SIZE

setting.c, 103 initial sbuffers max size

Tsetting, 33 INITIAL WINDOW SIZE

config.h, 56 invalid

dead zero sessions, 9 item, 14

ip

artp receiver, 7 ip6

artp receiver, 7 item, 13

act frag, 13 buffer info, 13 dgram type, 13 dseq, 14 first send time, 14 frag count, 14 fragments end, 14 fragments start, 14 invalid, 14 last, 14 last to resend, 14 length, 14 next, 14, 15 next to resend, 15 packet, 15 retr counter, 15 seq, 15 time to resend, 15

last item, 14 Tabuffers, 24 Tdupple, 26

last fragment

fragment item, 12 last send time

session item, 21 last to resend

item, 14 LATEST ACKS SEND

config.h, 56 latest send time

Tabuffers, 24 length

item, 14 LINK IDLE

config.h, 57 LIVE

structs.h, 108

main item

ext item, 10 MAX ACKS COUNT

artp.h, 49 max acks count

session item, 21 MAX ARTP PACKET SIZE

config.h, 57 MAX CONFIG LINE LENGTH

config.h, 57 MAX DGRAM LEN

options.h, 72 MAX DGRAM LEN TYPE

types.h, 110 MAX MSS

options.h, 72 MAX RBUFFER RED LIMIT

artp.h, 49 MAX RBUFFER RED -

PROBABILITY artp.h, 49

MAX RBUFFER SIZE

artp.h, 49 MAX SBUFFER SIZE

artp.h, 49 max seq

Tdupple, 26 max seq time

Tdupple, 26 min seq

Tdupple, 26 MSS

artp.h, 49 mss

session item, 21 MSS TYPE

types.h, 110

net.c, 63 rcvrcmp, 63 rcvrcpy, 63 rcvrsz, 64

net.h, 65 ARTP NET H, 65 rcvrcmp, 65 rcvrcpy, 66 rcvrsz, 66

next dead zero sessions, 9 item, 14, 15 Tabuffers, 24 Tdupple, 26

next fragment

fragment item, 12 next to resend

item, 15 NON EST

structs.h, 108

optid

control type, 8 options

session item, 21 options.c, 68

get session options, 68 options init, 69 parse session options, 69 set default options, 69 set global option, 70 use options, 70

options.h, 71 ARTP OPTIONS H, 71 artp session options, 72 get session options, 72 MAX DGRAM LEN, 72 MAX MSS, 72 OPTIONS COUNT, 71 options init, 73 parse session options, 73 RETRANSMITS TIMEOUT, 72 set default options, 73 set global option, 74 use options, 74

OPTIONS COUNT

options.h, 71 options init

options.c, 69 options.h, 73

OPTS OPTID TYPE

types.h, 110 OPTS SZ TYPE

types.h, 110 OPTSZ TYPE

types.h, 110 packet

item, 15 packet.h, 75

ACK, 76 ARTP PACKET H, 75 CTRL, 76 ctrl type, 75 DATA, 76 packet type, 76 REPLY, 75 REQUEST, 75

packet type

packet.h, 76 parse session options

options.c, 69 options.h, 73

partner options

session item, 21 payload

artp dgram, 5 fragment item, 12

payload CTRL, 16 control, 16 count, 16

payload DATA, 17 dseq, 17 encdata, 17 encsz, 17 sigdata, 17 sigsz, 17

payload size

fragment item, 12 payload type, 19

ctrl, 19 data, 19

rbuffer max size

session item, 21 rbuffer red limit

session item, 21 rbuffer red prob

session item, 22 rbuffers.c, 77

rbuffers add packet, 78 rbuffers create, 78 rbuffers destroy, 79 rbuffers get dgram, 79 rbuffers get size, 80 rbuffers init, 80

rbuffers.h, 81 ARTP RBUFFERS H, 81 rbuffers add packet, 81 rbuffers create, 82 rbuffers destroy, 83 rbuffers get dgram, 83 rbuffers get size, 84 rbuffers init, 84

rbuffers add packet rbuffers.c, 78 rbuffers.h, 81

rbuffers create rbuffers.c, 78 rbuffers.h, 82

rbuffers destroy rbuffers.c, 79 rbuffers.h, 83 rbuffers get dgram rbuffers.c, 79 rbuffers.h, 83

rbuffers get size rbuffers.c, 80 rbuffers.h, 84

rbuffers init rbuffers.c, 80 rbuffers.h, 84

rcvrcmp net.c, 63 net.h, 65

rcvrcpy net.c, 63 net.h, 66

rcvrsz net.c, 64 net.h, 66 READERS LOCK rwlocks.h, 85 READERS UNLOCK rwlocks.h, 85

receiver dead zero sessions, 9 ext item, 10 Tabuffers, 24 Tsending buffers, 30

ref counter

session item, 22 ref counter mutex

session item, 22 REPLY

packet.h, 75 REQUEST

packet.h, 75 retr counter

item, 15 RETR TIMEOUT TYPE

types.h, 110 RETRANSMITS TIMEOUT

options.h, 72 RETRIES TIMEOUT

artp.h, 49 retries timeout

session item, 22 rto

session item, 22 RTO COMPUTE

config.h, 57 rtt

session item, 22 RW INIT

rwlocks.h, 86 rwlocks.h, 85

ARTP RWLOCKS H, 85 READERS LOCK, 85 READERS UNLOCK, 85 RW INIT, 86 WRITERS LOCK, 86 WRITERS UNLOCK, 86

sbuffer max size

session item, 22 sbuffers.c, 88

sbuffers ack event, 89 sbuffers add packet, 89 sbuffers create, 90 sbuffers destroy, 90 sbuffers get packet, 91 sbuffers get rsnd packet, 91 sbuffers get size, 92 sbuffers get top rsnd time, 92 sbuffers ignore first rsnd, 88 sbuffers init, 92 sbuffers resend event, 93 sbuffers send event, 93

sbuffers.h, 95 ARTP SBUFFERS H, 95 sbuffers ack event, 96 sbuffers add packet, 96 sbuffers create, 97 sbuffers destroy, 97 sbuffers get packet, 97 sbuffers get rsnd packet, 98 sbuffers get size, 98 sbuffers get top rsnd time, 99 sbuffers ignore first rsnd, 99 sbuffers init, 99 sbuffers resend event, 100 sbuffers send event, 100

sbuffers ack event sbuffers.c, 89 sbuffers.h, 96 sbuffers add packet sbuffers.c, 89 sbuffers.h, 96

sbuffers create sbuffers.c, 90 sbuffers.h, 97

sbuffers destroy sbuffers.c, 90 sbuffers.h, 97 sbuffers get packet sbuffers.c, 91 sbuffers.h, 97 sbuffers get rsnd packet sbuffers.c, 91 sbuffers.h, 98

sbuffers get size sbuffers.c, 92 sbuffers.h, 98 sbuffers get top rsnd time sbuffers.c, 92 sbuffers.h, 99 sbuffers ignore first rsnd sbuffers.c, 88 sbuffers.h, 99

sbuffers init sbuffers.c, 92 sbuffers.h, 99 sbuffers resend event sbuffers.c, 93 sbuffers.h, 100 sbuffers send event sbuffers.c, 93 sbuffers.h, 100

sender

ext item, 10 sent end

Tsending buffers, 31 sent end mutex

Tsending buffers, 31 sent start

Tsending buffers, 31 sent start mutex

Tsending buffers, 31 seq

item, 15 SEQ MAX

types.h, 110 SEQ TYPE

types.h, 111 session item, 20

buffers id, 20 current seq, 21 cwnd, 21 expiration time, 21 flight, 21 last send time, 21 max acks count, 21 mss, 21 options, 21 partner options, 21 rbuffer max size, 21 rbuffer red limit, 21 rbuffer red prob, 22 ref counter, 22 ref counter mutex, 22 retries timeout, 22 rto, 22 rtt, 22 sbuffer max size, 22 session mutex, 22 session receiver, 22 session sid, 22 session status, 23 session type, 23 srtt, 23 ts delta, 23

session mutex

session item, 22 session receiver

session item, 22 session sid

session item, 22 session status

session item, 23 session type

session item, 23 set default options

options.c, 69 options.h, 73

set global option options.c, 70

options.h, 74 setting.c, 102

DEFAULT MAX ACKS - COUNT, 103 DEFAULT RED DROP - PROBABILITY, 103

DEFAULT RETRIES - TIMEOUT, 103 INITIAL EXP TIME, 103 INITIAL MSS, 103 INITIAL RBUFFERS MAX -

SIZE, 103 INITIAL RBUFFERS RED -

LIMIT, 103 INITIAL RTO TIME, 103 INITIAL SBUFFERS MAX -

SIZE, 103 setting read file, 104 setting set defaults, 104

setting.h, 105 ARTP SETTING H, 105 global setting, 106 setting read file, 105 setting set defaults, 106

setting read file setting.c, 104 setting.h, 105 setting set defaults setting.c, 104 setting.h, 106

sid dead zero sessions, 9 ext item, 10 Tabuffers, 25

SID MAX

types.h, 111 SID TYPE

types.h, 111 sigdata

payload DATA, 17 sigsz

payload DATA, 17 SIGSZ TYPE

types.h, 111 srtt

session item, 23 SRTT ALPHA

config.h, 57 SRTT COMPUTE config.h, 57 structs.h, 107

ARTP STRUCTS H, 107 DEAD, 108 EST, 108 LIVE, 108 NON EST, 108 Tsession status, 107 Tsession type, 108

Tabuffers, 24 acks, 24 acks count, 24 last, 24 latest send time, 24 next, 24 receiver, 24 sid, 25

Tdupple, 26 last, 26 max seq, 26 max seq time, 26 min seq, 26 next, 26

time to resend

item, 15 to send

Tsending buffers, 31 to send mutex

Tsending buffers, 31 Trcving buffers, 28

buffer size, 28 buffer size mutex, 28 complete end, 28 complete start, 28 complete start mutex, 28 dupple end, 28 dupple start, 29 incomplete end, 29 incomplete start, 29

ts delta

session item, 23 TS DELTA ALPHA

config.h, 58 TS DELTA COMPUTE

config.h, 58 TS TYPE

types.h, 111 Tsending buffers, 30

buffer size, 30 buffer size mutex, 30 end, 30 end mutex, 30 receiver, 30 sent end, 31 sent end mutex, 31 sent start, 31 sent start mutex, 31 to send, 31 to send mutex, 31

Tsession status

structs.h, 107 Tsession type

structs.h, 108 Tsetting, 32

default max acks count, 32 default red drop probability, 32 default retries timeout, 32 initial exp time, 32 initial mss, 32 initial rbuffers max size, 33 initial rbuffers red limit, 33 initial rto time, 33 initial sbuffers max size, 33

type artp dgram, 5 control type, 8

types.h, 109 ARTP TYPES H, 109 CTRL OPTID TYPE, 109 CTRL SZ TYPE, 109 CTRL VALUE SZ TYPE, 110 DSEQ TYPE, 110 ENCDATA SIZE TYPE, 110 FRAGMENTS TYPE, 110 MAX DGRAM LEN TYPE,

110 MSS TYPE, 110 OPTS OPTID TYPE, 110 OPTS SZ TYPE, 110 OPTSZ TYPE, 110 RETR TIMEOUT TYPE, 110 SEQ MAX, 110 SEQ TYPE, 111 SID MAX, 111 SID TYPE, 111 SIGSZ TYPE, 111 TS TYPE, 111

use options options.c, 70

options.h, 74

value

control type, 8 valuesize

control type, 8

WRITERS LOCK

rwlocks.h, 86 WRITERS UNLOCK

rwlocks.h, 86