ancillary(3)

πŸ“¦
version 1.32.0 Β· 2 versions
, in fedora 43

🌈 ancillary(3) β€” Library Functions Manual 🌈

okay so this is the ancillary(3) page, bestie, and it's literally the support squad of the library πŸ’… nothing here is the main character exactly, but everything here is the reason the main character doesn't fall over. we got files, macros, a typedef, a giant country enum, and a whole pile of functions. let's get into it ✨


πŸ’– NAME πŸ’–

ancillary β€” Ancillary functions and macros

like... that's the whole name section. it does what it says on the tin, no cap 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

πŸ“ Files

  • file dvb-log.h β€” Provides interfaces to handle libdvbv5 log messages. (your logging bestie πŸ’¬)
  • file crc32.h β€” Provides ancillary code to calculate DVB crc32 checksum.
  • file countries.h β€” Provides ancillary code to convert ISO 3166-1 country codes. 🌍

πŸŽ€ Macros

  • #define ARRAY_SIZE(x) β€” Calculates the number of elements of an array. lowkey the most useful one-liner in all of C.

🧚 Typedefs

  • typedef void(* dvb_logfunc) (int level, const char *fmt,...) β€” typedef used by dvb_fe_open2 for the log function

πŸ‘‘ Enumerations

  • enum dvb_country_t { ... } β€” ISO-3166-1 alpha-2 country code. and bestie, this enum is long. like, every country long. here's the whole roster verbatim because we do NOT skip entries in this house 🫑
enum dvb_country_t { COUNTRY_UNKNOWN, AD, AE, AF, AG, AI, AL, AM, AO,
    AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ,
    BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG,
    CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK,
    DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA,
    GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW,
    GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT,
    JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB,
    LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK,
    ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC,
    NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK,
    PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC,
    SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY,
    SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ,
    UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT,
    ZA, ZM, ZW }

πŸ”₯ Functions

  • void dvb_default_log (int level, const char *fmt,...) β€” This is the prototype of the internal log function that it is used, if the library client doesn't desire to override with something else.
  • void atsc_time (const uint32_t start_time, struct tm *tm) β€” Converts an ATSC EIT formatted timestamp into struct tm.
  • uint32_t dvb_crc32 (uint8_t *data, size_t datalen, uint32_t crc) β€” Calculates the crc-32 as defined at the MPEG-TS specs.
  • enum dvb_country_t dvb_country_a2_to_id (const char *name) β€” Converts an Unix-like 2-letter Country code into enum dvb_country_t.
  • enum dvb_country_t dvb_country_a3_to_id (const char *name) β€” Converts a 3-letter Country code as used by MPEG-TS tables into enum dvb_country_t.
  • const char * dvb_country_to_2letters (int id) β€” Converts an enum dvb_country_t into Unix-like 2-letter Country code.
  • const char * dvb_country_to_3letters (int id) β€” Converts an enum dvb_country_t into a 3-letter Country code as used by MPEG-TS tables.
  • const char * dvb_country_to_name (int id) β€” Converts an enum dvb_country_t into a Country name as used by MPEG-TS tables.
  • enum dvb_country_t dvb_guess_user_country (void) β€” Guess the country code from the Unix environment variables. πŸ‘€

🌸 Detailed Description 🌸

bestie. this section is literally empty in the source. no description. no vibes. no nothing. it's giving placeholder. we simply move on πŸ™ˆ


πŸ’œ Macro Definition Documentation πŸ’œ

#define ARRAY_SIZE( x)

Calculates the number of elements of an array. yes bestie, that's it, that's the macro, and it carries the entire codebase on its back πŸ’…

Definition at line 64 of file dvb-fe.h.


πŸŽ€ Typedef Documentation πŸŽ€

typedef void(* dvb_logfunc) (int level, const char *fmt,...)

typedef used by dvb_fe_open2 for the log function typedef used by dvb_fe_open2 for the log function with private context

(yes it says it twice in the source, we're not editing the source, we're just reporting the tea β˜•)

Definition at line 44 of file dvb-log.h.


πŸ‘‘ Enumeration Type Documentation πŸ‘‘

enum dvb_country_t

ISO-3166-1 alpha-2 country code. one enum to hold the entire planet 🌍✨

Enumerator

  • COUNTRY_UNKNOWN β€” (Unknown Country) β€” the "idk bestie" option πŸ™ˆ
  • AD β€” Andorra.
  • AE β€” United Arab Emirates.
  • AF β€” Afghanistan.
  • AG β€” Antigua and Barbuda.
  • AI β€” Anguilla.
  • AL β€” Albania.
  • AM β€” Armenia.
  • AO β€” Angola.
  • AQ β€” Antarctica. 🐧 iconic, actually
  • AR β€” Argentina.
  • AS β€” American Samoa.
  • AT β€” Austria.
  • AU β€” Australia.
  • AW β€” Aruba.
  • AX β€” Aland Islands.
  • AZ β€” Azerbaijan.
  • BA β€” Bosnia and Herzegovina.
  • BB β€” Barbados.
  • BD β€” Bangladesh.
  • BE β€” Belgium.
  • BF β€” Burkina Faso.
  • BG β€” Bulgaria.
  • BH β€” Bahrain.
  • BI β€” Burundi.
  • BJ β€” Benin.
  • BL β€” Saint Barthelemy.
  • BM β€” Bermuda.
  • BN β€” Brunei Darussalam.
  • BO β€” Plurinational State of Bolivia.
  • BQ β€” Bonaire, Saint Eustatius and Saba.
  • BR β€” Brazil.
  • BS β€” Bahamas.
  • BT β€” Bhutan.
  • BV β€” Bouvet Island.
  • BW β€” Botswana.
  • BY β€” Belarus.
  • BZ β€” Belize.
  • CA β€” Canada.
  • CC β€” Cocos (Keeling) Islands.
  • CD β€” The Democratic Republic of the Congo.
  • CF β€” Central African Republic.
  • CG β€” Congo.
  • CH β€” Switzerland.
  • CI β€” Cote d'Ivoire.
  • CK β€” Cook Islands.
  • CL β€” Chile.
  • CM β€” Cameroon.
  • CN β€” China.
  • CO β€” Colombia.
  • CR β€” Costa Rica.
  • CU β€” Cuba.
  • CV β€” Cape Verde.
  • CW β€” Curacao.
  • CX β€” Christmas Island. πŸŽ„ slay
  • CY β€” Cyprus.
  • CZ β€” Czech Republic.
  • DE β€” Germany.
  • DJ β€” Djibouti.
  • DK β€” Denmark.
  • DM β€” Dominica.
  • DO β€” Dominican Republic.
  • DZ β€” Algeria.
  • EC β€” Ecuador.
  • EE β€” Estonia.
  • EG β€” Egypt.
  • EH β€” Western Sahara.
  • ER β€” Eritrea.
  • ES β€” Spain.
  • ET β€” Ethiopia.
  • FI β€” Finland.
  • FJ β€” Fiji.
  • FK β€” Falkland Islands (Malvinas) (no period in the source, we respect that 🫑)
  • FM β€” Federated States of Micronesia.
  • FO β€” Faroe Islands.
  • FR β€” France.
  • GA β€” Gabon.
  • GB β€” United Kingdom.
  • GD β€” Grenada.
  • GE β€” Georgia.
  • GF β€” French Guiana.
  • GG β€” Guernsey.
  • GH β€” Ghana.
  • GI β€” Gibraltar.
  • GL β€” Greenland.
  • GM β€” Gambia.
  • GN β€” Guinea.
  • GP β€” Guadeloupe.
  • GQ β€” Equatorial Guinea.
  • GR β€” Greece.
  • GS β€” South Georgia and the South Sandwich Islands.
  • GT β€” Guatemala.
  • GU β€” Guam.
  • GW β€” Guinea-Bissau.
  • GY β€” Guyana.
  • HK β€” Hong Kong.
  • HM β€” Heard Island and McDonald Islands.
  • HN β€” Honduras.
  • HR β€” Croatia.
  • HT β€” Haiti.
  • HU β€” Hungary.
  • ID β€” Indonesia.
  • IE β€” Ireland.
  • IL β€” Israel.
  • IM β€” Isle of Man.
  • IN β€” India.
  • IO β€” British Indian Ocean Territory.
  • IQ β€” Iraq.
  • IR β€” Islamic Republic of Iran.
  • IS β€” Iceland.
  • IT β€” Italy.
  • JE β€” Jersey.
  • JM β€” Jamaica.
  • JO β€” Jordan.
  • JP β€” Japan.
  • KE β€” Kenya.
  • KG β€” Kyrgyzstan.
  • KH β€” Cambodia.
  • KI β€” Kiribati.
  • KM β€” Comoros.
  • KN β€” Saint Kitts and Nevis.
  • KP β€” Democratic People's Republic of Korea.
  • KR β€” Republic of Korea.
  • KW β€” Kuwait.
  • KY β€” Cayman Islands.
  • KZ β€” Kazakhstan.
  • LA β€” Lao People's Democratic Republic.
  • LB β€” Lebanon.
  • LC β€” Saint Lucia.
  • LI β€” Liechtenstein.
  • LK β€” Sri Lanka.
  • LR β€” Liberia.
  • LS β€” Lesotho.
  • LT β€” Lithuania.
  • LU β€” Luxembourg.
  • LV β€” Latvia.
  • LY β€” Libyan Arab Jamahiriya.
  • MA β€” Morocco.
  • MC β€” Monaco.
  • MD β€” Republic of Moldova.
  • ME β€” Montenegro.
  • MF β€” Saint Martin (French part) (also period-less, iconic πŸ’…)
  • MG β€” Madagascar.
  • MH β€” Marshall Islands.
  • MK β€” The Former Yugoslav Republic of Macedonia.
  • ML β€” Mali.
  • MM β€” Myanmar.
  • MN β€” Mongolia.
  • MO β€” Macao.
  • MP β€” Northern Mariana Islands.
  • MQ β€” Martinique.
  • MR β€” Mauritania.
  • MS β€” Montserrat.
  • MT β€” Malta.
  • MU β€” Mauritius.
  • MV β€” Maldives.
  • MW β€” Malawi.
  • MX β€” Mexico.
  • MY β€” Malaysia.
  • MZ β€” Mozambique.
  • NA β€” Namibia.
  • NC β€” New Caledonia.
  • NE β€” Niger.
  • NF β€” Norfolk Island.
  • NG β€” Nigeria.
  • NI β€” Nicaragua.
  • NL β€” Netherlands.
  • NO β€” Norway.
  • NP β€” Nepal.
  • NR β€” Nauru.
  • NU β€” Niue.
  • NZ β€” New Zealand.
  • OM β€” Oman.
  • PA β€” Panama.
  • PE β€” Peru.
  • PF β€” French Polynesia.
  • PG β€” Papua New Guinea.
  • PH β€” Philippines.
  • PK β€” Pakistan.
  • PL β€” Poland.
  • PM β€” Saint Pierre and Miquelon.
  • PN β€” Pitcairn.
  • PR β€” Puerto Rico.
  • PS β€” Occupied Palestinian Territory.
  • PT β€” Portugal.
  • PW β€” Palau.
  • PY β€” Paraguay.
  • QA β€” Qatar.
  • RE β€” Reunion.
  • RO β€” Romania.
  • RS β€” Serbia.
  • RU β€” Russian Federation.
  • RW β€” Rwanda.
  • SA β€” Saudi Arabia.
  • SB β€” Solomon Islands.
  • SC β€” Seychelles.
  • SD β€” Sudan.
  • SE β€” Sweden.
  • SG β€” Singapore.
  • SH β€” Saint Helena, Ascension and Tristan da Cunha.
  • SI β€” Slovenia.
  • SJ β€” Svalbard and Jan Mayen.
  • SK β€” Slovakia.
  • SL β€” Sierra Leone.
  • SM β€” San Marino.
  • SN β€” Senegal.
  • SO β€” Somalia.
  • SR β€” Suriname.
  • SS β€” South Sudan.
  • ST β€” Sao Tome and Principe.
  • SV β€” El Salvador.
  • SX β€” Sint Maarten (Dutch part) (period-less crew rise up ✨)
  • SY β€” Syrian Arab Republic.
  • SZ β€” Swaziland.
  • TC β€” Turks and Caicos Islands.
  • TD β€” Chad.
  • TF β€” French Southern Territories.
  • TG β€” Togo.
  • TH β€” Thailand.
  • TJ β€” Tajikistan.
  • TK β€” Tokelau.
  • TL β€” Timor-Leste.
  • TM β€” Turkmenistan.
  • TN β€” Tunisia.
  • TO β€” Tonga.
  • TR β€” Turkey.
  • TT β€” Trinidad and Tobago.
  • TV β€” Tuvalu.
  • TW β€” Taiwan, Province of China.
  • TZ β€” United Republic of Tanzania.
  • UA β€” Ukraine.
  • UG β€” Uganda.
  • UM β€” United States Minor Outlying Islands.
  • US β€” United States.
  • UY β€” Uruguay.
  • UZ β€” Uzbekistan.
  • VA β€” Holy See (Vatican City State) (also no period, we see you πŸ‘€)
  • VC β€” Saint Vincent and The Grenadines.
  • VE β€” Bolivarian Republic of Venezuela.
  • VG β€” British Virgin Islands.
  • VI β€” U.S. Virgin Islands (period-less legend 🫢)
  • VN β€” Viet Nam.
  • VU β€” Vanuatu.
  • WF β€” Wallis and Futuna.
  • WS β€” Samoa.
  • YE β€” Yemen.
  • YT β€” Mayotte.
  • ZA β€” South Africa.
  • ZM β€” Zambia.
  • ZW β€” Zimbabwe.

Definition at line 544 of file countries.h.


and that's the whole country list, every single one, no skips, no "etc." bestie 😭 to be continued in part 2 πŸ¦‹βœ¨

✨ Function Documentation ✨

Okay bestie, this is the function lineup for ancillary(3) β€” no skips, no cuts, every single one is getting her moment. πŸ’… Let's go.


void atsc_time (const uint32_t start_time, struct tm * tm)

This one converts an ATSC EIT formatted timestamp into struct tm. It's giving timezone-girlie energy. πŸ•°οΈβœ¨

Parameters:

  • start_time β€” event on ATSC EIT time format.
  • tm β€” pointer to struct tm where the converted timestamp will be stored.

No return value in the notes, so it's a void baddie. Periodt. πŸ’–


enum dvb_country_t dvb_country_a2_to_id (const char * name)

Converts an Unix-like 2-letter Country code into enum dvb_country_t. Cute, right? 🌍

Parameters:

  • name β€” two-letter Country code.

Returns: It returns the corresponding enum dvb_country_t ID. If not found, returns COUNTRY_UNKNOWN. No cap. 🫢


enum dvb_country_t dvb_country_a3_to_id (const char * name)

Converts a 3-letter Country code as used by MPEG-TS tables into enum dvb_country_t. The three-letter serve. πŸ’…

Parameters:

  • name β€” three-letter Country code.

Returns: It returns the corresponding enum dvb_country_t ID. If not found, returns COUNTRY_UNKNOWN. Iconic. ✨


const char * dvb_country_to_2letters (int id)

Converts an enum dvb_country_t into Unix-like 2-letter Country code. Reverse uno card, but make it geography. 🌈

Parameters:

  • id β€” enum dvb_country_t ID.

Returns: It returns the 2-letter country code string that corresponts to the Country. If not found, returns NULL. Lowkey useful. πŸ’œ


const char * dvb_country_to_3letters (int id)

Converts an enum dvb_country_t into a 3-letter Country code as used by MPEG-TS tables. Three letters, one vibe. πŸ¦‹

Parameters:

  • id β€” enum dvb_country_t ID.

Returns: It returns the 3-letter country code string that corresponts to the Country. If not found, returns NULL. Slay. πŸ’™


const char * dvb_country_to_name (int id)

Converts an enum dvb_country_t into a Country name as used by MPEG-TS tables. Name reveal moment. πŸŽ€

Parameters:

  • id β€” enum dvb_country_t ID.

Returns: It returns a string with the Country name that corresponts to the country. If not found, returns NULL. Obsessed. πŸ’š


uint32_t dvb_crc32 (uint8_t * data, size_t datalen, uint32_t crc)

Calculates the crc-32 as defined at the MPEG-TS specs. Math girlies, this is your main character moment. πŸ”₯

Parameters:

  • data β€” Pointer to the buffer to be checked.
  • datalen β€” Length of the buffer.
  • crc β€” Initial value for the crc checksum. To calculate the checksum of the entire packet at once, use 0xFFFFFFFF.

No Returns section listed, so we move. πŸ’›


void dvb_default_log (int level, const char * fmt, ...)

This is the prototype of the internal log function that it is used, if the library client doesn't desire to override with something else. Basically the default log bestie. πŸ“

Parameters:

  • level β€” level of the message, as defined at syslog.h.
  • fmt β€” format string (same as format string on sprintf).

No return value, just logging and vibes. πŸ‘


enum dvb_country_t dvb_guess_user_country (void )

Guess the country code from the Unix environment variables. Detective mode: activated. πŸ•΅οΈβ€β™€οΈ

Returns: It returns the corresponding enum dvb_country_t ID. If not found, returns COUNTRY_UNKNOWN. Fr fr. πŸ’š


🫢 Author 🫢

Generated automatically by Doxygen for libdvbv5 from the source code. πŸ€–βœ¨


And that's the whole function squad, bestie. This page came from libdvbv5, Version 1.32.0, and it's the ancillary(3) manual page. Mwah. πŸ’‹

πŸ“¦ where this page comes from