cat.h File Reference
Digital TV table parsing

Provides the table parser for the CAT (Conditional Access Table) More...

`#include <stdint.h>`
`#include <unistd.h>`
`#include <libdvbv5/header.h>`

Go to the source code of this file.

## Data Structures

struct | dvb_table_cat
| ATSC CAT table. More...

## Macros

#define | DVB_TABLE_CAT
| ATSC CAT table ID.
#define | DVB_TABLE_CAT_PID
| ATSC PID table ID.

## Functions

ssize_t | dvb_table_cat_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_cat **table)
| Initializes and parses CAT table.
void | dvb_table_cat_free (struct dvb_table_cat *table)
| Frees all data allocated by the CAT table parser.
void | dvb_table_cat_print (struct dvb_v5_fe_parms *parms, struct dvb_table_cat *table)
| Prints the content of the CAT table.

## Detailed Description

Provides the table parser for the CAT (Conditional Access Table)

Copyright
  GNU Lesser General Public License version 2.1 (LGPLv2.1)

Author
  Andre Roth

Bug Report
  Please submit bug reports and patches to linux.nosp@m.-med.nosp@m.ia@vg.nosp@m.er.k.nosp@m.ernel.nosp@m..org

Definition in file cat.h.

## Function Documentation

## dvb_table_cat_free()

void dvb_table_cat_free | ( | struct dvb_table_cat * | table | ) |

Frees all data allocated by the CAT table parser.

Parameters

  table | pointer to struct dvb_table_cat to be freed

## dvb_table_cat_init()

ssize_t dvb_table_cat_init | ( | struct dvb_v5_fe_parms * | parms,
|  | const uint8_t * | buf,
|  | ssize_t | buflen,
|  | struct dvb_table_cat ** | table
| ) |  |

Initializes and parses CAT table.

Parameters

  parms | struct dvb_v5_fe_parms pointer to the opened device
  buf | buffer containing the CAT raw data
  buflen | length of the buffer
  table | pointer to struct dvb_table_cat to be allocated and filled

This function allocates an CAT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.

Returns
  On success, it returns the size of the allocated struct. A negative value indicates an error.

## dvb_table_cat_print()

void dvb_table_cat_print | ( | struct dvb_v5_fe_parms * | parms,
|  | struct dvb_table_cat * | table
| ) |  |

Prints the content of the CAT table.

Parameters

  parms | struct dvb_v5_fe_parms pointer to the opened device
  table | pointer to struct dvb_table_cat