t35.h File Reference

Go to the source code of this file.

## Functions

int | t35_real_country_code (int country_code, int country_code_extension)
| Resolve a T.35 country code with bit reversal resolution.
const char * | t35_real_country_code_to_str (int country_code, int country_code_extension)
| Decode a T.35 country code to a country name, with bit reversal resolution.
const char * | t35_country_code_to_str (int country_code, int country_code_extension)
| Decode a T.35 country code to a country name.
const char * | t35_vendor_to_str (const uint8_t *msg, int len)
int | t35_decode (const uint8_t *msg, int len, const char **country, const char **vendor, const char **model)
| Decode an NSF field.

## Function Documentation

## t35_country_code_to_str()

const char * t35_country_code_to_str | ( | int | country_code,
|  | int | country_code_extension )

Decode a T.35 country code to a country name.

Decode a T.35 country code to a country name.

Parameters

  country_code | The country code.
  country_code_extension | The country code extension.

Returns
  The country name, or NULL for an invalid country code.

## t35_decode()

int t35_decode | ( | const uint8_t * | msg,
|  | int | len,
|  | const char ** | country,
|  | const char ** | vendor,
|  | const char ** | model )

Decode an NSF field.

Decode an NSF field to try to determine the make and model of the remote machine.

Parameters

  msg | The NSF message.
  len | The length of the NSF message.
  country | A pointer which will be pointed to the identified country of origin. If a NULL pointer is given, the country of origin will not be returned. If the country of origin is not identified, NULL will be returned.
  vendor | A pointer which will be pointed to the identified vendor. If a NULL pointer is given, the vendor ID will not be returned. If the vendor is not identified, NULL will be returned.
  model | A pointer which will be pointed to the identified model. If a NULL pointer is given, the model will not be returned. If the model is not identified, NULL will be returned.

Returns
  TRUE if the machine was identified, otherwise FALSE.

References nsf_data_t::known_models, model_data_t::model_id, model_data_t::model_id_size, model_data_t::model_name, t35_real_country_code_to_str(), nsf_data_t::vendor_id_len, and nsf_data_t::vendor_name.

## t35_real_country_code()

int t35_real_country_code | ( | int | country_code,
|  | int | country_code_extension )

Resolve a T.35 country code with bit reversal resolution.

Resolve a T.35 country code its probable likely real value, using heuristics to try to resolve issues of broken bit order in the country code.

Parameters

  country_code | The country code.
  country_code_extension | The country code extension.

Returns
  The true country code, or -1 for an invalid code.

Referenced by t35_real_country_code_to_str().

## t35_real_country_code_to_str()

const char * t35_real_country_code_to_str | ( | int | country_code,
|  | int | country_code_extension )

Decode a T.35 country code to a country name, with bit reversal resolution.

Decode a T.35 country code to a country name, using heuristics to try to resolve issues of broken bit order in the country code.

Parameters

  country_code | The country code.
  country_code_extension | The country code extension.

Returns
  The country name, or NULL for an invalid country code.

References t35_real_country_code().

Referenced by t35_decode().