TI Network Developer's Kit (NDK) API Reference Guide (Rev. K)

Total Page:16

File Type:pdf, Size:1020Kb

TI Network Developer's Kit (NDK) API Reference Guide (Rev. K) TI Network Developer's Kit (NDK) API Reference Guide Literature Number: SPRU524K May 2001–Revised October 2017 Contents Preface ........................................................................................................................................ 9 1 Introduction ....................................................................................................................... 11 1.1 What This Document Covers ............................................................................................. 12 1.2 Introduction.................................................................................................................. 12 1.3 Supplemental API Information............................................................................................ 13 2 Operating System Abstraction API ....................................................................................... 14 2.1 Operating System Configuration ......................................................................................... 15 2.1.1 Configuration Structure ........................................................................................... 15 2.2 Task Support................................................................................................................ 17 2.2.1 Function Overview ................................................................................................ 17 2.2.2 Task API Functions ............................................................................................... 18 2.3 Semaphore Support........................................................................................................ 22 2.3.1 Function Overview ................................................................................................ 22 2.3.2 Semaphore API Functions ....................................................................................... 22 2.4 Memory Allocation Support ............................................................................................... 25 2.4.1 Function Overview ................................................................................................ 25 2.4.2 Memory Allocation API Functions ............................................................................... 25 2.5 Print and Debug Support .................................................................................................. 26 2.5.1 Standard API Functions .......................................................................................... 26 2.5.2 Debug API Functions ............................................................................................. 27 2.6 File I/O Support for Embedded Systems................................................................................ 27 2.6.1 Function Overview ................................................................................................ 28 2.6.2 EFS Custom API Functions...................................................................................... 28 2.6.3 EFS Standard API Functions .................................................................................... 32 3 Sockets and Stream IO API.................................................................................................. 35 3.1 File Descriptor Environment .............................................................................................. 36 3.1.1 Organization ....................................................................................................... 36 3.1.2 Initializing the File System Environment ....................................................................... 36 3.1.2.1 When to Initialize the File Descriptor Environment ..................................................... 36 3.1.2.2 Auto-Initializing the File Descriptor Environment ....................................................... 37 3.2 File Descriptor Programming Interface .................................................................................. 38 3.2.1 Function Overview ................................................................................................ 38 3.2.2 File Descriptor API Functions.................................................................................... 38 3.2.3 File Descriptor Set (fd_set) Macros............................................................................. 44 3.3 Sockets Programming Interface .......................................................................................... 46 3.3.1 Enhanced No-Copy Socket Operation ......................................................................... 46 3.3.2 Function Overview ................................................................................................ 47 3.3.3 Sockets API Functions............................................................................................ 48 3.4 Raw Ethernet Sockets Programming Interface......................................................................... 66 3.4.1 Function Overview ................................................................................................ 66 3.4.2 Raw Ethernet Sockets API Functions .......................................................................... 66 3.5 Full Duplex Pipes Programming Interface .............................................................................. 74 3.5.1 Pipe API Functions................................................................................................ 75 3.6 Internet Group Management Protocol (IGMP).......................................................................... 75 2 Contents SPRU524K–May 2001–Revised October 2017 Submit Documentation Feedback Copyright © 2001–2017, Texas Instruments Incorporated www.ti.com 4 Configuration and Initialization ............................................................................................ 76 4.1 Configuration Methods..................................................................................................... 77 4.2 Configuration Manager API ............................................................................................... 77 4.2.1 Function Overview ................................................................................................ 78 4.2.2 Configuration API Functions ..................................................................................... 79 4.2.3 Configuration Entry API Functions .............................................................................. 89 4.3 Configuration Specification................................................................................................ 92 4.3.1 Organization ....................................................................................................... 92 4.3.2 Network Service Specification (CFGTAG_SERVICE)........................................................ 92 4.3.2.1 Service Types ............................................................................................... 93 4.3.2.2 Common Argument Structure ............................................................................. 93 4.3.2.3 Individual Configuration Entry Instance Structures ..................................................... 95 4.3.2.4 Specifying Network Services .............................................................................. 96 4.3.3 IP Network Specification (CFGTAG_IPNET) .................................................................. 99 4.3.4 IP Gateway Route Specification (CFGTAG_ROUTE) ...................................................... 100 4.3.5 Client Record Specification (CFGTAG_CLIENT)............................................................ 100 4.3.6 Client User Account (CFGTAG_ACCT)....................................................................... 101 4.3.7 System Information Specification (CFGTAG_SYSINFO)................................................... 102 4.3.8 Extended System Information Tags ........................................................................... 102 4.3.9 OS / IP Stack Configuration Item Specification (CFGTAG_OS, CFGTAG_IP).......................... 103 4.4 Initialization Procedure ................................................................................................... 105 4.5 Network Control Initialization Procedure (NETCTRL)................................................................ 105 4.5.1 Initialization Procedure .......................................................................................... 106 4.5.2 Function Overview ............................................................................................... 107 4.5.3 Network Control API Functions ................................................................................ 107 5 Network Tools Library - Support Functions ......................................................................... 110 5.1 Generic Support Calls.................................................................................................... 111 5.1.1 Function Overview ............................................................................................... 111 5.1.2 Network Tools Support API Functions ........................................................................ 111 5.2 DNS Support Calls........................................................................................................ 117 5.2.1 Function Overview ............................................................................................... 117 5.2.2 Standard Types and Definitions ..............................................................................
Recommended publications
  • 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]
  • 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]
  • 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]
  • CS162: Operating Systems and Systems Programming Lecture 20
    CS162: Operating Systems and Systems Programming Lecture 20: Networking: TCP/ P !finis#$% RPC (start'$ 23 Ju*y 201+ Char*es &eiss #ttps://cs162.eecs.berkeley,edu/ Recal*: Sockets .bstraction o/ network I/O inter/ace ― Bidirectional communication c#anne* ― 0ses file interface once esta-*is#ed ● read% write% c*ose Server setup: ― socket(), bind(), listen(), accept!$ ― read, write, c*ose from socket returned by accept Client setup: ― socket(), connect!$ ― t#en read, write, c*ose getaddrin/o($ to resolve names, addresses /or bind($ and connect!$ 2 Recal*: Layering Comple2 ser1ices from simpler ones TCP/IP networking layers: ― Physical + Link (4ireless, Ethernet, ..,$ ● Unrelia-*e, loca* e2c#ange o/ limited-si7ed frames ― Network (IP) – routing between networks ● Unrelia-*e, glo-a* e2c#ange o/ limited6si7ed packets ― Transport (TCP, 08P) – routing ● &elia-*ity, streams o/ bytes instead o/ packets, … ― .pplication – everything on top o/ sockets ( Recal*: Glue: Adding Functionality Physical Reality: Frames Abstraction: Stream Limited Size .r-itrary Si7e 0nordered (sometimes$ Ordered 0nre*iab*e Reliable <achine-to-machine Process-to-process On*y on local area net Routed anywhere .synchronous Synchronous Recal*: >ierarchical Networking: The nternet >ierarchy of networks – scales to mil*ions of host Other subnets "ranscontinental subnet1 Router #ink Router ther subnet$ subnets Router subnet2 + Recal*: Routing (2) Internet routing mechanism: routing tab*es ― 5ach router does tab*e lookup to decide which link to use to get packet closer to destination
    [Show full text]
  • Developer's Guide to Oracle® Solaris 11 Security
    ® Developer's Guide to Oracle Solaris 11 Security Part No: E36855 July 2014 Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved. 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. 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. 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, the following notice is applicable: U.S. GOVERNMENT END USERS. Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications.
    [Show full text]
  • Z/OS Communications Server Version 2.Release 4
    z/OS Communications Server Version 2.Release 4 IP CICS Sockets Guide IBM SC27-3649-40 Note: Before using this information and the product it supports, be sure to read the general information under “Notices” on page 583. 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............................................................................................................... xiii Tables.................................................................................................................xxi About this document......................................................................................... xxiii Who should read this document............................................................................................................. xxiii How this document is organized............................................................................................................. xxiii How to use this document.......................................................................................................................xxiv How to contact IBM service............................................................................................................... xxiv Conventions and
    [Show full text]
  • 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.
    [Show full text]
  • Oracle® Solaris 11.3 Programming Interfaces Guide
    ® Oracle Solaris 11.3 Programming Interfaces Guide Part No: E54815 April 2019 Oracle Solaris 11.3 Programming Interfaces Guide Part No: E54815 Copyright © 2001, 2019, Oracle and/or its affiliates. All rights reserved. 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. 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. 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 installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S.
    [Show full text]
  • Working with Oracle® Solaris 11.3 Directory and Naming Services: LDAP
    ® Working With Oracle Solaris 11.3 Directory and Naming Services: LDAP Part No: E54912 September 2018 Working With Oracle Solaris 11.3 Directory and Naming Services: LDAP Part No: E54912 Copyright © 2002, 2018, Oracle and/or its affiliates. All rights reserved. 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. 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. 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 installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
    [Show full text]
  • Programming Socket Programming
    IBM i Version 7.2 Programming Socket programming IBM Note Before using this information and the product it supports, read the information in “Notices” on page 179. This edition applies to version IBM i 7.2 (product number 5770-SS1) and to all subsequent releases and modifications until otherwise indicated in new editions. This version does not run on all reduced instruction set computer (RISC) models nor does it run on CISC models. This document may contain references to Licensed Internal Code. Licensed Internal Code is Machine Code and is licensed to you under the terms of the IBM License Agreement for Machine Code. © Copyright International Business Machines Corporation 2001, 2013. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Socket programming............................................................................................. 1 What's new for IBM i 7.2..............................................................................................................................1 PDF files for Socket programming...............................................................................................................1 Prerequisites for socket programming........................................................................................................3 How sockets work........................................................................................................................................3 Socket characteristics..................................................................................................................................6
    [Show full text]