Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP 9000 Networking: HP FTAM/9000 Programmer's Guide > Chapter 2 Using HP FTAM/9000

General Recommendations

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Observe the following recommendations for programming with FTAM:

  • FTAM functions are not re-entrant. Do not call any FTAM function within a signal handler.

  • The inout_dcb pointer should reference a NULL value on input. This way, you do not have to anticipate the necessary output memory; the FTAM interface will allocate it for you. (Remember to later free the memory using ft_dfdcb().)

  • You are guaranteed a minimum of 10 local to local (i.e., loopback) connections. You might have a maximum of 50 local to local connections, depending on the packet sizes.

  • To make troubleshooting easier, always check for errors and record the following information:

    • Loop counters and other program-state information.

    • Specific function call that failed

    • Input parameters passed to the function

    • Function return value

    • inout_dcb->result.return_code

    • inout_dcb->result.vendor_code

    • Log instance (upper 16 bits of vendor_code)

    • inout_dcb->diagnostic.error_id

    • inout_dcb->diagnostic.further_details

    • return_string and vendor_string (from ft_gperror() or em_ gperror())

Handling Strings, HP-UX Lines, and FTAM-1 Lines

NOTE: This section applies to FTAM-1 files only and to strings as they are used within low level FTAM calls.

This section clarifies the meaning of a string, HP-UX line, and FTAM-1 line. When transferring data with low level calls, you must understand FTAM-1 lines. If you are reading or writing local HP-UX files using low level calls, you must understand how to convert between HP-UX lines and FTAM lines.

String

A string is data within or pointed to by the primitive field of type struct Ft_data_element. A string may contain multiple or partial FTAM lines.

HP-UX Line

HP-UX lines are terminated by LINE FEED %<LF> characters (%<LF> is '\n' or '\012').

FTAM-1 Line

FTAM-1 lines are terminated by a combination of CARRIAGE-RETURN/LINE-FEED %<CR,LF> ('%<CR> is \r' or '\015').

Since HP-UX uses %<LF> to represent new lines, you must convert each %<LF> to the combination %<CR,LF> when writing to FTAM-1 files. For example, if your application reads an HP-UX file and subsequently sends the data as an FTAM-1 file (using low level FTAM calls), you must convert all instances of %<LF> in the data to %<CR,LF> before sending it.

  • Any FTAM data element you receive uses %<CR,LF> to indicate a new line. Consequently, to write such data to an HP-UX file without using FTAM, you must write a %<LF> for every %<CR,LF> combination.

  • Any FTAM data element you send must use %<CR,LF> to indicate a new line. A single %<LF> character is treated as data.

If you did not receive data directly from an FTAM function call and if you are using FTAM low level calls (e.g., ft_sdata()), you must insert %<CR,LF> characters to delimit lines; you will receive them back in ft_rdata() output.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1997 Hewlett-Packard Development Company, L.P.