TCP/IP Programmer's Reference

Total Page:16

File Type:pdf, Size:1020Kb

TCP/IP Programmer's Reference VSI OpenVMS TCP/IP Programmer's Reference Document Number: DO-DVTPRG-01B Publication Date: January 2020 This manual documents the programmer's interface to VSI TCP/IP and is intended to guide the programmer in developing applications that use network services. Revision Update Information: This guide supercedes the VSI TCP/IP Programmer's Reference, Version 10.5. Operating System and Version: VSI OpenVMS Version 8.4-2L1 or higher Software Version: VSI TCP/IP for OpenVMS Version 10.6 VMS Software, Inc., (VSI) Bolton, Massachusetts, USA TCP/IP Programmer's Reference: Copyright © 2020 VMS Software, Inc. (VSI), Bolton, Massachusetts, USA Legal Notice Confidential computer software. Valid license from VSI required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice. The only warranties for VSI products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. VSI shall not be liable for technical or editorial errors or omissions contained herein. HPE, HPE Integrity, HPE Alpha, and HPE Proliant are trademarks or registered trademarks of Hewlett Packard Enterprise. Intel, Itanium and IA64 are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Java, the coffee cup logo, and all Java based marks are trademarks or registered trademarks of Oracle Corporation in the United States or other countries. Kerberos is a trademark of the Massachusetts Institute of Technology. Microsoft, Windows, Windows-NT and Microsoft XP are U.S. registered trademarks of Microsoft Corporation. Microsoft Vista is either a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries. Motif is a registered trademark of The Open Group UNIX is a registered trademark of The Open Group. The VSI OpenVMS documentation set is available on CD. ii TCP/IP Programmer's Reference Preface ................................................................................................................................... vii 1. About VSI .................................................................................................................... vii 2. Intended Audience ........................................................................................................ vii 3. Typographical Conventions ........................................................................................... vii 4. VSI TCP/IP Support .................................................................................................... viii 5. VSI Encourages Your Comments .................................................................................... ix 6. How to Order Additional Documentation ........................................................................ ix Chapter 1. VSI TCP/IP Programming Tutorial ................................................................. 1 1.1. Sockets ........................................................................................................................ 1 1.2. TCP Client .................................................................................................................. 3 1.3. TCP Server .................................................................................................................. 3 1.4. UDP ............................................................................................................................ 3 1.5. BSD-Specific Tips ....................................................................................................... 4 1.5.1. BSD Sockets Porting Note ................................................................................. 4 1.5.2. BSD 4.4 TCP/IP Future Compatibility Considerations ......................................... 4 1.5.3. TCP/IP Services (UCX) Compatibility ................................................................ 6 1.6. TCP/IP Services (UCX) Compatibility .......................................................................... 6 Chapter 2. Socket Library Functions .................................................................................. 7 2.1. Debugging and Tracing ................................................................................................ 7 2.2. AST Reentrancy ........................................................................................................... 7 2.3. Socket Library Functions .............................................................................................. 8 2.4. Domain Name Resolver Routines ................................................................................ 15 2.5. SCTP ......................................................................................................................... 86 Chapter 3. Using the $QIO System Service ...................................................................... 93 3.1. $QIO System Service Variations ................................................................................. 93 3.2. $QIO Format ............................................................................................................. 93 3.2.1. Symbol Definition Files ................................................................................... 93 3.3. $QIO Functions .......................................................................................................... 94 3.4. $QIO Arguments ........................................................................................................ 95 3.4.1. $QIO Function-Independent Arguments ............................................................ 95 3.4.2. I/O Status Block .............................................................................................. 95 3.4.3. $QIO Function-Dependent Arguments .............................................................. 96 3.5. Passing Arguments by Descriptor ................................................................................ 97 3.5.1. Specifying an Input Parameter List ................................................................... 98 3.5.2. Specifying an Output Parameter List ............................................................... 100 3.5.3. Specifying a Socket Name ............................................................................. 101 3.5.4. Specifying a Buffer List ................................................................................. 102 Chapter 4. $QIO Interface ............................................................................................... 105 IO$_ACCEPT ................................................................................................................ 106 IO$_ACCEPT_WAIT .................................................................................................... 107 IO$_BIND ..................................................................................................................... 107 IO$_CONNECT ............................................................................................................ 108 IO$_GETPEERNAME .................................................................................................. 109 IO$_GETSOCKNAME ................................................................................................. 110 IO$_GETSOCKOPT ..................................................................................................... 111 IO$_IOCTL ................................................................................................................... 112 IO$_LISTEN ................................................................................................................. 113 IO$_RECEIVE (IO$_READVBLK) .............................................................................. 113 IO$_SELECT ................................................................................................................ 115 IO$_SEND ..................................................................................................................... 116 iii TCP/IP Programmer's Reference IO$_SENSEMODE ........................................................................................................ 118 IO$_SENSEMODE | IO$M_CTRL ............................................................................... 120 IO$_SETCHAR ............................................................................................................. 129 IO$_SETMODE|IO$M_ATTNAST ............................................................................... 130 IO$_SETSOCKOPT ...................................................................................................... 131 IO$_SHUTDOWN ......................................................................................................... 132 IO$_SOCKET ............................................................................................................... 133 SYS$CANCEL ............................................................................................................... 134 SYS$DASSGN ............................................................................................................... 134 Chapter 5. SNMP Extensible Agent API Routines .......................................................
Recommended publications
  • Openvms Record Management Services Reference Manual
    OpenVMS Record Management Services Reference Manual Order Number: AA-PV6RD-TK April 2001 This reference manual contains general information intended for use in any OpenVMS programming language, as well as specific information on writing programs that use OpenVMS Record Management Services (OpenVMS RMS). Revision/Update Information: This manual supersedes the OpenVMS Record Management Services Reference Manual, OpenVMS Alpha Version 7.2 and OpenVMS VAX Version 7.2 Software Version: OpenVMS Alpha Version 7.3 OpenVMS VAX Version 7.3 Compaq Computer Corporation Houston, Texas © 2001 Compaq Computer Corporation Compaq, AlphaServer, VAX, VMS, the Compaq logo Registered in U.S. Patent and Trademark Office. Alpha, PATHWORKS, DECnet, DEC, and OpenVMS are trademarks of Compaq Information Technologies Group, L.P. in the United States and other countries. UNIX and X/Open are trademarks of The Open Group in the United States and other countries. All other product names mentioned herein may be the trademarks of their respective companies. Confidential computer software. Valid license from Compaq required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. Compaq shall not be liable for technical or editorial errors or omissions contained herein. The information in this document is provided "as is" without warranty of any kind and is subject to change without notice. The warranties for Compaq products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty.
    [Show full text]
  • Software Product Description and Quickspecs
    VSI OpenVMS Alpha Version 8.4-2L2 Operating System DO-DVASPQ-01A Software Product Description and QuickSpecs PRODUCT NAME: VSI OpenVMS Alpha Version 8.4-2L2 DO-DVASPQ-01A This SPD and QuickSpecs describes the VSI OpenVMS Alpha Performance Release Operating System software, Version 8.4-2L2 (hereafter referred to as VSI OpenVMS Alpha V8.4-2L2). DESCRIPTION OpenVMS is a general purpose, multiuser operating system that runs in both production and development environments. VSI OpenVMS Alpha Version 8.4-2L2 is the latest release of the OpenVMS Alpha computing environment by VMS Software, Inc (VSI). VSI OpenVMS Alpha V8.4-2L2 is compiled to take advantage of architectural features such as byte and word memory reference instructions, and floating-point improvements, which are available only in HPE AlphaServer EV6 or later processors. This optimized release improves performance by taking advantage of faster hardware-based instructions that were previously emulated in software. NOTE: VSI OpenVMS Alpha V8.4-2L2 does not work on, and is not supported on, HPE AlphaServer pre-EV6 systems. OpenVMS Alpha supports HPE’s AlphaServer series computers. OpenVMS software supports industry standards, facilitating application portability and interoperability. OpenVMS provides symmetric multiprocessing (SMP) support for multiprocessing systems. The OpenVMS operating system can be tuned to perform well in a wide variety of environments. This includes combinations of compute-intensive, I/O-intensive, client/server, real-time, and other environments. Actual system performance depends on the type of computer, available physical memory, and the number and type of active disk and tape drives. The OpenVMS operating system has well-integrated networking, distributed computing, client/server, windowing, multi-processing, and authentication capabilities.
    [Show full text]
  • Operating System Support for Parallel Processes
    Operating System Support for Parallel Processes Barret Rhoden Electrical Engineering and Computer Sciences University of California at Berkeley Technical Report No. UCB/EECS-2014-223 http://www.eecs.berkeley.edu/Pubs/TechRpts/2014/EECS-2014-223.html December 18, 2014 Copyright © 2014, by the author(s). All rights reserved. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission. Operating System Support for Parallel Processes by Barret Joseph Rhoden A dissertation submitted in partial satisfaction of the requirements for the degree of Doctor of Philosophy in Computer Science in the Graduate Division of the University of California, Berkeley Committee in charge: Professor Eric Brewer, Chair Professor Krste Asanovi´c Professor David Culler Professor John Chuang Fall 2014 Operating System Support for Parallel Processes Copyright 2014 by Barret Joseph Rhoden 1 Abstract Operating System Support for Parallel Processes by Barret Joseph Rhoden Doctor of Philosophy in Computer Science University of California, Berkeley Professor Eric Brewer, Chair High-performance, parallel programs want uninterrupted access to physical resources. This characterization is true not only for traditional scientific computing, but also for high- priority data center applications that run on parallel processors. These applications require high, predictable performance and low latency, and they are important enough to warrant engineering effort at all levels of the software stack.
    [Show full text]
  • The GNU C Library: System & Network Applications
    The GNU C Library: System & Network Applications For GNU C Libraries version 2.3.x by Sandra Loosemore with Richard M. Stallman, Roland McGrath, Andrew Oram, and Ulrich Drepper This manual documents the GNU C Libraries version 2.3.x. ISBN 1-882114-24-8, First Printing, March 2004. Published by: GNU Press Website: www.gnupress.org a division of the General: [email protected] Free Software Foundation Orders: [email protected] 51 Franklin St, Fifth Floor Tel: 617-542-5942 Boston, MA 02110-1301 USA Fax: 617-542-2652 Copyright © 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2, or any later version published by the Free Software Foundation; with the Invariant Sections being “Free Software and Free Manuals”, the “GNU Free Documentation License”," and the “GNU Lesser General Public License”, with the Front Cover Texts being “A GNU Manual”, and with the Back Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License”. (a) The Back Cover Text is: You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom. Cover art by Etienne Suvasa. Cover design by Jonathan Richard. Printed in USA. i Short Contents 1 Introduction ............................................ 1 2 Low-Level Input/Output .................................. 17 3 File-System Interface .................................... 71 4 Pipes and FIFOs ...................................... 119 5 Sockets .............................................. 125 6 Low-Level Terminal Interface ...........................
    [Show full text]
  • Systemprogrammierung Grundlage Von Betriebssystemen
    Systemprogrammierung Grundlage von Betriebssystemen Sachwortverzeichnis c Wolfgang Schr¨oder-Preikschat 27. Januar 2017 Die in der Vorlesung (mundlich¨ oder schriftlich) verwendeten Akronyme und Sachworte sind in der nachfolgenden Aufz¨ahlung zusammengefasst. Dabei werden die Akronyme nach den Sachwor- ten, fur¨ die sie die Verkurzung¨ bilden, aufgeschlusselt.¨ Fur¨ englischsprachige Sachw¨orter werden, soweit bekannt, die deutschsprachigen Entsprechungen angegeben. In der Beschreibung durch das "-Zeichen angefuhrte¨ Sachw¨orter zeigen einen Kreuzverweis an. Jedes Sachwort wird erkl¨art, wo- bei dies im Zusammenhang mit dem hier relevanten Kontext der "Systemprogrammierung und in Bezug auf Betriebssysteme geschieht. Die Formulierungen erheben nicht den Anspruch auf Gultigkeit¨ auch fur¨ andere Fachrichtungen in der Informatik. Ebenso erhebt die Aufz¨ahlung nicht den Anspruch auf Vollst¨andigkeit fur¨ das in der Vorlesung behandelte Fachgebiet. Der vorliegende Text ist ein Nachschlagewerk, dessen Lekture,¨ im Gegensatz zu einem Lehr- buch mit durchgehendem roten Faden, fur¨ gew¨ohnlich nicht von vorne nach hinten empfohlen ist. Vielmehr ist der Text Begleitmaterial zu den Vorlesungsfolien. Neben Systemprogrammierung sind hier insbesondere die Lehrveranstaltungen Betriebssysteme, Betriebssystemtechnik, Nebenl¨aufige Systeme und Echtzeitsysteme eingeschlossen. Daruber¨ hinaus kommen aber auch Lehrveranstal- tungen zu den Themen Rechnerorganisation und Rechnerarchitektur als Bezugspunkt in Frage. Viele der dort (mundlich¨ oder schriftlich)
    [Show full text]
  • Proceedings, ITC/USA
    THE EFFICIENT USE OF A VAX COMPUTER IN THE REAL-TIME TELEMETRY ENVIRONMENT Item Type text; Proceedings Authors Robbins, Robert B. Publisher International Foundation for Telemetering Journal International Telemetering Conference Proceedings Rights Copyright © International Foundation for Telemetering Download date 01/10/2021 10:32:25 Link to Item http://hdl.handle.net/10150/613377 THE EFFICIENT USE OF A VAX COMPUTER IN THE REAL-TIME TELEMETRY ENVIRONMENT Robert B. Robbins Sangamo-Weston Incorporated Data Systems Division Post Office Box 3041 Sarasota, Florida 33578 ABSTRACT The use of a Digital Equipment Corporation VAX computer under the VMS operating system, in a real-time telemetry environment, brings with it many advantages. These advantages pertain to its ability to handle real-time telemetry processing in an efficient and relatively straight forward manner. The author will use the TELSET, TELDAX and TELFOR telemetry software systems as the basis for demonstrating the techniques which have allowed the real-time telemetry user to take advantage of a 32-bit, virtual addressing, architecture. INTRODUCTION Many real-time telemetry computer users believe in the need for 32-bit processing of telemetry data once it has entered the central processor. We at Sangamo-Weston agree with this belief and have successfully designed a real-time telemetry data acquisition system which efficiently uses the VAX computer under the VMS operating system. SYSTEM SOFTWARE The software written for this system achieves three goals. TELSET, which sets up the telemetry front-end hardware units, is written in VAX-11 MACRO. TELDAX the real- time data acquisition executive and TELFOR the telemetry data acquisition formatted storage process are written in interactive VAX-11 FORTRAN and are menu driven.
    [Show full text]
  • RSX - 11 M-PLUS Mini-Reference
    RSX - 11 M-PLUS Mini-Reference Order No. AV-H435F-TC RSX - 11M-PLUS Mini-Reference Order Number. AV-H435F-TC RSX-ll M-PLUS Version 4.2 Digital Equipment Corporation Maynard, Massachusetts First Printing, September 1977 Revised, April 1982 Revised, April 1983 Revised, July 1985 R~vised, .September 1987 Revised, January 1989 The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may be used or copied only in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by Digital Equipment Corporation or its affiliated companies. © Digital Equipment Corporation 1977, 1982, 1983, 1985, 1987, 1989. All Rights Reserved. Printed in U.S.A. The postpaid Reader's Comments forms at the end of this document request your critical evaluation to assist in preparing future documentation. The following are trademarks of Digital Equipment Corporation: DEC DIBOL UNIBUS DEC/CMS EduSystem VAX DEC/MMS lAS VAXcluster DECnet MASSBUS VMS DECsystem-lO PDP VT DECSYSTEM-20 PDT DECUS RSTS DECwriter RSX ~U~UIl~DTM ZK5077 Contents Preface vii Conventions ............................................... viii Online Help Files Online Help Files ............................................. 3 Command Line Interpreters Monitor Console Routine (MCR) Commands ......................... 7 Digital Command Language (DCL) ............................... 21 utilities BAD Command Summary ...................................... 67 iii BRU Command Summary ...................................... 69 CMP Command Summary ...................................... 74 DMP Command Summary .....................................
    [Show full text]
  • DNS and the DNS Cache Poisoning Attack
    Lecture 17: DNS and the DNS Cache Poisoning Attack Lecture Notes on “Computer and Network Security” by Avi Kak ([email protected]) June 25, 2021 3:21pm ©2021 Avinash Kak, Purdue University Goals: The Domain Name System BIND Configuring BIND Running BIND on your Ubuntu laptop Light-Weight Nameservers (and how to install them) DNS Cache Poisoning Attack Writing Perl and Python code for cache poisoning attacks Dan Kaminsky’s More Virulent DNS Cache Poisoning Attack CONTENTS Section Title Page 17.1 Internet, Harry Potter, and the Magic of DNS 3 17.2 DNS 5 17.3 An Example That Illustrates Extensive DNS 13 Lookups in Even the Simplest Client-Server Interactions 17.4 The Domain Name System and The dig Utility 28 17.5 host, nslookup, and whois Utilities for Name 42 Lookup 17.6 Creating a New Zone and Zone Transfers 45 17.7 DNS Cache 48 17.7.1 The TTL Time Interval 51 17.8 BIND 56 17.8.1 Configuring BIND 58 17.8.2 An Example of the named.conf Configuration File 64 17.8.3 Running BIND on Your Ubuntu Laptop 68 17.9 What Does it Mean to Run a Process in a 70 chroot Jail? 17.10 Phishing versus Pharming 73 17.11 DNS Cache Poisoning 74 17.12 Writing Perl and Python Code for Mounting a 81 DNS Cache Poisoning Attack 17.13 Dan Kaminsky’s More Virulent Exploit for 92 DNS Cache Poisoning 17.14 Homework Problems 99 Computer and Network Security by Avi Kak Lecture 17 Back to TOC 17.1 INTERNET, HARRY POTTER, AND THE MAGIC OF DNS If you have read Harry Potter, you are certainly familiar with the use of owl mail by the wizards and the witches.
    [Show full text]
  • Working with Oracle® Solaris 11.4 Directory and Naming Services: LDAP
    ® Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP Part No: E61012 November 2020 Working With Oracle Solaris 11.4 Directory and Naming Services: LDAP Part No: E61012 Copyright © 2002, 2020, Oracle and/or its affiliates. License Restrictions Warranty/Consequential Damages Disclaimer This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. Warranty Disclaimer The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. Restricted Rights Notice If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users
    [Show full text]
  • Digital Technical Journal, Number 5, September 1987: Vaxcluster Systems
    VAX clusterSystems Digital Technical Journal Digital Equipment Corporation Number 5 September 1987 Editorial Staff Ediwr- Richard W. Beane Production Staff Production Editor- Jane C. 131ake Designer- Charlotte Bell Interactive Page Makeup- Te rry Reed Advisory Board Samuel H. Fuller, Chairman Robert M. Glorioso John W. McCredie Mahendra R. Patel F. Grant Saviers William D. Strecker The Digital Te chnical journal is published by Digital Equipment Corporation, 77 Reed Road, Hudson, MassachusettS 01749. Changes of address should be sent to Digital Equipment Corporation, attention: Media Response Manager, 444 Whitney Street, NR02-1/J5, Northboro, M.A 01532-2599 Comments on the content of any paper are welcomed. Write to the editor at Mail Stop HL02-3/K11 at the published-by address. Comments can also be sent on the ENET to RDVAX::BEANE or on the ARPANET to BEANE%RDVAX.DEC@DECWRL. Copyright© 1987 Digital Equipment Corporation. Copying without fee is permiued provided that such copies are made for use in educational institutions by facuhy members and are not distributed for commercial advantage. Abstracting with credit of Digital Equipment Corporation's authorship is permitted Requests for other copies for a fee may be made to the Digital Press of Digital Equipment Corporation. All rights reserved. The information in this journal is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document.
    [Show full text]
  • Z/OS V2R4.0 Communications Server: IP IMS Sockets Guide Summary of Changes for IP IMS Sockets Guide
    z/OS Communications Server Version 2.Release 4 IP IMS Sockets Guide IBM SC27-3653-40 Note: Before using this information and the product it supports, be sure to read the general information under “Notices” on page 303. This edition applies to Version 2 Release 4 of z/OS® (5650-ZOS), and to subsequent releases and modifications until otherwise indicated in new editions. Last updated: 2021-06-21 © Copyright International Business Machines Corporation 2000, 2020. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Figures................................................................................................................. ix Tables................................................................................................................ xiii About this document.......................................................................................... xvii Who should read this document.............................................................................................................. xvii How this document is organized............................................................................................................. xviii How to use this document.......................................................................................................................xviii How to contact IBM service............................................................................................................... xviii Conventions and
    [Show full text]
  • Sockets/TCP/IP
    CS162: Operating Systems and Systems Programming Lecture 19: Networking: Sockets/TCP/ P 22 Ju"y 201$ Char"es &eiss %ttps://cs162.eecs.berkeley'edu/ Recal": Echo client-ser+er code void client(int sockfd) { int n; char sndbuf[MAXIN]; char rcvbuf[MAXOUT]; while (getreq(sndbuf, MAXIN)) { /* prompt + read */ write(sockfd, sndbuf, strlen(sndbuf)); /* send */ n=read(sockfd, rcvbuf, MAXOUT-1); /* receive */ if (n <= 0) return; /* handle error or EOF */ write(STDOUT_FILENO, rcvbuf, n); /* echo */ 3 3 void server(int consockfd) { int n; char reqbuf[MAXREQ]; while (1) { n = read(consockfd,reqbuf,MAXREQ-1); /* Recv */ if (n <= 0) return; /* handle error or EOF */ n = write(STDOUT_FILENO, reqbuf, strlen(reqbuf)); n = write(consockfd, reqbuf, strlen(reqbuf)); /* echo */ 3 2 3 Recal": Socket Setup o+er TCP/ P Server Socket new socket socket connection socket Client Server Specia" kind o- socket: server socket ― .as fi"e descriptor ― Can0t read or write Two operations: ― "isten1): start a""owing c"ients to connect ― accept(): create a new socket -or a particu"ar c"ient , Recal": Client Protocol char *hostname; char *portname; int sockfd; struct addrinfo *server; server = buildServerAddr(hostname, portname); /* Create a T P socket */ /* server-$ai%famil&: A(%)*+! ()Pv,) or A(%)*+!6 ()"v6) */ /* server-$ai%sockt&pe' S. /%ST0EA1 (byte-oriented) */ /* server-$ai%protocol' I""0.!.%! " */ sockfd = socket(server#>ai_family, server#$ai_socktype, server#$ai_protocol) /* Connect to server on port */ connect(sockfd, server#$ai_addr, server#>ai_addrlen); /* Carr&
    [Show full text]