%!PS-Adobe-2.0 %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: rtp_insides.dvi %%Pages: 16 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 %%DocumentFonts: Times-Roman Times-Bold Courier Times-Italic %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips rtp_insides %DVIPSParameters: dpi=600, compressed %DVIPSSource: TeX output 1999.12.06:1149 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 {2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ 1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet %%BeginProcSet: 8r.enc % @@psencodingfile@{ % author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry", % version = "0.6", % date = "1 July 1998", % filename = "8r.enc", % email = "tex-fonts@@tug.org", % docstring = "Encoding for TrueType or Type 1 fonts % to be used with TeX." % @} % % Idea is to have all the characters normally included in Type 1 fonts % available for typesetting. This is effectively the characters in Adobe % Standard Encoding + ISO Latin 1 + extra characters from Lucida. % % Character code assignments were made as follows: % % (1) the Windows ANSI characters are almost all in their Windows ANSI % positions, because some Windows users cannot easily reencode the % fonts, and it makes no difference on other systems. The only Windows % ANSI characters not available are those that make no sense for % typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen % (173). quotesingle and grave are moved just because it's such an % irritation not having them in TeX positions. % % (2) Remaining characters are assigned arbitrarily to the lower part % of the range, avoiding 0, 10 and 13 in case we meet dumb software. % % (3) Y&Y Lucida Bright includes some extra text characters; in the % hopes that other PostScript fonts, perhaps created for public % consumption, will include them, they are included starting at 0x12. % % (4) Remaining positions left undefined are for use in (hopefully) % upward-compatible revisions, if someday more characters are generally % available. % % (5) hyphen appears twice for compatibility with both % ASCII and Windows. % /TeXBase1Encoding [ % 0x00 (encoded characters from Adobe Standard not in Windows 3.1) /.notdef /dotaccent /fi /fl /fraction /hungarumlaut /Lslash /lslash /ogonek /ring /.notdef /breve /minus /.notdef % These are the only two remaining unencoded characters, so may as % well include them. /Zcaron /zcaron % 0x10 /caron /dotlessi % (unusual TeX characters available in, e.g., Lucida Bright) /dotlessj /ff /ffi /ffl /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef % very contentious; it's so painful not having quoteleft and quoteright % at 96 and 145 that we move the things normally found there to here. /grave /quotesingle % 0x20 (ASCII begins) /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash % 0x30 /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question % 0x40 /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O % 0x50 /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore % 0x60 /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o % 0x70 /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef % rubout; ASCII ends % 0x80 /.notdef /.notdef /quotesinglbase /florin /quotedblbase /ellipsis /dagger /daggerdbl /circumflex /perthousand /Scaron /guilsinglleft /OE /.notdef /.notdef /.notdef % 0x90 /.notdef /.notdef /.notdef /quotedblleft /quotedblright /bullet /endash /emdash /tilde /trademark /scaron /guilsinglright /oe /.notdef /.notdef /Ydieresis % 0xA0 /.notdef % nobreakspace /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen % Y&Y (also at 45); Windows' softhyphen /registered /macron % 0xD0 /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown % 0xC0 /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis % 0xD0 /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls % 0xE0 /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis % 0xF0 /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def %%EndProcSet %%BeginProcSet: texps.pro %! TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{ dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def} if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def} def end %%EndProcSet TeXDict begin 40258431 52099146 1000 600 600 (rtp_insides.dvi) @start /Fa 139[23 32 28 1[42 42 42 65 23 2[23 2[28 37 1[37 1[37 12[51 1[55 1[46 14[60 6[23 12[28 45[{ .167 SlantFont TeXBase1Encoding ReEncodeFont}19 83.022 /Times-Roman rf /Fb 137[40 6[40 5[40 3[40 1[40 99[{ TeXBase1Encoding ReEncodeFont}5 66.4176 /Courier rf /Fc 205[29 50[{TeXBase1Encoding ReEncodeFont}1 58.1154 /Times-Roman rf %DVIPSBitmapFont: Fd cmr10 10 3 /Fd 3 62 df48 D56 D<007FB812F8B912FCA26C17F8CCFCAE007FB812F8B912FCA26C17F83616 7B9F41>61 D E %EndDVIPSBitmapFont /Fe 158[42 97[{TeXBase1Encoding ReEncodeFont}1 83.022 /Times-Italic rf %DVIPSBitmapFont: Ff cmmi10 10 10 /Ff 10 116 df22 D60 D<902603FFFE93381FFFE049606D60D90007F0E000505AF101DF157F 020E4C485AF1073FA2190E021C4DC7FC191C19386F7E0238EE70FE19E0A2F001C00270EE C1FCF00381F007016F7E02E092380E03F8181CA21838D901C04C5A18706F6C13E0A2D903 804A48485AEF0380A2EF0700D90700020E495AA26F6C5AA2010E4B495A5FA25F49DAF1C0 49C8FCA2923803FB80A24902FFC712FE5EA201785C4C495A13F8D807FE6D481303267FFF E04AB512F8B500F049488002E001C05D53397DB851>77 D<92381FE0019238FFFC030203 EBFE0791390FE01F0F91391F80079F91393E0001FE5C4A1300495A4948147C13075C130F 4A1478131FA3013F1570A28017008080EB1FFCECFF8015F86DEBFF806D14E0826D800100 806E7F020F7F1400031F1380150181167F163FA30006151F120EA3001EED3F00A2163E16 7E003E157CA25E003F4A5A484A5A6D495AD87DE0495AD878F0013FC7FCD8F07F13FE39E0 3FFFF8010F13E0D8C00190C8FC303D7CBA33>83 D99 D<163FED0FFF5DA2ED00 7EA416FCA4ED01F8A4ED03F0A4ED07E0147E903803FF87010F13C790391F81EFC090383E 00FF49137F5B4848EB3F80485A12074848131FED3F00485AA2123F90C7127E5AA300FE5C A44A5A48151CA3913803F038A2007C1307140F007E011F1370003E133B6C01F113E0380F 83E13A07FFC0FFC06C9038807F803A00FC001F00283B7DB92B>II109 D111 D<14FF010313C0010F13F090381F80 F890383E003849133C49137C4913FC00011301A215F80003EB00F06D13007F3801FFC014 FC6C13FF15806D13C0011F13E013079038003FF0140F1403121E123F5A4814E0A215C048 130700F814800070EB0F000078133E003F13FC6CB45A000713E0000190C7FC1E267CA427 >115 D E %EndDVIPSBitmapFont /Fg 145[60 4[60 2[60 60 60 64[60 35[{TeXBase1Encoding ReEncodeFont}6 99.6264 /Courier rf /Fh 134[50 2[50 55 33 39 44 2[50 55 1[28 2[28 1[50 33 44 1[44 55 50 41[50 50 50 50 50 50 50 2[25 46[{TeXBase1Encoding ReEncodeFont}24 99.6264 /Times-Bold rf %DVIPSBitmapFont: Fi cmsy10 14.4 2 /Fi 2 104 df102 D<127FEAFFF813FF000313C0C66C7EEB1FF86D7EEB03FE6D7EA26D7FA26E7EB3B26E7EA3 6E7E140F6E7E6E7E6EB4FC6E7FED3FF092380FFFC0030313E0A2030F13C092383FF000ED FF804A90C7FCEC03FC4A5A4A5A141F4A5AA34A5AB3B24A5AA24990C8FCA2495AEB0FFC49 5AEB7FE03803FFC0B5C9FC13F86CCAFC2B7878D93C>I E %EndDVIPSBitmapFont /Fj 134[50 50 50 50 50 50 50 50 1[50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 6[50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 2[50 50 50 50 50 50 50 50 50 6[50 1[50 3[50 50 50 2[50 50 50 50 1[50 50 50 4[50 35[{ TeXBase1Encoding ReEncodeFont}61 83.022 /Courier rf %DVIPSBitmapFont: Fk cmsy10 10 5 /Fk 5 111 df15 D24 D<15FE1407141FEC7FC0ECFE00495AEB03F0A2495AB3A8495AA2495A49C7FC13FEEA07FC EAFFF0138013F0EA07FCC67E133F6D7E6D7EA26D7EB3A86D7EA2EB01FC6D7EEC7FC0EC1F FE140714001F537BBD2A>102 D<127EEAFFE013F8EA07FEC67EEB3F806D7E130F6D7EB3 A86D7EA26D7E6D7E147FEC3FC0EC0FFE1403140FEC3FC0EC7F0014FC495A495AA2495AB3 A8495A131F495A01FFC7FCEA07FEEAFFF813E0007EC8FC1F537BBD2A>I<126012F0A212 78A37EA37EA37EA36C7EA36C7EA36C7EA36C7EA31378A37FA37FA37FA36D7EA36D7EA26D 7EA36D7EA31478A380A380A380A3EC0780A3EC03C0A3EC01E0A3EC00F0A31578A3153CA3 151EA2150C1F537BBD2A>110 D E %EndDVIPSBitmapFont /Fl 133[37 42 42 60 42 46 28 32 37 46 46 42 46 69 23 46 1[23 46 42 28 37 46 37 46 42 3[28 1[28 55 60 60 83 60 60 55 46 60 65 51 65 60 78 55 65 1[32 65 65 51 55 60 60 55 60 6[28 42 42 42 42 42 42 42 42 42 42 23 21 28 21 1[42 28 28 28 35[46 46 2[{TeXBase1Encoding ReEncodeFont}73 83.022 /Times-Bold rf /Fm 134[60 1[86 60 66 40 47 53 1[66 60 66 100 33 2[33 66 1[40 53 66 53 66 60 14[86 2[93 2[80 2[47 2[73 2[86 10[60 60 60 60 60 60 60 60 2[30 1[30 44[{TeXBase1Encoding ReEncodeFont}36 119.552 /Times-Bold rf %DVIPSBitmapFont: Fn cmsy8 8 1 /Fn 1 14 df13 D E %EndDVIPSBitmapFont /Fo 134[33 1[48 33 33 18 26 22 1[33 33 33 52 18 33 1[18 33 33 22 29 33 29 33 29 9[63 2[41 7[41 1[26 22 2[37 10[18 1[33 33 33 5[33 2[17 1[17 41[37 2[{TeXBase1Encoding ReEncodeFont}36 66.4176 /Times-Roman rf %DVIPSBitmapFont: Fp cmsy6 6 1 /Fp 1 4 df<136013F0A30060136000F013F0EAFC63EAFE67383FFFC03807FE00EA01F8 EA07FE383FFFC038FE67F0EAFC63EAF0F00060136000001300A3136014157B9620>3 D E %EndDVIPSBitmapFont /Fq 205[25 25 49[{TeXBase1Encoding ReEncodeFont}2 49.8132 /Times-Roman rf /Fr 134[37 37 54 37 37 21 29 25 37 37 37 37 58 21 37 1[21 37 37 25 33 37 33 37 33 3[25 1[25 5[54 46 1[50 1[42 2[66 46 5[42 2[50 50 7[21 7[37 37 1[21 19 25 19 41[42 2[{TeXBase1Encoding ReEncodeFont}43 74.7198 /Times-Roman rf /Fs 139[25 29 33 14[33 42 37 31[54 65[{ TeXBase1Encoding ReEncodeFont}7 74.7198 /Times-Bold rf /Ft 107[37 37 24[37 42 42 60 42 42 23 32 28 42 42 42 42 65 23 42 23 23 42 42 28 37 42 37 42 37 3[28 1[28 1[60 1[78 60 60 51 46 55 60 46 60 60 74 51 60 32 28 60 60 46 51 60 55 55 60 76 2[47 2[23 42 42 42 42 42 42 42 42 42 42 23 21 28 21 47 1[28 28 28 1[69 33[46 46 2[{ TeXBase1Encoding ReEncodeFont}78 83.022 /Times-Roman rf /Fu 133[44 1[50 1[50 50 28 39 33 1[50 50 50 78 28 2[28 50 50 33 44 50 44 50 44 12[61 55 66 3[72 1[61 1[39 1[72 3[72 66 9[50 1[50 50 4[50 3[33 25 44[{ TeXBase1Encoding ReEncodeFont}36 99.6264 /Times-Roman rf %DVIPSBitmapFont: Fv cmsy10 12 1 /Fv 1 4 df<147014F8A8003815E0007CEC01F000FEEC03F8D8FF80130FD87FC0EB1FF0 01E0133F3A1FF870FFC02607FC7113003901FF77FC39007FFFF0011F13C0010790C7FCEB 01FCEB07FF011F13C0017F13F03901FF77FC3907FC71FF261FF87013C03A7FE0F83FF001 C0131FD8FF80EB0FF8D8FE001303007CEC01F00038EC00E0C71400A81470252B7AAD32> 3 D E %EndDVIPSBitmapFont /Fw 134[72 3[72 40 56 48 1[72 72 72 112 40 2[40 3[64 1[64 72 64 11[104 88 1[96 1[80 2[128 88 2[48 2[80 1[104 96 96 18[40 47[{TeXBase1Encoding ReEncodeFont}27 143.462 /Times-Roman rf end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%EndSetup %%Page: 1 1 1 0 bop 237 432 a Fw(Bell)35 b(Labs/Columbia/UMass)c(R)-9 b(TP)35 b(Library)2601 380 y Fv(\003)2671 432 y Fw(Internal)f(Function) 1587 614 y(Descriptions)306 855 y Fu(Dan)25 b(Rubenstein,)f(Jonathan)g (Lennox,)g(Jonathan)g(Rosenber)n(g,)h(and)g(Henning)f(Schulzrinne)1480 1054 y(T)-7 b(echnical)25 b(Report)g(99-76)1282 1171 y(Department)f(of)h(Computer)f(Science)1619 1270 y(No)o(v)o(ember)l(,)f (1999)0 1577 y Ft(Comments)50 b(related)g(to)g(this)h(document)d(or)i (to)h(the)f(Bell)i(Labs/Columbia/UMass)d(R)-5 b(TP)51 b(Library)e(should)g(be)i(sent)f(to)0 1677 y(rtplib@cs.columbia.edu) 1811 1851 y Fs(Abstract)320 1988 y Fr(This)19 b(documentation)i (describes)g(the)e(internal)h(functions)h(that)e(are)h(components)h(of) f(the)f(Bell)g(Labs/Columbia/UMass)i(R)l(TP)208 2080 y(Library)-5 b(.)446 2048 y Fq(1)507 2080 y Fr(The)22 b(purpose)h(of)f(this)g(document)h(is)f(to)f(pro)o(vide)i(the)f(e)o (xperienced)i(netw)o(orking)f(programmer)g(who)g(is)e(f)o(amiliar)h (with)208 2171 y(the)g(details)h(of)g(R)l(TP/R)l(TCP)c(with)j(a)h (detailed)g(understanding)i(of)e(the)f(operation)i(of)f(the)g(internal) f(aspects)i(of)e(the)h(Library)-5 b(.)35 b(This)208 2262 y(document)25 b(should)g(not)f(be)h(necessary)g(for)f(implementing)h (an)f(application)h(that)f(uses)g(the)g(R)l(TP/R)l(TCP)d(protocols.)39 b(Use)24 b(of)g(the)208 2354 y(library)d(for)h(such)h(a)f(purpose)h(is) e(described)i(in)f([1].)32 b(The)22 b(Bell)f(Labs/Columbia/UMass)i(R)l (TP)d(Library)i(attempts)g(to)g(conform)g(to)208 2445 y(the)c(protocol)g(description)h(discussed)g(in)f([2)q(].)k(The)c (softw)o(are)g(is)g(pro)o(vided)h(as-is:)j(neither)d(the)f(authors)g (nor)h(Lucent)f(T)-5 b(echnologies)208 2536 y(mak)o(e)23 b(an)o(y)g(guarantees)h(as)e(to)h(its)f(correctness.)34 b(Furthermore,)24 b(the)e(reader)h(is)f(w)o(arned)i(that)e(modifying)i (an)o(y)f(part)f(of)h(the)f(library)208 2628 y(code)d(can)h(result)e (in)h(a)g(protocol)h(that)f(no)g(longer)h(satis\002es)e(the)h (requirements)h(of)f(the)g(R)l(TP/R)l(TCP)c(protocol)20 b(as)f(speci\002ed)g(in)g([2].)p 0 5103 1560 4 v 84 5156 a Fp(\003)140 5178 y Fo(c)120 5180 y Fn(\015)o Fo(1997,)e(1998,)g(1999) h(Lucent)g(T)-5 b(echnologies;)20 b(all)e(rights)g(reserv)o(ed.)90 5237 y Fq(1)120 5261 y Fo(In)13 b(its)g(current)i(form,)e(the)h (document)h(describes)f(the)g(library)h(as)e(it)h(appeared)h(in)f (January)l(,)g(1998.)20 b(W)-5 b(e)12 b(point)j(out)e(that)i(there)f (ha)o(v)o(e)g(been)g(signi\002cant)h(modi\002cations)0 5340 y(since)j(then.)1929 5589 y Ft(1)p eop %%Page: 2 2 2 1 bop 0 83 a Fm(Contents)0 269 y Fl(1)83 b(Intr)o(oduction)3281 b(3)0 451 y(2)83 b(Library)20 b(Inter)o(nals)g(Ov)o(er)o(view)2748 b(3)0 634 y(3)83 b(rtp)p 241 634 25 4 v 29 w(mlist)p 445 634 V 30 w(inter)o(nal.)p Fk(f)p Fl(h,c)p Fk(g)2898 b Fl(3)125 733 y Ft(3.1)85 b Fj(#define)p Ft(s)71 b(.)41 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(3)125 833 y(3.2)85 b(structures)67 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)143 b(4)125 933 y(3.3)85 b(global)20 b(v)n(ariables)49 b(.)42 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(4)125 1032 y(3.4)85 b(functionality)26 b(.)41 b(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(4)0 1215 y Fl(4)83 b(rtp)p 241 1215 V 29 w(mlist.)p Fk(f)p Fl(h,c)p Fk(g)3209 b Fl(7)125 1315 y Ft(4.1)85 b(functions)80 b(.)41 b(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(7)315 1414 y(4.1.1)98 b(Reaction)20 b(to)g(Ev)o(ents)58 b(.)41 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(7)315 1514 y(4.1.2)98 b(Member)19 b(Initialization)g(/)i(destruction) e(functions)65 b(.)41 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(7)315 1614 y(4.1.3)98 b(Functions)19 b(to)i(update)e(a)h(member')-5 b(s)20 b(status)37 b(.)k(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)143 b(8)315 1713 y(4.1.4)98 b(Queries)20 b(of)g(a)h(member')-5 b(s)19 b(status)32 b(.)42 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)g(.)143 b(8)0 1896 y Fl(5)83 b(rtp)p 241 1896 V 29 w(api)p 381 1896 V 30 w(inter)o(nal.)p Fk(f)p Fl(h,c)p Fk(g)2962 b Fl(9)125 1995 y Ft(5.1)85 b Fj(#define)p Ft(s)71 b(.)41 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)143 b(9)125 2095 y(5.2)85 b(structures)67 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(10)125 2195 y(5.3)85 b(global)20 b(v)n(ariables)49 b(.)42 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(11)125 2294 y(5.4)85 b(functions)80 b(.)41 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)g(.)102 b(11)0 2477 y Fl(6)83 b(rtp)p 241 2477 V 29 w(collision.)p Fk(f)p Fl(h,c)p Fk(g)3052 b Fl(14)125 2577 y Ft(6.1)85 b(functions)80 b(.)41 b(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(14)0 2759 y Fl(7)83 b(rtp)p 241 2759 V 29 w(encrypt.)p Fk(f)p Fl(h,c)p Fk(g)3070 b Fl(15)125 2859 y Ft(7.1)85 b(functions)80 b(.)41 b(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)102 b(15)0 3042 y Fl(8)83 b(Other)19 b(Files)3294 b(15)0 3224 y(Refer)o(ences)3430 b(16)1929 5589 y Ft(2)p eop %%Page: 3 3 3 2 bop 0 83 a Fm(1)119 b(Intr)n(oduction)0 269 y Ft(The)17 b(Bell)i(Labs/Columbia/UMass)d(R)-5 b(TP)19 b(Library)d(is)i(pro)o (vided)d(as)j(a)g(tool)g(to)f(f)o(acilitate)h(de)n(v)o(elopment)d(of)i (applications)g(that)g(imple-)0 368 y(ment)i(R)-5 b(TP/R)g(TCP)21 b(protocols)c(for)i(deli)n(v)o(ering)e(real-time)h(data.)25 b(It)19 b(also)h(pro)o(vides)d(a)j(common)d(implementation)g(of)i(the)g (R)-5 b(TP/R)g(TCP)0 468 y(protocols.)23 b(By)c(using)f(the)g(library) -5 b(,)17 b(v)n(arious)h(applications')e(protocols)h(will)j(conform)c (to)i(the)h(same)f(set)i(of)e(requirements.)k(This)d(will)0 567 y(mak)o(e)24 b(it)i(easier)f(for)f(dif)n(ferent)f(applications)g (to)i(share)g(data)g(o)o(v)o(er)e(a)i(netw)o(ork.)37 b(Furthermore,)24 b(the)g(cost)i(of)e(updating)f(an)i(applica-)0 667 y(tion)d(to)g(a)h(ne)n(wer)e(v)o(ersion)g(of)h(R)-5 b(TP/R)g(TCP)24 b(is)f(simpli\002ed.)30 b(The)22 b(application)e (programmer)g(simply)h(needs)h(to)g(compile)f(in)i(a)f(ne)n(wer)0 767 y(v)o(ersion)d(of)h(the)g(library)-5 b(.)125 866 y(The)27 b(library)f(itself)i(can)f(be)h(vie)n(wed)e(in)i(tw)o(o)g(le)n (v)o(els.)46 b(The)27 b(top)h(le)n(v)o(el)f(is)h(the)g(interf)o(ace)e (that)i(is)g(pro)o(vided)d(to)j(the)f(application)0 966 y(programmer)-5 b(.)30 b(Through)21 b(calls)j(to)f(this)g(interf)o (ace,)g(the)g(application)e(programmer)f(should)i(be)h(able)f(to)h (easily)h(construct)d(an)i(appli-)0 1066 y(cation)g(whose)h(netw)o(ork) e(transport)h(protocol)f(conforms)g(to)h(the)h(R)-5 b(TP/R)g(TCP)26 b(speci\002cation)d(in)g([2].)35 b(This)24 b(interf)o(ace)f(is)i (described)0 1165 y(in)d([1)o(].)31 b(In)22 b(this)h(document,)d(we)j (describe)e(ho)n(w)h(the)g(internals)f(of)h(the)g(interf)o(ace)g (operate)f(\(i.e.)30 b(all)23 b(the)f(details)h(that)f(an)g (application)0 1265 y(programmer)17 b(shouldn')o(t)h(need)i(to)g(kno)n (w\).)0 1545 y Fm(2)119 b(Library)30 b(Inter)n(nals)g(Ov)o(er)o(view)0 1731 y Ft(The)f(Internals)g(of)g(the)g(Library)f(perform)g(man)o(y)g (functions)g(that)h(are)h(required)d(to)j(support)e(R)-5 b(TP/R)g(TCP)c(.)31 b(This)e(support)f(can)i(be)0 1830 y(brok)o(en)23 b(do)n(wn)i(into)f(tw)o(o)i(basic)f(components:)33 b Fl(Netw)o(ork)25 b(Interface)g(Operations)f Ft(and)h Fl(Membership)h(Operations)p Ft(.)39 b(Netw)o(ork)0 1930 y(interf)o(ace)19 b(operationsin)m(v)n(olv)o(e)c(sending,)k(recei)n (ving,)e(processing,)h(and)h(perhaps)f(decoding)g(of)h(R)-5 b(TP/R)g(TCP)21 b(pack)o(ets.)j(Membership)0 2029 y(operationsin)m(v)n (olv)o(e)c(k)o(eeping)j(track)h(of)f(the)h(members)f(of)h(the)g (current)f(session,)i(and)f(an)o(y)f(statistics)j(for)d(these)h (members)f(that)i(are)0 2129 y(rele)n(v)n(ant)19 b(to)h(the)h (operation)d(of)i(R)-5 b(TP/R)g(TCP)c(.)0 2409 y Fm(3)119 b(rtp)p 345 2409 36 4 v 44 w(mlist)p 642 2409 V 42 w(inter)n(nal.)p Fi(f)p Fm(h,c)p Fi(g)0 2595 y Ft(These)30 b(\002les)i(pro)o(vide)c (structures)i(and)g(functionality)f(that)h(perform)f(generic)g(list)j (operations.)54 b(The)o(y)30 b(also)h(pro)o(vide)d(structures)0 2694 y(and)f(functionality)e(for)i(operations)e(that)j(are)f (speci\002c)g(to)h(R)-5 b(TP/R)g(TCP)c(,)28 b(b)n(ut)g(which)e(are)i (for)e(the)i(mostpart)e(strictly)i(membership)0 2794 y(operations.)0 3032 y Fh(3.1)99 b Fg(#define)p Fh(s)p -65 3187 25 4 v -40 3187 a Fl(R)m(TP)p 128 3187 V 29 w(DEB)o(UG)208 3287 y Ft(If)20 b(this)g(v)n(ariable)f(is)j Fj(#define)p Ft(d,)c(then)i(certain)g(interal)g(messages)g(will)h(be)f (printed)f(to)h Fj(stdout)p Ft(.)p -65 3453 V -40 3453 a Fl(R)m(TP)p 128 3453 V 29 w(W)-10 b(A)i(TCH)p 462 3453 V 30 w(ALLOCA)g(TION)208 3553 y Ft(If)19 b(this)g(v)n(ariable)f(is)i Fj(#define)p Ft(d,)e(then)h(dynamic)e(memory)h(allocations)g(are)h (track)o(ed,)g(messages)g(to)g Fj(stdout)g Ft(will)h(pro)o(vide)208 3652 y(noti\002cation)i(whene)n(v)o(er)g(a)j(memory)d(location)i(is)h (freed)e(by)g(the)h(library)f(that)i(w)o(as)g(not)e(allocated)h(by)f (the)h(library)-5 b(.)36 b(Further)n(-)208 3752 y(more,)19 b(functionality)f(is)j(pro)o(vided)d(that)i(can)g(be)g(called)g(to)g(e) o(xamine)f(the)h(status)h(of)f(memory)f(at)h(an)o(y)g(time.)p -65 3918 V -40 3918 a Fl(R)m(TP)p 128 3918 V 29 w(SEMI)p 368 3918 V 31 w(RANDOM)208 4018 y Ft(If)c(this)i(v)n(ariable)e(is)i Fj(#define)p Ft(d,)e(then)g(the)h(random)f(number)f(generator)g(does)h (not)h(use)g(a)h(random)d(seed,)i(so)h(that)f(it)h(generates)208 4117 y(random)g(numbers)h(in)h(a)h(predictable)d(order)m(,)h(and)g(mak) o(es)h(it)h(easier)g(to)f(test)h(for)e(things)h(lik)o(e)h(SSRC)h (collisions.)p -65 4283 V -40 4283 a Fl(R)m(TP)p 128 4283 V 29 w(NUM)p 355 4283 V 30 w(SDES)p 592 4283 V 31 w(TYPES)208 4383 y Ft(This)h(v)n(ariable)g(must)g(be)g Fj(#define)p Ft(d)g(to)g(the)h(number)d(of)i(SDES)h(types)g(that)f(are) h(supported)d(by)i(the)h(library)-5 b(.)33 b(The)23 b(current)208 4483 y(def)o(ault)c(is)i(12.)-70 4649 y Fl(MAXMALLOCS)208 4748 y Ft(De\002ned)i(for)h(internal)f(use)i(only)-5 b(.)36 b(Number)23 b(of)h(items)g(that)h(can)f(be)g(dynamically)e (allocated)i(during)f(a)h(session.)38 b(Currently)208 4848 y(set)21 b(to)f(10,000.)j(Its)d(use)h(\(and)e(the)h(imposed)f (limit\))i(is)g(only)e(in)i(ef)n(fect)e(if)p 2328 4848 V 51 w Fj(RTP)p 2508 4848 V 29 w(WATCH)p 2787 4848 V 29 w(ALLOCATION)g Ft(is)i Fj(#define)p Ft(d.)1929 5589 y(3)p eop %%Page: 4 4 4 3 bop 0 83 a Fh(3.2)99 b(structur)n(es)-70 239 y Fl(rtp)p 46 239 25 4 v 29 w(sndr)p 236 239 V 31 w(local)208 338 y Ft(Holds)18 b(information)f(about)h(observ)n(ations)f(from)h(a)h (particular)f(member)g Ff(M)28 b Ft(about)18 b(a)h(particular)f(sender) m(,)g Ff(S)5 b Ft(.)25 b(F)o(or)18 b(instance,)h(it)208 438 y(k)o(eeps)d(track)h(of)f(the)h(jitter)g(and)g(arri)n(v)n(al)e (times)j(and)e(sequence)g(numbers)f(for)h(recently)g(recei)n(v)o(ed)f (pack)o(ets)i(from)f Ff(S)22 b Ft(as)c(observ)o(ed)208 538 y Ff(M)9 b Ft(,)26 b(and)e(communicated)f(locally)h(via)h(R)-5 b(TCP)27 b(reports.)38 b Ff(M)c Ft(can)25 b(also)h(be)f(the)g(local)g (member)m(,)f(such)h(that)g(the)g(information)208 637 y(contained)18 b(in)i(the)h(structure)e(is)i(what)f(is)h(observ)o(ed)e (of)g(sender)h Ff(S)25 b Ft(from)19 b(a)i(local)f(perspecti)n(v)o(e.) -70 803 y Fl(member)208 903 y Ft(Holds)g(information)e(about)i(a)h (particular)e(member)h(of)g(the)h(R)-5 b(TP/R)g(TCP)22 b(session.)27 b(Sample)20 b(members)g(for)g(which)g(this)h(struc-)208 1002 y(ture)g(is)i(used)f(include:)27 b(the)22 b(local)g(member)m(,)f (an)o(y)g(member)f(that)i(is)h(sending)e(R)-5 b(TP)23 b(or)e(R)-5 b(TCP)23 b(pack)o(ets,)f(or)g(an)o(y)f(member)f(that)208 1102 y(appears)f(in)h(the)g(CSRC)i(list)g(of)e(an)g(R)-5 b(TCP)21 b(pack)o(et.)-70 1268 y Fl(struct)f(link)208 1368 y Ft(An)g(object)f(used)h(within)g(a)h(doubly)d(link)o(ed)i(list)h (to)f(connect)f(the)i(members)e(of)h(the)g(list.)-70 1534 y Fl(doubly)p 180 1534 V 29 w(link)o(ed)p 429 1534 V 31 w(list)208 1633 y Ft(A)g(doubly)f(link)o(ed)g(list)i(of)f(members) f(that)i(are)f(link)o(ed)f(together)g(via)h Fj(struct)49 b(link)p Ft(s.)-70 1800 y Fl(membership)p 377 1800 V 30 w(list)208 1899 y Ft(The)28 b(list)h(of)f(members)f(for)h(the)h (current)e(conte)o(xt.)48 b(This)28 b(is)i(simply)e(a)g Fj(d)p Ft(oubly)p 2589 1899 V 28 w(link)o(ed)p 2825 1899 V 29 w(list)h(with)g(a)g(fe)n(w)f(e)o(xtra)g(\002elds)g(that)208 1999 y(allo)n(w)c(it)h(to)f(group)e(members)h(of)h(dif)n(ferent)f (status)i(\()p 1772 1999 V 29 w Fj(RTP)p 1951 1999 V 30 w(MEMBER)p 2281 1999 V 28 w(CONFIRMED)p Ft(,)p 2803 1999 V 53 w Fj(RTP)p 2983 1999 V 79 w(MEMBER)p 3362 1999 V 29 w(PENDING)p Ft(,)e(and)p 208 2098 V 232 2098 a Fj(RTP)p 387 2098 V 30 w(MEMBER)p 717 2098 V 29 w(EXPIRED)p Ft(\).)-70 2264 y Fl(hash)p 101 2264 V 30 w(table)208 2364 y Ft(Simply)f(an)h (array)f(of)h(se)n(v)o(eral)g Fj(doubly)p 1421 2364 V 28 w(linked)p 1749 2364 V 29 w(list)p Ft(s,)h(where)e(a)i(function)d (maps)i(each)g(member)f(to)h(a)h(particular)d(list)208 2464 y(via)f(a)g(hash)g(function.)0 2701 y Fh(3.3)99 b(global)24 b(v)o(ariables)-70 2857 y Fl(long)c(mallctr)208 2957 y Ft(Counts)27 b(the)i(number)d(of)h(bytes)h(that)g(were)g (dynamically)e(allocated)i(made)f(throughout)e(the)j(entire)g(running)e (of)i(the)g(e)o(x)o(e-)208 3056 y(cutable.)c(Only)c(in)g(use)g(if)p 974 3056 V 51 w Fj(RTP)p 1154 3056 V 29 w(WATCH)p 1433 3056 V 29 w(ALLOCATION)f Ft(is)i Fj(#define)p Ft(d.)-70 3222 y Fl(long)f(mallcalls)208 3322 y Ft(Counts)f(the)h(number)d(of)j (dynamic)e(memory)g(allocations)h(made)f(throughout)f(the)j(entire)f (running)e(of)j(the)f(e)o(x)o(ecutable.)k(Only)208 3422 y(in)d(use)g(if)p 501 3422 V 51 w Fj(RTP)p 681 3422 V 29 w(WATCH)p 960 3422 V 29 w(ALLOCATION)f Ft(is)i Fj(#define)p Ft(d.)-70 3588 y Fl(long)f(fr)o(eecalls)208 3687 y Ft(Counts)g(the)g (number)e(of)i(times)h(memory)d(w)o(as)j(freed.)j(Only)c(in)g(use)h(if) p 2294 3687 V 50 w Fj(RTP)p 2474 3687 V 30 w(WATCH)p 2754 3687 V 28 w(ALLOCATION)e Ft(is)i Fj(#define)p Ft(d.)-70 3853 y Fl(v)o(oid*)f(malladdr[MAXMALLOCS])208 3953 y Ft(Stores)35 b(the)g(currently)e(acti)n(v)o(e)i(memory)e(allocations.) 69 b(When)35 b(an)g(allocation)f(is)i(no)e(longer)g(acti)n(v)o(e)h (\(i.e.)69 b(it)36 b(has)f(been)208 4053 y Fj(free\(\))p Ft(d\),)18 b(its)j(v)n(alue)f(is)h(set)g(to)f Fj(NULL)p Ft(.)0 4290 y Fh(3.4)99 b(functionality)-70 4446 y Fl(v)o(oid)20 b(InitMallocs\(\))208 4545 y Ft(Initialization)25 b(function)h(for)g Fj(malloc\(\))g Ft(tracking.)44 b(Should)26 b(only)g(be)h(called)g (when)p 2836 4545 V 57 w Fj(RTP)p 3016 4545 V 29 w(WATCH)p 3295 4545 V 29 w(ALLOCATION)f Ft(is)208 4645 y Fj(#define)p Ft(d.)-70 4811 y Fl(v)o(oid)20 b(CheckMallocs\(\))208 4911 y Ft(Examines)h(what)h(has)h(been)e Fj(malloc\(\))p Ft(d)g(and)h Fj(free\(\))p Ft(d)f(and)h(reports)f(an)o(y)h(unfreed)e (memory)-5 b(.)30 b(Should)21 b(be)h(called)g(right)208 5010 y(before)13 b(termination)h(of)h(the)g(e)o(x)o(ecutable)e(to)j (check)e(for)h(memory)e(leaks.)24 b(Should)14 b(only)g(be)h(used)g (when)p 3192 5010 V 45 w Fj(RTP)p 3372 5010 V 29 w(WATCH)p 3651 5010 V 29 w(ALLOCATION)208 5110 y Ft(is)21 b Fj(#define)p Ft(d.)1929 5589 y(4)p eop %%Page: 5 5 5 4 bop -70 83 a Fl(v)o(oid*)20 b(my)p 260 83 25 4 v 29 w(malloc\(size)p 682 83 V 29 w(t)g(size\))208 183 y Ft(This)j(function)f(is)i(called)f(throughout)d(the)k(library)e(code) g(in)i(place)f(of)g Fj(malloc\(\))p Ft(.)33 b(If)p 2839 183 V 53 w Fj(RTP)p 3019 183 V 30 w(WATCH)p 3299 183 V 29 w(ALLOCATION)22 b Ft(is)208 282 y Fj(#define)p Ft(d,)28 b(then)g(the)g(call)h(performs)d(a)j Fj(malloc\(\))e Ft(and)h(also)g(retains)g(information)e(about)h(the)h(memory)f (allocation.)208 382 y(Otherwise,)19 b(it)i(simply)f(calls)h Fj(malloc\(\))p Ft(.)-70 540 y Fl(v)o(oid*)f(my)p 260 540 V 29 w(calloc\(size)p 650 540 V 29 w(t)g(num,)h(size)p 1059 540 V 30 w(t)f(size\))208 640 y Ft(Similar)g(to)g Fj(my)p 663 640 V 30 w(malloc\(\))p Ft(,)f(e)o(xcept)g(replaces)h Fj(calloc\(\))p Ft(.)-70 798 y Fl(v)o(oid)g(my)p 218 798 V 30 w(fr)o(ee\(v)o(oid*)e(tofr)o(ee\))208 898 y Ft(Similar)i(to)g Fj(my)p 663 898 V 30 w(malloc\(\))p Ft(,)f(e)o(xcept)g(replaces)h Fj(free\(\))p Ft(.)-70 1056 y Fl(v)o(oid)g(InitList\(doubly)p 647 1056 V 30 w(link)o(ed)p 897 1056 V 30 w(list)h(*l\))208 1156 y Ft(Initializes)f(a)g(list)i(to)e(be)g(empty)-5 b(.)24 b(Does)c(not)g(allocate)g(memory)e(for)i(the)g(list.)-70 1314 y Fl(struct)g(link)h(*Cr)o(eateLink\(member)e(*the)p 1269 1314 V 29 w(member\))208 1414 y Ft(Allocates)j(memory)e(for)h(a)h (link)g(which)f(can)h(be)g(used)f(to)i(insert)e Fj(the)p 2260 1414 V 30 w(member)g Ft(into)h(some)f(list.)32 b(The)21 b(function)f(itself)j(does)208 1513 y(not)c(place)h(the)h(link)e(in)i (an)o(y)e(lists.)-70 1672 y Fl(int)h(PullMember\(doubly)p 772 1672 V 30 w(link)o(ed)p 1022 1672 V 30 w(list)h(*l,)f(struct)h (link)g(*the)p 1826 1672 V 29 w(link\))208 1771 y Ft(Remo)o(v)o(e)e (link)g Fj(the)p 807 1771 V 30 w(link)h Ft(from)f(the)h(list)h Fj(l)p Ft(.)-58 1909 y Fl(int)g(UnsortedInsertMember)14 b(\(doubly)p 1196 1909 V 29 w(link)o(ed)p 1445 1909 V 30 w(list)21 b(*l,)f(struct)h(link)g(*the)p 2249 1909 V 29 w(link,)938 2009 y(struct)g(link)g(*pr)o(e)o(v)p 1533 2009 V 28 w(on)p 1649 2009 V 30 w(list\))208 2104 y Ft(Insert)i(the)g(link)g Fj(the)p 854 2104 V 30 w(link)g Ft(into)g(the)h(list)g Fj(l)g Ft(immediately)e(behind)g(the)h(link,)h Fj(prev)p 2774 2104 V 29 w(on)p 2903 2104 V 30 w(list)p Ft(.)34 b(If)24 b Fj(prev)p 3468 2104 V 29 w(on)p 3597 2104 V 29 w(list)g Ft(is)208 2203 y Fj(NULL)p Ft(,)19 b(then)h(insert)g(the)g(member)f(into)h(the)g(front)g(of)f(the)i(list.) -58 2352 y Fl(int)g(SortedInsertMember)13 b(\()p 858 2352 V 30 w(R)m(TP)p 1051 2352 V 30 w(CONTEXT)21 b(*the)p 1665 2352 V 29 w(context,)e(doubly)p 2239 2352 V 29 w(link)o(ed)p 2488 2352 V 31 w(list)i(*l,)f(struct)g(link)h(*the)p 3292 2352 V 29 w(link,)846 2452 y(int)g(\(*sort)p 1178 2452 V 28 w(func\)\()p 1419 2452 V 29 w(R)m(TP)p 1611 2452 V 30 w(CONTEXT)g(*the)p 2225 2452 V 29 w(context,)e(struct)h(link) h(*compar)o(e)p 3292 2452 V 28 w(me,)846 2551 y(struct)f(link)i(*to)p 1351 2551 V 28 w(me\),)e(struct)h(link)g(*start)p 2151 2551 V 28 w(point\))208 2646 y Ft(Insert)h(the)h(link)g Fj(the)p 853 2646 V 30 w(link)g Ft(into)f(the)i(sorted)e(list,)j Fj(l)p Ft(,)f(sorted)f(by)f(the)h(member)f(that)h(each)g(link)g(points) g(to,)h(ordered)d(by)i(the)208 2746 y(sorting)17 b(function)g Fj(sort)p 958 2746 V 29 w(func\(\))p Ft(.)23 b(The)18 b(sorting)g(should)f(be)o(gin)g(by)h(comparing)e Fj(the)p 2797 2746 V 29 w(link)i Ft(to)g(the)h(link)f Fj(to)p 3496 2746 V 29 w(me)p Ft(.)25 b(F)o(or)18 b(the)208 2845 y(list)i(to)g(be)g(sorted)f(properly)-5 b(,)17 b(the)i Fj(SortedInsertMember\(\))e Ft(function)h(must)h(al)o(w)o(ays)h(use)g (the)g(same)g(sort)f(function)f(for)208 2945 y(a)i(particular)f(list.) 26 b(At)21 b(this)g(point)e(in)h(time,)g(this)h(function)e(is)i(not)f (used)g(within)g(the)g(library)-5 b(.)-70 3103 y Fl(v)o(oid)20 b(MembershipListInit\(membership)p 1295 3103 V 32 w(list)h(*l\))208 3203 y Ft(Initialize)f(the)h(membership)e(list.)29 b(This)21 b(entails)h(initializing)e(the)h Fj(doubly)p 2447 3203 V 29 w(linked)p 2776 3203 V 29 w(list)f Ft(structure)h(as)g(well)h(as)g (setting)208 3302 y(the)e(number)f(of)i(con\002rmed)d(members)i(to)h (0,)f(and)h(setting)f(the)h(pointer)e(to)i(the)g(oldest)f(member)g (that)h(has)f(not)h(soft)g(timed)f(out)208 3402 y(yet)g(to)g Fj(NULL)g Ft(\(since)g(there)g(are)g(no)g(members)f(at)i(all\).)-70 3560 y Fl(int)f(MembershipListPullMember\(membership)p 1558 3560 V 32 w(list)h(*l,)f(str)o(cut)g(link)h(*the)p 2362 3560 V 29 w(link\))208 3660 y Ft(Remo)o(v)o(e)j(a)i(member)f(from) g(the)g(membership)f(list,)k Fj(l)p Ft(.)42 b(In)m(v)n(olv)o(es)24 b(taking)h(the)h(member)f(out)g(of)h(the)f(list)i(and)f(updating)e(the) 208 3760 y(con\002rmed)18 b(member)h(count)g(\(if)h(necessary\))f(and)h (the)g(oldest)g(not-yet-soft)e(pointer)h(\(if)h(necessary\).)-58 3914 y Fl(v)o(oid)g(ChangeMemberStatus)13 b(\()p 959 3914 V 30 w(R)m(TP)p 1152 3914 V 29 w(CONTEXT)22 b(*the)p 1766 3914 V 29 w(context,)c(member)j(*m,)947 4014 y(memberstatus)f(new) p 1618 4014 V 30 w(status\))208 4109 y Ft(Should)g(be)h(called)g(whene) n(v)o(er)f(a)i(member')-5 b(s)20 b(status)i(is)h(changed.)j(It)c(not)f (only)g(updates)f(the)i(member')-5 b(s)20 b(information)f(appro-)208 4208 y(priately)-5 b(,)18 b(b)n(ut)i(also)h(mak)o(es)f(the)g(necessary) g(changes)f(within)h(the)g(conte)o(xt)f Fj(the)p 2537 4208 V 29 w(context)p Ft(')-5 b(s)20 b(membership)e(list.)-70 4367 y Fl(v)o(oid)i(InitSSRCHashT)-8 b(able\()p 856 4367 V 30 w(R)m(TP)p 1049 4367 V 29 w(CONTEXT)22 b(*the)p 1663 4367 V 29 w(context\))208 4466 y Ft(Initializes)e(the)g(member)f (hash)h(table)g(that)g(hashes)g(on)g(the)g(SSRC.)-70 4625 y Fl(v)o(oid)g(DeleteSSRCHashT)-8 b(able\()p 949 4625 V 29 w(R)m(TP)p 1141 4625 V 30 w(CONTEXT)21 b(*the)p 1755 4625 V 29 w(context\))208 4724 y Ft(Destro)o(ys)f(the)g(member)f (hash)h(table)g(that)g(hashes)g(on)g(the)g(SSRC.)-70 4883 y Fl(int)g(EnterSSRCHashT)-8 b(able\()p 875 4883 V 30 w(R)m(TP)p 1068 4883 V 30 w(CONTEXT)21 b(*the)p 1682 4883 V 29 w(context,)e(member)i(*the)p 2480 4883 V 29 w(member\))208 4982 y Ft(Places)f(a)h(member)e(into)h(the)g(hash)g (table)g(that)g(hashes)g(on)g(the)g(member')-5 b(s)20 b(SSRC.)-70 5141 y Fl(member)h(*GetMemberFr)o(omSSRCHash\()p 1350 5141 V 27 w(R)m(TP)p 1540 5141 V 29 w(CONTEXT)g(*the)p 2153 5141 V 30 w(context,)d(u)p 2528 5141 V 30 w(int32)i(ssr)o(c\))208 5240 y Ft(Retrie)n(v)o(es)i Fe(a)g Ft(member)f(with)i(SSRC)h Fj(ssrc)e Ft(\(there)g(might)g(be)g(more)g(than)g(one)g(if)h(a)f (collision)h(e)o(xists\).)31 b(If)23 b(no)f(such)g(member)208 5340 y(e)o(xists,)e(the)g(function)f(returns)g Fj(NULL)p Ft(.)1929 5589 y(5)p eop %%Page: 6 6 6 5 bop -58 70 a Fl(int)21 b(Remo)o(v)o(eMemberFr)o(omSSRCHash)12 b(\()p 1289 70 25 4 v 29 w(R)m(TP)p 1481 70 V 30 w(CONTEXT)21 b(*the)p 2095 70 V 29 w(context,)1277 169 y(member)f(*the)p 1750 169 V 29 w(member\))208 264 y Ft(Remo)o(v)o(es)i(a)i(particular)e (member)g(from)h(the)g(SSRC)i(hash)f(table.)35 b(Returns)23 b Fj(FALSE)g Ft(if)h Fj(the)p 2955 264 V 29 w(member)f Ft(is)h(not)g(currently)d(in)208 364 y(the)f(hash)g(table.)-70 530 y Fl(v)o(oid)g(InitUniqueIDHashT)-8 b(able\()p 994 530 V 30 w(R)m(TP)p 1187 530 V 30 w(CONTEXT)21 b(*the)p 1801 530 V 29 w(context\))208 629 y Ft(Creates)f(the)g(hash)g(table)h (that)f(hashes)g(on)g(the)g(canonical)f(identi\002er)g(for)h(each)g (member)-5 b(.)-70 796 y Fl(v)o(oid)20 b(DeleteUniqueIDHashT)-8 b(able\()p 1087 796 V 29 w(R)m(TP)p 1279 796 V 30 w(CONTEXT)21 b(*the)p 1893 796 V 29 w(context\))208 895 y Ft(Deletes)f(the)g(hash)g (table)h(that)f(hashes)g(on)g(the)g(canonical)f(identi\002er)g(for)h (each)g(member)-5 b(.)-70 1061 y Fl(int)20 b(EnterUniqueIDHashT)-8 b(able\()p 1013 1061 V 30 w(R)m(TP)p 1206 1061 V 30 w(CONTEXT)21 b(*the)p 1820 1061 V 29 w(context,)e(member)i(*the)p 2618 1061 V 29 w(member\))208 1161 y Ft(Places)f(the)h(member)d Fj(the)p 1010 1161 V 30 w(member)h Ft(into)h(the)h(unique)d(ID)j(hash)f (table.)-70 1327 y Fl(member)h(*GetMemberFr)o(omUniqueIDHash\()p 1488 1327 V 27 w(R)m(TP)p 1678 1327 V 30 w(CONTEXT)g(*the)p 2292 1327 V 29 w(context,)e(person)h(id\))208 1426 y Ft(Gets)g(the)h(member)e(with)h(the)g(unique)f(id)h Fj(id)p Ft(.)25 b(Returns)20 b Fj(NULL)g Ft(if)h(no)f(such)g(member)e(e)o (xists.)-58 1589 y Fl(int)j(Remo)o(v)o(eMemberFr)o(omUniqueIDHash)12 b(\()p 1427 1589 V 30 w(R)m(TP)p 1620 1589 V 29 w(CONTEXT)22 b(*the)p 2234 1589 V 29 w(context,)1415 1689 y(member)f(*the)p 1889 1689 V 29 w(member\))208 1783 y Ft(Remo)o(v)o(e)i(the)i(member)e Fj(the)p 1086 1783 V 29 w(member)h Ft(from)g(the)h(hash)f(table.)38 b(Returns)25 b Fj(FALSE)f Ft(if)h(no)f(such)h(member)e(is)j(present)e (in)h(the)208 1883 y(table.)-70 2049 y Fl(v)o(oid)20 b(InitCN)n(AMEHashT)-8 b(able\()p 955 2049 V 31 w(R)m(TP)p 1149 2049 V 29 w(CONTEXT)21 b(*the)p 1762 2049 V 30 w(context\))208 2149 y Ft(Creates)f(the)g(hash)g(table)h(that)f(hashes)g(on)g(the)g (canonical)f(name)g(of)h(a)h(member)-5 b(.)-70 2315 y Fl(v)o(oid)20 b(DeleteCN)n(AMEHashT)-8 b(able\()p 1048 2315 V 30 w(R)m(TP)p 1241 2315 V 29 w(CONTEXT)22 b(*the)p 1855 2315 V 29 w(context\))208 2414 y Ft(Deletes)e(the)g(hash)g(table)h (that)f(hashes)g(on)g(the)g(canonical)f(name)g(of)h(a)h(member)-5 b(.)-70 2580 y Fl(int)20 b(HashOnName\(char)f(*the)p 918 2580 V 29 w(name\))208 2680 y Ft(Con)m(v)o(erts)d(a)h (NULL-terminated)e(string)i Fj(the)p 1559 2680 V 30 w(name)g Ft(into)g(an)g(inte)o(ger)f(that)i(can)f(then)g(be)g(fed)g(to)h(a)f (hash)g(function)f(to)i(produce)208 2780 y(a)i(hash)g(v)n(alue.)-70 2946 y Fl(int)g(EnterCN)n(AMEHashT)-8 b(able\()p 974 2946 V 31 w(R)m(TP)p 1168 2946 V 29 w(CONTEXT)22 b(*the)p 1782 2946 V 29 w(context,)c(member)j(*the)p 2579 2946 V 29 w(member\))208 3045 y Ft(Places)f(the)h(member)d Fj(the)p 1010 3045 V 30 w(member)h Ft(into)h(the)h(CN)m(AME)f(hash)g (table.)-70 3211 y Fl(member)h(*GetMemberFr)o(omCN)n(AMEHash\()p 1449 3211 V 27 w(R)m(TP)p 1639 3211 V 30 w(CONTEXT)g(*the)p 2253 3211 V 29 w(context,)e(char)h(*cname\))208 3311 y Ft(Gets)g(the)h(member)e(with)h(the)g(CN)m(AME)h Fj(cname)p Ft(.)j(Returns)c Fj(NULL)g Ft(if)h(no)f(such)g(member)e(e)o(xists.)-58 3457 y Fl(int)j(Remo)o(v)o(eMemberFr)o(omCN)n(AMEHash)13 b(\()p 1389 3457 V 29 w(R)m(TP)p 1581 3457 V 30 w(CONTEXT)21 b(*the)p 2195 3457 V 29 w(context,)1376 3557 y(member)g(*the)p 1850 3557 V 29 w(member\))208 3651 y Ft(Remo)o(v)o(e)i(the)i(member)e Fj(the)p 1086 3651 V 29 w(member)h Ft(from)g(the)h(hash)f(table.)38 b(Returns)25 b Fj(FALSE)f Ft(if)h(no)f(such)h(member)e(is)j(present)e (in)h(the)208 3751 y(table.)-70 3917 y Fl(v)o(oid)20 b(Init)p 236 3917 V 30 w(RR)p 386 3917 V 30 w(Hash\(member)g(*the)p 1097 3917 V 29 w(member\))208 4017 y Ft(Creates)g(the)g(hash)g(table)h (used)f(by)f(the)h(member)f Fj(the)p 1801 4017 V 30 w(member)g Ft(that)i(hashes)f(on)f(a)i(recei)n(v)o(er)e(report)g(for)g(a)i(sender) -5 b(.)-70 4183 y Fl(v)o(oid)20 b(Delete)p 329 4183 V 29 w(RR)p 478 4183 V 30 w(Hash\(member)g(*the)p 1189 4183 V 29 w(member\))208 4282 y Ft(Deletes)g(the)g(hash)g(table)h(used) f(by)f(the)h(member)f Fj(the)p 1801 4282 V 30 w(member)g Ft(that)i(hashes)f(on)f(a)i(recei)n(v)o(er)e(report)g(for)g(a)i(sender) -5 b(.)-58 4445 y Fl(r)o(ecei)o(v)o(er)p 231 4445 V 29 w(r)o(eport)19 b(*Update)p 806 4445 V 28 w(RR)14 b(\(member)21 b(*r)o(eporter)-8 b(,)18 b(member)j(*sender)-8 b(,)984 4544 y(rtcp)p 1137 4544 V 30 w(r)o(eport)p 1393 4544 V 28 w(block)20 b(*the)p 1788 4544 V 29 w(block\))208 4639 y Ft(Updates)f(the)i(report)e(to)h Fj(the)p 1082 4639 V 29 w(block)g Ft(for)g(the)g(sender)f Fj(sender)h Ft(that)g(w)o(as)h(issued)g(by)e(the)i(member)d Fj(reporter)p Ft(.)-70 4805 y Fl(v)o(oid)i(Clear)p 306 4805 V 29 w(Member)p 639 4805 V 30 w(RRs\()p 849 4805 V 30 w(R)m(TP)p 1042 4805 V 30 w(CONTEXT)h(*the)p 1656 4805 V 29 w(context,)e(member)i(*the) p 2454 4805 V 29 w(member\))208 4905 y Ft(Remo)o(v)o(es)e(hash)h (enttries)g(for)f(the)i(member)e Fj(the)p 1661 4905 V 29 w(member)p Ft(.)-70 5071 y Fl(static)h(v)o(oid)g(Mer)o(ge)p 547 5071 V 29 w(RRs\(r)o(ecei)o(v)o(er)p 1040 5071 V 29 w(r)o(eport)f(*pr)o(e)o(v)p 1516 5071 V 28 w(sr)-8 b(,)21 b(r)o(ecei)o(v)o(er)p 1931 5071 V 28 w(r)o(eport)f(*new)p 2390 5071 V 29 w(sr\))208 5171 y Ft(Mer)o(ges)f(tw)o(o)h(recei)n(v)o (er)f(reports)g(and)h(stores)g(the)h(results)f(in)g Fj(prev)p 2161 5171 V 30 w(sr)p Ft(.)1929 5589 y(6)p eop %%Page: 7 7 7 6 bop -70 83 a Fl(v)o(oid)20 b(Mer)o(ge)p 337 83 25 4 v 30 w(RR)p 487 83 V 29 w(Hashes\(member*)g(pr)o(e)o(v)p 1315 83 V 29 w(member)-8 b(,)20 b(member)h(*new)p 2173 83 V 30 w(member\))208 183 y Ft(Mer)o(ges)e(the)h(hash)g(table)g(from)f (member)g Fj(new)p 1583 183 V 29 w(member)h Ft(into)g(the)g(hash)g (table)g(for)g Fj(prev)p 2877 183 V 29 w(member)p Ft(.)-70 349 y Fl(v)o(oid)g(panic\(char)g(*f)n(ormat,)e(...\))208 448 y Ft(Called)i(by)g Fl(tclHash.c)f Ft(whene)n(v)o(er)g(something)f (goes)i(wrong.)k(Hopefully)-5 b(,)18 b(it)i(ne)n(v)o(er)f(gets)i (called.)0 729 y Fm(4)119 b(rtp)p 345 729 36 4 v 44 w(mlist.)p Fi(f)p Fm(h,c)p Fi(g)0 914 y Ft(These)20 b(\002les)h(pro)o(vide)d(netw) o(ork)h(interf)o(ace)h(operationsthat)e(af)n(fect)h(the)i(membership)d (lists.)0 1152 y Fh(4.1)99 b(functions)0 1307 y Fl(4.1.1)81 b(Reaction)19 b(to)h(Ev)o(ents)0 1463 y Ft(Library)26 b(member)f(list)j(operations)e(are)h(performed)d(whene)n(v)o(er)h(an)i (e)n(v)o(ent)f(occurs.)44 b(An)27 b(e)n(v)o(ent)f(is)i(de\002ned)e(as)i (a)g(\(R)-5 b(TP)27 b(or)g(R)-5 b(TCP\))0 1563 y(pack)o(et,)19 b(or)h(a)h(timeout)e(\(i.e.)25 b(when)20 b(the)g(application)f(mak)o (es)h(a)g(call)h(to)f Fj(RTPExecute\(\))f Ft(\(see)h([1)o(]\).)-58 1742 y Fl(rtperr)o(or)f(UpdateMemberInf)n(oByR)m(TCP)13 b(\()p 1336 1742 25 4 v 29 w(R)m(TP)p 1528 1742 V 30 w(CONTEXT)21 b(*the)p 2142 1742 V 29 w(context,)e(rtcp)p 2619 1742 V 29 w(pack)o(et)h(*the)p 3056 1742 V 30 w(pack)o(et,)1324 1841 y(struct)g(sockaddr)g(*fr)o(omaddr)-8 b(,)1324 1941 y(int)20 b(addrlen,)1324 2041 y(int)g(part)p 1599 2041 V 29 w(in)p 1697 2041 V 30 w(compound)p 2101 2041 V 30 w(pkt\))208 2135 y Ft(This)k(function)e(is)j(called)f(for)f(the)i (member)d(from)h(which)h(an)g(R)-5 b(TCP)25 b(pack)o(et)f(w)o(as)g (just)h(recei)n(v)o(ed.)35 b(The)24 b(member)e(is)k(mo)o(v)o(ed)208 2235 y(to)f(status)g Fj(RTP)p 667 2235 V 29 w(MEMBER)p 996 2235 V 29 w(CONFIRMED)f Ft(if)h(tw)o(o)g(R)-5 b(T\(C\)P)25 b(pack)o(ets)g(ha)n(v)o(e)f(been)g(recei)n(v)o(ed)f(from)h(it.)40 b(All)25 b(\002elds)g(which)g(are)208 2335 y(af)n(fected)h(by)i (information)d(in)j(R)-5 b(TCP)30 b(compound)25 b(pack)o(ets)i(are)h (updated.)47 b(SSRC)29 b(collisions)f(are)g(detected)f(and)g(handled) 208 2434 y(via)h(calls)h(to)g Fj(HandleSSRCCollision\(\))c Ft(if)k(tw)o(o)g(members)f(with)g(the)h(same)g(SSRC)h(b)n(ut)e(dif)n (ferent)f(CN)m(AMEs)j(are)208 2534 y(detected.)56 b(Members)30 b(are)h(mer)o(ged)e(if)i(a)g(member)f(obtains)g(a)i(CN)m(AME)f(and)f (turns)h(out)f(to)h(be)g(identical)g(to)g(a)g(pre)n(vious)208 2634 y(member)21 b(that)j(w)o(as)g(pre)n(viously)d(in)m(v)n(olv)o(ed)g (in)i(an)g(SSRC)i(collision.)34 b(If)23 b(the)g(R)-5 b(TCP)24 b(pack)o(et)f(includes)f(a)i(BYE)g(pack)o(et,)f(those)208 2733 y(members)18 b(speci\002ed)i(in)g(the)g(pack)o(et)f(are)h(remo)o (v)o(ed.)j(An)c(APP)i(pack)o(et)e(updates)h(member)e(info.)24 b(At)d(the)f(end)f(of)h(the)g(function,)208 2833 y(a)g(call)h(to)f Fj(UpdateMembershipLists\(\))d Ft(is)k(made)e(to)i(update)e(the)h (appropriate)e(lists.)-58 2995 y Fl(rtperr)o(or)h(UpdateMemberInf)n (oByR)m(TP)13 b(\()p 1276 2995 V 29 w(R)m(TP)p 1468 2995 V 30 w(CONTEXT)21 b(*the)p 2082 2995 V 29 w(context,)e(rtp)p 2522 2995 V 30 w(pack)o(et)h(*the)p 2960 2995 V 29 w(pack)o(et,)1264 3095 y(struct)g(sockaddr)g(*fr)o(omaddr)-8 b(,)1264 3194 y(int)20 b(addrlen\))208 3289 y Ft(Called)g(upon)g(receipt)g(\(or)g (sending\))f(of)h(an)g(R)-5 b(TP)22 b(pack)o(et.)j(Updates)20 b(the)h(info)f(of)g(the)h(sending)e(member)g(of)h(the)h(R)-5 b(TP)21 b(pack)o(et.)208 3389 y(The)k(status)i(of)f(the)g(member)f(is)i (changed)d(to)i Fj(RTP)p 1733 3389 V 29 w(MEMBER)p 2062 3389 V 29 w(CONFIRMED)f Ft(if)h(tw)o(o)h(R)-5 b(TP)27 b(pack)o(ets)f(ha)n(v)o(e)f(been)g(recei)n(v)o(ed.)208 3489 y(Jitter)20 b(and)g(sequence)f(number)f(\002elds)j(are)f(updated)f (as)i(well.)-70 3655 y Fl(v)o(oid)f(UpdateMembershipLists\()p 1015 3655 V 30 w(R)m(TP)p 1208 3655 V 30 w(CONTEXT)h(*the)p 1822 3655 V 29 w(context\))208 3754 y Ft(Called)f(after)g(an)h(R)-5 b(TCP)21 b(pack)o(et)f(is)i(recei)n(v)o(ed)d(\(i.e.)25 b(called)20 b(by)g Fj(UpdateMemberInfoByRTCP\(\))p Ft(\))d(as)k(well)g (as)g(when)f(an)208 3854 y(R)-5 b(TCP)22 b(pack)o(et)f(is)h(sent)g (\(see)f Fj(SendRTCPPacket\(\))e Ft(in)j([1)o(].)29 b(Updates)21 b(the)g(status)h(of)f(all)h(members)e(on)h(the)h(membership)208 3953 y(list,)d(calls)h(the)f(necessary)f(callbacks)g(when)g(membership) f(status)i(changes,)f(and)g(pur)o(ges)f(those)i(members)e(from)h(the)h (list)g(that)208 4053 y(no)g(longer)g(belong)g(on)h(it.)25 b(It)c(also)f(updates)g(the)g(sender)f(status)i(appropriately)d(for)h (members.)0 4274 y Fl(4.1.2)81 b(Member)21 b(Initialization)f(/)g (destruction)g(functions)0 4430 y Ft(Functions)27 b(that)h(correspond)e (to)i(initializing)g(members)f(are)h(called)g(whene)n(v)o(er)e(the)i (library)f(belie)n(v)o(es)h(that)g(a)h(ne)n(w)f(member)e(has)0 4529 y(joined)18 b(the)h(session)h(\(i.e.)k(a)c(pack)o(et)f(arri)n(v)o (es)f(from)g(a)i(pre)n(viously)d(unkno)n(wn)f(SSRC,)21 b(or)e(a)g(collision)g(of)g(SSRCs)i(has)f(been)e(detected\).)0 4629 y(Functions)24 b(that)h(destro)o(y)f(members)f(are)i(called)g (when)f(a)h(member)f(hard)g(times)h(out,)g(or)g(when)f(a)h(collision)f (is)i(resolv)o(ed)e(\(i.e.)38 b(tw)o(o)0 4729 y(members)19 b(with)h(dif)n(ferent)f(SSRCs)j(in)e(f)o(act)h(refer)e(to)i(the)f(pre-) f(and)h(post-collission)f(members\).)-58 4908 y Fl(member)i (*EstablishNewMember)14 b(\()p 1135 4908 V 30 w(R)m(TP)p 1328 4908 V 29 w(CONTEXT)22 b(*the)p 1942 4908 V 29 w(context,)c(u)p 2316 4908 V 30 w(int32)i(ssr)o(c,)1123 5007 y(v)o(oid*)g(user)p 1494 5007 V 30 w(data,)f(struct)h(sockaddr)h(*fr)o(omaddr\))208 5102 y Ft(Constructs)h(a)i(ne)n(w)e(member)g(with)h(the)g(speci\002ed)g (SSRC.)h(The)f(member)e(is)j(gi)n(v)o(en)e(a)h(unique)f(ID)h(\(the)g (CN)m(AME)g(is)h(not)f(yet)208 5202 y(kno)n(wn)i(so)i(it)g(is)h (assumed)e(to)h(be)g(a)g(ne)n(w)g(member\).)43 b(The)26 b(initial)i(status)f(of)g(the)f(member)g(is)h Fj(RTP)p 3177 5202 V 30 w(MEMBER)p 3507 5202 V 29 w(PENDING)p Ft(.)1929 5589 y(7)p eop %%Page: 8 8 8 7 bop 208 83 a Ft(Calling)29 b(this)i(function)d(also)i(triggers)f (callbacks)g Fj(UpdateMemberCallBack\(\))d Ft(and)j Fj (ChangedMemberInfo-)208 183 y(CallBack\(\))d Ft(if)h(the)o(y)g(ha)n(v)o (e)g(been)g(set)h(to)g(indicate)e(a)i(ne)n(w)g(member)e(and)g(announce) g(the)h(IP)h(address)f(of)g(the)h(member)m(,)208 282 y(respecti)n(v)o(ely)-5 b(.)-70 439 y Fl(static)20 b(person)g (AssignID\()p 760 439 25 4 v 30 w(R)m(TP)p 953 439 V 30 w(CONTEXT)h(*the)p 1567 439 V 29 w(context\))208 538 y Ft(Allocates)f(a)g(unique)f(ID)i(each)e(time)i(the)f(function)e(is)k (called.)i(The)c(returned)f(number)f(is)j(simply)f(incremented)e(each)i (time.)-70 695 y Fl(int)g(Remo)o(v)o(eMember\()p 669 695 V 29 w(R)m(TP)p 861 695 V 30 w(CONTEXT)h(*the)p 1475 695 V 29 w(context,)e(member)i(*r)o(emo)o(v)o(e)p 2423 695 V 28 w(me\))208 794 y Ft(Remo)o(v)o(es)e(a)h(member)f(from)g(all)i (lists)h(and)d(hash)h(tables.)-70 951 y Fl(int)g(Destr)o(oyMember\()p 661 951 V 28 w(R)m(TP)p 852 951 V 30 w(CONTEXT)h(*the)p 1466 951 V 29 w(context,)e(member)i(*destr)o(oy)p 2416 951 V 28 w(me\))208 1050 y Ft(Deallocates)f(memory)e(associated)i(with) g(a)h(member)-5 b(.)24 b(Remo)o(v)o(es)19 b(it)i(from)e(an)o(y)h (collisions)g(that)g(it)h(is)g(in)m(v)n(olv)o(ed)d(in)j(as)f(well.)0 1267 y Fl(4.1.3)81 b(Functions)20 b(to)g(update)h(a)f(member')m(s)h (status)0 1423 y Ft(The)i(follo)n(wing)e(functions)h(update)g(the)i (status)f(of)g(a)h(member)m(,)e(and)h(the)g(appropriate)e(function)g (is)j(called)f(in)h(reaction)e(to)h(an)g(e)n(v)o(ent)0 1522 y(triggered)18 b(by)i(the)g(member)f(that)i(is)g(being)e(updated.) -58 1677 y Fl(int)i(UpdateMemberT)o(ime)13 b(\()p 852 1677 V 30 w(R)m(TP)p 1045 1677 V 30 w(CONTEXT)21 b(*the)p 1659 1677 V 29 w(context,)e(member)h(*the)p 2456 1677 V 29 w(member)-8 b(,)840 1777 y(struct)20 b(time)o(v)o(al)g(newtime\)) 208 1871 y Ft(Updates)26 b(the)h(\002eld)f(that)h(tracks)g(the)f(last)i (time)f(that)f(the)h(member)e(recei)n(v)o(ed)g(an)i(R)-5 b(TP/R)g(TCP)28 b(pack)o(et.)44 b(The)26 b(function)f(gets)208 1971 y(called)20 b(whene)n(v)o(er)e(an)i(R)-5 b(TP)21 b(or)f(R)-5 b(TCP)21 b(pack)o(et)f(is)h(recei)n(v)o(ed)e(from)g(the)h (member)f Fj(the)p 2711 1971 V 29 w(member)p Ft(.)-70 2127 y Fl(int)h(UpdateSenderT)o(ime\()p 771 2127 V 29 w(R)m(TP)p 963 2127 V 30 w(CONTEXT)h(*the)p 1577 2127 V 29 w(context,)e(member)i(*the)p 2375 2127 V 29 w(member)-8 b(,)21 b(struct)f(time)o(v)o(al)g(newtime\))208 2227 y Ft(Updates)k(the)i(\002eld)f(that)g(tracks)h(the)f(last)h(time)f(the) h(member)e(sent)h(an)g(R)-5 b(TP)26 b(pack)o(et.)40 b(If)25 b(this)h(member)e(is)i(a)g(ne)n(w)f(sender)m(,)g(it)208 2327 y(initiates)e(the)g(RR)h(Hash)f(table)g(and)f(calls)i(the)e Fj(UpdateMemberCallBack\(\))p Ft(.)30 b(The)22 b(function)f(is)j (called)f(whene)n(v)o(er)e(an)208 2426 y(R)-5 b(TP)21 b(pack)o(et)e(is)i(recei)n(v)o(ed)e(from)g Fj(the)p 1324 2426 V 29 w(member)p Ft(.)-58 2579 y Fl(static)h(member*)g(UpdateT)o (imeOrCr)o(eateMember)12 b(\()p 1642 2579 V 29 w(R)m(TP)p 1834 2579 V 30 w(CONTEXT)21 b(*the)p 2448 2579 V 29 w(context,)1629 2679 y(u)p 1680 2679 V 30 w(int32)f(ssr)o(c,)1629 2778 y(struct)g(sockaddr)h(*fr)o(omaddr)-8 b(,)1629 2878 y(int)21 b(addrlen\))208 2973 y Ft(This)i(function)f(is)j(called)e(internally)g (by)g(functions)f(that)i(wish)g(to)g(recei)n(v)o(e)f(a)h Fj(member)f Ft(structure)f(that)i(contains)f(the)h(gi)n(v)o(en)208 3072 y(SSRC)h(with)f(the)f(gi)n(v)o(en)g(address.)35 b(If)23 b(no)g(such)h(member)e(e)o(xists,)j(it)f(is)h(created.)34 b(If)24 b(there)f(are)h(multiple)f(members)f(with)i(this)208 3172 y(SSRC)f(\(i.e.)30 b(all)22 b(members)f(with)h(the)g(SSRC)h(are)f (in)m(v)n(olv)o(ed)e(in)i(a)g(collision\),)f(it)i(attempts)f(to)g (retrie)n(v)o(e)e(the)i(member)f(with)h(the)208 3272 y(same)f(SSRC.)h(If)f(it)h(\002nds)f(a)h(member)e(whose)h(address)f (isn')o(t)h(kno)n(wn,)f(it)h(sets)i(that)e(member')-5 b(s)20 b(address)h(to)g(the)g(address)g(spec-)208 3371 y(i\002ed)26 b(\(See)g(the)g(comments)f(abo)o(v)o(e)g(the)h(function)f (for)g(details\))h(and)g(calls)h(the)f Fj (ChangedMemberInfoCallBack\(\))208 3471 y Ft(function)18 b(to)j(notify)f(about)f(changes)h(in)h(address)f(and)g(port.)25 b(Finally)-5 b(,)20 b(it)h(updates)f(the)h(time)f(associated)h(with)g (the)f(member)f(to)208 3570 y(the)h(current)f(time.)0 3787 y Fl(4.1.4)81 b(Queries)21 b(of)e(a)i(member')m(s)f(status)-58 3936 y(int)h(SenderT)o(imedOut)13 b(\()p 723 3936 V 30 w(R)m(TP)p 916 3936 V 30 w(CONTEXT)21 b(*the)p 1530 3936 V 29 w(context,)e(member)h(*themember)-8 b(,)711 4036 y(struct)20 b(time)o(v)o(al)g(no)o(w\))208 4130 y Ft(Returns)g Fj(TRUE)g Ft(if)g(the)g(member)f(has)i(timed)e(out)h(as)h(a)g(sender)-5 b(.)-58 4267 y Fl(int)21 b(SoftT)o(imedOut)12 b(\()p 617 4267 V 30 w(R)m(TP)p 810 4267 V 30 w(CONTEXT)21 b(*the)p 1424 4267 V 29 w(context,)e(member)h(*themember)-8 b(,)605 4366 y(struct)20 b(time)o(v)o(al)g(no)o(w\))208 4461 y Ft(Returns)g Fj(TRUE)g Ft(if)g(the)g(member)f(has)i(soft)f(timed)g (out.)-58 4598 y Fl(int)h(HardT)o(imedOut)13 b(\()p 664 4598 V 29 w(R)m(TP)p 856 4598 V 30 w(CONTEXT)21 b(*the)p 1470 4598 V 29 w(context,)e(member)i(*themember)-8 b(,)651 4697 y(struct)20 b(time)o(v)o(al)g(no)o(w\))208 4792 y Ft(Returns)g Fj(TRUE)g Ft(if)g(the)g(member)f(has)i(hard)e(timed)h (out.)-58 4928 y Fl(int)h(Fr)o(omDiffer)o(entSour)o(ce)10 b(\(struct)20 b(sockaddr)g(*addr1,)f(struct)h(sockaddr)h(*addr2,)856 5028 y(int)f(complen\))208 5123 y Ft(Returns)g Fj(TRUE)h Ft(if)g(the)g(addresses)g(do)g(not)f(match.)27 b(If)21 b(the)g(address)g(is)g(of)g(type)g Fj(AF)p 2635 5123 V 29 w(INET)p Ft(,)g(then)f(either)h(the)g(addresses)g(must)208 5222 y(not)h(match,)g(or)h(the)f(ports)h(must)f(dif)n(fer)g(by)g(a)h(v) n(alue)f(greater)g(than)g(1.)33 b(If)22 b(of)g(another)g(address)g (type,)g(then)h(the)f(addresses)h(are)208 5322 y(considered)18 b(dif)n(ferent)g(if)j(the)f(\002rst)h Fj(complen)f Ft(bytes)g(don')o(t) e(match)i(e)o(xactly)-5 b(.)1929 5589 y(8)p eop %%Page: 9 9 9 8 bop 0 90 a Fm(5)119 b(rtp)p 345 90 36 4 v 44 w(api)p 548 90 V 43 w(inter)n(nal.)p Fi(f)p Fm(h,c)p Fi(g)0 275 y Ft(These)17 b(\002les)i(pro)o(vide)c(the)i(basic)h(netw)o(ork)e (interf)o(ace)g(operations,)h(as)h(well)g(as)g(the)f(de\002nition)f(of) h(the)p 2935 275 25 4 v 48 w Fj(RTP)p 3115 275 V 29 w(CONTEXT)g Ft(structure,)f(in)0 375 y(which)f(all)h(information)d(about)i(the)g (session)h(is)g(stored.)23 b(What)16 b(is)g(in)g(these)g(\002les)g(is)g (meant)f(to)h(support)e(what)h(appears)g(in)h Fj(rtp)p 3627 375 V 29 w(api.h)0 474 y Ft(and)k Fj(rtp)p 296 474 V 29 w(api.c)p Ft(,)g(b)n(ut)g(which)f(can)h(be)h(k)o(ept)e(hidden)g (from)g(the)i(application)d(programmer)-5 b(.)0 706 y Fh(5.1)99 b Fg(#define)p Fh(s)p -65 862 V -40 862 a Fl(R)m(TP)p 128 862 V 29 w(INIT)p 336 862 V 31 w(CONTEXTS)p 823 862 V 31 w(A)-12 b(V)h(AIL)208 961 y Ft(Ho)n(w)27 b(man)o(y)g(conte)o(xts)g (can)g(be)h(constructed)e(before)h(the)g Fj(ContextList)g Ft(structure)g(must)g(be)h(e)o(xpanded)d(in)j(size.)49 b(The)208 1061 y(current)18 b(v)n(alue)i(is)h(256.)p -65 1214 V -40 1214 a Fl(R)m(TP)p 128 1214 V 29 w(VERSION)208 1314 y Ft(The)e(v)o(ersion)g(of)h(the)g(R)-5 b(TP)21 b(protocol.)j(The)c(current)e(v)n(alue)i(is)h(2.)p -65 1467 V -40 1467 a Fl(R)m(TP)p 128 1467 V 29 w(CONTEXT)p 567 1467 V 31 w(INC)208 1566 y Ft(The)e(increment)g(by)h(which)g(the)g Fj(ContextList)f Ft(is)i(increased)e(if)h(an)g(increase)g(is)h (necessary)-5 b(.)24 b(The)c(current)f(v)n(alue)g(is)j(10.)p -65 1719 V -40 1719 a Fl(R)m(TP)p 128 1719 V 29 w(DEF)-7 b(A)l(UL)f(T)p 534 1719 V 31 w(TTL)208 1819 y Ft(The)21 b(def)o(ault)f(TTL)i(\(time)f(to)g(li)n(v)o(e)h(\002eld\))f(for)g(a)h (mulicast)f(channel.)27 b(The)22 b(def)o(ault)e(v)n(alue)h(is)h(128.)28 b(The)21 b(TTL)h(v)n(alue)e(cannot)h(be)208 1918 y(set)g(for)e(unicast) h(communication.)p -65 2071 V -40 2071 a Fl(R)m(TP)p 128 2071 V 29 w(DEF)-7 b(A)l(UL)f(T)p 534 2071 V 31 w(ENCR)m(YPTION)208 2171 y Ft(The)19 b(def)o(ault)h(form)f(of)h(encryption)e(used.)24 b(The)c(def)o(ault)g(is)h(currently)d Fj(RTP)p 2406 2171 V 30 w(ENCRYPTION)p 2936 2171 V 28 w(NONE)p Ft(.)p -65 2324 V -40 2324 a Fl(R)m(TP)p 128 2324 V 29 w(MAX)p 355 2324 V 30 w(BYE)p 555 2324 V 31 w(SIZE)208 2423 y Ft(Maximum)g(storage) i(allocated)f(for)h(the)g(BYE)h(reason.)j(The)c(current)f(v)n(alue)g (is)i(1024.)p -65 2576 V -40 2576 a Fl(R)m(TP)p 128 2576 V 29 w(MAX)p 355 2576 V 30 w(PKT)p 556 2576 V 30 w(SIZE)208 2676 y Ft(The)e(maximum)g(size)i(allo)n(wed)e(for)h(an)g(R)-5 b(TP)21 b(pack)o(et.)j(The)c(def)o(ault)g(is)h(10,000.)p -65 2829 V -40 2829 a Fl(R)m(TP)p 128 2829 V 29 w(MAX)p 355 2829 V 30 w(POR)m(T)p 613 2829 V 30 w(STR)p 804 2829 V 30 w(SIZE)208 2928 y Ft(The)f(maximum)e(length)i(of)g(a)h(UDP)g(port) f(number)f(when)h(represented)e(as)j(a)g(string.)26 b(The)20 b(def)o(ault)g(is)h(8,)f(which)g(is)i(an)e(o)o(v)o(eres-)208 3028 y(timate.)p -65 3181 V -40 3181 a Fl(R)m(TP)p 128 3181 V 29 w(MAX)p 355 3181 V 30 w(PKTS)p 602 3181 V 30 w(IN)p 724 3181 V 30 w(COMPOUND)208 3280 y Ft(The)f(maximum)e(number)h (of)h(R)-5 b(TCP)20 b(pack)o(ets)f(that)h(can)f(appear)f(in)h(a)h (compound)c(pack)o(et.)24 b(The)19 b(def)o(ault)g(v)n(alue)g(is)h(200,) e(which)208 3380 y(is)27 b(an)f(o)o(v)o(erestimate.)42 b(The)26 b(v)n(alue)g(is)h(used)f(to)h(create)f(a)h(structure)e(that)i (maintains)f(pointers)f(to)i(the)f(start)h(of)f(each)g(pack)o(et,)208 3480 y(which)19 b(does)h(not)g(require)f(much)g(memory)-5 b(.)p -65 3633 V -40 3633 a Fl(R)m(TP)p 128 3633 V 29 w(MAX)p 355 3633 V 30 w(P)f(A)e(YLO)m(AD)p 779 3633 V 29 w(TYPES)208 3732 y Ft(Number)18 b(of)i(payload)f(types)h(a)n(v)n (ailable.)k(The)c(def)o(ault)g(is)h(128.)p -65 3885 V -40 3885 a Fl(R)m(TP)p 128 3885 V 29 w(DEF)-7 b(A)l(UL)f(T)p 534 3885 V 31 w(B)n(AND)m(WIDTH)208 3985 y Ft(The)19 b(def)o(ault)h(bandwidth)e(that)i(an)h(R)-5 b(TP)21 b(session)f(is)h (belie)n(v)o(ed)e(to)h(use,)h(gi)n(v)o(en)d(in)j(Kb)f(/)h(sec.)k(The)20 b(def)o(ault)g(is)h(120.)p -65 4138 V -40 4138 a Fl(R)m(TP)p 128 4138 V 29 w(DEF)-7 b(A)l(UL)f(T)p 534 4138 V 31 w(R)m(TCP)p 788 4138 V 29 w(FRA)j(C)208 4237 y Ft(The)19 b(fraction)g(of)h (bandwidth)f(that)h(should)f(be)h(used)g(by)g(R)-5 b(TCP)c(.)21 b(The)f(def)o(ault)f(is)i(.05)f(\(5\045\).)p -65 4390 V -40 4390 a Fl(R)m(TP)p 128 4390 V 29 w(DEF)-7 b(A)l(UL)f(T)p 534 4390 V 31 w(SENDER)p 901 4390 V 30 w(BW)p 1069 4390 V 31 w(FRA)j(C)208 4490 y Ft(The)19 b(fraction)g(of)h(the)g(R)-5 b(TCP)22 b(bandwidth)c(that)i(is)i(to)e(be)g(shared)f(among)g(acti)n(v) o(e)h(senders.)k(The)c(def)o(ault)g(is)h(.25)e(\(25\045\).)p -65 4643 V -40 4643 a Fl(R)m(TP)p 128 4643 V 29 w(MAX)p 355 4643 V 30 w(UNIQ)o(UE)p 716 4643 V 31 w(ID)p 839 4643 V 30 w(REMAPS)208 4742 y Ft(The)k(maximum)e(number)h(of)h(ID)g (remaps)g(that)g(are)g(track)o(ed)g(within)g(a)g(conte)o(xt.)33 b(An)24 b(ID)f(is)h(remapped)d(when)i(a)h(collision)f(is)208 4842 y(resolv)o(ed)d(and)i(it)g(is)h(realized)f(that)g(tw)o(o)g(member) f(structures)g(ha)n(v)o(e)h(been)f(b)n(uilt)h(for)g(a)g(single)g (member)f(\(each)g(with)i(a)f(unique)208 4941 y(ID\).)29 b(The)g(member)f(with)i(the)g(lar)o(ger)e(ID)i(is)g(mer)o(ged)e(into)i (the)f(other)g(member)m(,)h(and)f(is)i(subsequently)c(destro)o(yed.)52 b(An)o(y)208 5041 y(further)22 b(references)h(to)h(the)g(lar)o(ger)f (ID)i(will)g(map)e(to)i(the)f(smaller)g(ID,)g(as)h(long)e(as)i(the)f (information)e(is)j(maintained.)36 b(If)24 b(the)208 5141 y(number)e(of)i(remaps)g(gro)n(ws)f(lar)o(ger)g(than)p 1460 5141 V 54 w Fj(RTP)p 1640 5141 V 29 w(MAX)p 1819 5141 V 30 w(UNIQUE)p 2149 5141 V 28 w(ID)p 2277 5141 V 30 w(REMAPS)p Ft(,)g(then)h(earlier)g(remaps)g(are)g(dropped)e(from) 208 5240 y(memory)-5 b(,)16 b(and)j(remapping)e(for)h(certain)h (members)f(will)h(f)o(ail)h(to)f(tak)o(e)g(place.)24 b(The)19 b(def)o(ault)f(v)n(alue)h(is)h(2,000,)d(which)i(should)f(be) 208 5340 y(more)h(than)h(the)g(number)e(of)i(remappings)e(that)j(tak)o (e)f(place)g(in)g(a)h(session.)1929 5589 y(9)p eop %%Page: 10 10 10 9 bop -65 83 25 4 v -40 83 a Fl(R)m(TP)p 128 83 V 29 w(HARD)p 402 83 V 30 w(MEMBER)p 813 83 V 31 w(TIMEOUT)208 183 y Ft(The)14 b(time)i(until)f(a)g(hard)g(timeout)f(is)i(a)g(\002x)o (ed)f(multiple)f(of)h(the)g(time)h(it)g(tak)o(es)f(to)h(soft)f (timeout.)p 2903 183 V 52 w Fj(RTP)p 3083 183 V 30 w(HARD)p 3313 183 V 29 w(MEMBER)p 3642 183 V 29 w(TIMEOUT)208 282 y Ft(equals)k(this)i(multiple.)j(The)c(def)o(ault)g(v)n(alue)f(is)i (3.)p -65 448 V -40 448 a Fl(R)m(TP)p 128 448 V 29 w(SOFT)p 374 448 V 30 w(MEMBER)p 785 448 V 32 w(TIMEOUT)208 548 y Ft(The)35 b(time)h(until)f(a)h(member)e(has)i(a)g(\223soft\224)f (timeout,)k(or)c(the)g(time)h(that)g(a)g(member)e(who)h(has)h(not)f (been)g(\223v)n(alidated\224)208 648 y(\(i.e.)55 b(does)30 b(not)g(yet)g(ha)n(v)o(e)g(a)h(CN)m(AME)f(or)h(is)g(currently)d(in)m(v) n(olv)o(ed)h(in)h(a)h(collision\))e(will)j(be)e(terminated.)54 b(The)30 b(v)n(alue)f(in)p 208 747 V 232 747 a Fj(RTP)p 387 747 V 30 w(SOFT)p 617 747 V 29 w(MEMBER)p 946 747 V 29 w(TIMEOUT)21 b Ft(should)g(be)g(multiplied)g(by)h(the)g(time)g(of) f(the)h(current)f(R)-5 b(TCP)23 b(recei)n(v)o(er)d(interv)n(al)h(to)h (de-)208 847 y(termine)d(the)h(soft)g(timeout)g(time.)25 b(The)20 b(current)f(def)o(aul)g(it)i(5.)p -65 1013 V -40 1013 a Fl(R)m(TP)p 128 1013 V 29 w(SENDER)p 493 1013 V 31 w(TIMEOUT)208 1112 y Ft(The)f(number)f(of)i(R)-5 b(TCP)22 b(pack)o(ets)e(that)h(appear)f(in)h(a)g(ro)n(w)f(from)g(a)h (particular)f(member)f(\(i.e.)27 b(no)20 b(R)-5 b(TP)22 b(pack)o(ets)f(arri)n(v)o(e)e(during)208 1212 y(this)h(interv)n(al\))f (that)i(cause)f(the)g(member)f(to)h(re)n(v)o(ert)f(to)h(non-sender)e (status.)26 b(The)20 b(current)e(def)o(ault)i(is)h(1.)p -65 1378 V -40 1378 a Fl(R)m(TP)p 128 1378 V 29 w(SENDER)p 493 1378 V 31 w(MAX)p 722 1378 V 30 w(TIMEOUT)208 1478 y Ft(The)e(maximum)g(time)h(until)g(a)h(sender)e(times)i(out)f(\(in)g (seconds\).)k(The)c(current)f(v)n(alue)g(is)i(3,600)e(\(1)h(hour\).)p -65 1644 V -40 1644 a Fl(R)m(TCP)p 188 1644 V 29 w(MIN)p 387 1644 V 31 w(TIME)208 1743 y Ft(The)f(minimum)g(time)h(\(period)f (in)h(seconds\))g(in)g(which)g(a)g(member)f(can)h(send)g(R)-5 b(TCP)21 b(pack)o(ets.)k(The)20 b(current)f(def)o(ault)g(is)i(5.)p -65 1910 V -40 1910 a Fl(R)m(TCP)p 188 1910 V 29 w(SIZE)p 405 1910 V 31 w(GAIN)208 2009 y Ft(R)-5 b(TCP)21 b(pack)o(et)e(size)i (is)f(computed)e(using)i(an)g(e)o(xponentially)d(decaying)h(a)n(v)o (erage.)p 2638 2009 V 54 w Fj(RTCP)p 2868 2009 V 29 w(SIZE)p 3097 2009 V 29 w(GAIN)i Ft(is)g(the)g(fraction)f(by)208 2109 y(which)g(the)h(most)h(recent)e(R)-5 b(TCP)22 b(pack)o(et)d (in\003uences)h(the)g(a)n(v)o(erage.)k(The)19 b(def)o(ault)h(v)n(alue)f (is)j(1/16.)p -65 2275 V -40 2275 a Fl(R)m(TP)p 128 2275 V 29 w(ADDRESS)p 544 2275 V 31 w(NO)m(T)p 752 2275 V 29 w(YET)p 951 2275 V 31 w(KNO)l(WN)208 2374 y Ft(The)d(def)o(ault)h(v) n(alue)f(for)h(an)g(address)g(of)g(an)g(SSRC)i(before)c(the)j(address)e (can)h(be)h(determined.)i(The)c(current)g(v)n(alue)h(is)h(30.)p -65 2540 V -40 2540 a Fl(R)m(TP)p 128 2540 V 29 w(DEF)-7 b(A)l(UL)f(T)p 534 2540 V 31 w(POR)m(T)208 2640 y Ft(A)20 b(def)o(ault)g(port)f(number)-5 b(.)24 b(The)c(current)f(v)n(alue)g(is) i(5,000.)p -65 2806 V -40 2806 a Fl(BIND)p 172 2806 V 30 w(COUNTER)208 2906 y Ft(The)e(maximum)g(number)f(of)i(tries)h(to)f (allocate)g(a)h(dynamic)e(R)-5 b(TP)21 b(port.)j(The)c(current)f(v)n (alue)g(is)i(20.)p -65 3072 V -40 3072 a Fl(UDP)p 136 3072 V 29 w(POR)m(T)p 393 3072 V 29 w(B)n(ASE)208 3171 y Ft(Starting)e(UDP)i(port)f(for)f(dynamic)g(ports.)24 b(The)c(current)f(v)n(alue)h(is)h(49,152.)p -65 3337 V -40 3337 a Fl(UDP)p 136 3337 V 29 w(POR)m(T)p 393 3337 V 29 w(RANGE)208 3437 y Ft(The)e(range)h(of)f(UDP)i(dynamic)e(ports.)24 b(The)c(current)f(v)n(alue)h(is)h(16382)p -65 3603 V -40 3603 a Fl(GETTIMEOFD)m(A)-8 b(Y)p 645 3603 V 30 w(T)o(O)p 794 3603 V 30 w(NTP)p 990 3603 V 30 w(OFFSET)208 3703 y Ft(The)19 b(number)g(of)h(seconds)f(between)h(1/1/1900)e(and)h (1/1/1970.)k(The)d(v)n(alue)f(is)j(2,208,988,800)-70 3869 y Fl(R)m(TP)p 98 3869 V 29 w(OP)-6 b(A)l(Q)o(UE)p 472 3869 V 30 w(SEND)p 723 3869 V 30 w(R)m(TCP)208 3968 y Ft(The)19 b(only)h(opaque)e(type)i(currently)e(used)i(by)g(the)g Fj(RTPExecute\(\))p Ft(.)k(Its)c(v)n(alue)g(is)h(1.)0 4206 y Fh(5.2)99 b(structur)n(es)-70 4362 y Fl(struct)20 b(little)p 325 4362 V 29 w(endian)p 594 4362 V 30 w(rtp)p 735 4362 V 30 w(hdr)208 4461 y Ft(A)25 b(header)f(equi)n(v)n(alent)f (to)i(the)g(R)-5 b(TP)26 b(header)m(,)f(e)o(xcept)f(that)h(its)h (bit-\002elds)f(are)g(re)n(v)o(ersed)e(so)i(that)h(the)o(y)e(map)g(to)i (a)f(big)g(endian)208 4561 y(ordering)18 b(on)h(a)i(little)g(endian)e (machine.)-70 4727 y Fl(struct)h(little)p 325 4727 V 29 w(endian)p 594 4727 V 30 w(rtcp)p 772 4727 V 30 w(hdr)208 4827 y Ft(A)i(header)f(equi)n(v)n(alent)g(to)h(the)h(R)-5 b(TCP)23 b(header)m(,)e(e)o(xcept)h(that)g(its)h(bit-\002elds)f(are)g (re)n(v)o(ersed)f(so)i(that)f(the)o(y)g(map)g(to)g(a)h(big)f(endian)208 4926 y(ordering)c(on)h(a)i(little)g(endian)e(machine.)-70 5092 y Fl(addr)o(ess)p 206 5092 V 29 w(holder)p 466 5092 V 30 w(t)208 5192 y Ft(This)j(is)i(used)f(to)g(hold)e(addresses)i(to)g (send)f(to)h(for)f(R)-5 b(TP)24 b(and)e(R)-5 b(TCP)24 b(pack)o(ets.)32 b(It)23 b(is)h(a)f(link)o(ed)f(list)i(of)f(addresses,) f(ports,)h(and)208 5292 y(TTLs.)1908 5589 y(10)p eop %%Page: 11 11 11 10 bop -65 83 25 4 v -40 83 a Fl(R)m(TP)p 128 83 V 29 w(CONTEXT)208 183 y Ft(This)24 b(structure)f(holds)h(information)d (that)k(pertains)e(to)i(a)f(conte)o(xt.)36 b(It)24 b(holds)g(or)g (points)f(to)i(all)g(information)c(rele)n(v)n(ant)i(to)i(the)208 282 y(current)18 b(session.)0 520 y Fh(5.3)99 b(global)24 b(v)o(ariables)p -44 676 V -20 676 a Fl(R)m(TP)p 148 676 V 30 w(CONTEXT)d(**ContextList)208 775 y Ft(An)k(array)f(of)h (pointers)f(to)h(conte)o(xts.)39 b(The)25 b(conte)o(xts)f(are)h (constructed)e(when)i(the)o(y)f(are)h(needed)f(\(via)h(a)g(call)h(to)f Fj(RTPCre-)208 875 y(ate\(\))p Ft(\).)f(The)c(conte)o(xt')-5 b(s)19 b Fj(cid)h Ft(is)h(the)f(inde)o(x)f(of)h(in)h(this)f(array)g(of) g(the)g(conte)o(xt.)-49 1041 y Fl(long)p 129 1041 V 49 w(R)m(TP)p 321 1041 V 30 w(context)p 611 1041 V 28 w(abo)o(v)o(e)p 846 1041 V 29 w(used)208 1141 y Ft(Points)g(to)g(the)g(smallest)h(inde) o(x)e(that)i(pertains)e(is)i(lar)o(ger)e(than)h(the)g Fj(cid)p Ft(s)h(of)f(an)o(y)f(acti)n(v)o(e)h(conte)o(xt.)-49 1307 y Fl(long)p 129 1307 V 49 w(R)m(TP)p 321 1307 V 30 w(contexts)p 643 1307 V 28 w(in)p 740 1307 V 31 w(use)208 1406 y Ft(Counts)g(the)g(number)e(of)i(conte)o(xts)f(in)i(use.)-49 1572 y Fl(rtperr)o(or)p 274 1572 V 48 w(R)m(TP)p 467 1572 V 30 w(cur)p 617 1572 V 30 w(err)208 1672 y Ft(K)n(eeps)f(track)f (of)h(the)h(most)f(recent)f(error)g(that)i(occured)d(during)h(a)h (session.)-49 1838 y Fl(char)p 138 1838 V 50 w(R)m(TP)p 331 1838 V 29 w(err)p 471 1838 V 30 w(msg[200])208 1938 y Ft(K)n(eeps)g(track)f(of)h(the)h(error)e(message)h(associated)g(with) g(the)g(most)g(recent)g(error)f(that)h(occured)f(during)f(a)j(session.) -70 2104 y Fl(int)p 52 2104 V 50 w(R)m(TP)p 245 2104 V 30 w(P)-6 b(A)e(YLO)m(AD)p 669 2104 V 29 w(CLOCK)p 1003 2104 V 29 w(CONVERSIONS[)p 1669 2104 V 29 w(R)m(TP)p 1861 2104 V 30 w(MAX)p 2089 2104 V 30 w(P)i(A)e(YLO)m(AD)p 2513 2104 V 29 w(TYPES])208 2203 y Ft(Holds)20 b(clock)f(con)m(v)o (ersion)f(rates)i(\(NTP)g(ticks)h(in)f(terms)h(of)f(an)g(R)-5 b(TP)21 b(tick\))f(for)f(v)n(arious)g(payload)g(types.)0 2441 y Fh(5.4)99 b(functions)-70 2597 y Fl(v)o(oid)20 b(InitRandom\(\))208 2696 y Ft(Initializes)29 b(random)f(number)g (generators)g(with)i(a)g(random)e(seed.)54 b(If)p 2352 2696 V 60 w Fj(RTP)p 2532 2696 V 29 w(SEMI)p 2761 2696 V 29 w(RANDOM)29 b Ft(is)i Fj(#define)p Ft(d,)g(then)e(no)208 2796 y(initialization)19 b(is)i(performed.)h(Otherwise,)e(the)g Fj(drand48\(\))f Ft(generator)g(is)i(initialized)f(via)g(the)g(time)g (of)g(day)g(\()p Ff(\026sec)p Ft(\).)-70 2962 y Fl(u)p -19 2962 V 30 w(int32)g(random32\(int)e(type\))208 3061 y Ft(Returns)k(a)g(32)g(bit)h(random)d(number)-5 b(.)30 b(If)p 1426 3061 V 52 w Fj(RTP)p 1606 3061 V 29 w(SEMI)p 1835 3061 V 29 w(RANDOM)22 b Ft(is)h Fj(#define)p Ft(d,)f(it)h(simply)e (calls)i Fj(rand\(\))p Ft(.)31 b(Otherwise,)208 3161 y(it)20 b(calls)h Fj(md)p 552 3161 V 30 w(32\(\))p Ft(,)-70 3327 y Fl(static)f(u)p 191 3327 V 30 w(long)g(md)p 509 3327 V 30 w(32\(char)f(*string,)g(int)i(length\))208 3427 y Ft(The)e(random)g(number)f(generator)g(code)i(presented)f(in)h ([2)o(].)-70 3593 y Fl(v)o(oid)g(SetDefaultP)o(ayloadRates\()p 996 3593 V 25 w(R)m(TP)p 1184 3593 V 30 w(CONTEXT)h(*the)p 1798 3593 V 29 w(context\))208 3692 y Ft(Set)h(the)g(def)o(ault)f (payload)f(rates.)30 b(This)21 b(currently)f(sets)j(the)f(rates)g(as)g (is)h(speci\002ed)e(in)h Fl(draft-ietf-a)n(vt-pr)o(o\002le-new-01)16 b Ft(from)208 3792 y(May)j(15,)h(1997.)-70 3958 y Fl(rtperr)o(or)f(V)-8 b(alidR)m(TPContext\(context)16 b(cid,)21 b(char)f(*calling)p 1798 3958 V 29 w(func\))208 4058 y Ft(V)-9 b(alidate)19 b(that)i(a)f(putati)n(v)o(e)f(R)-5 b(TP)21 b(conte)o(xt)e(actually)h(e) o(xists.)25 b(If)20 b(not,)g(set)h(error)e(message)h(and)g(return)f (appropriately)-5 b(.)-58 4220 y Fl(rtperr)o(or)19 b(GetMemberF)n (orContext)11 b(\(context)18 b(cid,)j(person)g(p,)f(member)h(**the)p 2435 4220 V 29 w(member)p 2759 4220 V 30 w(p,)1138 4320 y(char)f(*calling)p 1603 4320 V 28 w(func\))208 4415 y Ft(Retrie)n(v)o(es)g(the)g(member)f(for)g(a)i(putati)n(v)o(e)e (person)g(with)h(a)h(gi)n(v)o(en)e(conte)o(xt,)f(or)i(complains.)-70 4581 y Fl(int)g(IsMulticast\(struct)h(in)p 779 4581 V 30 w(addr)f(addr\))208 4680 y Ft(Determines)f(if)i(an)f(IPv4)f(address) h(is)h(a)g(multicast)f(address.)-70 4846 y Fl(struct)g(time)o(v)o(al)g (AddT)o(imes\(struct)g(time)o(v)o(al)g(*time1,)f(struct)h(time)o(v)o (al)g(*time2\))208 4946 y Ft(Adds)g(tw)o(o)g(time)n(v)n(als.)25 b(Does)20 b(not)g(handle)f(the)h(o)o(v)o(er\003o)n(w)f(of)g Fj(tv)p 2060 4946 V 30 w(sec)h Ft(\(year)f(2038)g(problem\).)-58 5108 y Fl(int)i(T)o(imeExpir)o(ed)13 b(\(struct)20 b(time)o(v)o(al)g (*init)p 1246 5108 V 29 w(time,)g(struct)h(time)o(v)o(al)e(*cur)p 2145 5108 V 29 w(time,)562 5208 y(struct)h(time)o(v)o(al)g(*inter)o(v)o (al\))208 5303 y Ft(Returns)g Fj(TRUE)g Ft(if)g Fj(init)p 983 5303 V 29 w(time)g Ft(+)h Fj(interval)e Ff(<)p Fd(=)h Fj(cur)p 2019 5303 V 29 w(time)p Ft(,)g(i.e.)25 b(if)c(an)f(e)o (xpiration)e(period)h(has)h(elapsed.)1908 5589 y(11)p eop %%Page: 12 12 12 11 bop -70 83 a Fl(struct)20 b(time)o(v)o(al)g(Con)m(v)o(ertDoubleT) -8 b(oT)o(ime\(double)18 b(inter)o(v)o(al\))208 183 y Ft(Con)m(v)o(ert)g(a)j Fj(double)e Ft(v)n(alue)h(to)g(a)h Fj(struct)49 b(timeval)19 b Ft(structure.)24 b(The)c(v)n(alue)f Fj(interval)h Ft(is)h(in)f(terms)g(of)g(seconds.)-70 349 y Fl(static)g(ntp64)f(Con)m(v)o(ertT)o(ime)o(v)o(alT)-8 b(oNTP\(struct)18 b(time)o(v)o(al)h(tv\))208 448 y Ft(Con)m(v)o(erts)g (a)h Fj(struct)49 b(timeval)19 b Ft(structure)h(to)g(an)g(NTP)h (timestamp.)-58 611 y Fl(double)g(R)m(TPT)o(imeDiff)13 b(\()p 734 611 25 4 v 29 w(R)m(TP)p 926 611 V 30 w(CONTEXT)21 b(*the)p 1540 611 V 29 w(context,)722 710 y(struct)f(time)o(v)o(al)f (*later)p 1445 710 V 29 w(time,)722 810 y(struct)h(time)o(v)o(al)f (*earlier)p 1514 810 V 29 w(time,)722 910 y(int8)h(payload)p 1169 910 V 28 w(type\))208 1004 y Ft(Returns)j(the)h(time)g(dif)n (ference)d(on)j(an)f(R)-5 b(TP)25 b(scale)f(between)f(tw)o(o)h(NTP)g (timestamps.)36 b(The)23 b(result)h(is)h(in)e(milliseconds,)h(and)208 1104 y(should)19 b(be)h(an)g(inte)o(ger)-5 b(.)-58 1266 y Fl(static)20 b(double)h(Inter)o(nalComputeR)m(TCPSendDelay)11 b(\()p 1677 1266 V 30 w(R)m(TP)p 1870 1266 V 30 w(CONTEXT)21 b(*the)p 2484 1266 V 29 w(context,)1665 1366 y(int)g(sender\))208 1461 y Ft(Returns)15 b(the)g(current)f(delay)g(interv)n(al)h(\(in)g (seconds\))f(between)g(R)-5 b(TCP)17 b(pack)o(ets)e(for)f(the)h (session)h(described)e(by)h Fj(the)p 3575 1461 V 29 w(context)p Ft(.)208 1561 y(The)h Fj(sender)h Ft(boolean)e(v)n(ariable)h (determines)f(whether)h(or)h(not)g(the)g(results)g(should)f(be)h (returned)e(for)h(a)h(sender)m(,)g(whose)f(rates)208 1660 y(are)k(dif)n(ferent)e(from)h(a)i(non-sender)-5 b(.)-70 1826 y Fl(double)21 b(ComputeR)m(TCPSendDelay\()p 1154 1826 V 27 w(R)m(TP)p 1344 1826 V 30 w(CONTEXT)g(*the)p 1958 1826 V 29 w(context\))208 1926 y Ft(Compute)e(the)h(local)g (member')-5 b(s)19 b(R)-5 b(TCP)22 b(interv)n(al,)d(dependent)f(on)i (whether)f(or)h(not)f(the)i(member)d(is)k(a)e(sender)-5 b(.)-70 2092 y Fl(double)21 b(ComputeSenderR)m(TCPSendDelay\()p 1403 2092 V 27 w(R)m(TP)p 1593 2092 V 30 w(CONTEXT)g(*the)p 2207 2092 V 29 w(context\))208 2192 y Ft(Compute)e(the)h(R)-5 b(TCP)21 b(interv)n(al)f(for)f(an)o(y)h(sender)-5 b(.)-70 2358 y Fl(double)21 b(ComputeRecei)o(v)o(erR)m(TCPSendDelay\()p 1462 2358 V 27 w(R)m(TP)p 1652 2358 V 29 w(CONTEXT)g(*the)p 2265 2358 V 30 w(context\))208 2457 y Ft(Compute)e(the)h(R)-5 b(TCP)21 b(interv)n(al)f(for)f(an)o(y)h(non-sender)-5 b(.)-58 2620 y Fl(v)o(oid)20 b(ComputeBlockInf)n(o)13 b(\()p 837 2620 V 30 w(R)m(TP)p 1030 2620 V 30 w(CONTEXT)21 b(*the)p 1644 2620 V 29 w(context,)e(member)h(*the)p 2441 2620 V 29 w(member)-8 b(,)825 2719 y(rtcp)p 978 2719 V 30 w(r)o(eport)p 1234 2719 V 28 w(block)20 b(*cur)p 1638 2719 V 30 w(block,)g(u)p 1949 2719 V 30 w(int32)g(*expected)p 2532 2719 V 28 w(ptr\))208 2814 y Ft(Compute)e(the)i(v)n(alues)g(for)f (SR)i(or)e(RR)i(pack)o(ets)f(for)f Fj(the)p 1885 2814 V 29 w(member)p Ft(,)g(based)h(on)f(statistics)i(that)f(ha)n(v)o(e)f (been)g(observ)o(ed)f(during)208 2914 y(the)e(session.)25 b(This)17 b(function)e(is)j(called)e(by)h Fj(BuildBlockInfo\(\))d Ft(as)k(well)f(as)h(the)f(v)n(arious)e(API)j(calls)f(that)g(enquire)f (about)208 3013 y(member)i(statistics.)27 b(Those)20 b(\002elds)g(which)g(are)g(computed)e(here)i(are:)307 3196 y Fk(\017)41 b Ft(cumulati)n(v)o(e)19 b(number)f(of)i(pack)o(ets)g (lost)h(that)f(were)g(sent)g(by)g Fj(the)p 2291 3196 V 29 w(member)p Ft(.)307 3329 y Fk(\017)41 b Ft(fraction)19 b(of)h(pack)o(ets)g(lost)h(that)f(were)g(sent)h(by)e Fj(the)p 1909 3329 V 30 w(member)p Ft(.)307 3462 y Fk(\017)41 b Ft(highest)20 b(sequence)f(number)f(recei)n(v)o(ed)307 3594 y Fk(\017)41 b Ft(jitter)307 3727 y Fk(\017)g Ft(lsr)307 3860 y Fk(\017)g Ft(dlsr)-58 4022 y Fl(static)20 b(v)o(oid)g (BuildBlockInf)n(o)15 b(\()p 914 4022 V 29 w(R)m(TP)p 1106 4022 V 30 w(CONTEXT)21 b(*the)p 1720 4022 V 29 w(context,)e(u)p 2095 4022 V 30 w(int32)h(ssr)o(c,)901 4122 y(rtcp)p 1054 4122 V 30 w(r)o(eport)p 1310 4122 V 28 w(block)h(*cur)p 1715 4122 V 29 w(block\))208 4217 y Ft(Build)e(a)g(report)f(block)g (which)h(appears)f(in)h(an)g(SR)h(or)f(RR)h(pack)o(et)f(for)f(the)h (member)f(with)h(SSRC)i Fj(ssrc)p Ft(,)e(based)f(on)h(statistics)208 4316 y(that)30 b(are)g(collected)g(from)f(local)h(observ)n(ation.)53 b(If)30 b(the)g(member)f(with)i(SSRC)h Fj(ssrc)e Ft(does)g(not)g(e)o (xist,)i(it)f(is)g(created.)55 b(If)208 4416 y(a)33 b(pre)n(vious)d (report)i(block)f(does)i(not)f(e)o(xist,)j(it)f(is)f(created.)61 b(Otherwise,)35 b(the)e(information)d(is)j(computed)e(via)h(a)h(call)g (to)208 4515 y Fj(ComputeBlockInfo\(\))p Ft(.)21 b(Also,)d(update)f (those)g(\002elds)h(that)g(track)g(the)f(v)n(alues)h(since)f(the)h (last)h(sent)f(R)-5 b(TCP)19 b(pack)o(et)e(\(since)208 4615 y(this)23 b(is)g(part)f(of)h(the)f(process)g(to)h(b)n(uild)f(and)g (send)g(such)g(a)h(pack)o(et\).)31 b(Finally)-5 b(,)23 b(the)f(local)h(information)d(about)h(this)i(member)f(is)208 4715 y(updated)c(as)j(if)g(an)f(RR)h(or)f(SR)h(pack)o(et)f(had)g(arri)n (v)o(ed.)-70 4881 y Fl(static)g(int)g(AddP)o(ad\(char*)f(cur)-8 b(,)21 b(int)g(cur)p 1195 4881 V 30 w(tot)p 1323 4881 V 28 w(len\))208 4980 y Ft(Adds)k(padding)f(to)i(the)g(end)f(of)g(a)i (stream)e(with)h(total)g(length)f Fj(cur)p 2211 4980 V 29 w(tot)p 2390 4980 V 30 w(len)g Ft(such)h(that)g(the)g(length)e(of) i(the)g(stream)f(with)208 5080 y(the)f(padding)f(is)j Fd(0)p Ff(mod)p Fd(8)p Ft(.)38 b(The)24 b(ending)g(of)g(the)h(stream)g (with)f(length)g Fj(cur)p 2441 5080 V 30 w(tot)p 2621 5080 V 29 w(len)h Ft(is)g(at)g Fj(cur)g Ft(\(before)e(the)i(padding)e (is)208 5180 y(added\).)g(The)c(padding)f(is)j(all)f(0')-5 b(s,)20 b(e)o(xcept)f(for)g(the)g(last)i(byte,)e(which)g(is)i(set)f(to) g(a)g(v)n(alue)f(that)h(indicates)g(the)f(number)f(of)i(bytes)208 5279 y(\(including)e(itself\))i(that)g(mak)o(e)g(up)g(the)g(padding.) 1908 5589 y(12)p eop %%Page: 13 13 13 12 bop -58 70 a Fl(char)20 b(*Build)p 364 70 25 4 v 30 w(SR)p 500 70 V 30 w(P)o(ack)o(et)14 b(\()p 811 70 V 29 w(R)m(TP)p 1003 70 V 30 w(CONTEXT)21 b(*the)p 1617 70 V 29 w(context,)798 169 y(char)g(*b)n(uffer)-8 b(,)20 b(struct)g(link)h(**\002rst)p 1895 169 V 29 w(sender)p 2159 169 V 30 w(link\))208 264 y Ft(Builds)31 b(an)g(SR)h(pack)o(et,)h (or)d(b)n(uilds)h(an)g(additional)f(SR)i(pack)o(et.)57 b(The)30 b(pack)o(et)h(is)g(b)n(uilt)h(at)f(memory)e(location)h Fj(buffer)p Ft(.)208 364 y(If)j Fj(first)p 552 364 V 29 w(sender)p 881 364 V 28 w(link)g Ft(is)h(set)g(to)g Fj(NULL)p Ft(,)e(then)h(the)g(initial)h(SR)g(pack)o(et)e(is)j(b)n (uilt.)64 b(If)33 b(the)g(function)e(returns)h(with)208 463 y Fj(first)p 463 463 V 29 w(sender)p 792 463 V 28 w(link)16 b Ft(set)h(to)f(a)g(non-)p Fj(NULL)e Ft(v)n(alue,)i(then)g (an)g(additional)e(SR)k(pack)o(et)d(is)i(required)d(to)i(describe)f (all)i(senders)208 563 y(in)23 b(the)h(current)f(session)h(\(SR)g(pack) o(ets)g(can)f(describe)g(a)i(limit)f(of)f(31\).)35 b(The)24 b(function)e(returns)g(a)j(pointer)d(to)i(the)g(end)f(of)h(the)208 663 y(b)n(uf)n(fer)d(of)h(the)g(current)f(SR)i(pack)o(et)f(that)g(w)o (as)i(b)n(uilt,)e(so)h(that)f(a)h(function)e(to)h(b)n(uild)g(an)g (additional)f(R)-5 b(TCP)24 b(pack)o(et)d(within)i(the)208 762 y(compound)17 b(pack)o(et)i(can)h(be)h(gi)n(v)o(en)d(the)j (starting)e(location)h(of)g(the)g(ne)o(xt)f(pack)o(et.)-58 925 y Fl(char)h(*Build)p 364 925 V 30 w(RR)p 514 925 V 30 w(P)o(ack)o(et)13 b(\()p 824 925 V 30 w(R)m(TP)p 1017 925 V 30 w(CONTEXT)21 b(*the)p 1631 925 V 29 w(context,)812 1024 y(char)f(*b)n(uffer)-8 b(,)20 b(struct)h(link)g(**\002rst)p 1909 1024 V 29 w(sender)p 2173 1024 V 30 w(link,)812 1124 y(int)g(b)n(uild)p 1117 1124 V 31 w(empty\))208 1219 y Ft(Builds)30 b(an)g(RR)h(pack)o(et,)h(or)e(b)n(uilds)g(an)f (additional)g(RR)i(pack)o(et.)54 b(The)30 b(pack)o(et)f(is)i(b)n(uilt)f (at)h(memory)d(location)h Fj(buffer)p Ft(.)208 1318 y(If)j Fj(first)p 551 1318 V 29 w(sender)p 880 1318 V 29 w(link)g Ft(is)i(set)f(to)g Fj(NULL)p Ft(,)f(then)h(the)f(initial)h(RR)h(pack)o (et)e(is)i(b)n(uilt.)62 b(If)33 b(the)g(function)e(returns)g(with)208 1418 y Fj(first)p 463 1418 V 29 w(sender)p 792 1418 V 28 w(link)16 b Ft(set)g(to)f(a)h(non-)p Fj(NULL)e Ft(v)n(alue,)h(then)g (an)g(additional)f(RR)j(pack)o(et)e(is)h(required)e(to)h(describe)g (all)h(senders)208 1518 y(in)23 b(the)g(current)f(session)i(\(RR)h (pack)o(ets)e(can)g(describe)f(a)i(limit)g(of)f(31\).)34 b(The)23 b(function)e(returns)i(a)h(pointer)e(to)h(the)h(end)e(of)i (the)208 1617 y(b)n(uf)n(fer)c(of)i(the)f(current)g(RR)i(pack)o(et)e (that)h(w)o(as)h(b)n(uilt,)f(so)h(that)e(a)i(function)d(to)i(b)n(uild)f (an)h(additional)f(R)-5 b(TCP)23 b(pack)o(et)e(within)h(the)208 1717 y(compound)17 b(pack)o(et)i(can)h(be)h(gi)n(v)o(en)d(the)j (starting)e(location)h(of)g(the)g(ne)o(xt)f(pack)o(et.)-58 1879 y Fl(int)i(PlaceSDESInf)n(oF)n(orMember)12 b(\(member)21 b(*the)p 1549 1879 V 29 w(member)-8 b(,)21 b(char)f(*b)n(uffer)-8 b(,)1068 1979 y(int)21 b(init)p 1311 1979 V 30 w(b)n(uffer)p 1561 1979 V 29 w(offset\))208 2074 y Ft(Builds)h(an)h(SDES)g(pack)o(et) f(at)h(location)e Fj(buffer)h Ft(for)g(the)h(member)e Fj(the)p 2404 2074 V 29 w(member)p Ft(.)31 b Fj(buffer)22 b Ft(points)g(to)h(the)f(start)h(of)g(the)208 2173 y(SDES)f(pack)o(et,) g(and)g Fj(init)p 1041 2173 V 29 w(buffer)p 1370 2173 V 29 w(offset)f Ft(gi)n(v)o(es)h(the)g(of)n(fset)g(from)f(the)h(point)f (of)h Fj(buffer)g Ft(where)f(the)h(current)f(info)208 2273 y(should)h(be)h(placed.)32 b(If)23 b(all)h(of)e(this)i(member')-5 b(s)22 b(SDES)i(\002elds)f(are)g Fj(NULL)p Ft(,)g(then)f(no)h (information)d(is)k(placed)f(into)f(the)h(b)n(uf)n(fer)m(,)208 2373 y(and)c(the)h(v)n(alue)g(returned)e(equals)i Fj(init)p 1404 2373 V 29 w(buffer)p 1733 2373 V 29 w(offset)p Ft(.)-58 2535 y Fl(char)g(*Build)p 364 2535 V 30 w(SDES)p 601 2535 V 31 w(P)o(ack)o(et)13 b(\()p 912 2535 V 30 w(R)m(TP)p 1105 2535 V 29 w(CONTEXT)22 b(*the)p 1719 2535 V 29 w(context,)c(char)j (*b)n(uffer)-8 b(,)900 2635 y(int)21 b(lastpkt)p 1268 2635 V 29 w(and)p 1431 2635 V 30 w(encrypt\))208 2730 y Ft(Builds)i(an)f(SDES)i(pack)o(et)e(which)g(contains)g(information)e (for)i(the)h(local)g(member)e(and)h(each)h(sender)f(that)g(has)h(at)h (least)f(one)208 2829 y(non-)p Fj(NULL)g Ft(SDES)i(\002eld.)40 b(The)25 b(parameter)f Fj(lastpkt)p 1890 2829 V 29 w(and)p 2069 2829 V 29 w(encrypt)g Ft(should)g(be)i(set)f(to)h Fj(TRUE)f Ft(if)g(the)g(SDES)h(pack)o(et)208 2929 y(is)e(the)f(last)i (pack)o(et)e(in)g(the)h(compound)c(R)-5 b(TCP)25 b(pack)o(et)e(and)g (the)g(pack)o(et)g(is)h(being)f(encrypted.)33 b(This)23 b(w)o(ay)-5 b(,)24 b(padding)d(will)k(be)208 3028 y(added.)-58 3174 y Fl(char)20 b(*BuildBy)o(eP)o(ack)o(et)14 b(\()p 778 3174 V 29 w(R)m(TP)p 970 3174 V 30 w(CONTEXT)21 b(*the)p 1584 3174 V 29 w(context,)e(char)h(*b)n(uffer)-8 b(,)766 3273 y(int)20 b(by)o(e)p 1012 3273 V 30 w(f)n(or)p 1147 3273 V 29 w(csr)o(cs,)g(int)g(lastpkt)p 1753 3273 V 30 w(and)p 1917 3273 V 30 w(encrypt,)f(char)h(*r)o(eason\))208 3368 y Ft(Builds)25 b(a)h(BYE)g(pack)o(et.)39 b(If)25 b Fj(bye)p 1218 3368 V 29 w(for)p 1397 3368 V 30 w(csrcs)f Ft(is)j Fj(TRUE)p Ft(,)d(then)h(the)g(csrcs)h(in)f(the)h(csrc)f(list)h (will)g(be)f(included)f(the)h(BYE.)208 3468 y(The)i(parameter)f Fj(lastpkt)p 1080 3468 V 29 w(and)p 1259 3468 V 29 w(encrypt)h Ft(should)g(be)g(set)i(to)f Fj(TRUE)f Ft(if)h(the)g(BYE)g(pack)o(et)g (is)g(the)g(last)h(pack)o(et)e(in)h(the)208 3568 y(compound)20 b(R)-5 b(TCP)24 b(pack)o(et)f(and)f(the)h(pack)o(et)g(is)h(being)e (encrypted.)32 b(This)23 b(w)o(ay)-5 b(,)24 b(padding)d(will)j(be)f (added.)32 b Fj(reason)23 b Ft(points)208 3667 y(to)f(the)g(b)n(uf)n (fer)f(that)i(contains)e(the)h(reason)g(for)g(lea)n(ving)f(the)i (session)f(\(should)f(be)h(terminated)f(with)i(a)f Fk(n)p Fd(0)p Ft(,)h(or)f(set)h(to)f Fj(NULL)g Ft(if)208 3767 y(no)d(reason)h(is)h(desired.\))-70 3933 y Fl(int)f(SendR)m(TCPP)o(ack) o(et\()p 717 3933 V 29 w(R)m(TP)p 909 3933 V 30 w(CONTEXT)h(*the)p 1523 3933 V 29 w(context,)e(int)h(special\))208 4032 y Ft(Builds)25 b(and)f(sends)g(an)h(R)-5 b(TCP)26 b(pack)o(et,)f(b)n (ut)g(only)e(after)i(performing)d(reconsideration)g(\(if)i(it)i(is)f (enabled\))e(which)h(con\002rms)208 4132 y(whether)g(or)i(not)f(it)h (is)h(currently)d(the)i(time)f(to)h(send.)41 b(Returns)26 b Fj(TRUE)f Ft(if)h(the)g(pack)o(et)f(w)o(as)i(sent,)g Fj(FALSE)e Ft(otherwise.)41 b(The)208 4232 y(time)25 b(for)g(the)h(ne)o(xt)e(R)-5 b(TCP)27 b(pack)o(et)e(to)h(be)f(sent)h (is)h(also)e(scheduled)f(here)h(\(or)g(the)h(time)g(for)e(the)i (current)e(pack)o(et)h(to)h(be)f(sent)208 4331 y(is)f(rescheduled)e(if) i(reconsideration)d(caused)j(the)f(pack)o(ets)h(sending)f(to)h(be)f (delayed\).)34 b(The)24 b(parameter)e Fj(special)h Ft(is)i(used)208 4431 y(to)g(perform)f(partial)h(encryption.)39 b(If)25 b(partial)h(encryption)d(is)k(enabled)d(in)i(the)f(conte)o(xt,)h(the)f (setting)h Fj(special)f Ft(=)h(0)g(sends)208 4531 y(the)19 b(encrypted)e(SDES)j(pack)o(et,)e(and)h(setting)g Fj(special)g Ft(=)g(1)g(sends)h(the)f(non-encrypted)c(portion)j(of)h(the)g(compound) d(R)-5 b(TCP)208 4630 y(pack)o(et.)37 b(Thus,)25 b(the)f(function)f (must)h(be)h(called)f(twice)h(when)f(partial)g(encryption)e(is)j(in)g (use.)38 b(When)24 b(partial)h(encryption)d(is)208 4730 y(not)d(in)i(use,)f Fj(special)f Ft(should)h(be)g(set)h(to)f(0.)-70 4896 y Fl(rtperr)o(or)f(RemapP)n(erson\()p 779 4896 V 29 w(R)m(TP)p 971 4896 V 29 w(CONTEXT)j(*the)p 1585 4896 V 29 w(context,)c(person)j(*p\))208 4996 y Ft(Gi)n(v)o(en)k(a)i(unique) e(ID,)i Fj(p)p Ft(,)h(returns)e(the)h(canonical)e(identi\002er)h(for)g (that)g(member)-5 b(.)44 b(\(Person)25 b(IDs)i(can)g(be)f(remapped)f (after)h(a)208 5095 y(collision)21 b(resolution)g(where)h(tw)o(o)h (member)d(structures)i(that)g(describe)g(the)g(same)h(member)e(\(b)n (ut)h(ha)n(v)o(e)f(dif)n(ferent)g(canonical)208 5195 y(IDs\))f(are)g(mapped)f(into)h(a)g(single)g(structure\).)1908 5589 y(13)p eop %%Page: 14 14 14 13 bop -58 70 a Fl(int)21 b(SplitAndHostOrderLengthCompoundR)m(TCP) 12 b(\(char)20 b(*rtcppack)o(et,)e(char)j(*indpkts[],)1674 169 y(int)f(len\))208 264 y Ft(This)25 b(function)e(is)j(identical)f (in)g(all)h(respects)f(sa)n(v)o(e)h(one)e(as)i(the)f Fj(RTPSplitCompoundRTCP\(\))d Ft(function)h(that)j(is)g(pro-)208 364 y(vided)i(to)h(the)g(application)e(programmer)m(,)h(and)g(is)i (described)e(in)h([1)o(].)52 b(The)29 b(only)f(dif)n(ference)f(is)j (that)f(the)g(length)f(\002eld)h(in)208 463 y(each)22 b(R)-5 b(TCP)24 b(pack)o(et)e(within)h(the)g(compound)d(pack)o(et)i(is) i(con)m(v)o(erted)c(into)j(host)g(byte)f(order)-5 b(.)32 b(This)23 b(con)m(v)o(ersion)e(should)g(only)208 563 y(be)i(performed)d(once)i(per)h(arri)n(ving)e(compound)f(pack)o(et,)j (and)g(is)h(therefore)d(called)i(internally)f(by)g(the)i(library)d (upon)h(pack)o(et)208 663 y(arri)n(v)n(al.)i(The)19 b(function)g(is)i (identical)f(to)g Fj(RTPSplitCompoundRTCP\(\))d Ft(on)i(Big)i(Endian)e (machines.)-70 823 y Fl(v)o(oid)h(FixR)m(TPByteOrdering\(char)d(*the)p 1241 823 25 4 v 29 w(pack)o(et,)j(int)h(pktlen,)f(int)h(is)p 2104 823 V 30 w(nw)p 2240 823 V 30 w(to)p 2340 823 V 29 w(host\))208 922 y Ft(Con)m(v)o(erts)16 b(a)j(netw)o (ork-byte-ordered)12 b(R)-5 b(TP)19 b(pack)o(et)e(into)h(a)g (host-byte-ordered)13 b(R)-5 b(TP)19 b(pack)o(et)e(when)h Fj(is)p 3233 922 V 29 w(nw)p 3362 922 V 30 w(to)p 3492 922 V 29 w(host)g Ft(is)h(set)208 1022 y(to)h Fj(TRUE)p Ft(.)g(Otherwise,)f(con)m(v)o(erts)g(the)h(R)-5 b(TP)21 b(pack)o(et)f(in)g(the)g(opposite)f(direction.)-70 1182 y Fl(v)o(oid)h(FixR)m(TCPByteOrdering\(rtcp)p 1117 1182 V 27 w(pack)o(et)g(*the)p 1552 1182 V 29 w(pack)o(et,)g(int)g(is)p 2029 1182 V 31 w(nw)p 2166 1182 V 29 w(to)p 2265 1182 V 30 w(host\))208 1282 y Ft(Con)m(v)o(erts)j(a)i(netw)o (ork-byte-ordered)19 b(R)-5 b(TCP)26 b(pack)o(et)e(into)g(a)h (host-byte-ordered)20 b(R)-5 b(TCP)26 b(pack)o(et)e(when)g Fj(is)p 3417 1282 V 30 w(nw)p 3547 1282 V 29 w(to)p 3676 1282 V 30 w(host)208 1381 y Ft(is)d(set)g(to)f Fj(TRUE)p Ft(.)g(Otherwise,)g(con)m(v)o(erts)e(the)i(R)-5 b(TCP)22 b(pack)o(et)d(in)i(the)f(opposite)f(direction.)-70 1542 y Fl(v)o(oid)h(Flip24\(char)f(*the)p 696 1542 V 29 w(24bit)p 906 1542 V 29 w(thing\))208 1641 y Ft(Flips)k(a)g(24-bit)f(v)n(alue)g (from)f(host)i(to)g(netw)o(ork)e(byte)i(order)m(,)e(or)i(vice)f(v)o (ersa.)32 b(This)23 b(is)h(used)e(for)g(the)h Fj(cum)p 3298 1641 V 29 w(packets)p 3677 1641 V 29 w(lost)208 1741 y Ft(\002eld)d(in)g(the)g(R)-5 b(TCP)22 b(report)d(block,)g(which) h(is)h(a)f(24-bit)f(quantity)-5 b(.)-70 1901 y Fl(v)o(oid)20 b(Re)o(v)o(erseR)m(TPHeader\(rtp)p 953 1901 V 27 w(hdr)p 1109 1901 V 30 w(t)g(*the)p 1340 1901 V 29 w(hdr\))208 2001 y Ft(T)-7 b(ak)o(es)20 b(an)g(R)-5 b(TP)21 b(header)e(in)i(Big)f (Endian)f(format)g(and)h(con)m(v)o(erts)e(it)j(to)g(Little)f(Endian)f (format.)-70 2161 y Fl(v)o(oid)h(Re)o(v)o(erseR)m(TCPHeader\(rtcp)p 1050 2161 V 27 w(o)o(v)o(erlay)f(*the)p 1512 2161 V 29 w(hdr\))208 2260 y Ft(T)-7 b(ak)o(es)20 b(an)g(R)-5 b(TCP)22 b(header)d(in)h(Big)h(Endian)e(format)g(and)g(con)m(v)o(erts)g(it)i(to) f(Little)h(Endian)e(format.)-70 2420 y Fl(v)o(oid)h(StraightenR)m (TPHeader\(rtp)p 1048 2420 V 26 w(hdr)p 1203 2420 V 30 w(t)h(*the)p 1435 2420 V 29 w(hdr\))208 2520 y Ft(T)-7 b(ak)o(es)20 b(an)g(R)-5 b(TP)21 b(header)e(in)i(Little)f(Endian)f (format)g(and)h(con)m(v)o(erts)e(it)j(to)g(Big)f(Endian)f(format.)-70 2680 y Fl(v)o(oid)h(StraightenR)m(TCPHeader\(rtcp)p 1145 2680 V 26 w(o)o(v)o(erlay)f(*the)p 1606 2680 V 29 w(hdr\))208 2780 y Ft(T)-7 b(ak)o(es)20 b(an)g(R)-5 b(TCP)22 b(header)d(in)h (Little)h(Endian)e(format)g(and)g(con)m(v)o(erts)g(it)i(to)f(Big)h (Endian)e(format.)0 3057 y Fm(6)119 b(rtp)p 345 3057 36 4 v 44 w(collision.)p Fi(f)p Fm(h,c)p Fi(g)0 3243 y Ft(These)22 b(\002les)h(pro)o(vide)d(support)h(that)h(is)h (speci\002c)g(to)f(detecting)f(and)h(resolving)e(collisions)i(between)g (member)f(identi\002ers)g(\(SSRCs\))0 3342 y(within)f(a)h(session.)0 3577 y Fh(6.1)99 b(functions)-70 3733 y Fl(v)o(oid)20 b(ComputeNewSSRC\()p 832 3733 25 4 v 29 w(R)m(TP)p 1024 3733 V 30 w(CONTEXT)h(*the)p 1638 3733 V 29 w(context\))208 3833 y Ft(This)f(function)e(is)j(called)f(by)g(the)g(local)g(member)f (to)h(choose)g(a)g(ne)n(w)g(SSRC.)i(The)e(function)e(attempts)i(to)g (retrie)n(v)o(e)f(a)i(member)208 3932 y(with)26 b(an)f(identical)h (SSRC,)h(and)e(if)h(one)g(is)g(located,)h(the)f(process)f(is)i (repeated.)40 b(This)26 b(guarantees)f(that)h(the)g(ne)n(w)f(SSRC)j(is) 208 4032 y(unique)16 b(at)j(the)f(time)h(of)f(its)h(creation.)k(The)18 b(local)h(member')-5 b(s)17 b(state)i(is)g(then)f(updated)f(to)h (re\003ect)g(that)h(it)g(is)g(no)f(longer)f(colliding)208 4132 y(with)j(an)o(y)f(other)h(members.)-58 4288 y Fl(v)o(oid)g (HandleSSRCCollision)14 b(\()p 946 4288 V 29 w(R)m(TP)p 1138 4288 V 30 w(CONTEXT)21 b(*the)p 1752 4288 V 29 w(context,)e (member)i(*the)p 2550 4288 V 29 w(member)-8 b(,)933 4388 y(struct)21 b(sockaddr)f(*new)p 1700 4388 V 29 w(addr)-8 b(,)21 b(char)f(*new)p 2301 4388 V 29 w(cname\))208 4483 y Ft(This)27 b(function)e(is)j(called)f(after)f(an)h(SSRC)i(collision)e (has)g(been)f(detected.)45 b(It)27 b(constructs)f(a)i(ne)n(w)e(member)g (\(whose)g(entry)208 4582 y(to)d(the)f(session)i(has)f(induced)e(the)i (collision\),)f(updates)g(\002elds)i(in)f(all)g(colliding)f(members)g (that)h(indicate)f(in)m(v)n(olv)o(ement)e(in)j(a)208 4682 y(collision.)33 b(If)23 b(the)g(collision)g(in)m(v)n(olv)o(es)f (the)h(local)g(member)m(,)f(then)h(the)g(collision)g(callback)f(is)i (called,)g(and)f(a)g(BYE)h(pack)o(et)f(is)208 4781 y(sent.)-70 4941 y Fl(static)d(v)o(oid)g(Mer)o(geLocalInf)n(o\(rtp)p 1031 4941 V 28 w(sndr)p 1220 4941 V 30 w(local)g(*pr)o(e)o(v)p 1639 4941 V 28 w(local,)f(rtp)p 1985 4941 V 30 w(sndr)p 2176 4941 V 30 w(local)h(*new)p 2578 4941 V 29 w(local\))208 5041 y Ft(This)29 b(function)f(tak)o(es)h(tw)o(o)h(type)e Fj(rtp)p 1372 5041 V 30 w(sndr)p 1602 5041 V 29 w(local)h Ft(parameters,)h(and)f(mer)o(ges)f(their)h(\002elds)g(into)h(the)f Fj(prev)p 3627 5041 V 29 w(local)208 5141 y Ft(parameter)-5 b(.)25 b(Fields)c(that)g(count)e(e)n(v)o(ents)h(are)h(added)e(together) m(,)g(and)h(\002elds)h(that)g(represent)f(maximums)f(and)h(minimums)g (tak)o(e)208 5240 y(the)j(max)h(/)g(min)g(respecti)n(v)o(ely)e(of)i (the)f(respecti)n(v)o(e)g(\002eld)h(between)f(the)h(tw)o(o)g (parameters.)34 b(This)24 b(function)f(is)h(only)f(called)h(by)208 5340 y Fj(MergeMembers\(\))18 b Ft(and)h(has)i(no)f(scope)f(outside)h (the)g(\002le)h Fl(rtp)p 2137 5340 V 30 w(collision.c)p Ft(.)1908 5589 y(14)p eop %%Page: 15 15 15 14 bop -58 70 a Fl(member)21 b(*Mer)o(geMembers)14 b(\()p 913 70 25 4 v 29 w(R)m(TP)p 1105 70 V 30 w(CONTEXT)21 b(*the)p 1719 70 V 29 w(context,)e(member)i(*pr)o(e)o(v)p 2566 70 V 28 w(member)-8 b(,)901 169 y(member)20 b(*new)p 1406 169 V 30 w(member\))208 264 y Ft(This)c(function)f(tak)o(es)h(tw)o (o)h(separate)f(copies)g(of)g(a)g(member)f(\(due)h(to)g(an)g(SSRC)i (change)d(after)h(which)g(certain)g(e)n(v)o(ents)g(occurred)208 364 y(with)j(the)g(ne)n(w)g(SSRC)i(before)d(it)i(could)f(be)g (determined)e(that)j(this)g(ne)n(w)f(SSRC)i(resulted)d(from)h(a)g (change\))f(and)h(mer)o(ges)f(them)208 463 y(into)h(a)i(single)f (member)m(,)e(and)i(returning)e(the)i(mer)o(ged)f(member)f(in)j Fj(prev)p 2384 463 V 29 w(member)p Ft(.)0 744 y Fm(7)119 b(rtp)p 345 744 36 4 v 44 w(encrypt.)p Fi(f)p Fm(h,c)p Fi(g)0 929 y Ft(These)21 b(\002les)h(pro)o(vide)c(support)i(for)g (encryption)f(of)h(R)-5 b(TP/R)g(TCP)23 b(pack)o(ets.)j(Note)21 b(that)g(the)g(encryption)e(techniques)g(aren')o(t)h(supplied)0 1029 y(themselv)o(es,)f(b)n(ut)h(allo)n(ws)h(an)f(application)f (programmer)e(to)j(interf)o(ace)f(an)i(encryption)c(package)i(with)i (the)f(library)-5 b(.)0 1266 y Fh(7.1)99 b(functions)-58 1402 y Fl(rtperr)o(or)19 b(DoEncryption)13 b(\(context)18 b(cid,)j(struct)f(io)o(v)o(ec)g(*pktpart,)f(int)i(pktlen,)799 1502 y(int)f(IsR)m(TP\))208 1596 y Ft(This)28 b(function)g(tak)o(es)h (an)f(IO)h(V)-9 b(ector)28 b(that)h(contains)f(a)h(pack)o(et)g(and)f (performs)f(the)i(necessary)f(operations)f(that)i(result)f(in)208 1696 y(sending)23 b(an)i(encrypted)e(pack)o(et)h(into)g(the)h(netw)o (ork.)38 b(The)24 b(function)f(copies)i(the)f(IO)h(V)-9 b(ector)24 b(into)h(a)g(b)n(uf)n(fer)3395 1666 y Fc(2)3426 1696 y Ft(,)i(prepends)c(the)208 1796 y(random)28 b(8)j(byte)f(header)m (,)h(calls)g(the)g(encryption)d(routines)i(supplied)f(by)h(the)h (application)e(programmer)m(,)g(and)h(sends)h(the)208 1895 y(pack)o(et)19 b(o)o(v)o(er)g(the)h(appropriate)e(sock)o(et.)-58 2058 y Fl(rtperr)o(or)h(DoDecryption)12 b(\(context)19 b(cid,)h(char)h(*decrypt)p 1730 2058 25 4 v 28 w(b)n(uff)o(,)794 2157 y(long)f(decrypt)p 1245 2157 V 29 w(b)n(uf\003en\))208 2252 y Ft(This)26 b(function)g(tak)o(es)h(an)f(encrypted)f(stream)i (and)f(applies)g(the)h(decryption)e(function)g(supplied)g(by)i(the)f (application)g(pro-)208 2352 y(grammer)m(,)17 b(and)j(strips)h(of)n(f)e (the)h(encryption)e(header)-5 b(.)-70 2518 y Fl(int)20 b(IsV)-8 b(alidR)m(TPP)o(ack)o(et\()p 732 2518 V 30 w(R)m(TP)p 925 2518 V 29 w(CONTEXT)21 b(*the)p 1538 2518 V 30 w(context,)d(rtp)p 1978 2518 V 30 w(pack)o(et)i(*the)p 2416 2518 V 29 w(pkt\))208 2617 y Ft(Performs)31 b(some)h(checks)g(that)h(can)f(often)f(detect)i (non-R)-5 b(TP)31 b(or)h(improperly)e(decrypted)h(R)-5 b(TP)33 b(pack)o(ets.)61 b(The)32 b(function)208 2717 y(currently)16 b(e)o(xamines)g(the)i(v)o(ersion)e(byte)h(in)h(the)g (pack)o(et)f(and)g(mak)o(es)h(sure)f(it)i(matches)p 2719 2717 V 47 w Fj(RTP)p 2899 2717 V 29 w(VERSION)p Ft(.)e(It)h(also)g(mak) o(es)g(sure)208 2817 y(that)i(the)g(pack)o(et)g(isn')o(t)g(an)g(R)-5 b(TCP)21 b(pack)o(et.)j(Currently)-5 b(,)19 b(it)i(skips)f(payload)f (checks)g(and)h(v)n(alid)g(sequence)f(number)f(checks.)-58 2979 y Fl(int)j(IsV)-8 b(alidR)m(TCPP)o(ack)o(et)13 b(\()p 818 2979 V 30 w(R)m(TP)p 1011 2979 V 30 w(CONTEXT)21 b(*the)p 1625 2979 V 29 w(context,)e(char)h(**pktpos,)806 3079 y(int)h(num)p 1090 3079 V 30 w(parts,)f(long)g(totlen\))208 3174 y Ft(Performs)k(some)h(checks)g(that)h(can)f(often)g(detect)g (non-R)-5 b(TCP)25 b(or)g(improperly)e(decrypted)h(R)-5 b(TCP)27 b(pack)o(ets.)40 b(The)25 b(function)208 3273 y(currently)g(e)o(xamines)i(a)h(compound)d(R)-5 b(TCP)28 b(pack)o(et,)h(and)e(looks)g(at)h(the)g(v)o(ersion)e(byte)h(in)h(the)g (pack)o(et)f(and)g(mak)o(es)g(sure)h(it)208 3373 y(matches)p 505 3373 V 49 w Fj(RTP)p 685 3373 V 30 w(VERSION)p Ft(.)19 b(It)h(also)h(mak)o(es)f(sure)g(that)g(the)g(\002rst)h(pack)o(et,)f (which)f(should)h(be)g(an)g(SR)h(or)f(RR)i(pack)o(et,)d(doesn')o(t)208 3472 y(ha)n(v)o(e)24 b(its)i(padding)e(bit)h(set.)41 b(Finally)-5 b(,)25 b(it)h(ensures)f(that)g(each)g(pack)o(et')-5 b(s)25 b(length)f(in)i(the)f(compound)d(pack)o(et)j(is)h(set)g (correctly)-5 b(..)208 3572 y(Currently)g(,)18 b(it)j(skips)f(payload)f (checks.)0 3852 y Fm(8)119 b(Other)31 b(Files)0 4038 y Ft(Se)n(v)o(eral)23 b(\002les)i(that)f(are)f(used)h(by)f(the)h (library)f(are)h(not)f(discussed)h(in)g(this)g(document.)34 b(The)o(y)22 b(are)i(either)f(discussed)h(else)n(where,)g(or)0 4137 y(standard)19 b(components)f(of)i(other)f(softw)o(are)h(packages)f (and)h(are)g(not)g(discussed)g(here.)k(Speci\002cally)-5 b(,)19 b(the)h(\002les)i(are:)0 4320 y Fl(tclHash.)p Fk(f)p Fl(h,c)p Fk(g)p Fl(:)39 b Ft(These)26 b(\002les)i(were)e(e)o (xtracted)f(from)h(Tcl)h(8.0p2)e(to)h(use)h(Tcl')-5 b(s)27 b(hash)g(table)f(functions,)g(and)g(are)h(stripped)f(do)n(wn)208 4420 y(v)o(ersions)19 b(of)h Fl(tcl.)p Fk(f)p Fl(h,c)p Fk(g)f Ft(and)g Fl(tclInt.)p Fk(f)p Fl(h,c)p Fk(g)p Ft(.)0 4586 y Fl(con\002g)o(.h:)40 b Ft(Generated)25 b(automatically)g(by)h (con\002gure)f(\(part)h(of)g(mak)o(e\),)h(setting)g Fj(#define)p Ft(s)f(that)g(are)h(machine)e(speci\002c)i(to)g(the)208 4685 y(compiling)18 b(platform.)0 4851 y Fl(global.h:)40 b Ft(A)21 b(small)f(set)h(of)f Fj(#define)p Ft(s)g(that)g(are)g(used)g (if)h(the)f(compiler)f(supports)g(function)f(ar)o(gument)g (prototyping.)0 5017 y Fl(md5.)p Fk(f)p Fl(h,c)p Fk(g)p Fl(:)40 b Ft(P)o(art)30 b(of)g(the)h(RSA)h(Data)e(Security)g(package.) 55 b(These)30 b(functions)f(are)i(used)f(by)g(the)h(library)e(to)i (perform)d(random)208 5117 y(number)18 b(generation.)p 0 5170 1560 4 v 90 5226 a Fq(2)120 5249 y Fo(This)e(w)o(as)g(under)h (the)h(assumption)f(that)h(the)f(encryption)i(package)g(w)o(ould)e(not) g(support)g(encryption)i(o)o(v)o(er)e Fb(iovec)e Fo(structures.)23 b(Future)17 b(re)n(visions)h(will)f(assume)0 5328 y(that)h(the)g (encryption)i(library)e(can)g(support)g(encryption)i(o)o(v)o(er)d(such) h(structures.)1908 5589 y Ft(15)p eop %%Page: 16 16 16 15 bop 0 83 a Fl(hpt.c:)41 b Ft(Pro)o(vides)14 b(a)h(single)h (function,)e Fj(hpt\(char)48 b(*h,)h(stuct)g(sockaddr)g(*sa,)g (unsisgned)f(char)h(*ttl\))p Ft(,)15 b(which)208 183 y(parses)20 b([host]/port[/ttl].)0 349 y Fl(rtp)p 116 349 25 4 v 30 w(api.)p Fk(f)p Fl(h,c)p Fk(g)p Fl(:)39 b Ft(Pro)o(vides)19 b(an)h(interf)o(ace)f(to)h(the)g(application)e (programmer)-5 b(.)22 b(Details)f(of)f(the)g(code)f(in)h(these)g (\002les)h(are)f(discussed)f(in)208 448 y([1)o(].)0 729 y Fm(Refer)n(ences)42 914 y Ft([1])40 b(On-line)121 b(documentation)e (of)i(the)h(Bell)h(Labs/Columbia/UMass)d(R)-5 b(TP)123 b(Library)-5 b(,)145 b(a)n(v)n(ailable)121 b(at)180 1014 y Fj(http://www.cs.columbia.edu/)p Fk(\030)p Fj(jdros)o(en/rt)o(p)p 2148 1014 V 24 w(api.html)p Ft(.)42 1180 y([2])40 b(H.)20 b(Schulzrinne,)e(S.)i(Casner)m(,)g(R.)g(Frederick,)f(and)g(V)-11 b(.)20 b(Jacobson,)f Fa(R)-5 b(TP:)21 b(A)f(T)m(ransport)f(Protocol)f (for)i(Real-T)m(ime)f(application)p Ft(,)180 1279 y(Internet)g(Draft)h (draft-ietf-a)n(vt-rtp-ne)n(w-00.)o(ps,)15 b(December)k(1997.)1908 5589 y(16)p eop %%Trailer end userdict /end-hook known{end-hook}if %%EOF