Previous PageTable Of Contents../index.htmlIndexNext Page

fx_getNSF( )

Description | Example | Errors

Name:

int fx_getNSF(dev,nsf_length,nsf_data)

Inputs:

int dev

fax channel device handle

unsigned short nsf_length

number of bytes from NSF message to return

char * nsf_data

pointer to buffer for NSF data

Returns:

0 if success

-1 if failure

Includes:

srllib.h

dxxxlib.h

faxlib.h

Category:

miscellaneous

Mode:

synchronous

 

Top Of PageDescription

The fx_getNSF( ) function returns the remote station's NSF message (T.30 Non-Standard Facilities), if available, for the specified channel containing the specified number of bytes.

Parameter

Description

dev

Specifies the channel device handle for the fax channel obtained when the channel was opened.

nsf_length

Total number of bytes in the NSF message to be stored in the buffer and number of bytes of the NSF message to retrieve.

nsf_data

A pointer to the buffer location where the NSF message specified in nsf_length is stored.

The first word of nsf_data contains the actual length of the entire NSF message. The remaining bytes of nsf_data contain the bytes of the NSF message information.

To understand how the parameters are used, consider this example. If nsf_length is 10 bytes, then the nsf_data format is as follows:

NOTE:
If the actual NSF message requires fewer bytes than was specified in nsf_length, the number of bytes remaining is blank. If the actual NSF message contains more bytes than was specified in nsf_length, the NSF message is truncated.

The NSF message information is an optional, variable-length message that can contain fax hardware manufacturer-specific information. Manufacturers can use this information to support proprietary features for their products. The NSF message is sent by the remote station's fax machine and is available to the application after the completion of the first Phase B negotiation for a fx_sendfax( ), fx_rcvfax( ) or fx_rcvfax2( ) function call.

The NSF message information remains valid until the next Phase B negotiation is completed for the current function or until a new send or receive is initiated.

NOTE:
Phase B negotiations take place at the beginning of a fax send or receive function call and after a T.30 EOM (End of Message) message is sent by the transmitter.

To determine if the remote station sent an NSF message, call the ATFX_BSTAT( ) function. If the NSF message is available, this function returns a bitmap with the DFS_NSF bit set.

Top Of PageExample

Top Of PageErrors

ATDV_LASTERR( ) returns the following fax error codes for the following reasons:

EFX_NODATA

The function is called before completion of the initial Phase B or the NSF message was not sent by the remote station.

EFX_NSFBUFF

nsf_length value is less than 2 (bytes).

EFX_UNSUPPORTED

The function is called for an unsupported board.

See Appendix D for a list of error codes that may be returned for this function.


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Intel Corporation
All rights reserved
This page generated February, 2002