libdvbv5 1.22.1
Library to work with Digital TV devices on Linux
Data Structures | Macros | Functions
cat.h File Reference

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

#include <stdint.h>
#include <unistd.h>
#include <libdvbv5/header.h>
Include dependency graph for cat.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. More...
 
#define DVB_TABLE_CAT_PID
 ATSC PID table ID. More...
 

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. More...
 
void dvb_table_cat_free (struct dvb_table_cat *table)
 Frees all data allocated by the CAT table parser. More...
 
void dvb_table_cat_print (struct dvb_v5_fe_parms *parms, struct dvb_table_cat *table)
 Prints the content of the CAT table. More...
 

Detailed Description

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

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
tablepointer 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
parmsstruct dvb_v5_fe_parms pointer to the opened device
bufbuffer containing the CAT raw data
buflenlength of the buffer
tablepointer 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
parmsstruct dvb_v5_fe_parms pointer to the opened device
tablepointer to struct dvb_table_cat