TCP/IP Programming Manual
Interfacing TAL Programs to the Socket Library ...........................................................................86
Procedure Prototypes..........................................................................................................87
Implications of the C Socket Library......................................................................................87
Usage/Bind Considerations................................................................................................87
TAL to pTAL Conversion Issues .............................................................................................88
CRE Considerations............................................................................................................88
Native Mode C/C++ Issues.....................................................................................................89
accept..................................................................................................................................89
Errors...............................................................................................................................90
Usage Guidelines..............................................................................................................90
Examples..........................................................................................................................90
accept_nw.............................................................................................................................91
Errors...............................................................................................................................92
Usage Guidelines..............................................................................................................92
Example...........................................................................................................................92
accept_nw1...........................................................................................................................94
Errors...............................................................................................................................95
Usage Guidelines..............................................................................................................95
accept_nw2...........................................................................................................................95
Errors...............................................................................................................................96
Usage Guidelines..............................................................................................................96
Example...........................................................................................................................97
accept_nw3...........................................................................................................................97
Errors...............................................................................................................................98
Usage Guidelines..............................................................................................................98
bind, bind_nw........................................................................................................................98
Errors...............................................................................................................................99
Usage Guidelines............................................................................................................100
Examples........................................................................................................................101
connect, connect_nw.............................................................................................................102
Errors.............................................................................................................................103
Usage Guidelines............................................................................................................103
Examples........................................................................................................................103
freeaddrinfo.........................................................................................................................104
Errors.............................................................................................................................104
Usage Guidelines............................................................................................................105
Examples........................................................................................................................105
freehostent...........................................................................................................................105
Usage Guidelines............................................................................................................105
gai_strerror..........................................................................................................................105
Usage Guidelines............................................................................................................106
Example.........................................................................................................................107
Errors.............................................................................................................................107
getaddrinfo..........................................................................................................................107
Example.........................................................................................................................108
Usage Guidelines............................................................................................................108
gethostbyaddr, host_file_gethostbyaddr...................................................................................109
Errors.............................................................................................................................110
Usage Guidelines............................................................................................................110
gethostbyname, host_file_gethostbyname.................................................................................110
Errors.............................................................................................................................111
Usage Guidelines............................................................................................................111
Example.........................................................................................................................111
gethostbyname2...................................................................................................................112
Errors.............................................................................................................................112
Contents 5