1 Linux Standard Base Trial Use Specification 4.0 2 3 Copyright © 2008 Linux Foundation 4 5 Permission is granted to copy, distribute and/or modify this 6 document under the terms of the GNU Free Documentation License, 7 Version 1.1; with no Invariant Sections, with no Front-Cover 8 Texts, and with no Back-Cover Texts. A copy of the license is 9 included in the section entitled "GNU Free Documentation 10 License". 11 12 Portions of the text may be copyrighted by the following 13 parties: 14 15 * The Regents of the University of California 16 * Free Software Foundation 17 * Ian F. Darwin 18 * Paul Vixie 19 * BSDI (now Wind River) 20 * Andrew G Morgan 21 * Jean-loup Gailly and Mark Adler 22 * Massachusetts Institute of Technology 23 * Apple Inc. 24 * Easy Software Products 25 * artofcode LLC 26 * Till Kamppeter 27 * Manfred Wassman 28 * Python Software Foundation 29 30 These excerpts are being used in accordance with their 31 respective licenses. 32 33 Linux is the registered trademark of Linus Torvalds in the U.S. 34 and other countries. 35 36 UNIX is a registered trademark of The Open Group. 37 38 LSB is a trademark of the Linux Foundation in the United States 39 and other countries. 40 41 AMD is a trademark of Advanced Micro Devices, Inc. 42 43 Intel and Itanium are registered trademarks and Intel386 is a 44 trademark of Intel Corporation. 45 46 PowerPC is a registered trademark and PowerPC Architecture is a 47 trademark of the IBM Corporation. 48 49 S/390 is a registered trademark of the IBM Corporation. 50 51 OpenGL is a registered trademark of Silicon Graphics, Inc. 52 __________________________________________________________ 53 54 Table of Contents 55 Foreword 56 Introduction 57 I. Introductory Elements 58 59 1. Scope 60 2. Normative References 61 3. Requirements 62 63 3.1. Multimedia Libraries 64 3.2. Security Libraries 65 66 4. Definitions 67 5. Terminology 68 69 II. ALSA sound library 70 71 6. Libraries 72 73 6.1. Interfaces for libasound 74 6.2. Data Definitions for libasound 75 76 III. Network Security Services 77 78 7. Libraries 79 80 7.1. Interfaces for libnspr4 81 7.2. Data Definitions for libnspr4 82 7.3. Interfaces for libnss3 83 7.4. Data Definitions for libnss3 84 7.5. Interfaces for libssl3 85 7.6. Data Definitions for libssl3 86 87 IV. Java Interpreter 88 89 8. Java Interpreter 90 91 8.1. Introduction 92 8.2. Java Interpreter Location 93 8.3. Java Interpreter Version 94 8.4. Operators and Functions 95 8.5. Java Interpreter Command 96 97 V. Trial Use Module 98 99 9. Trial Use Module 100 101 9.1. Introduction 102 9.2. Xdg-utils 103 104 A. GNU Free Documentation License (Informative) 105 106 A.1. PREAMBLE 107 A.2. APPLICABILITY AND DEFINITIONS 108 A.3. VERBATIM COPYING 109 A.4. COPYING IN QUANTITY 110 A.5. MODIFICATIONS 111 A.6. COMBINING DOCUMENTS 112 A.7. COLLECTIONS OF DOCUMENTS 113 A.8. AGGREGATION WITH INDEPENDENT WORKS 114 A.9. TRANSLATION 115 A.10. TERMINATION 116 A.11. FUTURE REVISIONS OF THIS LICENSE 117 A.12. How to use this License for your documents 118 119 List of Tables 120 2-1. Informative References 121 3-1. Standard Library Names 122 3-2. Standard Library Names 123 6-1. libasound Definition 124 6-2. libasound - ALSA Configuration Interface Function 125 Interfaces 126 127 6-3. libasound - ALSA Configuration Interface Data Interfaces 128 6-4. libasound - ALSA Control Interface Function Interfaces 129 6-5. libasound - ALSA Global defines and functions Function 130 Interfaces 131 132 6-6. libasound - ALSA Hardware Dependant Interface Function 133 Interfaces 134 135 6-7. libasound - ALSA High level Control Interface Function 136 Interfaces 137 138 6-8. libasound - ALSA Input Interface Function Interfaces 139 6-9. libasound - ALSA MIDI Sequencer Function Interfaces 140 6-10. libasound - ALSA Mixer Interface Function Interfaces 141 6-11. libasound - ALSA Output Interface Function Interfaces 142 6-12. libasound - ALSA PCM Interface - General Functions 143 Function Interfaces 144 145 6-13. libasound - ALSA PCM Interface - Access Mask Functions 146 Function Interfaces 147 148 6-14. libasound - ALSA PCM Interface - Debug Functions Function 149 Interfaces 150 151 6-15. libasound - ALSA PCM Interface - Description Functions 152 Function Interfaces 153 154 6-16. libasound - ALSA PCM Interface - Direct Access (MMAP) 155 Functions Function Interfaces 156 157 6-17. libasound - ALSA PCM Interface - Format Mask Functions 158 Function Interfaces 159 160 6-18. libasound - ALSA PCM Interface - Hardware Parameters 161 Function Interfaces 162 163 6-19. libasound - ALSA PCM Interface - Helper Functions 164 Function Interfaces 165 166 6-20. libasound - ALSA PCM Interface - Software Parameters 167 Function Interfaces 168 169 6-21. libasound - ALSA PCM Interface - Status Functions 170 Function Interfaces 171 172 6-22. libasound - ALSA PCM Interface - Stream Information 173 Function Interfaces 174 175 6-23. libasound - ALSA Sequencer Event Type Checks Data 176 Interfaces 177 178 6-24. libasound - ALSA Error Handling Function Interfaces 179 6-25. libasound - ALSA RawMidi Interface Function Interfaces 180 6-26. libasound - ALSA Sequencer Client Interface Function 181 Interfaces 182 183 6-27. libasound - ALSA Sequencer Event API Function Interfaces 184 6-28. libasound - ALSA Sequencer Middle Level Interface 185 Function Interfaces 186 187 6-29. libasound - ALSA Sequencer Port Interface Function 188 Interfaces 189 190 6-30. libasound - ALSA Sequencer Port Subscription Function 191 Interfaces 192 193 6-31. libasound - ALSA Sequencer Queue Interface Function 194 Interfaces 195 196 6-32. libasound - ALSA Sequencer event - MIDI byte stream coder 197 Function Interfaces 198 199 6-33. libasound - ALSA Simple Mixer Interface Function 200 Interfaces 201 202 6-34. libasound - ALSA Timer Interface Function Interfaces 203 7-1. libnspr4 Definition 204 7-2. libnspr4 - Netscape Portable Runtime Function Interfaces 205 7-3. libnss3 Definition 206 7-4. libnss3 - NSS Utility Function Interfaces 207 7-5. libssl3 Definition 208 7-6. libssl3 - NSS SSL Function Interfaces 209 9-1. Commands And Utilities 210 __________________________________________________________ 211 212 Foreword 213 214 This is version 4.0 of the Trial Use Specification. This 215 version is a preliminary version for review only. Conclusion of 216 work on this version will result in version 3.2 of the Trial 217 Use Specification. 218 219 This specification describes components which have Trial Use 220 Specification status, and as such there is no formal compliance 221 process for this specification. Implementations may claim to 222 provide these components in a manner that agrees with this 223 specification, but such a claim is not part of a conformance 224 statement for the LSB version in which this module appears. 225 226 Applications may not assume that the components of this 227 specification are present or operate as described in this 228 specification on any given implementation. 229 __________________________________________________________ 230 231 Introduction 232 233 The Trial Use Specification describes components which may or 234 may not be present on an otherwise conforming system. The 235 purpose is to indicate that these components are on a Standards 236 Track, that is, they are intended to become part of the LSB 237 Specification in a future edition. 238 239 This document should be used in conjunction with the documents 240 it references. Information referenced in this way is as much a 241 part of this document as is the information explicitly included 242 here. 243 244 I. Introductory Elements 245 246 Table of Contents 247 1. Scope 248 2. Normative References 249 3. Requirements 250 251 3.1. Multimedia Libraries 252 3.2. Security Libraries 253 254 4. Definitions 255 5. Terminology 256 __________________________________________________________ 257 258 Chapter 1. Scope 259 260 The Trial Use Specification defines components which are not 261 required parts of the LSB Specification. 262 __________________________________________________________ 263 264 Chapter 2. Normative References 265 266 The specifications listed below are referenced in whole or in 267 part by the Trial Use Specification. Such references may be 268 normative or informative; a reference to specification shall 269 only be considered normative if it is explicitly cited as such. 270 The Trial Use Specification may make normative references to a 271 portion of these specifications (that is, to define a specific 272 function or group of functions); in such cases, only the 273 explicitly referenced portion of the specification is to be 274 considered normative. 275 276 Table 2-1. Informative References 277 Name Title URL 278 ALSA Library API Reference ALSA Library API Reference 279 http://www.alsa-project.org/alsa-doc/alsa-lib/ 280 ISO C (1999) ISO/IEC 9899: 1999, Programming Languages --C 281 Java application launcher documentation Java application 282 launcher documentation 283 http://java.sun.com/javase/6/docs/technotes/tools/solaris/java. 284 html 285 Java Platform SE 6 API Java Platform, Standard Edition 6 API 286 Specification http://java.sun.com/javase/6/docs/api/index.html 287 Java VM Specification Java Virtual Machine Specification 288 http://java.sun.com/docs/books/jvms/second_edition/html/VMSpecT 289 OC.doc.html 290 Mozilla's NSS SSL Reference Mozilla's NSS SSL Reference 291 http://www.mozilla.org/projects/security/pki/nss/ref/ssl/ 292 NSPR Reference Mozilla's NSPR Reference 293 http://refspecs.linuxfoundation.org/NSPR_API_Reference/NSPR_API 294 .html 295 xdg-utils reference Portland Project XDG Utilities Reference 296 1.0 http://portland.freedesktop.org/xdg-utils-1.0/ 297 __________________________________________________________ 298 299 Chapter 3. Requirements 300 301 3.1. Multimedia Libraries 302 303 The multimedia libraries listed in Table 3-1 shall be available 304 on a Linux Standard Base system, with the specified runtime 305 names. This list may be supplemented or amended by the 306 architecture-specific specification. 307 308 Table 3-1. Standard Library Names 309 Library Runtime Name 310 libasound libasound.so.2 311 312 These libraries will be in an implementation-defined directory 313 which the dynamic linker shall search by default. 314 __________________________________________________________ 315 316 3.2. Security Libraries 317 318 The security libraries listed in Table 3-2 shall be available 319 on a Linux Standard Base system, with the specified runtime 320 names. This list may be supplemented or amended by the 321 architecture-specific specification. 322 323 Table 3-2. Standard Library Names 324 Library Runtime Name 325 libnss3 libnss3.so 326 libssl3 libssl3.so 327 libnspr4 libnspr4.so 328 329 These libraries will be in an implementation-defined directory 330 which the dynamic linker shall search by default. 331 __________________________________________________________ 332 333 Chapter 4. Definitions 334 335 For the purposes of this document, the following definitions, 336 as specified in the ISO/IEC Directives, Part 2, 2001, 4th 337 Edition, apply: 338 339 can 340 341 be able to; there is a possibility of; it is possible to 342 cannot 343 344 be unable to; there is no possibility of; it is not possible to 345 may 346 347 is permitted; is allowed; is permissible 348 need not 349 350 it is not required that; no...is required 351 shall 352 353 is to; is required to; it is required that; has to; only...is 354 permitted; it is necessary 355 shall not 356 357 is not allowed [permitted] [acceptable] [permissible]; is 358 required to be not; is required that...be not; is not to be 359 should 360 361 it is recommended that; ought to 362 should not 363 364 it is not recommended that; ought not to 365 __________________________________________________________ 366 367 Chapter 5. Terminology 368 369 For the purposes of this document, the following terms apply: 370 371 implementation-defined 372 Describes a value or behavior that is not defined by 373 this document but is selected by an implementor. The 374 value or behavior may vary among implementations that 375 conform to this document. An application should not rely 376 on the existence of the value or behavior. An 377 application that relies on such a value or behavior 378 cannot be assured to be portable across conforming 379 implementations. The implementor shall document such a 380 value or behavior so that it can be used correctly by an 381 application. 382 383 Shell Script 384 A file that is read by an interpreter (e.g., awk). The 385 first line of the shell script includes a reference to 386 its interpreter binary. 387 388 undefined 389 Describes the nature of a value or behavior not defined 390 by this document which results from use of an invalid 391 program construct or invalid data input. The value or 392 behavior may vary among implementations that conform to 393 this document. An application should not rely on the 394 existence or validity of the value or behavior. An 395 application that relies on any particular value or 396 behavior cannot be assured to be portable across 397 conforming implementations. 398 399 unspecified 400 Describes the nature of a value or behavior not 401 specified by this document which results from use of a 402 valid program construct or valid data input. The value 403 or behavior may vary among implementations that conform 404 to this document. An application should not rely on the 405 existence or validity of the value or behavior. An 406 application that relies on any particular value or 407 behavior cannot be assured to be portable across 408 conforming implementations. 409 410 II. ALSA sound library 411 412 Table of Contents 413 6. Libraries 414 415 6.1. Interfaces for libasound 416 417 6.1.1. ALSA Configuration Interface 418 6.1.2. ALSA Control Interface 419 6.1.3. ALSA Global defines and functions 420 6.1.4. ALSA Hardware Dependant Interface 421 6.1.5. ALSA High level Control Interface 422 6.1.6. ALSA Input Interface 423 6.1.7. ALSA MIDI Sequencer 424 6.1.8. ALSA Mixer Interface 425 6.1.9. ALSA Output Interface 426 6.1.10. ALSA PCM Interface - General Functions 427 6.1.11. ALSA PCM Interface - Access Mask Functions 428 6.1.12. ALSA PCM Interface - Debug Functions 429 6.1.13. ALSA PCM Interface - Description Functions 430 6.1.14. ALSA PCM Interface - Direct Access (MMAP) 431 Functions 432 433 6.1.15. ALSA PCM Interface - Format Mask Functions 434 6.1.16. ALSA PCM Interface - Hardware Parameters 435 6.1.17. ALSA PCM Interface - Helper Functions 436 6.1.18. ALSA PCM Interface - Software Parameters 437 6.1.19. ALSA PCM Interface - Status Functions 438 6.1.20. ALSA PCM Interface - Stream Information 439 6.1.21. ALSA Sequencer Event Type Checks 440 6.1.22. ALSA Error Handling 441 6.1.23. ALSA RawMidi Interface 442 6.1.24. ALSA Sequencer Client Interface 443 6.1.25. ALSA Sequencer Event API 444 6.1.26. ALSA Sequencer Middle Level Interface 445 6.1.27. ALSA Sequencer Port Interface 446 6.1.28. ALSA Sequencer Port Subscription 447 6.1.29. ALSA Sequencer Queue Interface 448 6.1.30. ALSA Sequencer event - MIDI byte stream 449 coder 450 451 6.1.31. ALSA Simple Mixer Interface 452 6.1.32. ALSA Timer Interface 453 454 6.2. Data Definitions for libasound 455 456 6.2.1. alsa/conf.h 457 6.2.2. alsa/control.h 458 6.2.3. alsa/control_external.h 459 6.2.4. alsa/error.h 460 6.2.5. alsa/global.h 461 6.2.6. alsa/hwdep.h 462 6.2.7. alsa/iatomic.h 463 6.2.8. alsa/input.h 464 6.2.9. alsa/mixer.h 465 6.2.10. alsa/mixer_abst.h 466 6.2.11. alsa/output.h 467 6.2.12. alsa/pcm.h 468 6.2.13. alsa/pcm_extplug.h 469 6.2.14. alsa/pcm_plugin.h 470 6.2.15. alsa/rawmidi.h 471 6.2.16. alsa/seq.h 472 6.2.17. alsa/seq_event.h 473 6.2.18. alsa/seq_midi_event.h 474 6.2.19. alsa/seqmid.h 475 6.2.20. alsa/timer.h 476 __________________________________________________________ 477 478 Chapter 6. Libraries 479 480 6.1. Interfaces for libasound 481 482 Table 6-1 defines the library name and shared object name for 483 the libasound library 484 485 Table 6-1. libasound Definition 486 Library: libasound 487 SONAME: libasound.so.2 488 489 The behavior of the interfaces in this library is specified by 490 the following specifications: 491 492 [ALSA] ALSA Library API Reference 493 __________________________________________________________ 494 495 6.1.1. ALSA Configuration Interface 496 __________________________________________________________ 497 498 6.1.1.1. Interfaces for ALSA Configuration Interface 499 500 An LSB conforming implementation shall provide the generic 501 functions for ALSA Configuration Interface specified in Table 502 6-2, with the full mandatory functionality as described in the 503 referenced underlying specification. 504 505 Table 6-2. libasound - ALSA Configuration Interface Function 506 Interfaces 507 snd_config_add(ALSA_0.9) [ALSA] snd_config_copy(ALSA_0.9) 508 [ALSA] snd_config_delete(ALSA_0.9) [ALSA] 509 snd_config_get_ascii(ALSA_0.9) [ALSA] 510 snd_config_get_id(ALSA_0.9) [ALSA] 511 snd_config_get_integer(ALSA_0.9) [ALSA] 512 snd_config_get_integer64(ALSA_0.9) [ALSA] 513 snd_config_get_string(ALSA_0.9) [ALSA] 514 snd_config_get_type(ALSA_0.9) [ALSA] 515 snd_config_imake_integer(ALSA_0.9) [ALSA] 516 snd_config_imake_integer64(ALSA_0.9) [ALSA] 517 snd_config_imake_string(ALSA_0.9) [ALSA] 518 snd_config_iterator_end(ALSA_0.9) [ALSA] 519 snd_config_iterator_entry(ALSA_0.9) [ALSA] 520 snd_config_iterator_first(ALSA_0.9) [ALSA] 521 snd_config_iterator_next(ALSA_0.9) [ALSA] 522 snd_config_load(ALSA_0.9) [ALSA] 523 snd_config_make_compound(ALSA_0.9) [ALSA] 524 snd_config_make_integer(ALSA_0.9) [ALSA] 525 snd_config_make_integer64(ALSA_0.9) [ALSA] 526 snd_config_make_string(ALSA_0.9) [ALSA] 527 snd_config_save(ALSA_0.9) [ALSA] snd_config_search(ALSA_0.9) 528 [ALSA] snd_config_searchv(ALSA_0.9) [ALSA] 529 snd_config_set_ascii(ALSA_0.9) [ALSA] 530 snd_config_set_integer(ALSA_0.9) [ALSA] 531 snd_config_set_integer64(ALSA_0.9) [ALSA] 532 snd_config_set_string(ALSA_0.9) [ALSA] snd_config_top(ALSA_0.9) 533 [ALSA] snd_config_update(ALSA_0.9) [ALSA] 534 snd_config_update_free_global(ALSA_0.9) [ALSA] 535 536 An LSB conforming implementation shall provide the generic data 537 interfaces for ALSA Configuration Interface specified in Table 538 6-3, with the full mandatory functionality as described in the 539 referenced underlying specification. 540 541 Table 6-3. libasound - ALSA Configuration Interface Data 542 Interfaces 543 snd_config(ALSA_0.9) [ALSA] 544 __________________________________________________________ 545 546 6.1.2. ALSA Control Interface 547 __________________________________________________________ 548 549 6.1.2.1. Interfaces for ALSA Control Interface 550 551 An LSB conforming implementation shall provide the generic 552 functions for ALSA Control Interface specified in Table 6-4, 553 with the full mandatory functionality as described in the 554 referenced underlying specification. 555 556 Table 6-4. libasound - ALSA Control Interface Function 557 Interfaces 558 snd_async_add_ctl_handler(ALSA_0.9) [ALSA] 559 snd_async_handler_get_ctl(ALSA_0.9) [ALSA] 560 snd_card_get_index(ALSA_0.9) [ALSA] 561 snd_card_get_longname(ALSA_0.9) [ALSA] 562 snd_card_get_name(ALSA_0.9) [ALSA] snd_card_load(ALSA_0.9) 563 [ALSA] 564 snd_card_next(ALSA_0.9) [ALSA] snd_ctl_card_info(ALSA_0.9) 565 [ALSA] snd_ctl_card_info_clear(ALSA_0.9) [ALSA] 566 snd_ctl_card_info_copy(ALSA_0.9) [ALSA] 567 snd_ctl_card_info_free(ALSA_0.9) [ALSA] 568 snd_ctl_card_info_get_components(ALSA_0.9) [ALSA] 569 snd_ctl_card_info_get_driver(ALSA_0.9) [ALSA] 570 snd_ctl_card_info_get_id(ALSA_0.9) [ALSA] 571 snd_ctl_card_info_get_longname(ALSA_0.9) [ALSA] 572 snd_ctl_card_info_get_mixername(ALSA_0.9) [ALSA] 573 snd_ctl_card_info_get_name(ALSA_0.9) [ALSA] 574 snd_ctl_card_info_malloc(ALSA_0.9) [ALSA] 575 snd_ctl_card_info_sizeof(ALSA_0.9) [ALSA] 576 snd_ctl_close(ALSA_0.9) [ALSA] 577 snd_ctl_elem_add_boolean(ALSA_0.9) [ALSA] 578 snd_ctl_elem_add_iec958(ALSA_0.9) [ALSA] 579 snd_ctl_elem_add_integer(ALSA_0.9) [ALSA] 580 snd_ctl_elem_id_clear(ALSA_0.9) [ALSA] 581 snd_ctl_elem_id_copy(ALSA_0.9) [ALSA] 582 snd_ctl_elem_id_free(ALSA_0.9) [ALSA] 583 snd_ctl_elem_id_get_device(ALSA_0.9) [ALSA] 584 snd_ctl_elem_id_get_index(ALSA_0.9) [ALSA] 585 snd_ctl_elem_id_get_interface(ALSA_0.9) [ALSA] 586 snd_ctl_elem_id_get_name(ALSA_0.9) [ALSA] 587 snd_ctl_elem_id_get_numid(ALSA_0.9) [ALSA] 588 snd_ctl_elem_id_get_subdevice(ALSA_0.9) [ALSA] 589 snd_ctl_elem_id_malloc(ALSA_0.9) [ALSA] 590 snd_ctl_elem_id_set_device(ALSA_0.9) [ALSA] 591 snd_ctl_elem_id_set_index(ALSA_0.9) [ALSA] 592 snd_ctl_elem_id_set_interface(ALSA_0.9) [ALSA] 593 snd_ctl_elem_id_set_name(ALSA_0.9) [ALSA] 594 snd_ctl_elem_id_set_numid(ALSA_0.9) [ALSA] 595 snd_ctl_elem_id_set_subdevice(ALSA_0.9) [ALSA] 596 snd_ctl_elem_id_sizeof(ALSA_0.9) [ALSA] 597 snd_ctl_elem_iface_name(ALSA_0.9) [ALSA] 598 snd_ctl_elem_info(ALSA_0.9) [ALSA] 599 snd_ctl_elem_info_clear(ALSA_0.9) [ALSA] 600 snd_ctl_elem_info_copy(ALSA_0.9) [ALSA] 601 snd_ctl_elem_info_free(ALSA_0.9) [ALSA] 602 snd_ctl_elem_info_get_count(ALSA_0.9) [ALSA] 603 snd_ctl_elem_info_get_id(ALSA_0.9) [ALSA] 604 snd_ctl_elem_info_get_item_name(ALSA_0.9) [ALSA] 605 snd_ctl_elem_info_get_items(ALSA_0.9) [ALSA] 606 snd_ctl_elem_info_get_max(ALSA_0.9) [ALSA] 607 snd_ctl_elem_info_get_max64(ALSA_0.9) [ALSA] 608 snd_ctl_elem_info_get_min(ALSA_0.9) [ALSA] 609 snd_ctl_elem_info_get_min64(ALSA_0.9) [ALSA] 610 snd_ctl_elem_info_get_name(ALSA_0.9) [ALSA] 611 snd_ctl_elem_info_get_numid(ALSA_0.9) [ALSA] 612 snd_ctl_elem_info_get_step(ALSA_0.9) [ALSA] 613 snd_ctl_elem_info_get_step64(ALSA_0.9) [ALSA] 614 snd_ctl_elem_info_get_type(ALSA_0.9) [ALSA] 615 snd_ctl_elem_info_is_inactive(ALSA_0.9) [ALSA] 616 snd_ctl_elem_info_is_locked(ALSA_0.9) [ALSA] 617 snd_ctl_elem_info_is_readable(ALSA_0.9) [ALSA] 618 snd_ctl_elem_info_is_user(ALSA_0.9) [ALSA] 619 snd_ctl_elem_info_is_volatile(ALSA_0.9) [ALSA] 620 snd_ctl_elem_info_is_writable(ALSA_0.9) [ALSA] 621 snd_ctl_elem_info_malloc(ALSA_0.9) [ALSA] 622 snd_ctl_elem_info_set_id(ALSA_0.9) [ALSA] 623 snd_ctl_elem_info_set_item(ALSA_0.9) [ALSA] 624 snd_ctl_elem_info_sizeof(ALSA_0.9) [ALSA] 625 snd_ctl_elem_list(ALSA_0.9) [ALSA] 626 snd_ctl_elem_list_alloc_space(ALSA_0.9) [ALSA] 627 snd_ctl_elem_list_clear(ALSA_0.9) [ALSA] 628 snd_ctl_elem_list_copy(ALSA_0.9) [ALSA] 629 snd_ctl_elem_list_free(ALSA_0.9) [ALSA] 630 snd_ctl_elem_list_free_space(ALSA_0.9) [ALSA] 631 snd_ctl_elem_list_get_count(ALSA_0.9) [ALSA] 632 snd_ctl_elem_list_get_id(ALSA_0.9) [ALSA] 633 snd_ctl_elem_list_get_name(ALSA_0.9) [ALSA] 634 snd_ctl_elem_list_get_used(ALSA_0.9) [ALSA] 635 snd_ctl_elem_list_malloc(ALSA_0.9) [ALSA] 636 snd_ctl_elem_list_set_offset(ALSA_0.9) [ALSA] 637 snd_ctl_elem_list_sizeof(ALSA_0.9) [ALSA] 638 snd_ctl_elem_read(ALSA_0.9) [ALSA] 639 snd_ctl_elem_remove(ALSA_0.9) [ALSA] 640 snd_ctl_elem_type_name(ALSA_0.9) [ALSA] 641 snd_ctl_elem_value_clear(ALSA_0.9) [ALSA] 642 snd_ctl_elem_value_copy(ALSA_0.9) [ALSA] 643 snd_ctl_elem_value_free(ALSA_0.9) [ALSA] 644 snd_ctl_elem_value_get_boolean(ALSA_0.9) [ALSA] 645 snd_ctl_elem_value_get_byte(ALSA_0.9) [ALSA] 646 snd_ctl_elem_value_get_bytes(ALSA_0.9) [ALSA] 647 snd_ctl_elem_value_get_enumerated(ALSA_0.9) [ALSA] 648 snd_ctl_elem_value_get_id(ALSA_0.9) [ALSA] 649 snd_ctl_elem_value_get_iec958(ALSA_0.9) [ALSA] 650 snd_ctl_elem_value_get_integer(ALSA_0.9) [ALSA] 651 snd_ctl_elem_value_get_integer64(ALSA_0.9) [ALSA] 652 snd_ctl_elem_value_malloc(ALSA_0.9) [ALSA] 653 snd_ctl_elem_value_set_boolean(ALSA_0.9) [ALSA] 654 snd_ctl_elem_value_set_byte(ALSA_0.9) [ALSA] 655 snd_ctl_elem_value_set_enumerated(ALSA_0.9) [ALSA] 656 snd_ctl_elem_value_set_id(ALSA_0.9) [ALSA] 657 snd_ctl_elem_value_set_iec958(ALSA_0.9) [ALSA] 658 snd_ctl_elem_value_set_integer(ALSA_0.9) [ALSA] 659 snd_ctl_elem_value_set_integer64(ALSA_0.9) [ALSA] 660 snd_ctl_elem_value_sizeof(ALSA_0.9) [ALSA] 661 snd_ctl_elem_write(ALSA_0.9) [ALSA] 662 snd_ctl_event_clear(ALSA_0.9) [ALSA] 663 snd_ctl_event_copy(ALSA_0.9) [ALSA] 664 snd_ctl_event_elem_get_id(ALSA_0.9) [ALSA] 665 snd_ctl_event_elem_get_mask(ALSA_0.9) [ALSA] 666 snd_ctl_event_free(ALSA_0.9) [ALSA] 667 snd_ctl_event_malloc(ALSA_0.9) [ALSA] 668 snd_ctl_event_sizeof(ALSA_0.9) [ALSA] 669 snd_ctl_hwdep_info(ALSA_0.9) [ALSA] 670 snd_ctl_hwdep_next_device(ALSA_0.9) [ALSA] 671 snd_ctl_name(ALSA_0.9) [ALSA] snd_ctl_nonblock(ALSA_0.9) [ALSA] 672 snd_ctl_open(ALSA_0.9) [ALSA] 673 snd_ctl_pcm_info(ALSA_0.9) [ALSA] 674 snd_ctl_pcm_next_device(ALSA_0.9) [ALSA] 675 snd_ctl_poll_descriptors(ALSA_0.9) [ALSA] 676 snd_ctl_poll_descriptors_count(ALSA_0.9) [ALSA] 677 snd_ctl_rawmidi_info(ALSA_0.9) [ALSA] 678 snd_ctl_rawmidi_next_device(ALSA_0.9) [ALSA] 679 snd_ctl_read(ALSA_0.9) [ALSA] 680 snd_ctl_subscribe_events(ALSA_0.9) [ALSA] 681 __________________________________________________________ 682 683 6.1.3. ALSA Global defines and functions 684 __________________________________________________________ 685 686 6.1.3.1. Interfaces for ALSA Global defines and functions 687 688 An LSB conforming implementation shall provide the generic 689 functions for ALSA Global defines and functions specified in 690 Table 6-5, with the full mandatory functionality as described 691 in the referenced underlying specification. 692 693 Table 6-5. libasound - ALSA Global defines and functions 694 Function Interfaces 695 snd_asoundlib_version(ALSA_0.9) [ALSA] 696 snd_async_add_handler(ALSA_0.9) [ALSA] 697 snd_async_del_handler(ALSA_0.9) [ALSA] 698 snd_async_handler_get_callback_private(ALSA_0.9) [ALSA] 699 __________________________________________________________ 700 701 6.1.4. ALSA Hardware Dependant Interface 702 __________________________________________________________ 703 704 6.1.4.1. Interfaces for ALSA Hardware Dependant Interface 705 706 An LSB conforming implementation shall provide the generic 707 functions for ALSA Hardware Dependant Interface specified in 708 Table 6-6, with the full mandatory functionality as described 709 in the referenced underlying specification. 710 711 Table 6-6. libasound - ALSA Hardware Dependant Interface 712 Function Interfaces 713 snd_hwdep_close(ALSA_0.9) [ALSA] 714 snd_hwdep_dsp_image_copy(ALSA_0.9) [ALSA] 715 snd_hwdep_dsp_image_free(ALSA_0.9) [ALSA] 716 snd_hwdep_dsp_image_get_image(ALSA_0.9) [ALSA] 717 snd_hwdep_dsp_image_get_index(ALSA_0.9) [ALSA] 718 snd_hwdep_dsp_image_get_length(ALSA_0.9) [ALSA] 719 snd_hwdep_dsp_image_get_name(ALSA_0.9) [ALSA] 720 snd_hwdep_dsp_image_malloc(ALSA_0.9) [ALSA] 721 snd_hwdep_dsp_image_set_image(ALSA_0.9) [ALSA] 722 snd_hwdep_dsp_image_set_index(ALSA_0.9) [ALSA] 723 snd_hwdep_dsp_image_set_length(ALSA_0.9) [ALSA] 724 snd_hwdep_dsp_image_set_name(ALSA_0.9) [ALSA] 725 snd_hwdep_dsp_image_sizeof(ALSA_0.9) [ALSA] 726 snd_hwdep_dsp_load(ALSA_0.9) [ALSA] 727 snd_hwdep_dsp_status(ALSA_0.9) [ALSA] 728 snd_hwdep_dsp_status_copy(ALSA_0.9) [ALSA] 729 snd_hwdep_dsp_status_free(ALSA_0.9) [ALSA] 730 snd_hwdep_dsp_status_get_chip_ready(ALSA_0.9) [ALSA] 731 snd_hwdep_dsp_status_get_dsp_loaded(ALSA_0.9) [ALSA] 732 snd_hwdep_dsp_status_get_id(ALSA_0.9) [ALSA] 733 snd_hwdep_dsp_status_get_num_dsps(ALSA_0.9) [ALSA] 734 snd_hwdep_dsp_status_get_version(ALSA_0.9) [ALSA] 735 snd_hwdep_dsp_status_malloc(ALSA_0.9) [ALSA] 736 snd_hwdep_dsp_status_sizeof(ALSA_0.9) [ALSA] 737 snd_hwdep_info(ALSA_0.9) [ALSA] snd_hwdep_info_copy(ALSA_0.9) 738 [ALSA] snd_hwdep_info_free(ALSA_0.9) [ALSA] 739 snd_hwdep_info_get_card(ALSA_0.9) [ALSA] 740 snd_hwdep_info_get_device(ALSA_0.9) [ALSA] 741 snd_hwdep_info_get_id(ALSA_0.9) [ALSA] 742 snd_hwdep_info_get_iface(ALSA_0.9) [ALSA] 743 snd_hwdep_info_get_name(ALSA_0.9) [ALSA] 744 snd_hwdep_info_malloc(ALSA_0.9) [ALSA] 745 snd_hwdep_info_set_device(ALSA_0.9) [ALSA] 746 snd_hwdep_info_sizeof(ALSA_0.9) [ALSA] 747 snd_hwdep_ioctl(ALSA_0.9) [ALSA] 748 snd_hwdep_open(ALSA_0.9) [ALSA] 749 snd_hwdep_poll_descriptors(ALSA_0.9) [ALSA] 750 snd_hwdep_read(ALSA_0.9) [ALSA] 751 snd_hwdep_write(ALSA_0.9) [ALSA] 752 __________________________________________________________ 753 754 6.1.5. ALSA High level Control Interface 755 __________________________________________________________ 756 757 6.1.5.1. Interfaces for ALSA High level Control Interface 758 759 An LSB conforming implementation shall provide the generic 760 functions for ALSA High level Control Interface specified in 761 Table 6-7, with the full mandatory functionality as described 762 in the referenced underlying specification. 763 764 Table 6-7. libasound - ALSA High level Control Interface 765 Function Interfaces 766 snd_hctl_close(ALSA_0.9) [ALSA] 767 snd_hctl_elem_get_callback_private(ALSA_0.9) [ALSA] 768 snd_hctl_elem_get_id(ALSA_0.9) [ALSA] 769 snd_hctl_elem_info(ALSA_0.9) [ALSA] 770 snd_hctl_elem_next(ALSA_0.9) [ALSA] 771 snd_hctl_elem_prev(ALSA_0.9) [ALSA] 772 snd_hctl_elem_read(ALSA_0.9) [ALSA] 773 snd_hctl_elem_set_callback(ALSA_0.9) [ALSA] 774 snd_hctl_elem_set_callback_private(ALSA_0.9) [ALSA] 775 snd_hctl_elem_write(ALSA_0.9) [ALSA] 776 snd_hctl_find_elem(ALSA_0.9) [ALSA] 777 snd_hctl_first_elem(ALSA_0.9) [ALSA] 778 snd_hctl_free(ALSA_0.9) [ALSA] 779 snd_hctl_get_callback_private(ALSA_0.9) [ALSA] 780 snd_hctl_get_count(ALSA_0.9) [ALSA] 781 snd_hctl_handle_events(ALSA_0.9) [ALSA] 782 snd_hctl_last_elem(ALSA_0.9) [ALSA] snd_hctl_load(ALSA_0.9) 783 [ALSA] 784 snd_hctl_nonblock(ALSA_0.9) [ALSA] snd_hctl_open(ALSA_0.9) 785 [ALSA] snd_hctl_set_callback(ALSA_0.9) [ALSA] 786 snd_hctl_set_callback_private(ALSA_0.9) [ALSA] 787 snd_hctl_wait(ALSA_0.9) [ALSA] 788 __________________________________________________________ 789 790 6.1.6. ALSA Input Interface 791 __________________________________________________________ 792 793 6.1.6.1. Interfaces for ALSA Input Interface 794 795 An LSB conforming implementation shall provide the generic 796 functions for ALSA Input Interface specified in Table 6-8, with 797 the full mandatory functionality as described in the referenced 798 underlying specification. 799 800 Table 6-8. libasound - ALSA Input Interface Function Interfaces 801 snd_input_buffer_open(ALSA_0.9) [ALSA] 802 snd_input_close(ALSA_0.9) [ALSA] 803 snd_input_stdio_attach(ALSA_0.9) [ALSA] 804 snd_input_stdio_open(ALSA_0.9) [ALSA] 805 __________________________________________________________ 806 807 6.1.7. ALSA MIDI Sequencer 808 __________________________________________________________ 809 810 6.1.7.1. Interfaces for ALSA MIDI Sequencer 811 812 An LSB conforming implementation shall provide the generic 813 functions for ALSA MIDI Sequencer specified in Table 6-9, with 814 the full mandatory functionality as described in the referenced 815 underlying specification. 816 817 Table 6-9. libasound - ALSA MIDI Sequencer Function Interfaces 818 snd_seq_client_id(ALSA_0.9) [ALSA] snd_seq_close(ALSA_0.9) 819 [ALSA] snd_seq_get_input_buffer_size(ALSA_0.9) [ALSA] 820 snd_seq_get_output_buffer_size(ALSA_0.9) [ALSA] 821 snd_seq_nonblock(ALSA_0.9) [ALSA] snd_seq_open(ALSA_0.9) [ALSA] 822 snd_seq_poll_descriptors(ALSA_0.9) [ALSA] 823 snd_seq_poll_descriptors_count(ALSA_0.9) [ALSA] 824 snd_seq_poll_descriptors_revents(ALSA_0.9) [ALSA] 825 snd_seq_set_input_buffer_size(ALSA_0.9) [ALSA] 826 snd_seq_set_output_buffer_size(ALSA_0.9) [ALSA] 827 snd_seq_system_info(ALSA_0.9) [ALSA] 828 snd_seq_system_info_copy(ALSA_0.9) [ALSA] 829 snd_seq_system_info_free(ALSA_0.9) [ALSA] 830 snd_seq_system_info_get_clients(ALSA_0.9) [ALSA] 831 snd_seq_system_info_get_ports(ALSA_0.9) [ALSA] 832 snd_seq_system_info_get_queues(ALSA_0.9) [ALSA] 833 snd_seq_system_info_malloc(ALSA_0.9) [ALSA] 834 snd_seq_system_info_sizeof(ALSA_0.9) [ALSA] 835 __________________________________________________________ 836 837 6.1.8. ALSA Mixer Interface 838 __________________________________________________________ 839 840 6.1.8.1. Interfaces for ALSA Mixer Interface 841 842 An LSB conforming implementation shall provide the generic 843 functions for ALSA Mixer Interface specified in Table 6-10, 844 with the full mandatory functionality as described in the 845 referenced underlying specification. 846 847 Table 6-10. libasound - ALSA Mixer Interface Function 848 Interfaces 849 snd_mixer_attach(ALSA_0.9) [ALSA] snd_mixer_close(ALSA_0.9) 850 [ALSA] snd_mixer_detach(ALSA_0.9) [ALSA] 851 snd_mixer_elem_get_callback_private(ALSA_0.9) [ALSA] 852 snd_mixer_elem_get_type(ALSA_0.9) [ALSA] 853 snd_mixer_elem_next(ALSA_0.9) [ALSA] 854 snd_mixer_elem_prev(ALSA_0.9) [ALSA] 855 snd_mixer_elem_set_callback(ALSA_0.9) [ALSA] 856 snd_mixer_elem_set_callback_private(ALSA_0.9) [ALSA] 857 snd_mixer_first_elem(ALSA_0.9) [ALSA] snd_mixer_free(ALSA_0.9) 858 [ALSA] snd_mixer_get_callback_private(ALSA_0.9) [ALSA] 859 snd_mixer_get_count(ALSA_0.9) [ALSA] 860 snd_mixer_handle_events(ALSA_0.9) [ALSA] 861 snd_mixer_last_elem(ALSA_0.9) [ALSA] 862 snd_mixer_load(ALSA_0.9) [ALSA] snd_mixer_open(ALSA_0.9) [ALSA] 863 snd_mixer_poll_descriptors(ALSA_0.9) [ALSA] 864 snd_mixer_poll_descriptors_count(ALSA_0.9) [ALSA] 865 snd_mixer_poll_descriptors_revents(ALSA_0.9) [ALSA] 866 snd_mixer_set_callback(ALSA_0.9) [ALSA] 867 snd_mixer_set_callback_private(ALSA_0.9) [ALSA] 868 snd_mixer_wait(ALSA_0.9) [ALSA] snd_pcm_type_name(ALSA_0.9.0) 869 [ALSA] 870 __________________________________________________________ 871 872 6.1.9. ALSA Output Interface 873 __________________________________________________________ 874 875 6.1.9.1. Interfaces for ALSA Output Interface 876 877 An LSB conforming implementation shall provide the generic 878 functions for ALSA Output Interface specified in Table 6-11, 879 with the full mandatory functionality as described in the 880 referenced underlying specification. 881 882 Table 6-11. libasound - ALSA Output Interface Function 883 Interfaces 884 snd_output_buffer_open(ALSA_0.9) [ALSA] 885 snd_output_buffer_string(ALSA_0.9) [ALSA] 886 snd_output_close(ALSA_0.9) [ALSA] 887 snd_output_putc(ALSA_0.9) [ALSA] snd_output_puts(ALSA_0.9) 888 [ALSA] snd_output_stdio_attach(ALSA_0.9) [ALSA] 889 snd_output_stdio_open(ALSA_0.9) [ALSA] 890 __________________________________________________________ 891 892 6.1.10. ALSA PCM Interface - General Functions 893 __________________________________________________________ 894 895 6.1.10.1. Interfaces for ALSA PCM Interface - General Functions 896 897 An LSB conforming implementation shall provide the generic 898 functions for ALSA PCM Interface - General Functions specified 899 in Table 6-12, with the full mandatory functionality as 900 described in the referenced underlying specification. 901 902 Table 6-12. libasound - ALSA PCM Interface - General Functions 903 Function Interfaces 904 snd_async_add_pcm_handler(ALSA_0.9) [ALSA] 905 snd_async_handler_get_pcm(ALSA_0.9) [ALSA] 906 snd_pcm_avail_update(ALSA_0.9) [ALSA] 907 snd_pcm_close(ALSA_0.9) [ALSA] snd_pcm_delay(ALSA_0.9) [ALSA] 908 snd_pcm_drain(ALSA_0.9) [ALSA] 909 snd_pcm_drop(ALSA_0.9) [ALSA] snd_pcm_forward(ALSA_0.9.0rc8) 910 [ALSA] snd_pcm_hw_free(ALSA_0.9) [ALSA] 911 snd_pcm_hw_params(ALSA_0.9) [ALSA] 912 snd_pcm_hw_params_current(ALSA_0.9) [ALSA] 913 snd_pcm_hwsync(ALSA_0.9) [ALSA] 914 snd_pcm_info(ALSA_0.9) [ALSA] snd_pcm_link(ALSA_0.9) [ALSA] 915 snd_pcm_name(ALSA_0.9) [ALSA] 916 snd_pcm_nonblock(ALSA_0.9) [ALSA] snd_pcm_open(ALSA_0.9) [ALSA] 917 snd_pcm_open_lconf(ALSA_0.9) [ALSA] 918 snd_pcm_pause(ALSA_0.9) [ALSA] 919 snd_pcm_poll_descriptors(ALSA_0.9) [ALSA] 920 snd_pcm_poll_descriptors_count(ALSA_0.9) [ALSA] 921 snd_pcm_poll_descriptors_revents(ALSA_0.9) [ALSA] 922 snd_pcm_prepare(ALSA_0.9) [ALSA] snd_pcm_readi(ALSA_0.9) [ALSA] 923 snd_pcm_readn(ALSA_0.9) [ALSA] snd_pcm_recover(ALSA_0.9) [ALSA] 924 snd_pcm_reset(ALSA_0.9) [ALSA] 925 snd_pcm_resume(ALSA_0.9) [ALSA] snd_pcm_rewind(ALSA_0.9) [ALSA] 926 snd_pcm_start(ALSA_0.9) [ALSA] 927 snd_pcm_state(ALSA_0.9) [ALSA] snd_pcm_status(ALSA_0.9) [ALSA] 928 snd_pcm_stream(ALSA_0.9) [ALSA] 929 snd_pcm_sw_params(ALSA_0.9) [ALSA] 930 snd_pcm_sw_params_current(ALSA_0.9) [ALSA] 931 snd_pcm_type(ALSA_0.9) [ALSA] 932 snd_pcm_unlink(ALSA_0.9) [ALSA] snd_pcm_wait(ALSA_0.9) [ALSA] 933 snd_pcm_writei(ALSA_0.9) [ALSA] 934 snd_pcm_writen(ALSA_0.9) [ALSA] 935 __________________________________________________________ 936 937 6.1.11. ALSA PCM Interface - Access Mask Functions 938 __________________________________________________________ 939 940 6.1.11.1. Interfaces for ALSA PCM Interface - Access Mask Functions 941 942 An LSB conforming implementation shall provide the generic 943 functions for ALSA PCM Interface - Access Mask Functions 944 specified in Table 6-13, with the full mandatory functionality 945 as described in the referenced underlying specification. 946 947 Table 6-13. libasound - ALSA PCM Interface - Access Mask 948 Functions Function Interfaces 949 snd_pcm_access_mask_any(ALSA_0.9) [ALSA] 950 snd_pcm_access_mask_copy(ALSA_0.9) [ALSA] 951 snd_pcm_access_mask_free(ALSA_0.9) [ALSA] 952 snd_pcm_access_mask_malloc(ALSA_0.9) [ALSA] 953 snd_pcm_access_mask_none(ALSA_0.9) [ALSA] 954 snd_pcm_access_mask_set(ALSA_0.9) [ALSA] 955 snd_pcm_access_mask_sizeof(ALSA_0.9) [ALSA] 956 snd_pcm_access_mask_test(ALSA_0.9) [ALSA] 957 __________________________________________________________ 958 959 6.1.12. ALSA PCM Interface - Debug Functions 960 __________________________________________________________ 961 962 6.1.12.1. Interfaces for ALSA PCM Interface - Debug Functions 963 964 An LSB conforming implementation shall provide the generic 965 functions for ALSA PCM Interface - Debug Functions specified in 966 Table 6-14, with the full mandatory functionality as described 967 in the referenced underlying specification. 968 969 Table 6-14. libasound - ALSA PCM Interface - Debug Functions 970 Function Interfaces 971 snd_pcm_dump(ALSA_0.9) [ALSA] snd_pcm_hw_params_dump(ALSA_0.9) 972 [ALSA] snd_pcm_status_dump(ALSA_0.9) [ALSA] 973 snd_pcm_sw_params_dump(ALSA_0.9) [ALSA] 974 __________________________________________________________ 975 976 6.1.13. ALSA PCM Interface - Description Functions 977 __________________________________________________________ 978 979 6.1.13.1. Interfaces for ALSA PCM Interface - Description Functions 980 981 An LSB conforming implementation shall provide the generic 982 functions for ALSA PCM Interface - Description Functions 983 specified in Table 6-15, with the full mandatory functionality 984 as described in the referenced underlying specification. 985 986 Table 6-15. libasound - ALSA PCM Interface - Description 987 Functions Function Interfaces 988 snd_pcm_access_name(ALSA_0.9) [ALSA] 989 snd_pcm_format_description(ALSA_0.9) [ALSA] 990 snd_pcm_format_name(ALSA_0.9) [ALSA] 991 snd_pcm_format_value(ALSA_0.9) [ALSA] 992 snd_pcm_state_name(ALSA_0.9) [ALSA] 993 snd_pcm_stream_name(ALSA_0.9) [ALSA] 994 __________________________________________________________ 995 996 6.1.14. ALSA PCM Interface - Direct Access (MMAP) Functions 997 __________________________________________________________ 998 999 6.1.14.1. Interfaces for ALSA PCM Interface - Direct Access (MMAP) Functions 1000 1001 An LSB conforming implementation shall provide the generic 1002 functions for ALSA PCM Interface - Direct Access (MMAP) 1003 Functions specified in Table 6-16, with the full mandatory 1004 functionality as described in the referenced underlying 1005 specification. 1006 1007 Table 6-16. libasound - ALSA PCM Interface - Direct Access 1008 (MMAP) Functions Function Interfaces 1009 snd_pcm_mmap_begin(ALSA_0.9) [ALSA] 1010 snd_pcm_mmap_commit(ALSA_0.9) [ALSA] 1011 snd_pcm_mmap_readi(ALSA_0.9) [ALSA] 1012 snd_pcm_mmap_readn(ALSA_0.9) [ALSA] 1013 snd_pcm_mmap_writei(ALSA_0.9) [ALSA] 1014 snd_pcm_mmap_writen(ALSA_0.9) [ALSA] 1015 __________________________________________________________ 1016 1017 6.1.15. ALSA PCM Interface - Format Mask Functions 1018 __________________________________________________________ 1019 1020 6.1.15.1. Interfaces for ALSA PCM Interface - Format Mask Functions 1021 1022 An LSB conforming implementation shall provide the generic 1023 functions for ALSA PCM Interface - Format Mask Functions 1024 specified in Table 6-17, with the full mandatory functionality 1025 as described in the referenced underlying specification. 1026 1027 Table 6-17. libasound - ALSA PCM Interface - Format Mask 1028 Functions Function Interfaces 1029 snd_pcm_format_mask_any(ALSA_0.9) [ALSA] 1030 snd_pcm_format_mask_copy(ALSA_0.9) [ALSA] 1031 snd_pcm_format_mask_free(ALSA_0.9) [ALSA] 1032 snd_pcm_format_mask_malloc(ALSA_0.9) [ALSA] 1033 snd_pcm_format_mask_none(ALSA_0.9) [ALSA] 1034 snd_pcm_format_mask_set(ALSA_0.9) [ALSA] 1035 snd_pcm_format_mask_sizeof(ALSA_0.9) [ALSA] 1036 snd_pcm_format_mask_test(ALSA_0.9) [ALSA] 1037 __________________________________________________________ 1038 1039 6.1.16. ALSA PCM Interface - Hardware Parameters 1040 __________________________________________________________ 1041 1042 6.1.16.1. Interfaces for ALSA PCM Interface - Hardware Parameters 1043 1044 An LSB conforming implementation shall provide the generic 1045 functions for ALSA PCM Interface - Hardware Parameters 1046 specified in Table 6-18, with the full mandatory functionality 1047 as described in the referenced underlying specification. 1048 1049 Table 6-18. libasound - ALSA PCM Interface - Hardware 1050 Parameters Function Interfaces 1051 snd_pcm_hw_params_any(ALSA_0.9) [ALSA] 1052 snd_pcm_hw_params_can_mmap_sample_resolution(ALSA_0.9) [ALSA] 1053 snd_pcm_hw_params_can_pause(ALSA_0.9) [ALSA] 1054 snd_pcm_hw_params_can_resume(ALSA_0.9) [ALSA] 1055 snd_pcm_hw_params_can_sync_start(ALSA_0.9) [ALSA] 1056 snd_pcm_hw_params_copy(ALSA_0.9) [ALSA] 1057 snd_pcm_hw_params_free(ALSA_0.9) [ALSA] 1058 snd_pcm_hw_params_get_access(ALSA_0.9.0rc4) [ALSA] 1059 snd_pcm_hw_params_get_access_mask(ALSA_0.9) [ALSA] 1060 snd_pcm_hw_params_get_buffer_size(ALSA_0.9.0rc4) [ALSA] 1061 snd_pcm_hw_params_get_buffer_size_max(ALSA_0.9.0rc4) [ALSA] 1062 snd_pcm_hw_params_get_buffer_size_min(ALSA_0.9.0rc4) [ALSA] 1063 snd_pcm_hw_params_get_buffer_time(ALSA_0.9.0rc4) [ALSA] 1064 snd_pcm_hw_params_get_buffer_time_max(ALSA_0.9.0rc4) [ALSA] 1065 snd_pcm_hw_params_get_buffer_time_min(ALSA_0.9.0rc4) [ALSA] 1066 snd_pcm_hw_params_get_channels(ALSA_0.9.0rc4) [ALSA] 1067 snd_pcm_hw_params_get_channels_max(ALSA_0.9.0rc4) [ALSA] 1068 snd_pcm_hw_params_get_channels_min(ALSA_0.9.0rc4) [ALSA] 1069 snd_pcm_hw_params_get_format(ALSA_0.9.0rc4) [ALSA] 1070 snd_pcm_hw_params_get_format_mask(ALSA_0.9) [ALSA] 1071 snd_pcm_hw_params_get_period_size(ALSA_0.9.0rc4) [ALSA] 1072 snd_pcm_hw_params_get_period_size_max(ALSA_0.9.0rc4) [ALSA] 1073 snd_pcm_hw_params_get_period_size_min(ALSA_0.9.0rc4) [ALSA] 1074 snd_pcm_hw_params_get_period_time(ALSA_0.9.0rc4) [ALSA] 1075 snd_pcm_hw_params_get_period_time_max(ALSA_0.9.0rc4) [ALSA] 1076 snd_pcm_hw_params_get_period_time_min(ALSA_0.9.0rc4) [ALSA] 1077 snd_pcm_hw_params_get_periods(ALSA_0.9.0rc4) [ALSA] 1078 snd_pcm_hw_params_get_periods_max(ALSA_0.9.0rc4) [ALSA] 1079 snd_pcm_hw_params_get_periods_min(ALSA_0.9.0rc4) [ALSA] 1080 snd_pcm_hw_params_get_rate(ALSA_0.9.0rc4) [ALSA] 1081 snd_pcm_hw_params_get_rate_max(ALSA_0.9.0rc4) [ALSA] 1082 snd_pcm_hw_params_get_rate_min(ALSA_0.9.0rc4) [ALSA] 1083 snd_pcm_hw_params_get_rate_numden(ALSA_0.9) [ALSA] 1084 snd_pcm_hw_params_get_rate_resample(ALSA_0.9) [ALSA] 1085 snd_pcm_hw_params_get_sbits(ALSA_0.9) [ALSA] 1086 snd_pcm_hw_params_is_double(ALSA_0.9) [ALSA] 1087 snd_pcm_hw_params_is_half_duplex(ALSA_0.9) [ALSA] 1088 snd_pcm_hw_params_is_joint_duplex(ALSA_0.9) [ALSA] 1089 snd_pcm_hw_params_malloc(ALSA_0.9) [ALSA] 1090 snd_pcm_hw_params_set_access(ALSA_0.9) [ALSA] 1091 snd_pcm_hw_params_set_access_mask(ALSA_0.9) [ALSA] 1092 snd_pcm_hw_params_set_buffer_size(ALSA_0.9) [ALSA] 1093 snd_pcm_hw_params_set_buffer_size_near(ALSA_0.9.0rc4) [ALSA] 1094 snd_pcm_hw_params_set_buffer_time(ALSA_0.9) [ALSA] 1095 snd_pcm_hw_params_set_buffer_time_near(ALSA_0.9.0rc4) [ALSA] 1096 snd_pcm_hw_params_set_channels(ALSA_0.9) [ALSA] 1097 snd_pcm_hw_params_set_channels_near(ALSA_0.9.0rc4) [ALSA] 1098 snd_pcm_hw_params_set_format(ALSA_0.9) [ALSA] 1099 snd_pcm_hw_params_set_format_mask(ALSA_0.9) [ALSA] 1100 snd_pcm_hw_params_set_period_size(ALSA_0.9) [ALSA] 1101 snd_pcm_hw_params_set_period_size_near(ALSA_0.9.0rc4) [ALSA] 1102 snd_pcm_hw_params_set_period_time(ALSA_0.9) [ALSA] 1103 snd_pcm_hw_params_set_period_time_near(ALSA_0.9.0rc4) [ALSA] 1104 snd_pcm_hw_params_set_periods(ALSA_0.9) [ALSA] 1105 snd_pcm_hw_params_set_periods_integer(ALSA_0.9) [ALSA] 1106 snd_pcm_hw_params_set_periods_near(ALSA_0.9.0rc4) [ALSA] 1107 snd_pcm_hw_params_set_rate(ALSA_0.9) [ALSA] 1108 snd_pcm_hw_params_set_rate_near(ALSA_0.9.0rc4) [ALSA] 1109 snd_pcm_hw_params_set_rate_resample(ALSA_0.9) [ALSA] 1110 snd_pcm_hw_params_sizeof(ALSA_0.9) [ALSA] 1111 snd_pcm_hw_params_test_access(ALSA_0.9) [ALSA] 1112 snd_pcm_hw_params_test_buffer_size(ALSA_0.9) [ALSA] 1113 snd_pcm_hw_params_test_buffer_time(ALSA_0.9) [ALSA] 1114 snd_pcm_hw_params_test_channels(ALSA_0.9) [ALSA] 1115 snd_pcm_hw_params_test_format(ALSA_0.9) [ALSA] 1116 snd_pcm_hw_params_test_period_size(ALSA_0.9) [ALSA] 1117 snd_pcm_hw_params_test_period_time(ALSA_0.9) [ALSA] 1118 snd_pcm_hw_params_test_periods(ALSA_0.9) [ALSA] 1119 snd_pcm_hw_params_test_rate(ALSA_0.9) [ALSA] 1120 __________________________________________________________ 1121 1122 6.1.17. ALSA PCM Interface - Helper Functions 1123 __________________________________________________________ 1124 1125 6.1.17.1. Interfaces for ALSA PCM Interface - Helper Functions 1126 1127 An LSB conforming implementation shall provide the generic 1128 functions for ALSA PCM Interface - Helper Functions specified 1129 in Table 6-19, with the full mandatory functionality as 1130 described in the referenced underlying specification. 1131 1132 Table 6-19. libasound - ALSA PCM Interface - Helper Functions 1133 Function Interfaces 1134 snd_pcm_area_copy(ALSA_0.9) [ALSA] 1135 snd_pcm_area_silence(ALSA_0.9) [ALSA] 1136 snd_pcm_areas_copy(ALSA_0.9) [ALSA] 1137 snd_pcm_areas_silence(ALSA_0.9) [ALSA] 1138 snd_pcm_build_linear_format(ALSA_0.9) [ALSA] 1139 snd_pcm_bytes_to_frames(ALSA_0.9) [ALSA] 1140 snd_pcm_bytes_to_samples(ALSA_0.9) [ALSA] 1141 snd_pcm_format_big_endian(ALSA_0.9) [ALSA] 1142 snd_pcm_format_cpu_endian(ALSA_0.9) [ALSA] 1143 snd_pcm_format_float(ALSA_0.9) [ALSA] 1144 snd_pcm_format_linear(ALSA_0.9) [ALSA] 1145 snd_pcm_format_little_endian(ALSA_0.9) [ALSA] 1146 snd_pcm_format_physical_width(ALSA_0.9) [ALSA] 1147 snd_pcm_format_set_silence(ALSA_0.9) [ALSA] 1148 snd_pcm_format_signed(ALSA_0.9) [ALSA] 1149 snd_pcm_format_size(ALSA_0.9) [ALSA] 1150 snd_pcm_format_unsigned(ALSA_0.9) [ALSA] 1151 snd_pcm_format_width(ALSA_0.9) [ALSA] 1152 snd_pcm_frames_to_bytes(ALSA_0.9) [ALSA] 1153 snd_pcm_samples_to_bytes(ALSA_0.9) [ALSA] 1154 __________________________________________________________ 1155 1156 6.1.18. ALSA PCM Interface - Software Parameters 1157 __________________________________________________________ 1158 1159 6.1.18.1. Interfaces for ALSA PCM Interface - Software Parameters 1160 1161 An LSB conforming implementation shall provide the generic 1162 functions for ALSA PCM Interface - Software Parameters 1163 specified in Table 6-20, with the full mandatory functionality 1164 as described in the referenced underlying specification. 1165 1166 Table 6-20. libasound - ALSA PCM Interface - Software 1167 Parameters Function Interfaces 1168 snd_pcm_sw_params_copy(ALSA_0.9) [ALSA] 1169 snd_pcm_sw_params_free(ALSA_0.9) [ALSA] 1170 snd_pcm_sw_params_get_avail_min(ALSA_0.9.0rc4) [ALSA] 1171 snd_pcm_sw_params_get_boundary(ALSA_0.9) [ALSA] 1172 snd_pcm_sw_params_get_silence_size(ALSA_0.9.0rc4) [ALSA] 1173 snd_pcm_sw_params_get_silence_threshold(ALSA_0.9.0rc4) [ALSA] 1174 snd_pcm_sw_params_get_start_threshold(ALSA_0.9.0rc4) [ALSA] 1175 snd_pcm_sw_params_get_stop_threshold(ALSA_0.9.0rc4) [ALSA] 1176 snd_pcm_sw_params_get_tstamp_mode(ALSA_0.9.0rc4) [ALSA] 1177 snd_pcm_sw_params_malloc(ALSA_0.9) [ALSA] 1178 snd_pcm_sw_params_set_avail_min(ALSA_0.9) [ALSA] 1179 snd_pcm_sw_params_set_silence_size(ALSA_0.9) [ALSA] 1180 snd_pcm_sw_params_set_silence_threshold(ALSA_0.9) [ALSA] 1181 snd_pcm_sw_params_set_start_threshold(ALSA_0.9) [ALSA] 1182 snd_pcm_sw_params_set_stop_threshold(ALSA_0.9) [ALSA] 1183 snd_pcm_sw_params_set_tstamp_mode(ALSA_0.9) [ALSA] 1184 snd_pcm_sw_params_set_xfer_align(ALSA_0.9) [ALSA] 1185 snd_pcm_sw_params_sizeof(ALSA_0.9) [ALSA] 1186 __________________________________________________________ 1187 1188 6.1.19. ALSA PCM Interface - Status Functions 1189 __________________________________________________________ 1190 1191 6.1.19.1. Interfaces for ALSA PCM Interface - Status Functions 1192 1193 An LSB conforming implementation shall provide the generic 1194 functions for ALSA PCM Interface - Status Functions specified 1195 in Table 6-21, with the full mandatory functionality as 1196 described in the referenced underlying specification. 1197 1198 Table 6-21. libasound - ALSA PCM Interface - Status Functions 1199 Function Interfaces 1200 snd_pcm_status_copy(ALSA_0.9) [ALSA] 1201 snd_pcm_status_free(ALSA_0.9) [ALSA] 1202 snd_pcm_status_get_avail(ALSA_0.9) [ALSA] 1203 snd_pcm_status_get_avail_max(ALSA_0.9) [ALSA] 1204 snd_pcm_status_get_delay(ALSA_0.9) [ALSA] 1205 snd_pcm_status_get_state(ALSA_0.9) [ALSA] 1206 snd_pcm_status_get_trigger_tstamp(ALSA_0.9) [ALSA] 1207 snd_pcm_status_get_tstamp(ALSA_0.9) [ALSA] 1208 snd_pcm_status_malloc(ALSA_0.9) [ALSA] 1209 snd_pcm_status_sizeof(ALSA_0.9) [ALSA] 1210 __________________________________________________________ 1211 1212 6.1.20. ALSA PCM Interface - Stream Information 1213 __________________________________________________________ 1214 1215 6.1.20.1. Interfaces for ALSA PCM Interface - Stream Information 1216 1217 An LSB conforming implementation shall provide the generic 1218 functions for ALSA PCM Interface - Stream Information specified 1219 in Table 6-22, with the full mandatory functionality as 1220 described in the referenced underlying specification. 1221 1222 Table 6-22. libasound - ALSA PCM Interface - Stream Information 1223 Function Interfaces 1224 snd_pcm_info_copy(ALSA_0.9) [ALSA] snd_pcm_info_free(ALSA_0.9) 1225 [ALSA] snd_pcm_info_get_card(ALSA_0.9) [ALSA] 1226 snd_pcm_info_get_class(ALSA_0.9) [ALSA] 1227 snd_pcm_info_get_device(ALSA_0.9) [ALSA] 1228 snd_pcm_info_get_id(ALSA_0.9) [ALSA] 1229 snd_pcm_info_get_name(ALSA_0.9) [ALSA] 1230 snd_pcm_info_get_stream(ALSA_0.9) [ALSA] 1231 snd_pcm_info_get_subdevice(ALSA_0.9) [ALSA] 1232 snd_pcm_info_get_subdevice_name(ALSA_0.9) [ALSA] 1233 snd_pcm_info_get_subdevices_avail(ALSA_0.9) [ALSA] 1234 snd_pcm_info_get_subdevices_count(ALSA_0.9) [ALSA] 1235 snd_pcm_info_malloc(ALSA_0.9) [ALSA] 1236 snd_pcm_info_set_device(ALSA_0.9) [ALSA] 1237 snd_pcm_info_set_stream(ALSA_0.9) [ALSA] 1238 snd_pcm_info_set_subdevice(ALSA_0.9) [ALSA] 1239 snd_pcm_info_sizeof(ALSA_0.9) [ALSA] 1240 __________________________________________________________ 1241 1242 6.1.21. ALSA Sequencer Event Type Checks 1243 __________________________________________________________ 1244 1245 6.1.21.1. Interfaces for ALSA Sequencer Event Type Checks 1246 1247 No external functions are defined for libasound - ALSA 1248 Sequencer Event Type Checks in this part of the specification. 1249 See also the relevant architecture specific part of this 1250 specification. 1251 1252 An LSB conforming implementation shall provide the generic data 1253 interfaces for ALSA Sequencer Event Type Checks specified in 1254 Table 6-23, with the full mandatory functionality as described 1255 in the referenced underlying specification. 1256 1257 Table 6-23. libasound - ALSA Sequencer Event Type Checks Data 1258 Interfaces 1259 snd_seq_event_types(ALSA_0.9) [ALSA] 1260 __________________________________________________________ 1261 1262 6.1.22. ALSA Error Handling 1263 __________________________________________________________ 1264 1265 6.1.22.1. Interfaces for ALSA Error Handling 1266 1267 An LSB conforming implementation shall provide the generic 1268 functions for ALSA Error Handling specified in Table 6-24, with 1269 the full mandatory functionality as described in the referenced 1270 underlying specification. 1271 1272 Table 6-24. libasound - ALSA Error Handling Function Interfaces 1273 snd_lib_error_set_handler(ALSA_0.9) [ALSA] 1274 snd_strerror(ALSA_0.9) [ALSA] 1275 __________________________________________________________ 1276 1277 6.1.23. ALSA RawMidi Interface 1278 __________________________________________________________ 1279 1280 6.1.23.1. Interfaces for ALSA RawMidi Interface 1281 1282 An LSB conforming implementation shall provide the generic 1283 functions for ALSA RawMidi Interface specified in Table 6-25, 1284 with the full mandatory functionality as described in the 1285 referenced underlying specification. 1286 1287 Table 6-25. libasound - ALSA RawMidi Interface Function 1288 Interfaces 1289 snd_rawmidi_close(ALSA_0.9) [ALSA] snd_rawmidi_drain(ALSA_0.9) 1290 [ALSA] snd_rawmidi_drop(ALSA_0.9) [ALSA] 1291 snd_rawmidi_info_free(ALSA_0.9) [ALSA] 1292 snd_rawmidi_info_get_id(ALSA_0.9) [ALSA] 1293 snd_rawmidi_info_get_name(ALSA_0.9) [ALSA] 1294 snd_rawmidi_info_get_subdevice_name(ALSA_0.9) [ALSA] 1295 snd_rawmidi_info_get_subdevices_count(ALSA_0.9) [ALSA] 1296 snd_rawmidi_info_malloc(ALSA_0.9) [ALSA] 1297 snd_rawmidi_info_set_device(ALSA_0.9) [ALSA] 1298 snd_rawmidi_info_set_stream(ALSA_0.9) [ALSA] 1299 snd_rawmidi_info_set_subdevice(ALSA_0.9) [ALSA] 1300 snd_rawmidi_info_sizeof(ALSA_0.9) [ALSA] 1301 snd_rawmidi_nonblock(ALSA_0.9) [ALSA] 1302 snd_rawmidi_open(ALSA_0.9) [ALSA] 1303 snd_rawmidi_poll_descriptors(ALSA_0.9) [ALSA] 1304 snd_rawmidi_poll_descriptors_count(ALSA_0.9) [ALSA] 1305 snd_rawmidi_poll_descriptors_revents(ALSA_0.9) [ALSA] 1306 snd_rawmidi_read(ALSA_0.9) [ALSA] snd_rawmidi_write(ALSA_0.9) 1307 [ALSA] 1308 __________________________________________________________ 1309 1310 6.1.24. ALSA Sequencer Client Interface 1311 __________________________________________________________ 1312 1313 6.1.24.1. Interfaces for ALSA Sequencer Client Interface 1314 1315 An LSB conforming implementation shall provide the generic 1316 functions for ALSA Sequencer Client Interface specified in 1317 Table 6-26, with the full mandatory functionality as described 1318 in the referenced underlying specification. 1319 1320 Table 6-26. libasound - ALSA Sequencer Client Interface 1321 Function Interfaces 1322 snd_seq_client_info_copy(ALSA_0.9) [ALSA] 1323 snd_seq_client_info_free(ALSA_0.9) [ALSA] 1324 snd_seq_client_info_get_client(ALSA_0.9) [ALSA] 1325 snd_seq_client_info_get_name(ALSA_0.9) [ALSA] 1326 snd_seq_client_info_get_num_ports(ALSA_0.9) [ALSA] 1327 snd_seq_client_info_get_type(ALSA_0.9) [ALSA] 1328 snd_seq_client_info_malloc(ALSA_0.9) [ALSA] 1329 snd_seq_client_info_set_client(ALSA_0.9) [ALSA] 1330 snd_seq_client_info_set_name(ALSA_0.9) [ALSA] 1331 snd_seq_client_info_sizeof(ALSA_0.9) [ALSA] 1332 snd_seq_get_any_client_info(ALSA_0.9) [ALSA] 1333 snd_seq_get_client_info(ALSA_0.9) [ALSA] 1334 snd_seq_query_next_client(ALSA_0.9) [ALSA] 1335 snd_seq_set_client_info(ALSA_0.9) [ALSA] 1336 __________________________________________________________ 1337 1338 6.1.25. ALSA Sequencer Event API 1339 __________________________________________________________ 1340 1341 6.1.25.1. Interfaces for ALSA Sequencer Event API 1342 1343 An LSB conforming implementation shall provide the generic 1344 functions for ALSA Sequencer Event API specified in Table 6-27, 1345 with the full mandatory functionality as described in the 1346 referenced underlying specification. 1347 1348 Table 6-27. libasound - ALSA Sequencer Event API Function 1349 Interfaces 1350 snd_seq_drain_output(ALSA_0.9) [ALSA] 1351 snd_seq_drop_output(ALSA_0.9) [ALSA] 1352 snd_seq_drop_output_buffer(ALSA_0.9) [ALSA] 1353 snd_seq_event_input(ALSA_0.9) [ALSA] 1354 snd_seq_event_input_pending(ALSA_0.9) [ALSA] 1355 snd_seq_event_length(ALSA_0.9) [ALSA] 1356 snd_seq_event_output(ALSA_0.9) [ALSA] 1357 snd_seq_event_output_direct(ALSA_0.9) [ALSA] 1358 snd_seq_free_event(ALSA_0.9) [ALSA] 1359 __________________________________________________________ 1360 1361 6.1.26. ALSA Sequencer Middle Level Interface 1362 __________________________________________________________ 1363 1364 6.1.26.1. Interfaces for ALSA Sequencer Middle Level Interface 1365 1366 An LSB conforming implementation shall provide the generic 1367 functions for ALSA Sequencer Middle Level Interface specified 1368 in Table 6-28, with the full mandatory functionality as 1369 described in the referenced underlying specification. 1370 1371 Table 6-28. libasound - ALSA Sequencer Middle Level Interface 1372 Function Interfaces 1373 snd_seq_connect_from(ALSA_0.9) [ALSA] 1374 snd_seq_connect_to(ALSA_0.9) [ALSA] 1375 snd_seq_control_queue(ALSA_0.9) [ALSA] 1376 snd_seq_create_simple_port(ALSA_0.9) [ALSA] 1377 snd_seq_delete_simple_port(ALSA_0.9) [ALSA] 1378 snd_seq_disconnect_from(ALSA_0.9) [ALSA] 1379 snd_seq_disconnect_to(ALSA_0.9) [ALSA] 1380 snd_seq_parse_address(ALSA_0.9) [ALSA] 1381 snd_seq_set_client_name(ALSA_0.9) [ALSA] 1382 snd_seq_sync_output_queue(ALSA_0.9) [ALSA] 1383 __________________________________________________________ 1384 1385 6.1.27. ALSA Sequencer Port Interface 1386 __________________________________________________________ 1387 1388 6.1.27.1. Interfaces for ALSA Sequencer Port Interface 1389 1390 An LSB conforming implementation shall provide the generic 1391 functions for ALSA Sequencer Port Interface specified in Table 1392 6-29, with the full mandatory functionality as described in the 1393 referenced underlying specification. 1394 1395 Table 6-29. libasound - ALSA Sequencer Port Interface Function 1396 Interfaces 1397 snd_seq_create_port(ALSA_0.9) [ALSA] 1398 snd_seq_delete_port(ALSA_0.9) [ALSA] 1399 snd_seq_get_any_port_info(ALSA_0.9) [ALSA] 1400 snd_seq_get_port_info(ALSA_0.9) [ALSA] 1401 snd_seq_port_info_copy(ALSA_0.9) [ALSA] 1402 snd_seq_port_info_free(ALSA_0.9) [ALSA] 1403 snd_seq_port_info_get_addr(ALSA_0.9) [ALSA] 1404 snd_seq_port_info_get_capability(ALSA_0.9) [ALSA] 1405 snd_seq_port_info_get_client(ALSA_0.9) [ALSA] 1406 snd_seq_port_info_get_name(ALSA_0.9) [ALSA] 1407 snd_seq_port_info_get_port(ALSA_0.9) [ALSA] 1408 snd_seq_port_info_get_type(ALSA_0.9) [ALSA] 1409 snd_seq_port_info_malloc(ALSA_0.9) [ALSA] 1410 snd_seq_port_info_set_capability(ALSA_0.9) [ALSA] 1411 snd_seq_port_info_set_client(ALSA_0.9) [ALSA] 1412 snd_seq_port_info_set_midi_channels(ALSA_0.9) [ALSA] 1413 snd_seq_port_info_set_name(ALSA_0.9) [ALSA] 1414 snd_seq_port_info_set_port(ALSA_0.9) [ALSA] 1415 snd_seq_port_info_set_port_specified(ALSA_0.9) [ALSA] 1416 snd_seq_port_info_set_timestamp_queue(ALSA_0.9) [ALSA] 1417 snd_seq_port_info_set_timestamp_real(ALSA_0.9) [ALSA] 1418 snd_seq_port_info_set_timestamping(ALSA_0.9) [ALSA] 1419 snd_seq_port_info_set_type(ALSA_0.9) [ALSA] 1420 snd_seq_port_info_sizeof(ALSA_0.9) [ALSA] 1421 snd_seq_query_next_port(ALSA_0.9) [ALSA] 1422 snd_seq_set_port_info(ALSA_0.9) [ALSA] 1423 __________________________________________________________ 1424 1425 6.1.28. ALSA Sequencer Port Subscription 1426 __________________________________________________________ 1427 1428 6.1.28.1. Interfaces for ALSA Sequencer Port Subscription 1429 1430 An LSB conforming implementation shall provide the generic 1431 functions for ALSA Sequencer Port Subscription specified in 1432 Table 6-30, with the full mandatory functionality as described 1433 in the referenced underlying specification. 1434 1435 Table 6-30. libasound - ALSA Sequencer Port Subscription 1436 Function Interfaces 1437 snd_seq_get_port_subscription(ALSA_0.9) [ALSA] 1438 snd_seq_port_subscribe_copy(ALSA_0.9) [ALSA] 1439 snd_seq_port_subscribe_free(ALSA_0.9) [ALSA] 1440 snd_seq_port_subscribe_get_dest(ALSA_0.9) [ALSA] 1441 snd_seq_port_subscribe_get_exclusive(ALSA_0.9) [ALSA] 1442 snd_seq_port_subscribe_get_queue(ALSA_0.9) [ALSA] 1443 snd_seq_port_subscribe_get_sender(ALSA_0.9) [ALSA] 1444 snd_seq_port_subscribe_get_time_real(ALSA_0.9) [ALSA] 1445 snd_seq_port_subscribe_get_time_update(ALSA_0.9) [ALSA] 1446 snd_seq_port_subscribe_malloc(ALSA_0.9) [ALSA] 1447 snd_seq_port_subscribe_set_dest(ALSA_0.9) [ALSA] 1448 snd_seq_port_subscribe_set_exclusive(ALSA_0.9) [ALSA] 1449 snd_seq_port_subscribe_set_queue(ALSA_0.9) [ALSA] 1450 snd_seq_port_subscribe_set_sender(ALSA_0.9) [ALSA] 1451 snd_seq_port_subscribe_set_time_real(ALSA_0.9) [ALSA] 1452 snd_seq_port_subscribe_set_time_update(ALSA_0.9) [ALSA] 1453 snd_seq_port_subscribe_sizeof(ALSA_0.9) [ALSA] 1454 snd_seq_query_port_subscribers(ALSA_0.9) [ALSA] 1455 snd_seq_query_subscribe_copy(ALSA_0.9) [ALSA] 1456 snd_seq_query_subscribe_free(ALSA_0.9) [ALSA] 1457 snd_seq_query_subscribe_get_addr(ALSA_0.9) [ALSA] 1458 snd_seq_query_subscribe_get_exclusive(ALSA_0.9) [ALSA] 1459 snd_seq_query_subscribe_get_index(ALSA_0.9) [ALSA] 1460 snd_seq_query_subscribe_get_queue(ALSA_0.9) [ALSA] 1461 snd_seq_query_subscribe_get_root(ALSA_0.9) [ALSA] 1462 snd_seq_query_subscribe_get_time_real(ALSA_0.9) [ALSA] 1463 snd_seq_query_subscribe_get_time_update(ALSA_0.9) [ALSA] 1464 snd_seq_query_subscribe_malloc(ALSA_0.9) [ALSA] 1465 snd_seq_query_subscribe_set_index(ALSA_0.9) [ALSA] 1466 snd_seq_query_subscribe_set_root(ALSA_0.9) [ALSA] 1467 snd_seq_query_subscribe_set_type(ALSA_0.9) [ALSA] 1468 snd_seq_query_subscribe_sizeof(ALSA_0.9) [ALSA] 1469 snd_seq_subscribe_port(ALSA_0.9) [ALSA] 1470 snd_seq_unsubscribe_port(ALSA_0.9) [ALSA] 1471 __________________________________________________________ 1472 1473 6.1.29. ALSA Sequencer Queue Interface 1474 __________________________________________________________ 1475 1476 6.1.29.1. Interfaces for ALSA Sequencer Queue Interface 1477 1478 An LSB conforming implementation shall provide the generic 1479 functions for ALSA Sequencer Queue Interface specified in Table 1480 6-31, with the full mandatory functionality as described in the 1481 referenced underlying specification. 1482 1483 Table 6-31. libasound - ALSA Sequencer Queue Interface Function 1484 Interfaces 1485 snd_seq_alloc_named_queue(ALSA_0.9) [ALSA] 1486 snd_seq_alloc_queue(ALSA_0.9) [ALSA] 1487 snd_seq_free_queue(ALSA_0.9) [ALSA] 1488 snd_seq_get_queue_status(ALSA_0.9) [ALSA] 1489 snd_seq_get_queue_tempo(ALSA_0.9) [ALSA] 1490 snd_seq_queue_status_copy(ALSA_0.9) [ALSA] 1491 snd_seq_queue_status_free(ALSA_0.9) [ALSA] 1492 snd_seq_queue_status_get_real_time(ALSA_0.9) [ALSA] 1493 snd_seq_queue_status_get_tick_time(ALSA_0.9) [ALSA] 1494 snd_seq_queue_status_malloc(ALSA_0.9) [ALSA] 1495 snd_seq_queue_status_sizeof(ALSA_0.9) [ALSA] 1496 snd_seq_queue_tempo_copy(ALSA_0.9) [ALSA] 1497 snd_seq_queue_tempo_free(ALSA_0.9) [ALSA] 1498 snd_seq_queue_tempo_get_ppq(ALSA_0.9) [ALSA] 1499 snd_seq_queue_tempo_get_tempo(ALSA_0.9) [ALSA] 1500 snd_seq_queue_tempo_malloc(ALSA_0.9) [ALSA] 1501 snd_seq_queue_tempo_set_ppq(ALSA_0.9) [ALSA] 1502 snd_seq_queue_tempo_set_tempo(ALSA_0.9) [ALSA] 1503 snd_seq_queue_tempo_sizeof(ALSA_0.9) [ALSA] 1504 snd_seq_set_queue_tempo(ALSA_0.9) [ALSA] 1505 __________________________________________________________ 1506 1507 6.1.30. ALSA Sequencer event - MIDI byte stream coder 1508 __________________________________________________________ 1509 1510 6.1.30.1. Interfaces for ALSA Sequencer event - MIDI byte stream coder 1511 1512 An LSB conforming implementation shall provide the generic 1513 functions for ALSA Sequencer event - MIDI byte stream coder 1514 specified in Table 6-32, with the full mandatory functionality 1515 as described in the referenced underlying specification. 1516 1517 Table 6-32. libasound - ALSA Sequencer event - MIDI byte stream 1518 coder Function Interfaces 1519 snd_midi_event_decode(ALSA_0.9) [ALSA] 1520 snd_midi_event_encode(ALSA_0.9) [ALSA] 1521 snd_midi_event_encode_byte(ALSA_0.9) [ALSA] 1522 snd_midi_event_free(ALSA_0.9) [ALSA] 1523 snd_midi_event_init(ALSA_0.9) [ALSA] 1524 snd_midi_event_new(ALSA_0.9) [ALSA] 1525 snd_midi_event_reset_decode(ALSA_0.9) [ALSA] 1526 snd_midi_event_reset_encode(ALSA_0.9) [ALSA] 1527 __________________________________________________________ 1528 1529 6.1.31. ALSA Simple Mixer Interface 1530 __________________________________________________________ 1531 1532 6.1.31.1. Interfaces for ALSA Simple Mixer Interface 1533 1534 An LSB conforming implementation shall provide the generic 1535 functions for ALSA Simple Mixer Interface specified in Table 1536 6-33, with the full mandatory functionality as described in the 1537 referenced underlying specification. 1538 1539 Table 6-33. libasound - ALSA Simple Mixer Interface Function 1540 Interfaces 1541 snd_mixer_find_selem(ALSA_0.9) [ALSA] 1542 snd_mixer_selem_channel_name(ALSA_0.9) [ALSA] 1543 snd_mixer_selem_get_capture_group(ALSA_0.9) [ALSA] 1544 snd_mixer_selem_get_capture_switch(ALSA_0.9) [ALSA] 1545 snd_mixer_selem_get_capture_volume(ALSA_0.9) [ALSA] 1546 snd_mixer_selem_get_capture_volume_range(ALSA_0.9) [ALSA] 1547 snd_mixer_selem_get_enum_item(ALSA_0.9) [ALSA] 1548 snd_mixer_selem_get_enum_item_name(ALSA_0.9) [ALSA] 1549 snd_mixer_selem_get_enum_items(ALSA_0.9) [ALSA] 1550 snd_mixer_selem_get_id(ALSA_0.9) [ALSA] 1551 snd_mixer_selem_get_index(ALSA_0.9) [ALSA] 1552 snd_mixer_selem_get_name(ALSA_0.9) [ALSA] 1553 snd_mixer_selem_get_playback_switch(ALSA_0.9) [ALSA] 1554 snd_mixer_selem_get_playback_volume(ALSA_0.9) [ALSA] 1555 snd_mixer_selem_get_playback_volume_range(ALSA_0.9) [ALSA] 1556 snd_mixer_selem_has_capture_channel(ALSA_0.9) [ALSA] 1557 snd_mixer_selem_has_capture_switch(ALSA_0.9) [ALSA] 1558 snd_mixer_selem_has_capture_switch_exclusive(ALSA_0.9) [ALSA] 1559 snd_mixer_selem_has_capture_switch_joined(ALSA_0.9) [ALSA] 1560 snd_mixer_selem_has_capture_volume(ALSA_0.9) [ALSA] 1561 snd_mixer_selem_has_capture_volume_joined(ALSA_0.9) [ALSA] 1562 snd_mixer_selem_has_common_switch(ALSA_0.9) [ALSA] 1563 snd_mixer_selem_has_common_volume(ALSA_0.9) [ALSA] 1564 snd_mixer_selem_has_playback_channel(ALSA_0.9) [ALSA] 1565 snd_mixer_selem_has_playback_switch(ALSA_0.9) [ALSA] 1566 snd_mixer_selem_has_playback_switch_joined(ALSA_0.9) [ALSA] 1567 snd_mixer_selem_has_playback_volume(ALSA_0.9) [ALSA] 1568 snd_mixer_selem_has_playback_volume_joined(ALSA_0.9) [ALSA] 1569 snd_mixer_selem_id_copy(ALSA_0.9) [ALSA] 1570 snd_mixer_selem_id_free(ALSA_0.9) [ALSA] 1571 snd_mixer_selem_id_get_index(ALSA_0.9) [ALSA] 1572 snd_mixer_selem_id_get_name(ALSA_0.9) [ALSA] 1573 snd_mixer_selem_id_malloc(ALSA_0.9) [ALSA] 1574 snd_mixer_selem_id_set_index(ALSA_0.9) [ALSA] 1575 snd_mixer_selem_id_set_name(ALSA_0.9) [ALSA] 1576 snd_mixer_selem_id_sizeof(ALSA_0.9) [ALSA] 1577 snd_mixer_selem_is_active(ALSA_0.9) [ALSA] 1578 snd_mixer_selem_is_capture_mono(ALSA_0.9) [ALSA] 1579 snd_mixer_selem_is_enum_capture(ALSA_0.9) [ALSA] 1580 snd_mixer_selem_is_enum_playback(ALSA_0.9) [ALSA] 1581 snd_mixer_selem_is_enumerated(ALSA_0.9) [ALSA] 1582 snd_mixer_selem_is_playback_mono(ALSA_0.9) [ALSA] 1583 snd_mixer_selem_register(ALSA_0.9) [ALSA] 1584 snd_mixer_selem_set_capture_switch(ALSA_0.9) [ALSA] 1585 snd_mixer_selem_set_capture_switch_all(ALSA_0.9) [ALSA] 1586 snd_mixer_selem_set_capture_volume(ALSA_0.9) [ALSA] 1587 snd_mixer_selem_set_capture_volume_all(ALSA_0.9) [ALSA] 1588 snd_mixer_selem_set_capture_volume_range(ALSA_0.9) [ALSA] 1589 snd_mixer_selem_set_enum_item(ALSA_0.9) [ALSA] 1590 snd_mixer_selem_set_playback_switch(ALSA_0.9) [ALSA] 1591 snd_mixer_selem_set_playback_switch_all(ALSA_0.9) [ALSA] 1592 snd_mixer_selem_set_playback_volume(ALSA_0.9) [ALSA] 1593 snd_mixer_selem_set_playback_volume_all(ALSA_0.9) [ALSA] 1594 snd_mixer_selem_set_playback_volume_range(ALSA_0.9) [ALSA] 1595 __________________________________________________________ 1596 1597 6.1.32. ALSA Timer Interface 1598 __________________________________________________________ 1599 1600 6.1.32.1. Interfaces for ALSA Timer Interface 1601 1602 An LSB conforming implementation shall provide the generic 1603 functions for ALSA Timer Interface specified in Table 6-34, 1604 with the full mandatory functionality as described in the 1605 referenced underlying specification. 1606 1607 Table 6-34. libasound - ALSA Timer Interface Function 1608 Interfaces 1609 snd_timer_close(ALSA_0.9) [ALSA] snd_timer_continue(ALSA_0.9) 1610 [ALSA] snd_timer_id_copy(ALSA_0.9) [ALSA] 1611 snd_timer_id_free(ALSA_0.9) [ALSA] 1612 snd_timer_id_get_card(ALSA_0.9) [ALSA] 1613 snd_timer_id_get_class(ALSA_0.9) [ALSA] 1614 snd_timer_id_get_device(ALSA_0.9) [ALSA] 1615 snd_timer_id_get_sclass(ALSA_0.9) [ALSA] 1616 snd_timer_id_get_subdevice(ALSA_0.9) [ALSA] 1617 snd_timer_id_malloc(ALSA_0.9) [ALSA] 1618 snd_timer_id_set_card(ALSA_0.9) [ALSA] 1619 snd_timer_id_set_class(ALSA_0.9) [ALSA] 1620 snd_timer_id_set_device(ALSA_0.9) [ALSA] 1621 snd_timer_id_set_sclass(ALSA_0.9) [ALSA] 1622 snd_timer_id_set_subdevice(ALSA_0.9) [ALSA] 1623 snd_timer_id_sizeof(ALSA_0.9) [ALSA] snd_timer_info(ALSA_0.9) 1624 [ALSA] snd_timer_info_copy(ALSA_0.9) [ALSA] 1625 snd_timer_info_free(ALSA_0.9) [ALSA] 1626 snd_timer_info_get_card(ALSA_0.9) [ALSA] 1627 snd_timer_info_get_id(ALSA_0.9) [ALSA] 1628 snd_timer_info_get_name(ALSA_0.9) [ALSA] 1629 snd_timer_info_get_resolution(ALSA_0.9) [ALSA] 1630 snd_timer_info_malloc(ALSA_0.9) [ALSA] 1631 snd_timer_info_sizeof(ALSA_0.9) [ALSA] snd_timer_open(ALSA_0.9) 1632 [ALSA] snd_timer_params(ALSA_0.9) [ALSA] 1633 snd_timer_params_get_ticks(ALSA_0.9) [ALSA] 1634 snd_timer_params_malloc(ALSA_0.9) [ALSA] 1635 snd_timer_params_set_auto_start(ALSA_0.9) [ALSA] 1636 snd_timer_params_set_ticks(ALSA_0.9) [ALSA] 1637 snd_timer_poll_descriptors(ALSA_0.9) [ALSA] 1638 snd_timer_poll_descriptors_count(ALSA_0.9) [ALSA] 1639 snd_timer_read(ALSA_0.9) [ALSA] snd_timer_start(ALSA_0.9) 1640 [ALSA] snd_timer_status(ALSA_0.9) [ALSA] 1641 snd_timer_stop(ALSA_0.9) [ALSA] 1642 __________________________________________________________ 1643 1644 6.2. Data Definitions for libasound 1645 1646 This section defines global identifiers and their values that 1647 are associated with interfaces contained in libasound. These 1648 definitions are organized into groups that correspond to system 1649 headers. This convention is used as a convenience for the 1650 reader, and does not imply the existence of these headers, or 1651 their content. Where an interface is defined as requiring a 1652 particular system header file all of the data definitions for 1653 that system header file presented here shall be in effect. 1654 1655 This section gives data definitions to promote binary 1656 application portability, not to repeat source interface 1657 definitions available elsewhere. System providers and 1658 application developers should use this ABI to supplement - not 1659 to replace - source interface definition specifications. 1660 1661 This specification uses the ISO C (1999) C Language as the 1662 reference programming language, and data definitions are 1663 specified in ISO C format. The C language is used here as a 1664 convenient notation. Using a C language description of these 1665 data objects does not preclude their use by other programming 1666 languages. 1667 __________________________________________________________ 1668 1669 6.2.1. alsa/conf.h 1670 1671 typedef struct _snd_config_iterator *snd_config_iterator_t; 1672 typedef struct _snd_config snd_config_t; 1673 typedef enum _snd_config_type { 1674 SND_CONFIG_TYPE_INTEGER, 1675 SND_CONFIG_TYPE_INTEGER64 = 1, 1676 SND_CONFIG_TYPE_REAL = 2, 1677 SND_CONFIG_TYPE_STRING = 3, 1678 SND_CONFIG_TYPE_POINTER = 4, 1679 SND_CONFIG_TYPE_COMPOUND = 1024 1680 } snd_config_type_t; 1681 typedef struct _snd_config_update snd_config_update_t; 1682 typedef struct snd_devname { 1683 char *name; 1684 char *comment; 1685 snd_devname_t *next; 1686 } snd_devname_t; 1687 extern snd_config_t *snd_config; 1688 extern int snd_config_add(snd_config_t * config, snd_config_t * leaf); 1689 extern int snd_config_copy(snd_config_t * *dst, snd_config_t * src); 1690 extern int snd_config_delete(snd_config_t * config); 1691 extern int snd_config_get_ascii(const snd_config_t * config, char **value); 1692 extern int snd_config_get_id(const snd_config_t * config, 1693 const char **value); 1694 extern int snd_config_get_integer(const snd_config_t * config, 1695 long int *value); 1696 extern int snd_config_get_integer64(const snd_config_t * config, 1697 long long int *value); 1698 extern int snd_config_get_string(const snd_config_t * config, 1699 const char **value); 1700 extern snd_config_type_t snd_config_get_type(const snd_config_t * config); 1701 extern int snd_config_imake_integer(snd_config_t * *config, 1702 const char *key, const long int value); 1703 extern int snd_config_imake_integer64(snd_config_t * *config, 1704 const char *key, 1705 const long long int value); 1706 extern int snd_config_imake_string(snd_config_t * *config, const char *key, 1707 const char *ascii); 1708 extern snd_config_iterator_t snd_config_iterator_end(const snd_config_t* 1709 node); 1710 extern snd_config_t *snd_config_iterator_entry(const snd_config_iterator_t 1711 iterator); 1712 extern snd_config_iterator_t snd_config_iterator_first(const snd_config_t * 1713 node); 1714 extern snd_config_iterator_t snd_config_iterator_next(const 1715 snd_config_iterator_t 1716 iterator); 1717 extern int snd_config_load(snd_config_t * config, snd_input_t * in); 1718 extern int snd_config_make_compound(snd_config_t * *config, 1719 const char *key, int join); 1720 extern int snd_config_make_integer(snd_config_t * *config, 1721 const char *key); 1722 extern int snd_config_make_integer64(snd_config_t * *config, 1723 const char *key); 1724 extern int snd_config_make_string(snd_config_t * *config, const char *key); 1725 extern int snd_config_save(snd_config_t * config, snd_output_t * out); 1726 extern int snd_config_search(snd_config_t * config, const char *key, 1727 snd_config_t * *result); 1728 extern int snd_config_searchv(snd_config_t * config, 1729 snd_config_t * *result, ...); 1730 extern int snd_config_set_ascii(snd_config_t * config, const char *ascii); 1731 extern int snd_config_set_integer(snd_config_t * config, long int value); 1732 extern int snd_config_set_integer64(snd_config_t * config, 1733 long long int value); 1734 extern int snd_config_set_string(snd_config_t * config, const char *value); 1735 extern int snd_config_top(snd_config_t * *config); 1736 extern int snd_config_update(void); 1737 extern int snd_config_update_free_global(void); 1738 __________________________________________________________ 1739 1740 6.2.2. alsa/control.h 1741 1742 #define SND_CTL_EVENT_MASK_VALUE (1<<0) 1743 #define SND_CTL_EVENT_MASK_INFO (1<<1) 1744 #define SND_CTL_EVENT_MASK_ADD (1<<2) 1745 #define SND_CTL_EVENT_MASK_TLV (1<<3) 1746 #define SND_CTL_POWER_D3hot (SND_CTL_POWER_D3|0x0000) 1747 #define SND_CTL_POWER_D3cold (SND_CTL_POWER_D3|0x0001) 1748 #define SND_CTL_EVENT_MASK_REMOVE (~0U) 1749 #define SND_CTL_TLV_DB_GAIN_MUTE -9999999 1750 #define SND_CTL_POWER_D0 0x0000 1751 #define SND_CTL_TLVT_CONTAINER 0x0000 1752 #define SND_CTL_NONBLOCK 0x0001 1753 #define SND_CTL_TLVT_DB_SCALE 0x0001 1754 #define SND_SCTL_NOFREE 0x0001 1755 #define SND_CTL_ASYNC 0x0002 1756 #define SND_CTL_TLVT_DB_LINEAR 0x0002 1757 #define SND_CTL_TLVT_DB_RANGE 0x0003 1758 #define SND_CTL_READONLY 0x0004 1759 #define SND_CTL_POWER_D1 0x0100 1760 #define SND_CTL_POWER_D2 0x0200 1761 #define SND_CTL_POWER_D3 0x0300 1762 #define SND_CTL_POWER_MASK 0xff00 1763 1764 typedef struct snd_aes_iec958 { 1765 unsigned char status[24]; 1766 unsigned char subcode[147]; 1767 unsigned char pad; 1768 unsigned char dig_subframe[4]; 1769 } snd_aes_iec958_t; 1770 typedef struct _snd_ctl_card_info snd_ctl_card_info_t; 1771 typedef struct sndrv_ctl_elem_id snd_ctl_elem_id_t; 1772 typedef enum _snd_ctl_elem_iface { 1773 SND_CTL_ELEM_IFACE_CARD, 1774 SND_CTL_ELEM_IFACE_HWDEP = 1, 1775 SND_CTL_ELEM_IFACE_MIXER = 2, 1776 SND_CTL_ELEM_IFACE_PCM = 3, 1777 SND_CTL_ELEM_IFACE_RAWMIDI = 4, 1778 SND_CTL_ELEM_IFACE_TIMER = 5, 1779 SND_CTL_ELEM_IFACE_SEQUENCER = 6, 1780 SND_CTL_ELEM_IFACE_LAST = 6 1781 } snd_ctl_elem_iface_t; 1782 typedef struct _snd_ctl_elem_info snd_ctl_elem_info_t; 1783 typedef struct sndrv_ctl_elem_list snd_ctl_elem_list_t; 1784 typedef enum _snd_ctl_elem_type { 1785 SND_CTL_ELEM_TYPE_NONE, 1786 SND_CTL_ELEM_TYPE_BOOLEAN = 1, 1787 SND_CTL_ELEM_TYPE_INTEGER = 2, 1788 SND_CTL_ELEM_TYPE_ENUMERATED = 3, 1789 SND_CTL_ELEM_TYPE_BYTES = 4, 1790 SND_CTL_ELEM_TYPE_IEC958 = 5, 1791 SND_CTL_ELEM_TYPE_INTEGER64 = 6, 1792 SND_CTL_ELEM_TYPE_LAST = 6 1793 } snd_ctl_elem_type_t; 1794 typedef struct _snd_ctl_elem_value snd_ctl_elem_value_t; 1795 typedef struct sndrv_ctl_event snd_ctl_event_t; 1796 typedef enum _snd_ctl_event_type { 1797 SND_CTL_EVENT_ELEM, 1798 SND_CTL_EVENT_LAST 1799 } snd_ctl_event_type_t; 1800 typedef struct _snd_ctl snd_ctl_t; 1801 typedef enum _snd_ctl_type { 1802 SND_CTL_TYPE_HW, 1803 SND_CTL_TYPE_SHM = 1, 1804 SND_CTL_TYPE_INET = 2, 1805 SND_CTL_TYPE_EXT = 3 1806 } snd_ctl_type_t; 1807 typedef struct _snd_hctl snd_hctl_t; 1808 typedef struct _snd_sctl snd_sctl_t; 1809 typedef struct _snd_hctl_elem snd_hctl_elem_t; 1810 typedef int (*snd_hctl_compare_t) (const snd_hctl_elem_t *, 1811 const snd_hctl_elem_t *); 1812 typedef int (*snd_hctl_callback_t) (snd_hctl_t *, unsigned int, 1813 snd_hctl_elem_t *); 1814 typedef int (*snd_hctl_elem_callback_t) (snd_hctl_elem_t *, unsigned int); 1815 extern int snd_async_add_ctl_handler(snd_async_handler_t * *handler, 1816 snd_ctl_t * ctl, 1817 snd_async_callback_t callback, 1818 void *private_data); 1819 extern snd_ctl_t *snd_async_handler_get_ctl(snd_async_handler_t * handler); 1820 extern int snd_card_get_index(const char *name); 1821 extern int snd_card_get_longname(int card, char **name); 1822 extern int snd_card_get_name(int card, char **name); 1823 extern int snd_card_load(int card); 1824 extern int snd_card_next(int *card); 1825 extern int snd_ctl_card_info(snd_ctl_t * ctl, snd_ctl_card_info_t * info); 1826 extern void snd_ctl_card_info_clear(snd_ctl_card_info_t * obj); 1827 extern void snd_ctl_card_info_copy(snd_ctl_card_info_t * dst, 1828 const snd_ctl_card_info_t * src); 1829 extern void snd_ctl_card_info_free(snd_ctl_card_info_t * obj); 1830 extern const char *snd_ctl_card_info_get_components(const 1831 snd_ctl_card_info_t* 1832 obj); 1833 extern const char *snd_ctl_card_info_get_driver(const snd_ctl_card_info_t * 1834 obj); 1835 extern const char *snd_ctl_card_info_get_id(const snd_ctl_card_info_t * 1836 obj); 1837 extern const char *snd_ctl_card_info_get_longname(const snd_ctl_card_info_t 1838 * obj); 1839 extern const char *snd_ctl_card_info_get_mixername(const 1840 snd_ctl_card_info_t * 1841 obj); 1842 extern const char *snd_ctl_card_info_get_name(const snd_ctl_card_info_t* 1843 obj); 1844 extern int snd_ctl_card_info_malloc(snd_ctl_card_info_t * *ptr); 1845 extern size_t snd_ctl_card_info_sizeof(void); 1846 extern int snd_ctl_close(snd_ctl_t * ctl); 1847 extern int snd_ctl_elem_add_boolean(snd_ctl_t * ctl, 1848 const snd_ctl_elem_id_t * id, 1849 unsigned int count); 1850 extern int snd_ctl_elem_add_iec958(snd_ctl_t * ctl, 1851 const snd_ctl_elem_id_t * id); 1852 extern int snd_ctl_elem_add_integer(snd_ctl_t * ctl, 1853 const snd_ctl_elem_id_t * id, 1854 unsigned int count, long int imin, 1855 long int imax, long int istep); 1856 extern void snd_ctl_elem_id_clear(snd_ctl_elem_id_t * obj); 1857 extern void snd_ctl_elem_id_copy(snd_ctl_elem_id_t * dst, 1858 const snd_ctl_elem_id_t * src); 1859 extern void snd_ctl_elem_id_free(snd_ctl_elem_id_t * obj); 1860 extern unsigned int snd_ctl_elem_id_get_device(const snd_ctl_elem_id_t * 1861 obj); 1862 extern unsigned int snd_ctl_elem_id_get_index(const snd_ctl_elem_id_t * 1863 obj); 1864 extern snd_ctl_elem_iface_t snd_ctl_elem_id_get_interface(const 1865 snd_ctl_elem_id_t 1866 * obj); 1867 extern const char *snd_ctl_elem_id_get_name(const snd_ctl_elem_id_t * obj); 1868 extern unsigned int snd_ctl_elem_id_get_numid(const snd_ctl_elem_id_t * 1869 obj); 1870 extern unsigned int snd_ctl_elem_id_get_subdevice(const snd_ctl_elem_id_t * 1871 obj); 1872 extern int snd_ctl_elem_id_malloc(snd_ctl_elem_id_t * *ptr); 1873 extern void snd_ctl_elem_id_set_device(snd_ctl_elem_id_t * obj, 1874 unsigned int val); 1875 extern void snd_ctl_elem_id_set_index(snd_ctl_elem_id_t * obj, 1876 unsigned int val); 1877 extern void snd_ctl_elem_id_set_interface(snd_ctl_elem_id_t * obj, 1878 snd_ctl_elem_iface_t val); 1879 extern void snd_ctl_elem_id_set_name(snd_ctl_elem_id_t * obj, 1880 const char *val); 1881 extern void snd_ctl_elem_id_set_numid(snd_ctl_elem_id_t * obj, 1882 unsigned int val); 1883 extern void snd_ctl_elem_id_set_subdevice(snd_ctl_elem_id_t * obj, 1884 unsigned int val); 1885 extern size_t snd_ctl_elem_id_sizeof(void); 1886 extern const char *snd_ctl_elem_iface_name(snd_ctl_elem_iface_t iface); 1887 extern int snd_ctl_elem_info(snd_ctl_t * ctl, snd_ctl_elem_info_t * info); 1888 extern void snd_ctl_elem_info_clear(snd_ctl_elem_info_t * obj); 1889 extern void snd_ctl_elem_info_copy(snd_ctl_elem_info_t * dst, 1890 const snd_ctl_elem_info_t * src); 1891 extern void snd_ctl_elem_info_free(snd_ctl_elem_info_t * obj); 1892 extern unsigned int snd_ctl_elem_info_get_count(const snd_ctl_elem_info_t * 1893 obj); 1894 extern void snd_ctl_elem_info_get_id(const snd_ctl_elem_info_t * obj, 1895 snd_ctl_elem_id_t * ptr); 1896 extern const char *snd_ctl_elem_info_get_item_name(const 1897 snd_ctl_elem_info_t * 1898 obj); 1899 extern unsigned int snd_ctl_elem_info_get_items(const snd_ctl_elem_info_t * 1900 obj); 1901 extern long int snd_ctl_elem_info_get_max(const snd_ctl_elem_info_t * obj); 1902 extern long long int snd_ctl_elem_info_get_max64(const snd_ctl_elem_info_t 1903 * obj); 1904 extern long int snd_ctl_elem_info_get_min(const snd_ctl_elem_info_t * obj); 1905 extern long long int snd_ctl_elem_info_get_min64(const snd_ctl_elem_info_t 1906 * obj); 1907 extern const char *snd_ctl_elem_info_get_name(const snd_ctl_elem_info_t* 1908 obj); 1909 extern unsigned int snd_ctl_elem_info_get_numid(const snd_ctl_elem_info_t * 1910 obj); 1911 extern long int snd_ctl_elem_info_get_step(const snd_ctl_elem_info_t * 1912 obj); 1913 extern long long int snd_ctl_elem_info_get_step64(const snd_ctl_elem_info_t 1914 * obj); 1915 extern snd_ctl_elem_type_t snd_ctl_elem_info_get_type(const 1916 snd_ctl_elem_info_t * 1917 obj); 1918 extern int snd_ctl_elem_info_is_inactive(const snd_ctl_elem_info_t * obj); 1919 extern int snd_ctl_elem_info_is_locked(const snd_ctl_elem_info_t * obj); 1920 extern int snd_ctl_elem_info_is_readable(const snd_ctl_elem_info_t * obj); 1921 extern int snd_ctl_elem_info_is_user(const snd_ctl_elem_info_t * obj); 1922 extern int snd_ctl_elem_info_is_volatile(const snd_ctl_elem_info_t * obj); 1923 extern int snd_ctl_elem_info_is_writable(const snd_ctl_elem_info_t * obj); 1924 extern int snd_ctl_elem_info_malloc(snd_ctl_elem_info_t * *ptr); 1925 extern void snd_ctl_elem_info_set_id(snd_ctl_elem_info_t * obj, 1926 const snd_ctl_elem_id_t * ptr); 1927 extern void snd_ctl_elem_info_set_item(snd_ctl_elem_info_t * obj, 1928 unsigned int val); 1929 extern size_t snd_ctl_elem_info_sizeof(void); 1930 extern int snd_ctl_elem_list(snd_ctl_t * ctl, snd_ctl_elem_list_t * list); 1931 extern int snd_ctl_elem_list_alloc_space(snd_ctl_elem_list_t * obj, 1932 unsigned int entries); 1933 extern void snd_ctl_elem_list_clear(snd_ctl_elem_list_t * obj); 1934 extern void snd_ctl_elem_list_copy(snd_ctl_elem_list_t * dst, 1935 const snd_ctl_elem_list_t * src); 1936 extern void snd_ctl_elem_list_free(snd_ctl_elem_list_t * obj); 1937 extern void snd_ctl_elem_list_free_space(snd_ctl_elem_list_t * obj); 1938 extern unsigned int snd_ctl_elem_list_get_count(const snd_ctl_elem_list_t * 1939 obj); 1940 extern void snd_ctl_elem_list_get_id(const snd_ctl_elem_list_t * obj, 1941 unsigned int idx, 1942 snd_ctl_elem_id_t * ptr); 1943 extern const char *snd_ctl_elem_list_get_name(const snd_ctl_elem_list_t* 1944 obj, unsigned int idx); 1945 extern unsigned int snd_ctl_elem_list_get_used(const snd_ctl_elem_list_t * 1946 obj); 1947 extern int snd_ctl_elem_list_malloc(snd_ctl_elem_list_t * *ptr); 1948 extern void snd_ctl_elem_list_set_offset(snd_ctl_elem_list_t * obj, 1949 unsigned int val); 1950 extern size_t snd_ctl_elem_list_sizeof(void); 1951 extern int snd_ctl_elem_read(snd_ctl_t * ctl, 1952 snd_ctl_elem_value_t * value); 1953 extern int snd_ctl_elem_remove(snd_ctl_t * ctl, snd_ctl_elem_id_t * id); 1954 extern const char *snd_ctl_elem_type_name(snd_ctl_elem_type_t type); 1955 extern void snd_ctl_elem_value_clear(snd_ctl_elem_value_t * obj); 1956 extern void snd_ctl_elem_value_copy(snd_ctl_elem_value_t * dst, 1957 const snd_ctl_elem_value_t * src); 1958 extern void snd_ctl_elem_value_free(snd_ctl_elem_value_t * obj); 1959 extern int snd_ctl_elem_value_get_boolean(const snd_ctl_elem_value_t * obj, 1960 unsigned int idx); 1961 extern unsigned char snd_ctl_elem_value_get_byte(const snd_ctl_elem_value_t 1962 * obj, unsigned int idx); 1963 extern const void *snd_ctl_elem_value_get_bytes(const snd_ctl_elem_value_t 1964 * obj); 1965 extern unsigned int snd_ctl_elem_value_get_enumerated(const 1966 snd_ctl_elem_value_t 1967 * obj, 1968 unsigned int idx); 1969 extern void snd_ctl_elem_value_get_id(const snd_ctl_elem_value_t * obj, 1970 snd_ctl_elem_id_t * ptr); 1971 extern void snd_ctl_elem_value_get_iec958(const snd_ctl_elem_value_t * obj, 1972 snd_aes_iec958_t * ptr); 1973 extern long int snd_ctl_elem_value_get_integer(const snd_ctl_elem_value_t * 1974 obj, unsigned int idx); 1975 extern long long int snd_ctl_elem_value_get_integer64(const 1976 snd_ctl_elem_value_t 1977 * obj, 1978 unsigned int idx); 1979 extern int snd_ctl_elem_value_malloc(snd_ctl_elem_value_t * *ptr); 1980 extern void snd_ctl_elem_value_set_boolean(snd_ctl_elem_value_t * obj, 1981 unsigned int idx, long int val); 1982 extern void snd_ctl_elem_value_set_byte(snd_ctl_elem_value_t * obj, 1983 unsigned int idx, 1984 unsigned char val); 1985 extern void snd_ctl_elem_value_set_enumerated(snd_ctl_elem_value_t * obj, 1986 unsigned int idx, 1987 unsigned int val); 1988 extern void snd_ctl_elem_value_set_id(snd_ctl_elem_value_t * obj, 1989 const snd_ctl_elem_id_t * ptr); 1990 extern void snd_ctl_elem_value_set_iec958(snd_ctl_elem_value_t * obj, 1991 const snd_aes_iec958_t * ptr); 1992 extern void snd_ctl_elem_value_set_integer(snd_ctl_elem_value_t * obj, 1993 unsigned int idx, long int val); 1994 extern void snd_ctl_elem_value_set_integer64(snd_ctl_elem_value_t * obj, 1995 unsigned int idx, 1996 long long int val); 1997 extern size_t snd_ctl_elem_value_sizeof(void); 1998 extern int snd_ctl_elem_write(snd_ctl_t * ctl, 1999 snd_ctl_elem_value_t * value); 2000 extern void snd_ctl_event_clear(snd_ctl_event_t * obj); 2001 extern void snd_ctl_event_copy(snd_ctl_event_t * dst, 2002 const snd_ctl_event_t * src); 2003 extern void snd_ctl_event_elem_get_id(const snd_ctl_event_t * obj, 2004 snd_ctl_elem_id_t * ptr); 2005 extern unsigned int snd_ctl_event_elem_get_mask(const snd_ctl_event_t * 2006 obj); 2007 extern void snd_ctl_event_free(snd_ctl_event_t * obj); 2008 extern int snd_ctl_event_malloc(snd_ctl_event_t * *ptr); 2009 extern size_t snd_ctl_event_sizeof(void); 2010 extern int snd_ctl_hwdep_info(snd_ctl_t * ctl, snd_hwdep_info_t * info); 2011 extern int snd_ctl_hwdep_next_device(snd_ctl_t * ctl, int *device); 2012 extern const char *snd_ctl_name(snd_ctl_t * ctl); 2013 extern int snd_ctl_nonblock(snd_ctl_t * ctl, int nonblock); 2014 extern int snd_ctl_open(snd_ctl_t * *ctl, const char *name, int mode); 2015 extern int snd_ctl_pcm_info(snd_ctl_t * ctl, snd_pcm_info_t * info); 2016 extern int snd_ctl_pcm_next_device(snd_ctl_t * ctl, int *device); 2017 extern int snd_ctl_poll_descriptors(snd_ctl_t * ctl, struct pollfd *pfds, 2018 unsigned int space); 2019 extern int snd_ctl_poll_descriptors_count(snd_ctl_t * ctl); 2020 extern int snd_ctl_rawmidi_info(snd_ctl_t * ctl, 2021 snd_rawmidi_info_t * info); 2022 extern int snd_ctl_rawmidi_next_device(snd_ctl_t * ctl, int *device); 2023 extern int snd_ctl_read(snd_ctl_t * ctl, snd_ctl_event_t * event); 2024 extern int snd_ctl_subscribe_events(snd_ctl_t * ctl, int subscribe); 2025 extern int snd_hctl_close(snd_hctl_t * hctl); 2026 extern void *snd_hctl_elem_get_callback_private(const snd_hctl_elem_t * 2027 obj); 2028 extern void snd_hctl_elem_get_id(const snd_hctl_elem_t * obj, 2029 snd_ctl_elem_id_t * ptr); 2030 extern int snd_hctl_elem_info(snd_hctl_elem_t * elem, 2031 snd_ctl_elem_info_t * info); 2032 extern snd_hctl_elem_t *snd_hctl_elem_next(snd_hctl_elem_t * elem); 2033 extern snd_hctl_elem_t *snd_hctl_elem_prev(snd_hctl_elem_t * elem); 2034 extern int snd_hctl_elem_read(snd_hctl_elem_t * elem, 2035 snd_ctl_elem_value_t * value); 2036 extern void snd_hctl_elem_set_callback(snd_hctl_elem_t * obj, 2037 snd_hctl_elem_callback_t val); 2038 extern void snd_hctl_elem_set_callback_private(snd_hctl_elem_t * obj, 2039 void *val); 2040 extern int snd_hctl_elem_write(snd_hctl_elem_t * elem, 2041 snd_ctl_elem_value_t * value); 2042 extern snd_hctl_elem_t *snd_hctl_find_elem(snd_hctl_t * hctl, 2043 const snd_ctl_elem_id_t * id); 2044 extern snd_hctl_elem_t *snd_hctl_first_elem(snd_hctl_t * hctl); 2045 extern int snd_hctl_free(snd_hctl_t * hctl); 2046 extern void *snd_hctl_get_callback_private(snd_hctl_t * hctl); 2047 extern unsigned int snd_hctl_get_count(snd_hctl_t * hctl); 2048 extern int snd_hctl_handle_events(snd_hctl_t * hctl); 2049 extern snd_hctl_elem_t *snd_hctl_last_elem(snd_hctl_t * hctl); 2050 extern int snd_hctl_load(snd_hctl_t * hctl); 2051 extern int snd_hctl_nonblock(snd_hctl_t * hctl, int nonblock); 2052 extern int snd_hctl_open(snd_hctl_t * *hctl, const char *name, int mode); 2053 extern void snd_hctl_set_callback(snd_hctl_t * hctl, 2054 snd_hctl_callback_t callback); 2055 extern void snd_hctl_set_callback_private(snd_hctl_t * hctl, void *data); 2056 extern int snd_hctl_wait(snd_hctl_t * hctl, int timeout); 2057 __________________________________________________________ 2058 2059 6.2.3. alsa/control_external.h 2060 2061 #define SND_CTL_EXT_VERSION ((SND_CTL_EXT_VERSION_MAJOR<<16) | (SND_CTL_EXT_VERSION_MINOR<<8) | (SND_CTL_EXT_VERSION_TINY)) 2062 #define SND_CTL_EXT_KEY_NOT_FOUND (snd_ctl_ext_key_t)(-1) 2063 #define SND_CTL_EXT_VERSION_MINOR 0 2064 #define SND_CTL_EXT_VERSION_TINY 0 2065 #define SND_CTL_EXT_VERSION_MAJOR 1 2066 2067 typedef struct snd_ctl_ext_callback { 2068 void (*close) (void); 2069 int (*elem_count) (void); 2070 int (*elem_list) (void); 2071 snd_ctl_ext_key_t(*find_elem) (void); 2072 void (*free_key) (void); 2073 int (*get_attribute) (void); 2074 int (*get_integer_info) (void); 2075 int (*get_integer64_info) (void); 2076 int (*get_enumerated_info) (void); 2077 int (*get_enumerated_name) (void); 2078 int (*read_integer) (void); 2079 int (*read_integer64) (void); 2080 int (*read_enumerated) (void); 2081 int (*read_bytes) (void); 2082 int (*read_iec958) (void); 2083 int (*write_integer) (void); 2084 int (*write_integer64) (void); 2085 int (*write_enumerated) (void); 2086 int (*write_bytes) (void); 2087 int (*write_iec958) (void); 2088 void (*subscribe_events) (void); 2089 int (*read_event) (void); 2090 int (*poll_descriptors_count) (void); 2091 int (*poll_descriptors) (void); 2092 int (*poll_revents) (void); 2093 } snd_ctl_ext_callback_t; 2094 typedef long unsigned int snd_ctl_ext_key_t; 2095 typedef struct snd_ctl_ext { 2096 unsigned int version; 2097 int card_idx; 2098 char id[16]; 2099 char driver[16]; 2100 char name[32]; 2101 char longname[80]; 2102 char mixername[80]; 2103 int poll_fd; 2104 const snd_ctl_ext_callback_t *callback; 2105 void *private_data; 2106 snd_ctl_t *handle; 2107 int nonblock; 2108 int subscribed; 2109 } snd_ctl_ext_t; 2110 __________________________________________________________ 2111 2112 6.2.4. alsa/error.h 2113 2114 #define SND_ERROR_INCOMPATIBLE_VERSION (SND_ERROR_BEGIN+0) 2115 #define SND_ERROR_ALISP_NIL (SND_ERROR_BEGIN+1) 2116 #define SND_ERROR_BEGIN 500000 2117 2118 typedef void (*snd_lib_error_handler_t) (const char *, int, const char *, 2119 int, const char *, ...); 2120 extern int snd_lib_error_set_handler(snd_lib_error_handler_t handler); 2121 extern const char *snd_strerror(int errnum); 2122 __________________________________________________________ 2123 2124 6.2.5. alsa/global.h 2125 2126 typedef struct _snd_async_handler snd_async_handler_t; 2127 typedef void (*snd_async_callback_t) (snd_async_handler_t *); 2128 typedef struct timespec snd_htimestamp_t; 2129 typedef struct timeval snd_timestamp_t; 2130 extern const char *snd_asoundlib_version(void); 2131 extern int snd_async_add_handler(snd_async_handler_t * *handler, int fd, 2132 snd_async_callback_t callback, 2133 void *private_data); 2134 extern int snd_async_del_handler(snd_async_handler_t * handler); 2135 extern void *snd_async_handler_get_callback_private(snd_async_handler_t* 2136 handler); 2137 __________________________________________________________ 2138 2139 6.2.6. alsa/hwdep.h 2140 2141 #define SND_HWDEP_OPEN_NONBLOCK (O_NONBLOCK) 2142 #define SND_HWDEP_OPEN_READ (O_RDONLY) 2143 #define SND_HWDEP_OPEN_DUPLEX (O_RDWR) 2144 #define SND_HWDEP_OPEN_WRITE (O_WRONLY) 2145 2146 typedef struct sndrv_hwdep_dsp_image snd_hwdep_dsp_image_t; 2147 typedef struct sndrv_hwdep_dsp_status snd_hwdep_dsp_status_t; 2148 typedef enum _snd_hwdep_iface { 2149 SND_HWDEP_IFACE_OPL2, 2150 SND_HWDEP_IFACE_OPL3 = 1, 2151 SND_HWDEP_IFACE_OPL4 = 2, 2152 SND_HWDEP_IFACE_SB16CSP = 3, 2153 SND_HWDEP_IFACE_EMU10K1 = 4, 2154 SND_HWDEP_IFACE_YSS225 = 5, 2155 SND_HWDEP_IFACE_ICS2115 = 6, 2156 SND_HWDEP_IFACE_SSCAPE = 7, 2157 SND_HWDEP_IFACE_VX = 8, 2158 SND_HWDEP_IFACE_MIXART = 9, 2159 SND_HWDEP_IFACE_USX2Y = 10, 2160 SND_HWDEP_IFACE_EMUX_WAVETABLE = 11, 2161 SND_HWDEP_IFACE_BLUETOOTH = 12, 2162 SND_HWDEP_IFACE_USX2Y_PCM = 13, 2163 SND_HWDEP_IFACE_PCXHR = 14, 2164 SND_HWDEP_IFACE_SB_RC = 15, 2165 SND_HWDEP_IFACE_LAST = 15 2166 } snd_hwdep_iface_t; 2167 typedef struct sndrv_hwdep_info snd_hwdep_info_t; 2168 typedef struct _snd_hwdep snd_hwdep_t; 2169 typedef enum _snd_hwdep_type { 2170 SND_HWDEP_TYPE_HW, 2171 SND_HWDEP_TYPE_SHM = 1, 2172 SND_HWDEP_TYPE_INET = 2 2173 } snd_hwdep_type_t; 2174 extern int snd_hwdep_close(snd_hwdep_t * hwdep); 2175 extern void snd_hwdep_dsp_image_copy(snd_hwdep_dsp_image_t * dst, 2176 const snd_hwdep_dsp_image_t * src); 2177 extern void snd_hwdep_dsp_image_free(snd_hwdep_dsp_image_t * obj); 2178 extern const void *snd_hwdep_dsp_image_get_image(const 2179 snd_hwdep_dsp_image_t * 2180 obj); 2181 extern unsigned int snd_hwdep_dsp_image_get_index(const 2182 snd_hwdep_dsp_image_t* 2183 obj); 2184 extern size_t snd_hwdep_dsp_image_get_length(const snd_hwdep_dsp_image_t * 2185 obj); 2186 extern const char *snd_hwdep_dsp_image_get_name(const snd_hwdep_dsp_image_t 2187 * obj); 2188 extern int snd_hwdep_dsp_image_malloc(snd_hwdep_dsp_image_t * *ptr); 2189 extern void snd_hwdep_dsp_image_set_image(snd_hwdep_dsp_image_t * obj, 2190 void *buffer); 2191 extern void snd_hwdep_dsp_image_set_index(snd_hwdep_dsp_image_t * obj, 2192 unsigned int _index); 2193 extern void snd_hwdep_dsp_image_set_length(snd_hwdep_dsp_image_t * obj, 2194 size_t length); 2195 extern void snd_hwdep_dsp_image_set_name(snd_hwdep_dsp_image_t * obj, 2196 const char *name); 2197 extern size_t snd_hwdep_dsp_image_sizeof(void); 2198 extern int snd_hwdep_dsp_load(snd_hwdep_t * hwdep, 2199 snd_hwdep_dsp_image_t * block); 2200 extern int snd_hwdep_dsp_status(snd_hwdep_t * hwdep, 2201 snd_hwdep_dsp_status_t * status); 2202 extern void snd_hwdep_dsp_status_copy(snd_hwdep_dsp_status_t * dst, 2203 const snd_hwdep_dsp_status_t * src); 2204 extern void snd_hwdep_dsp_status_free(snd_hwdep_dsp_status_t * obj); 2205 extern unsigned int snd_hwdep_dsp_status_get_chip_ready(const 2206 snd_hwdep_dsp_status_t 2207 * obj); 2208 extern unsigned int snd_hwdep_dsp_status_get_dsp_loaded(const 2209 snd_hwdep_dsp_status_t 2210 * obj); 2211 extern const char *snd_hwdep_dsp_status_get_id(const snd_hwdep_dsp_status_t 2212 * obj); 2213 extern unsigned int snd_hwdep_dsp_status_get_num_dsps(const 2214 snd_hwdep_dsp_status_t 2215 * obj); 2216 extern unsigned int snd_hwdep_dsp_status_get_version(const 2217 snd_hwdep_dsp_status_t 2218 * obj); 2219 extern int snd_hwdep_dsp_status_malloc(snd_hwdep_dsp_status_t * *ptr); 2220 extern size_t snd_hwdep_dsp_status_sizeof(void); 2221 extern int snd_hwdep_info(snd_hwdep_t * hwdep, snd_hwdep_info_t * info); 2222 extern void snd_hwdep_info_copy(snd_hwdep_info_t * dst, 2223 const snd_hwdep_info_t * src); 2224 extern void snd_hwdep_info_free(snd_hwdep_info_t * obj); 2225 extern int snd_hwdep_info_get_card(const snd_hwdep_info_t * obj); 2226 extern unsigned int snd_hwdep_info_get_device(const snd_hwdep_info_t * 2227 obj); 2228 extern const char *snd_hwdep_info_get_id(const snd_hwdep_info_t * obj); 2229 extern snd_hwdep_iface_t snd_hwdep_info_get_iface(const snd_hwdep_info_t * 2230 obj); 2231 extern const char *snd_hwdep_info_get_name(const snd_hwdep_info_t * obj); 2232 extern int snd_hwdep_info_malloc(snd_hwdep_info_t * *ptr); 2233 extern void snd_hwdep_info_set_device(snd_hwdep_info_t * obj, 2234 unsigned int val); 2235 extern size_t snd_hwdep_info_sizeof(void); 2236 extern int snd_hwdep_ioctl(snd_hwdep_t * hwdep, unsigned int request, 2237 void *arg); 2238 extern int snd_hwdep_open(snd_hwdep_t * *hwdep, const char *name, 2239 int mode); 2240 extern int snd_hwdep_poll_descriptors(snd_hwdep_t * hwdep, 2241 struct pollfd *pfds, 2242 unsigned int space); 2243 extern ssize_t snd_hwdep_read(snd_hwdep_t * hwdep, void *buffer, 2244 size_t size); 2245 extern ssize_t snd_hwdep_write(snd_hwdep_t * hwdep, const void *buffer, 2246 size_t size); 2247 __________________________________________________________ 2248 2249 6.2.7. alsa/iatomic.h 2250 2251 #define atomic_set(v,i) (((v)->counter) = (i)) 2252 #define atomic_read(v) ((v)->counter) 2253 #define ATOMIC_INIT(i) { (i) } 2254 2255 typedef struct { 2256 unsigned int begin; 2257 unsigned int end; 2258 } snd_atomic_write_t; 2259 typedef struct { 2260 const volatile snd_atomic_write_t *write; 2261 unsigned int end; 2262 } snd_atomic_read_t; 2263 __________________________________________________________ 2264 2265 6.2.8. alsa/input.h 2266 2267 typedef struct _snd_input snd_input_t; 2268 extern int snd_input_buffer_open(snd_input_t * *inputp, const char *buffer, 2269 ssize_t size); 2270 extern int snd_input_close(snd_input_t * input); 2271 extern int snd_input_stdio_attach(snd_input_t * *inputp, FILE * fp, 2272 int _close); 2273 extern int snd_input_stdio_open(snd_input_t * *inputp, const char *file, 2274 const char *mode); 2275 __________________________________________________________ 2276 2277 6.2.9. alsa/mixer.h 2278 2279 typedef struct _snd_mixer snd_mixer_t; 2280 typedef struct _snd_mixer_elem snd_mixer_elem_t; 2281 typedef enum _snd_mixer_elem_type { 2282 SND_MIXER_ELEM_SIMPLE, 2283 SND_MIXER_ELEM_LAST 2284 } snd_mixer_elem_type_t; 2285 typedef struct _snd_mixer_class snd_mixer_class_t; 2286 typedef int (*snd_mixer_compare_t) (const snd_mixer_elem_t *, 2287 const snd_mixer_elem_t *); 2288 typedef int (*snd_mixer_elem_callback_t) (snd_mixer_elem_t *, 2289 unsigned int); 2290 typedef int (*snd_mixer_callback_t) (snd_mixer_t *, unsigned int, 2291 snd_mixer_elem_t *); 2292 typedef int (*snd_mixer_event_t) (snd_mixer_class_t *, unsigned int, 2293 snd_hctl_elem_t *, snd_mixer_elem_t *); 2294 typedef enum _snd_mixer_selem_channel_id { 2295 SND_MIXER_SCHN_UNKNOWN = -1, 2296 SND_MIXER_SCHN_FRONT_LEFT, 2297 SND_MIXER_SCHN_FRONT_RIGHT = 1, 2298 SND_MIXER_SCHN_REAR_LEFT = 2, 2299 SND_MIXER_SCHN_REAR_RIGHT = 3, 2300 SND_MIXER_SCHN_FRONT_CENTER = 4, 2301 SND_MIXER_SCHN_WOOFER = 5, 2302 SND_MIXER_SCHN_SIDE_LEFT = 6, 2303 SND_MIXER_SCHN_SIDE_RIGHT = 7, 2304 SND_MIXER_SCHN_REAR_CENTER = 8, 2305 SND_MIXER_SCHN_LAST = 31, 2306 SND_MIXER_SCHN_MONO 2307 } snd_mixer_selem_channel_id_t; 2308 typedef struct _snd_mixer_selem_id snd_mixer_selem_id_t; 2309 enum snd_mixer_selem_regopt_abstract { 2310 SND_MIXER_SABSTRACT_NONE, 2311 SND_MIXER_SABSTRACT_BASIC = 1 2312 }; 2313 struct snd_mixer_selem_regopt { 2314 int ver; 2315 enum snd_mixer_selem_regopt_abstract abstract; 2316 const char *device; 2317 snd_pcm_t *playback_pcm; 2318 snd_pcm_t *capture_pcm; 2319 }; 2320 extern int snd_mixer_attach(snd_mixer_t * mixer, const char *name); 2321 extern int snd_mixer_close(snd_mixer_t * mixer); 2322 extern int snd_mixer_detach(snd_mixer_t * mixer, const char *name); 2323 extern void *snd_mixer_elem_get_callback_private(const snd_mixer_elem_t* 2324 obj); 2325 extern snd_mixer_elem_type_t snd_mixer_elem_get_type(const snd_mixer_elem_t 2326 * obj); 2327 extern snd_mixer_elem_t *snd_mixer_elem_next(snd_mixer_elem_t * elem); 2328 extern snd_mixer_elem_t *snd_mixer_elem_prev(snd_mixer_elem_t * elem); 2329 extern void snd_mixer_elem_set_callback(snd_mixer_elem_t * obj, 2330 snd_mixer_elem_callback_t val); 2331 extern void snd_mixer_elem_set_callback_private(snd_mixer_elem_t * obj, 2332 void *val); 2333 extern snd_mixer_elem_t *snd_mixer_find_selem(snd_mixer_t * mixer, 2334 const snd_mixer_selem_id_t * 2335 id); 2336 extern snd_mixer_elem_t *snd_mixer_first_elem(snd_mixer_t * mixer); 2337 extern void snd_mixer_free(snd_mixer_t * mixer); 2338 extern void *snd_mixer_get_callback_private(const snd_mixer_t * obj); 2339 extern unsigned int snd_mixer_get_count(const snd_mixer_t * obj); 2340 extern int snd_mixer_handle_events(snd_mixer_t * mixer); 2341 extern snd_mixer_elem_t *snd_mixer_last_elem(snd_mixer_t * mixer); 2342 extern int snd_mixer_load(snd_mixer_t * mixer); 2343 extern int snd_mixer_open(snd_mixer_t * *mixer, int mode); 2344 extern int snd_mixer_poll_descriptors(snd_mixer_t * mixer, 2345 struct pollfd *pfds, 2346 unsigned int space); 2347 extern int snd_mixer_poll_descriptors_count(snd_mixer_t * mixer); 2348 extern int snd_mixer_poll_descriptors_revents(snd_mixer_t * mixer, 2349 struct pollfd *pfds, 2350 unsigned int nfds, 2351 short unsigned int *revents); 2352 extern const char 2353 *snd_mixer_selem_channel_name(snd_mixer_selem_channel_id_t channel); 2354 extern int snd_mixer_selem_get_capture_group(snd_mixer_elem_t * elem); 2355 extern int snd_mixer_selem_get_capture_switch(snd_mixer_elem_t * elem, 2356 snd_mixer_selem_channel_id_t 2357 channel, int *value); 2358 extern int snd_mixer_selem_get_capture_volume(snd_mixer_elem_t * elem, 2359 snd_mixer_selem_channel_id_t 2360 channel, long int *value); 2361 extern int snd_mixer_selem_get_capture_volume_range(snd_mixer_elem_t * 2362 elem, long int *min, 2363 long int *max); 2364 extern int snd_mixer_selem_get_enum_item(snd_mixer_elem_t * elem, 2365 snd_mixer_selem_channel_id_t 2366 channel, unsigned int *idxp); 2367 extern int snd_mixer_selem_get_enum_item_name(snd_mixer_elem_t * elem, 2368 unsigned int idx, 2369 size_t maxlen, char *str); 2370 extern int snd_mixer_selem_get_enum_items(snd_mixer_elem_t * elem); 2371 extern void snd_mixer_selem_get_id(snd_mixer_elem_t * element, 2372 snd_mixer_selem_id_t * id); 2373 extern unsigned int snd_mixer_selem_get_index(snd_mixer_elem_t * elem); 2374 extern const char *snd_mixer_selem_get_name(snd_mixer_elem_t * elem); 2375 extern int snd_mixer_selem_get_playback_switch(snd_mixer_elem_t * elem, 2376 snd_mixer_selem_channel_id_t 2377 channel, int *value); 2378 extern int snd_mixer_selem_get_playback_volume(snd_mixer_elem_t * elem, 2379 snd_mixer_selem_channel_id_t 2380 channel, long int *value); 2381 extern int snd_mixer_selem_get_playback_volume_range(snd_mixer_elem_t * 2382 elem, long int *min, 2383 long int *max); 2384 extern int snd_mixer_selem_has_capture_channel(snd_mixer_elem_t * obj, 2385 snd_mixer_selem_channel_id_t 2386 channel); 2387 extern int snd_mixer_selem_has_capture_switch(snd_mixer_elem_t * elem); 2388 extern int snd_mixer_selem_has_capture_switch_exclusive(snd_mixer_elem_t * 2389 elem); 2390 extern int snd_mixer_selem_has_capture_switch_joined(snd_mixer_elem_t * 2391 elem); 2392 extern int snd_mixer_selem_has_capture_volume(snd_mixer_elem_t * elem); 2393 extern int snd_mixer_selem_has_capture_volume_joined(snd_mixer_elem_t * 2394 elem); 2395 extern int snd_mixer_selem_has_common_switch(snd_mixer_elem_t * elem); 2396 extern int snd_mixer_selem_has_common_volume(snd_mixer_elem_t * elem); 2397 extern int snd_mixer_selem_has_playback_channel(snd_mixer_elem_t * obj, 2398 snd_mixer_selem_channel_id_t 2399 channel); 2400 extern int snd_mixer_selem_has_playback_switch(snd_mixer_elem_t * elem); 2401 extern int snd_mixer_selem_has_playback_switch_joined(snd_mixer_elem_t * 2402 elem); 2403 extern int snd_mixer_selem_has_playback_volume(snd_mixer_elem_t * elem); 2404 extern int snd_mixer_selem_has_playback_volume_joined(snd_mixer_elem_t * 2405 elem); 2406 extern void snd_mixer_selem_id_copy(snd_mixer_selem_id_t * dst, 2407 const snd_mixer_selem_id_t * src); 2408 extern void snd_mixer_selem_id_free(snd_mixer_selem_id_t * obj); 2409 extern unsigned int snd_mixer_selem_id_get_index(const snd_mixer_selem_id_t 2410 * obj); 2411 extern const char *snd_mixer_selem_id_get_name(const snd_mixer_selem_id_t * 2412 obj); 2413 extern int snd_mixer_selem_id_malloc(snd_mixer_selem_id_t * *ptr); 2414 extern void snd_mixer_selem_id_set_index(snd_mixer_selem_id_t * obj, 2415 unsigned int val); 2416 extern void snd_mixer_selem_id_set_name(snd_mixer_selem_id_t * obj, 2417 const char *val); 2418 extern size_t snd_mixer_selem_id_sizeof(void); 2419 extern int snd_mixer_selem_is_active(snd_mixer_elem_t * elem); 2420 extern int snd_mixer_selem_is_capture_mono(snd_mixer_elem_t * elem); 2421 extern int snd_mixer_selem_is_enum_capture(snd_mixer_elem_t * elem); 2422 extern int snd_mixer_selem_is_enum_playback(snd_mixer_elem_t * elem); 2423 extern int snd_mixer_selem_is_enumerated(snd_mixer_elem_t * elem); 2424 extern int snd_mixer_selem_is_playback_mono(snd_mixer_elem_t * elem); 2425 extern int snd_mixer_selem_register(snd_mixer_t * mixer, 2426 struct snd_mixer_selem_regopt *options, 2427 snd_mixer_class_t * *classp); 2428 extern int snd_mixer_selem_set_capture_switch(snd_mixer_elem_t * elem, 2429 snd_mixer_selem_channel_id_t 2430 channel, int value); 2431 extern int snd_mixer_selem_set_capture_switch_all(snd_mixer_elem_t * elem, 2432 int value); 2433 extern int snd_mixer_selem_set_capture_volume(snd_mixer_elem_t * elem, 2434 snd_mixer_selem_channel_id_t 2435 channel, long int value); 2436 extern int snd_mixer_selem_set_capture_volume_all(snd_mixer_elem_t * elem, 2437 long int value); 2438 extern int snd_mixer_selem_set_capture_volume_range(snd_mixer_elem_t * 2439 elem, long int min, 2440 long int max); 2441 extern int snd_mixer_selem_set_enum_item(snd_mixer_elem_t * elem, 2442 snd_mixer_selem_channel_id_t 2443 channel, unsigned int idx); 2444 extern int snd_mixer_selem_set_playback_switch(snd_mixer_elem_t * elem, 2445 snd_mixer_selem_channel_id_t 2446 channel, int value); 2447 extern int snd_mixer_selem_set_playback_switch_all(snd_mixer_elem_t * elem, 2448 int value); 2449 extern int snd_mixer_selem_set_playback_volume(snd_mixer_elem_t * elem, 2450 snd_mixer_selem_channel_id_t 2451 channel, long int value); 2452 extern int snd_mixer_selem_set_playback_volume_all(snd_mixer_elem_t * elem, 2453 long int value); 2454 extern int snd_mixer_selem_set_playback_volume_range(snd_mixer_elem_t * 2455 elem, long int min, 2456 long int max); 2457 extern void snd_mixer_set_callback(snd_mixer_t * obj, 2458 snd_mixer_callback_t val); 2459 extern void snd_mixer_set_callback_private(snd_mixer_t * obj, void *val); 2460 extern int snd_mixer_wait(snd_mixer_t * mixer, int timeout); 2461 __________________________________________________________ 2462 2463 6.2.10. alsa/mixer_abst.h 2464 2465 #define sm_selem(x) ((sm_selem_t *)((x)->private_data)) 2466 #define sm_selem_ops(x) ((sm_selem_t *)((x)->private_data))->ops 2467 #define SM_CAP_GVOLUME (1<<1) 2468 #define SM_CAP_CSWITCH_JOIN (1<<10) 2469 #define SM_CAP_CSWITCH_EXCL (1<<11) 2470 #define SM_CAP_PENUM (1<<12) 2471 #define SM_CAP_CENUM (1<<13) 2472 #define SM_CAP_GSWITCH (1<<2) 2473 #define SM_CAP_PVOLUME (1<<3) 2474 #define SM_CAP_PVOLUME_JOIN (1<<4) 2475 #define SM_CAP_PSWITCH (1<<5) 2476 #define SM_CAP_PSWITCH_JOIN (1<<6) 2477 #define SM_CAP_CVOLUME (1<<7) 2478 #define SM_CAP_CVOLUME_JOIN (1<<8) 2479 #define SM_CAP_CSWITCH (1<<9) 2480 #define SM_OPS_IS_ACTIVE 0 2481 #define SM_OPS_IS_MONO 1 2482 #define SM_OPS_IS_CHANNEL 2 2483 #define SM_OPS_IS_ENUMERATED 3 2484 #define SM_OPS_IS_ENUMCNT 4 2485 2486 typedef struct _sm_class_basic { 2487 char *device; 2488 snd_ctl_t *ctl; 2489 snd_hctl_t *hctl; 2490 snd_ctl_card_info_t *info; 2491 } sm_class_basic_t; 2492 __________________________________________________________ 2493 2494 6.2.11. alsa/output.h 2495 2496 typedef struct _snd_output snd_output_t; 2497 extern int snd_output_buffer_open(snd_output_t * *outputp); 2498 extern size_t snd_output_buffer_string(snd_output_t * output, char **buf); 2499 extern int snd_output_close(snd_output_t * output); 2500 extern int snd_output_putc(snd_output_t * output, int c); 2501 extern int snd_output_puts(snd_output_t * output, const char *str); 2502 extern int snd_output_stdio_attach(snd_output_t * *outputp, FILE * fp, 2503 int _close); 2504 extern int snd_output_stdio_open(snd_output_t * *outputp, const char *file, 2505 const char *mode); 2506 __________________________________________________________ 2507 2508 6.2.12. alsa/pcm.h 2509 2510 #define SND_PCM_NONBLOCK 0x0001 2511 #define SND_PCM_ASYNC 0x0002 2512 2513 typedef struct sndrv_mask snd_pcm_access_mask_t; 2514 typedef enum _snd_pcm_access { 2515 SND_PCM_ACCESS_MMAP_INTERLEAVED, 2516 SND_PCM_ACCESS_MMAP_NONINTERLEAVED = 1, 2517 SND_PCM_ACCESS_MMAP_COMPLEX = 2, 2518 SND_PCM_ACCESS_RW_INTERLEAVED = 3, 2519 SND_PCM_ACCESS_RW_NONINTERLEAVED = 4, 2520 SND_PCM_ACCESS_LAST = 4 2521 } snd_pcm_access_t; 2522 typedef struct _snd_pcm_channel_area { 2523 void *addr; 2524 unsigned int first; 2525 unsigned int step; 2526 } snd_pcm_channel_area_t; 2527 typedef enum _snd_pcm_class { 2528 SND_PCM_CLASS_GENERIC, 2529 SND_PCM_CLASS_MULTI = 1, 2530 SND_PCM_CLASS_MODEM = 2, 2531 SND_PCM_CLASS_DIGITIZER = 3, 2532 SND_PCM_CLASS_LAST = 3 2533 } snd_pcm_class_t; 2534 typedef struct sndrv_mask snd_pcm_format_mask_t; 2535 typedef enum _snd_pcm_format { 2536 SND_PCM_FORMAT_UNKNOWN = -1, 2537 SND_PCM_FORMAT_S8, 2538 SND_PCM_FORMAT_U8 = 1, 2539 SND_PCM_FORMAT_S16_LE = 2, 2540 SND_PCM_FORMAT_S16_BE = 3, 2541 SND_PCM_FORMAT_U16_LE = 4, 2542 SND_PCM_FORMAT_U16_BE = 5, 2543 SND_PCM_FORMAT_S24_LE = 6, 2544 SND_PCM_FORMAT_S24_BE = 7, 2545 SND_PCM_FORMAT_U24_LE = 8, 2546 SND_PCM_FORMAT_U24_BE = 9, 2547 SND_PCM_FORMAT_S32_LE = 10, 2548 SND_PCM_FORMAT_S32_BE = 11, 2549 SND_PCM_FORMAT_U32_LE = 12, 2550 SND_PCM_FORMAT_U32_BE = 13, 2551 SND_PCM_FORMAT_FLOAT_LE = 14, 2552 SND_PCM_FORMAT_FLOAT_BE = 15, 2553 SND_PCM_FORMAT_FLOAT64_LE = 16, 2554 SND_PCM_FORMAT_FLOAT64_BE = 17, 2555 SND_PCM_FORMAT_IEC958_SUBFRAME_LE = 18, 2556 SND_PCM_FORMAT_IEC958_SUBFRAME_BE = 19, 2557 SND_PCM_FORMAT_MU_LAW = 20, 2558 SND_PCM_FORMAT_A_LAW = 21, 2559 SND_PCM_FORMAT_IMA_ADPCM = 22, 2560 SND_PCM_FORMAT_MPEG = 23, 2561 SND_PCM_FORMAT_GSM = 24, 2562 SND_PCM_FORMAT_SPECIAL = 31, 2563 SND_PCM_FORMAT_S24_3LE = 32, 2564 SND_PCM_FORMAT_S24_3BE = 33, 2565 SND_PCM_FORMAT_U24_3LE = 34, 2566 SND_PCM_FORMAT_U24_3BE = 35, 2567 SND_PCM_FORMAT_S20_3LE = 36, 2568 SND_PCM_FORMAT_S20_3BE = 37, 2569 SND_PCM_FORMAT_U20_3LE = 38, 2570 SND_PCM_FORMAT_U20_3BE = 39, 2571 SND_PCM_FORMAT_S18_3LE = 40, 2572 SND_PCM_FORMAT_S18_3BE = 41, 2573 SND_PCM_FORMAT_U18_3LE = 42, 2574 SND_PCM_FORMAT_U18_3BE = 43, 2575 SND_PCM_FORMAT_LAST = 43, 2576 SND_PCM_FORMAT_S16 = 2, 2577 SND_PCM_FORMAT_U16 = 4, 2578 SND_PCM_FORMAT_S24 = 6, 2579 SND_PCM_FORMAT_U24 = 8, 2580 SND_PCM_FORMAT_S32 = 10, 2581 SND_PCM_FORMAT_U32 = 12, 2582 SND_PCM_FORMAT_FLOAT = 14, 2583 SND_PCM_FORMAT_FLOAT64 = 16, 2584 SND_PCM_FORMAT_IEC958_SUBFRAME = 18 2585 } snd_pcm_format_t; 2586 typedef struct _snd_pcm_hook snd_pcm_hook_t; 2587 typedef int (*snd_pcm_hook_func_t) (snd_pcm_hook_t *); 2588 typedef enum _snd_pcm_hook_type { 2589 SND_PCM_HOOK_TYPE_HW_PARAMS, 2590 SND_PCM_HOOK_TYPE_HW_FREE = 1, 2591 SND_PCM_HOOK_TYPE_CLOSE = 2, 2592 SND_PCM_HOOK_TYPE_LAST = 2 2593 } snd_pcm_hook_type_t; 2594 typedef struct sndrv_pcm_hw_params snd_pcm_hw_params_t; 2595 typedef struct sndrv_pcm_info snd_pcm_info_t; 2596 typedef struct _snd_pcm_scope_ops { 2597 int (*enable) (void); 2598 void (*disable) (void); 2599 void (*start) (void); 2600 void (*stop) (void); 2601 void (*update) (void); 2602 void (*reset) (void); 2603 void (*close) (void); 2604 } snd_pcm_scope_ops_t; 2605 typedef struct _snd_pcm_scope snd_pcm_scope_t; 2606 typedef long int snd_pcm_sframes_t; 2607 typedef enum _snd_pcm_start { 2608 SND_PCM_START_DATA, 2609 SND_PCM_START_EXPLICIT = 1, 2610 SND_PCM_START_LAST = 1 2611 } snd_pcm_start_t; 2612 typedef enum _snd_pcm_state { 2613 SND_PCM_STATE_OPEN, 2614 SND_PCM_STATE_SETUP = 1, 2615 SND_PCM_STATE_PREPARED = 2, 2616 SND_PCM_STATE_RUNNING = 3, 2617 SND_PCM_STATE_XRUN = 4, 2618 SND_PCM_STATE_DRAINING = 5, 2619 SND_PCM_STATE_PAUSED = 6, 2620 SND_PCM_STATE_SUSPENDED = 7, 2621 SND_PCM_STATE_DISCONNECTED = 8, 2622 SND_PCM_STATE_LAST = 8 2623 } snd_pcm_state_t; 2624 typedef struct sndrv_pcm_status snd_pcm_status_t; 2625 typedef enum _snd_pcm_stream { 2626 SND_PCM_STREAM_PLAYBACK, 2627 SND_PCM_STREAM_CAPTURE = 1, 2628 SND_PCM_STREAM_LAST = 1 2629 } snd_pcm_stream_t; 2630 typedef enum _snd_pcm_subclass { 2631 SND_PCM_SUBCLASS_GENERIC_MIX, 2632 SND_PCM_SUBCLASS_MULTI_MIX = 1, 2633 SND_PCM_SUBCLASS_LAST = 1 2634 } snd_pcm_subclass_t; 2635 typedef struct sndrv_mask snd_pcm_subformat_mask_t; 2636 typedef enum _snd_pcm_subformat { 2637 SND_PCM_SUBFORMAT_STD, 2638 SND_PCM_SUBFORMAT_LAST 2639 } snd_pcm_subformat_t; 2640 typedef struct sndrv_pcm_sw_params snd_pcm_sw_params_t; 2641 typedef union _snd_pcm_sync_id { 2642 unsigned char id[16]; 2643 short unsigned int id16[8]; 2644 unsigned int id32[4]; 2645 } snd_pcm_sync_id_t; 2646 typedef struct _snd_pcm snd_pcm_t; 2647 typedef enum _snd_pcm_tstamp { 2648 SND_PCM_TSTAMP_NONE, 2649 SND_PCM_TSTAMP_MMAP = 1, 2650 SND_PCM_TSTAMP_LAST = 1 2651 } snd_pcm_tstamp_t; 2652 typedef enum _snd_pcm_type { 2653 SND_PCM_TYPE_HW, 2654 SND_PCM_TYPE_HOOKS = 1, 2655 SND_PCM_TYPE_MULTI = 2, 2656 SND_PCM_TYPE_FILE = 3, 2657 SND_PCM_TYPE_NULL = 4, 2658 SND_PCM_TYPE_SHM = 5, 2659 SND_PCM_TYPE_INET = 6, 2660 SND_PCM_TYPE_COPY = 7, 2661 SND_PCM_TYPE_LINEAR = 8, 2662 SND_PCM_TYPE_ALAW = 9, 2663 SND_PCM_TYPE_MULAW = 10, 2664 SND_PCM_TYPE_ADPCM = 11, 2665 SND_PCM_TYPE_RATE = 12, 2666 SND_PCM_TYPE_ROUTE = 13, 2667 SND_PCM_TYPE_PLUG = 14, 2668 SND_PCM_TYPE_SHARE = 15, 2669 SND_PCM_TYPE_METER = 16, 2670 SND_PCM_TYPE_MIX = 17, 2671 SND_PCM_TYPE_DROUTE = 18, 2672 SND_PCM_TYPE_LBSERVER = 19, 2673 SND_PCM_TYPE_LINEAR_FLOAT = 20, 2674 SND_PCM_TYPE_LADSPA = 21, 2675 SND_PCM_TYPE_DMIX = 22, 2676 SND_PCM_TYPE_JACK = 23, 2677 SND_PCM_TYPE_DSNOOP = 24, 2678 SND_PCM_TYPE_DSHARE = 25, 2679 SND_PCM_TYPE_IEC958 = 26, 2680 SND_PCM_TYPE_SOFTVOL = 27, 2681 SND_PCM_TYPE_IOPLUG = 28, 2682 SND_PCM_TYPE_EXTPLUG = 29, 2683 SND_PCM_TYPE_LAST = 29 2684 } snd_pcm_type_t; 2685 typedef long unsigned int snd_pcm_uframes_t; 2686 typedef enum _snd_pcm_xrun { 2687 SND_PCM_XRUN_NONE, 2688 SND_PCM_XRUN_STOP = 1, 2689 SND_PCM_XRUN_LAST = 1 2690 } snd_pcm_xrun_t; 2691 typedef enum _snd_spcm_duplex_type { 2692 SND_SPCM_DUPLEX_LIBERAL, 2693 SND_SPCM_DUPLEX_PEDANTIC = 1 2694 } snd_spcm_duplex_type_t; 2695 typedef enum _snd_spcm_latency { 2696 SND_SPCM_LATENCY_STANDARD, 2697 SND_SPCM_LATENCY_MEDIUM = 1, 2698 SND_SPCM_LATENCY_REALTIME = 2 2699 } snd_spcm_latency_t; 2700 typedef enum _snd_spcm_xrun_type { 2701 SND_SPCM_XRUN_IGNORE, 2702 SND_SPCM_XRUN_STOP = 1 2703 } snd_spcm_xrun_type_t; 2704 extern int snd_async_add_pcm_handler(snd_async_handler_t * *handler, 2705 snd_pcm_t * pcm, 2706 snd_async_callback_t callback, 2707 void *private_data); 2708 extern snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t * handler); 2709 extern void snd_pcm_access_mask_any(snd_pcm_access_mask_t * mask); 2710 extern void snd_pcm_access_mask_copy(snd_pcm_access_mask_t * dst, 2711 const snd_pcm_access_mask_t * src); 2712 extern void snd_pcm_access_mask_free(snd_pcm_access_mask_t * obj); 2713 extern int snd_pcm_access_mask_malloc(snd_pcm_access_mask_t * *ptr); 2714 extern void snd_pcm_access_mask_none(snd_pcm_access_mask_t * mask); 2715 extern void snd_pcm_access_mask_set(snd_pcm_access_mask_t * mask, 2716 snd_pcm_access_t val); 2717 extern size_t snd_pcm_access_mask_sizeof(void); 2718 extern int snd_pcm_access_mask_test(const snd_pcm_access_mask_t * mask, 2719 snd_pcm_access_t val); 2720 extern const char *snd_pcm_access_name(snd_pcm_access_t _access); 2721 extern int snd_pcm_area_copy(const snd_pcm_channel_area_t * dst_channel, 2722 snd_pcm_uframes_t dst_offset, 2723 const snd_pcm_channel_area_t * src_channel, 2724 snd_pcm_uframes_t src_offset, 2725 unsigned int samples, 2726 snd_pcm_format_t format); 2727 extern int snd_pcm_area_silence(const snd_pcm_channel_area_t * dst_channel, 2728 snd_pcm_uframes_t dst_offset, 2729 unsigned int samples, 2730 snd_pcm_format_t format); 2731 extern int snd_pcm_areas_copy(const snd_pcm_channel_area_t * dst_channels, 2732 snd_pcm_uframes_t dst_offset, 2733 const snd_pcm_channel_area_t * src_channels, 2734 snd_pcm_uframes_t src_offset, 2735 unsigned int channels, 2736 snd_pcm_uframes_t frames, 2737 snd_pcm_format_t format); 2738 extern int snd_pcm_areas_silence(const snd_pcm_channel_area_t * 2739 dst_channels, 2740 snd_pcm_uframes_t dst_offset, 2741 unsigned int channels, 2742 snd_pcm_uframes_t frames, 2743 snd_pcm_format_t format); 2744 extern snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t * pcm); 2745 extern snd_pcm_format_t snd_pcm_build_linear_format(int width, int pwidth, 2746 int unsignd, 2747 int big_endian); 2748 extern snd_pcm_sframes_t snd_pcm_bytes_to_frames(snd_pcm_t * pcm, 2749 ssize_t bytes); 2750 extern long int snd_pcm_bytes_to_samples(snd_pcm_t * pcm, ssize_t bytes); 2751 extern int snd_pcm_close(snd_pcm_t * pcm); 2752 extern int snd_pcm_delay(snd_pcm_t * pcm, snd_pcm_sframes_t * delayp); 2753 extern int snd_pcm_drain(snd_pcm_t * pcm); 2754 extern int snd_pcm_drop(snd_pcm_t * pcm); 2755 extern int snd_pcm_dump(snd_pcm_t * pcm, snd_output_t * out); 2756 extern int snd_pcm_format_big_endian(snd_pcm_format_t format); 2757 extern int snd_pcm_format_cpu_endian(snd_pcm_format_t format); 2758 extern const char *snd_pcm_format_description(snd_pcm_format_t format); 2759 extern int snd_pcm_format_float(snd_pcm_format_t format); 2760 extern int snd_pcm_format_linear(snd_pcm_format_t format); 2761 extern int snd_pcm_format_little_endian(snd_pcm_format_t format); 2762 extern void snd_pcm_format_mask_any(snd_pcm_format_mask_t * mask); 2763 extern void snd_pcm_format_mask_copy(snd_pcm_format_mask_t * dst, 2764 const snd_pcm_format_mask_t * src); 2765 extern void snd_pcm_format_mask_free(snd_pcm_format_mask_t * obj); 2766 extern int snd_pcm_format_mask_malloc(snd_pcm_format_mask_t * *ptr); 2767 extern void snd_pcm_format_mask_none(snd_pcm_format_mask_t * mask); 2768 extern void snd_pcm_format_mask_set(snd_pcm_format_mask_t * mask, 2769 snd_pcm_format_t val); 2770 extern size_t snd_pcm_format_mask_sizeof(void); 2771 extern int snd_pcm_format_mask_test(const snd_pcm_format_mask_t * mask, 2772 snd_pcm_format_t val); 2773 extern const char *snd_pcm_format_name(snd_pcm_format_t format); 2774 extern int snd_pcm_format_physical_width(snd_pcm_format_t format); 2775 extern int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, 2776 unsigned int samples); 2777 extern int snd_pcm_format_signed(snd_pcm_format_t format); 2778 extern ssize_t snd_pcm_format_size(snd_pcm_format_t format, 2779 size_t samples); 2780 extern int snd_pcm_format_unsigned(snd_pcm_format_t format); 2781 extern snd_pcm_format_t snd_pcm_format_value(const char *name); 2782 extern int snd_pcm_format_width(snd_pcm_format_t format); 2783 extern snd_pcm_sframes_t snd_pcm_forward(snd_pcm_t * pcm, 2784 snd_pcm_uframes_t frames); 2785 extern ssize_t snd_pcm_frames_to_bytes(snd_pcm_t * pcm, 2786 snd_pcm_sframes_t frames); 2787 extern int snd_pcm_hw_free(snd_pcm_t * pcm); 2788 extern int snd_pcm_hw_params(snd_pcm_t * pcm, 2789 snd_pcm_hw_params_t * params); 2790 extern int snd_pcm_hw_params_any(snd_pcm_t * pcm, 2791 snd_pcm_hw_params_t * params); 2792 extern int snd_pcm_hw_params_can_mmap_sample_resolution(const 2793 snd_pcm_hw_params_t 2794 * params); 2795 extern int snd_pcm_hw_params_can_pause(const snd_pcm_hw_params_t * params); 2796 extern int snd_pcm_hw_params_can_resume(const snd_pcm_hw_params_t * 2797 params); 2798 extern int snd_pcm_hw_params_can_sync_start(const snd_pcm_hw_params_t * 2799 params); 2800 extern void snd_pcm_hw_params_copy(snd_pcm_hw_params_t * dst, 2801 const snd_pcm_hw_params_t * src); 2802 extern int snd_pcm_hw_params_current(snd_pcm_t * pcm, 2803 snd_pcm_hw_params_t * params); 2804 extern int snd_pcm_hw_params_dump(snd_pcm_hw_params_t * params, 2805 snd_output_t * out); 2806 extern void snd_pcm_hw_params_free(snd_pcm_hw_params_t * obj); 2807 extern int snd_pcm_hw_params_get_access(const snd_pcm_hw_params_t * params, 2808 snd_pcm_access_t * _access); 2809 extern int snd_pcm_hw_params_get_access_mask(snd_pcm_hw_params_t * params, 2810 snd_pcm_access_mask_t * mask); 2811 extern int snd_pcm_hw_params_get_buffer_size(const snd_pcm_hw_params_t * 2812 params, 2813 snd_pcm_uframes_t * val); 2814 extern int snd_pcm_hw_params_get_buffer_size_max(const snd_pcm_hw_params_t 2815 * params, 2816 snd_pcm_uframes_t * val); 2817 extern int snd_pcm_hw_params_get_buffer_size_min(const snd_pcm_hw_params_t 2818 * params, 2819 snd_pcm_uframes_t * val); 2820 extern int snd_pcm_hw_params_get_buffer_time(const snd_pcm_hw_params_t * 2821 params, unsigned int *val, 2822 int *dir); 2823 extern int snd_pcm_hw_params_get_buffer_time_max(const snd_pcm_hw_params_t 2824 * params, 2825 unsigned int *val, 2826 int *dir); 2827 extern int snd_pcm_hw_params_get_buffer_time_min(const snd_pcm_hw_params_t 2828 * params, 2829 unsigned int *val, 2830 int *dir); 2831 extern int snd_pcm_hw_params_get_channels(const snd_pcm_hw_params_t * 2832 params, unsigned int *val); 2833 extern int snd_pcm_hw_params_get_channels_max(const snd_pcm_hw_params_t* 2834 params, unsigned int *val); 2835 extern int snd_pcm_hw_params_get_channels_min(const snd_pcm_hw_params_t* 2836 params, unsigned int *val); 2837 extern int snd_pcm_hw_params_get_format(const snd_pcm_hw_params_t * params, 2838 snd_pcm_format_t * val); 2839 extern void snd_pcm_hw_params_get_format_mask(snd_pcm_hw_params_t * params, 2840 snd_pcm_format_mask_t * 2841 mask); 2842 extern int snd_pcm_hw_params_get_period_size(const snd_pcm_hw_params_t * 2843 params, 2844 snd_pcm_uframes_t * frames, 2845 int *dir); 2846 extern int snd_pcm_hw_params_get_period_size_max(const snd_pcm_hw_params_t 2847 * params, 2848 snd_pcm_uframes_t * 2849 frames, int *dir); 2850 extern int snd_pcm_hw_params_get_period_size_min(const snd_pcm_hw_params_t 2851 * params, 2852 snd_pcm_uframes_t * 2853 frames, int *dir); 2854 extern int snd_pcm_hw_params_get_period_time(const snd_pcm_hw_params_t * 2855 params, unsigned int *val, 2856 int *dir); 2857 extern int snd_pcm_hw_params_get_period_time_max(const snd_pcm_hw_params_t 2858 * params, 2859 unsigned int *val, 2860 int *dir); 2861 extern int snd_pcm_hw_params_get_period_time_min(const snd_pcm_hw_params_t 2862 * params, 2863 unsigned int *val, 2864 int *dir); 2865 extern int snd_pcm_hw_params_get_periods(const snd_pcm_hw_params_t * 2866 params, unsigned int *val, 2867 int *dir); 2868 extern int snd_pcm_hw_params_get_periods_max(const snd_pcm_hw_params_t * 2869 params, unsigned int *val, 2870 int *dir); 2871 extern int snd_pcm_hw_params_get_periods_min(const snd_pcm_hw_params_t * 2872 params, unsigned int *val, 2873 int *dir); 2874 extern int snd_pcm_hw_params_get_rate(const snd_pcm_hw_params_t * params, 2875 unsigned int *val, int *dir); 2876 extern int snd_pcm_hw_params_get_rate_max(const snd_pcm_hw_params_t * 2877 params, unsigned int *val, 2878 int *dir); 2879 extern int snd_pcm_hw_params_get_rate_min(const snd_pcm_hw_params_t * 2880 params, unsigned int *val, 2881 int *dir); 2882 extern int snd_pcm_hw_params_get_rate_numden(const snd_pcm_hw_params_t * 2883 params, 2884 unsigned int *rate_num, 2885 unsigned int *rate_den); 2886 extern int snd_pcm_hw_params_get_rate_resample(snd_pcm_t * pcm, 2887 snd_pcm_hw_params_t * 2888 params, unsigned int *val); 2889 extern int snd_pcm_hw_params_get_sbits(const snd_pcm_hw_params_t * params); 2890 extern int snd_pcm_hw_params_is_double(const snd_pcm_hw_params_t * params); 2891 extern int snd_pcm_hw_params_is_half_duplex(const snd_pcm_hw_params_t * 2892 params); 2893 extern int snd_pcm_hw_params_is_joint_duplex(const snd_pcm_hw_params_t * 2894 params); 2895 extern int snd_pcm_hw_params_malloc(snd_pcm_hw_params_t * *ptr); 2896 extern int snd_pcm_hw_params_set_access(snd_pcm_t * pcm, 2897 snd_pcm_hw_params_t * params, 2898 snd_pcm_access_t _access); 2899 extern int snd_pcm_hw_params_set_access_mask(snd_pcm_t * pcm, 2900 snd_pcm_hw_params_t * params, 2901 snd_pcm_access_mask_t * mask); 2902 extern int snd_pcm_hw_params_set_buffer_size(snd_pcm_t * pcm, 2903 snd_pcm_hw_params_t * params, 2904 snd_pcm_uframes_t val); 2905 extern int snd_pcm_hw_params_set_buffer_size_near(snd_pcm_t * pcm, 2906 snd_pcm_hw_params_t * 2907 params, 2908 snd_pcm_uframes_t * val); 2909 extern int snd_pcm_hw_params_set_buffer_time(snd_pcm_t * pcm, 2910 snd_pcm_hw_params_t * params, 2911 unsigned int val, int dir); 2912 extern int snd_pcm_hw_params_set_buffer_time_near(snd_pcm_t * pcm, 2913 snd_pcm_hw_params_t * 2914 params, 2915 unsigned int *val, 2916 int *dir); 2917 extern int snd_pcm_hw_params_set_channels(snd_pcm_t * pcm, 2918 snd_pcm_hw_params_t * params, 2919 unsigned int val); 2920 extern int snd_pcm_hw_params_set_channels_near(snd_pcm_t * pcm, 2921 snd_pcm_hw_params_t * 2922 params, unsigned int *val); 2923 extern int snd_pcm_hw_params_set_format(snd_pcm_t * pcm, 2924 snd_pcm_hw_params_t * params, 2925 snd_pcm_format_t val); 2926 extern int snd_pcm_hw_params_set_format_mask(snd_pcm_t * pcm, 2927 snd_pcm_hw_params_t * params, 2928 snd_pcm_format_mask_t * mask); 2929 extern int snd_pcm_hw_params_set_period_size(snd_pcm_t * pcm, 2930 snd_pcm_hw_params_t * params, 2931 snd_pcm_uframes_t val, 2932 int dir); 2933 extern int snd_pcm_hw_params_set_period_size_near(snd_pcm_t * pcm, 2934 snd_pcm_hw_params_t * 2935 params, 2936 snd_pcm_uframes_t * val, 2937 int *dir); 2938 extern int snd_pcm_hw_params_set_period_time(snd_pcm_t * pcm, 2939 snd_pcm_hw_params_t * params, 2940 unsigned int val, int dir); 2941 extern int snd_pcm_hw_params_set_period_time_near(snd_pcm_t * pcm, 2942 snd_pcm_hw_params_t * 2943 params, 2944 unsigned int *val, 2945 int *dir); 2946 extern int snd_pcm_hw_params_set_periods(snd_pcm_t * pcm, 2947 snd_pcm_hw_params_t * params, 2948 unsigned int val, int dir); 2949 extern int snd_pcm_hw_params_set_periods_integer(snd_pcm_t * pcm, 2950 snd_pcm_hw_params_t * 2951 params); 2952 extern int snd_pcm_hw_params_set_periods_near(snd_pcm_t * pcm, 2953 snd_pcm_hw_params_t * params, 2954 unsigned int *val, int *dir); 2955 extern int snd_pcm_hw_params_set_rate(snd_pcm_t * pcm, 2956 snd_pcm_hw_params_t * params, 2957 unsigned int val, int dir); 2958 extern int snd_pcm_hw_params_set_rate_near(snd_pcm_t * pcm, 2959 snd_pcm_hw_params_t * params, 2960 unsigned int *val, int *dir); 2961 extern int snd_pcm_hw_params_set_rate_resample(snd_pcm_t * pcm, 2962 snd_pcm_hw_params_t * 2963 params, unsigned int val); 2964 extern size_t snd_pcm_hw_params_sizeof(void); 2965 extern int snd_pcm_hw_params_test_access(snd_pcm_t * pcm, 2966 snd_pcm_hw_params_t * params, 2967 snd_pcm_access_t _access); 2968 extern int snd_pcm_hw_params_test_buffer_size(snd_pcm_t * pcm, 2969 snd_pcm_hw_params_t * params, 2970 snd_pcm_uframes_t val); 2971 extern int snd_pcm_hw_params_test_buffer_time(snd_pcm_t * pcm, 2972 snd_pcm_hw_params_t * params, 2973 unsigned int val, int dir); 2974 extern int snd_pcm_hw_params_test_channels(snd_pcm_t * pcm, 2975 snd_pcm_hw_params_t * params, 2976 unsigned int val); 2977 extern int snd_pcm_hw_params_test_format(snd_pcm_t * pcm, 2978 snd_pcm_hw_params_t * params, 2979 snd_pcm_format_t val); 2980 extern int snd_pcm_hw_params_test_period_size(snd_pcm_t * pcm, 2981 snd_pcm_hw_params_t * params, 2982 snd_pcm_uframes_t val, 2983 int dir); 2984 extern int snd_pcm_hw_params_test_period_time(snd_pcm_t * pcm, 2985 snd_pcm_hw_params_t * params, 2986 unsigned int val, int dir); 2987 extern int snd_pcm_hw_params_test_periods(snd_pcm_t * pcm, 2988 snd_pcm_hw_params_t * params, 2989 unsigned int val, int dir); 2990 extern int snd_pcm_hw_params_test_rate(snd_pcm_t * pcm, 2991 snd_pcm_hw_params_t * params, 2992 unsigned int val, int dir); 2993 extern int snd_pcm_hwsync(snd_pcm_t * pcm); 2994 extern int snd_pcm_info(snd_pcm_t * pcm, snd_pcm_info_t * info); 2995 extern void snd_pcm_info_copy(snd_pcm_info_t * dst, 2996 const snd_pcm_info_t * src); 2997 extern void snd_pcm_info_free(snd_pcm_info_t * obj); 2998 extern int snd_pcm_info_get_card(const snd_pcm_info_t * obj); 2999 extern snd_pcm_class_t snd_pcm_info_get_class(const snd_pcm_info_t * obj); 3000 extern unsigned int snd_pcm_info_get_device(const snd_pcm_info_t * obj); 3001 extern const char *snd_pcm_info_get_id(const snd_pcm_info_t * obj); 3002 extern const char *snd_pcm_info_get_name(const snd_pcm_info_t * obj); 3003 extern snd_pcm_stream_t snd_pcm_info_get_stream(const snd_pcm_info_t * 3004 obj); 3005 extern unsigned int snd_pcm_info_get_subdevice(const snd_pcm_info_t * obj); 3006 extern const char *snd_pcm_info_get_subdevice_name(const snd_pcm_info_t* 3007 obj); 3008 extern unsigned int snd_pcm_info_get_subdevices_avail(const snd_pcm_info_t 3009 * obj); 3010 extern unsigned int snd_pcm_info_get_subdevices_count(const snd_pcm_info_t 3011 * obj); 3012 extern int snd_pcm_info_malloc(snd_pcm_info_t * *ptr); 3013 extern void snd_pcm_info_set_device(snd_pcm_info_t * obj, 3014 unsigned int val); 3015 extern void snd_pcm_info_set_stream(snd_pcm_info_t * obj, 3016 snd_pcm_stream_t val); 3017 extern void snd_pcm_info_set_subdevice(snd_pcm_info_t * obj, 3018 unsigned int val); 3019 extern size_t snd_pcm_info_sizeof(void); 3020 extern int snd_pcm_link(snd_pcm_t * pcm1, snd_pcm_t * pcm2); 3021 extern int snd_pcm_mmap_begin(snd_pcm_t * pcm, 3022 const snd_pcm_channel_area_t * *areas, 3023 snd_pcm_uframes_t * offset, 3024 snd_pcm_uframes_t * frames); 3025 extern snd_pcm_sframes_t snd_pcm_mmap_commit(snd_pcm_t * pcm, 3026 snd_pcm_uframes_t offset, 3027 snd_pcm_uframes_t frames); 3028 extern snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t * pcm, void *buffer, 3029 snd_pcm_uframes_t size); 3030 extern snd_pcm_sframes_t snd_pcm_mmap_readn(snd_pcm_t * pcm, void **bufs, 3031 snd_pcm_uframes_t size); 3032 extern snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t * pcm, 3033 const void *buffer, 3034 snd_pcm_uframes_t size); 3035 extern snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t * pcm, void **bufs, 3036 snd_pcm_uframes_t size); 3037 extern const char *snd_pcm_name(snd_pcm_t * pcm); 3038 extern int snd_pcm_nonblock(snd_pcm_t * pcm, int nonblock); 3039 extern int snd_pcm_open(snd_pcm_t * *pcm, const char *name, 3040 snd_pcm_stream_t stream, int mode); 3041 extern int snd_pcm_open_lconf(snd_pcm_t * *pcm, const char *name, 3042 snd_pcm_stream_t stream, int mode, 3043 snd_config_t * lconf); 3044 extern int snd_pcm_pause(snd_pcm_t * pcm, int enable); 3045 extern int snd_pcm_poll_descriptors(snd_pcm_t * pcm, struct pollfd *pfds, 3046 unsigned int space); 3047 extern int snd_pcm_poll_descriptors_count(snd_pcm_t * pcm); 3048 extern int snd_pcm_poll_descriptors_revents(snd_pcm_t * pcm, 3049 struct pollfd *pfds, 3050 unsigned int nfds, 3051 short unsigned int *revents); 3052 extern int snd_pcm_prepare(snd_pcm_t * pcm); 3053 extern snd_pcm_sframes_t snd_pcm_readi(snd_pcm_t * pcm, void *buffer, 3054 snd_pcm_uframes_t size); 3055 extern snd_pcm_sframes_t snd_pcm_readn(snd_pcm_t * pcm, void **bufs, 3056 snd_pcm_uframes_t size); 3057 extern int snd_pcm_recover(snd_pcm_t * pcm, int err, int silent); 3058 extern int snd_pcm_reset(snd_pcm_t * pcm); 3059 extern int snd_pcm_resume(snd_pcm_t * pcm); 3060 extern snd_pcm_sframes_t snd_pcm_rewind(snd_pcm_t * pcm, 3061 snd_pcm_uframes_t frames); 3062 extern ssize_t snd_pcm_samples_to_bytes(snd_pcm_t * pcm, long int samples); 3063 extern int snd_pcm_start(snd_pcm_t * pcm); 3064 extern snd_pcm_state_t snd_pcm_state(snd_pcm_t * pcm); 3065 extern const char *snd_pcm_state_name(snd_pcm_state_t state); 3066 extern int snd_pcm_status(snd_pcm_t * pcm, snd_pcm_status_t * status); 3067 extern void snd_pcm_status_copy(snd_pcm_status_t * dst, 3068 const snd_pcm_status_t * src); 3069 extern int snd_pcm_status_dump(snd_pcm_status_t * status, 3070 snd_output_t * out); 3071 extern void snd_pcm_status_free(snd_pcm_status_t * obj); 3072 extern snd_pcm_uframes_t snd_pcm_status_get_avail(const snd_pcm_status_t * 3073 obj); 3074 extern snd_pcm_uframes_t snd_pcm_status_get_avail_max(const 3075 snd_pcm_status_t * 3076 obj); 3077 extern snd_pcm_sframes_t snd_pcm_status_get_delay(const snd_pcm_status_t * 3078 obj); 3079 extern snd_pcm_state_t snd_pcm_status_get_state(const snd_pcm_status_t * 3080 obj); 3081 extern void snd_pcm_status_get_trigger_tstamp(const snd_pcm_status_t * obj, 3082 snd_timestamp_t * ptr); 3083 extern void snd_pcm_status_get_tstamp(const snd_pcm_status_t * obj, 3084 snd_timestamp_t * ptr); 3085 extern int snd_pcm_status_malloc(snd_pcm_status_t * *ptr); 3086 extern size_t snd_pcm_status_sizeof(void); 3087 extern snd_pcm_stream_t snd_pcm_stream(snd_pcm_t * pcm); 3088 extern const char *snd_pcm_stream_name(snd_pcm_stream_t stream); 3089 extern int snd_pcm_sw_params(snd_pcm_t * pcm, 3090 snd_pcm_sw_params_t * params); 3091 extern void snd_pcm_sw_params_copy(snd_pcm_sw_params_t * dst, 3092 const snd_pcm_sw_params_t * src); 3093 extern int snd_pcm_sw_params_current(snd_pcm_t * pcm, 3094 snd_pcm_sw_params_t * params); 3095 extern int snd_pcm_sw_params_dump(snd_pcm_sw_params_t * params, 3096 snd_output_t * out); 3097 extern void snd_pcm_sw_params_free(snd_pcm_sw_params_t * obj); 3098 extern int snd_pcm_sw_params_get_avail_min(const snd_pcm_sw_params_t * 3099 params, 3100 snd_pcm_uframes_t * val); 3101 extern int snd_pcm_sw_params_get_boundary(const snd_pcm_sw_params_t * 3102 params, snd_pcm_uframes_t * val); 3103 extern int snd_pcm_sw_params_get_silence_size(const snd_pcm_sw_params_t* 3104 params, 3105 snd_pcm_uframes_t * val); 3106 extern int snd_pcm_sw_params_get_silence_threshold(const 3107 snd_pcm_sw_params_t * 3108 params, 3109 snd_pcm_uframes_t * 3110 val); 3111 extern int snd_pcm_sw_params_get_start_threshold(const snd_pcm_sw_params_t 3112 * paramsm, 3113 snd_pcm_uframes_t * val); 3114 extern int snd_pcm_sw_params_get_stop_threshold(const snd_pcm_sw_params_t * 3115 params, 3116 snd_pcm_uframes_t * val); 3117 extern int snd_pcm_sw_params_get_tstamp_mode(const snd_pcm_sw_params_t * 3118 params, 3119 snd_pcm_tstamp_t * val); 3120 extern int snd_pcm_sw_params_malloc(snd_pcm_sw_params_t * *ptr); 3121 extern int snd_pcm_sw_params_set_avail_min(snd_pcm_t * pcm, 3122 snd_pcm_sw_params_t * params, 3123 snd_pcm_uframes_t val); 3124 extern int snd_pcm_sw_params_set_silence_size(snd_pcm_t * pcm, 3125 snd_pcm_sw_params_t * params, 3126 snd_pcm_uframes_t val); 3127 extern int snd_pcm_sw_params_set_silence_threshold(snd_pcm_t * pcm, 3128 snd_pcm_sw_params_t * 3129 params, 3130 snd_pcm_uframes_t val); 3131 extern int snd_pcm_sw_params_set_start_threshold(snd_pcm_t * pcm, 3132 snd_pcm_sw_params_t * 3133 params, 3134 snd_pcm_uframes_t val); 3135 extern int snd_pcm_sw_params_set_stop_threshold(snd_pcm_t * pcm, 3136 snd_pcm_sw_params_t * 3137 params, 3138 snd_pcm_uframes_t val); 3139 extern int snd_pcm_sw_params_set_tstamp_mode(snd_pcm_t * pcm, 3140 snd_pcm_sw_params_t * params, 3141 snd_pcm_tstamp_t val); 3142 extern int snd_pcm_sw_params_set_xfer_align(snd_pcm_t * pcm, 3143 snd_pcm_sw_params_t * params, 3144 snd_pcm_uframes_t val); 3145 extern size_t snd_pcm_sw_params_sizeof(void); 3146 extern snd_pcm_type_t snd_pcm_type(snd_pcm_t * pcm); 3147 extern const char *snd_pcm_type_name(snd_pcm_type_t type); 3148 extern int snd_pcm_unlink(snd_pcm_t * pcm); 3149 extern int snd_pcm_wait(snd_pcm_t * pcm, int timeout); 3150 extern snd_pcm_sframes_t snd_pcm_writei(snd_pcm_t * pcm, 3151 const void *buffer, 3152 snd_pcm_uframes_t size); 3153 extern snd_pcm_sframes_t snd_pcm_writen(snd_pcm_t * pcm, void **bufs, 3154 snd_pcm_uframes_t size); 3155 __________________________________________________________ 3156 3157 6.2.13. alsa/pcm_extplug.h 3158 3159 #define SND_PCM_EXTPLUG_VERSION ((SND_PCM_EXTPLUG_VERSION_MAJOR<<16) | (SND_PCM_EXTPLUG_VERSION_MINOR<<8) | (SND_PCM_EXTPLUG_VERSION_TINY)) 3160 #define SND_PCM_EXTPLUG_VERSION_MINOR 0 3161 #define SND_PCM_EXTPLUG_VERSION_MAJOR 1 3162 #define SND_PCM_EXTPLUG_VERSION_TINY 1 3163 3164 typedef struct snd_pcm_extplug_callback { 3165 snd_pcm_sframes_t(*transfer) (void); 3166 int (*close) (void); 3167 int (*hw_params) (void); 3168 int (*hw_free) (void); 3169 void (*dump) (void); 3170 int (*init) (void); 3171 } snd_pcm_extplug_callback_t; 3172 typedef struct snd_pcm_extplug { 3173 unsigned int version; 3174 const char *name; 3175 const snd_pcm_extplug_callback_t *callback; 3176 void *private_data; 3177 snd_pcm_t *pcm; 3178 snd_pcm_stream_t stream; 3179 snd_pcm_format_t format; 3180 snd_pcm_subformat_t subformat; 3181 unsigned int channels; 3182 unsigned int rate; 3183 snd_pcm_format_t slave_format; 3184 snd_pcm_subformat_t slave_subformat; 3185 unsigned int slave_channels; 3186 } snd_pcm_extplug_t; 3187 __________________________________________________________ 3188 3189 6.2.14. alsa/pcm_plugin.h 3190 3191 #define SND_PCM_PLUGIN_ROUTE_HALF 0.5 3192 #define SND_PCM_PLUGIN_ROUTE_FLOAT 1 3193 #define SND_PCM_PLUGIN_ROUTE_FULL 1.0 3194 #define SND_PCM_PLUGIN_ROUTE_RESOLUTION 16 3195 #define SND_PCM_PLUGIN_RATE_MAX 192000 3196 #define SND_PCM_PLUGIN_RATE_MIN 4000 3197 3198 typedef float snd_pcm_route_ttable_entry_t; 3199 __________________________________________________________ 3200 3201 6.2.15. alsa/rawmidi.h 3202 3203 #define SND_RAWMIDI_APPEND 0x0001 3204 #define SND_RAWMIDI_NONBLOCK 0x0002 3205 #define SND_RAWMIDI_SYNC 0x0004 3206 3207 typedef struct sndrv_rawmidi_info snd_rawmidi_info_t; 3208 typedef struct sndrv_rawmidi_params snd_rawmidi_params_t; 3209 typedef struct sndrv_rawmidi_status snd_rawmidi_status_t; 3210 typedef enum _snd_rawmidi_stream { 3211 SND_RAWMIDI_STREAM_OUTPUT, 3212 SND_RAWMIDI_STREAM_INPUT = 1, 3213 SND_RAWMIDI_STREAM_LAST = 1 3214 } snd_rawmidi_stream_t; 3215 typedef struct _snd_rawmidi snd_rawmidi_t; 3216 typedef enum _snd_rawmidi_type { 3217 SND_RAWMIDI_TYPE_HW, 3218 SND_RAWMIDI_TYPE_SHM = 1, 3219 SND_RAWMIDI_TYPE_INET = 2, 3220 SND_RAWMIDI_TYPE_VIRTUAL = 3 3221 } snd_rawmidi_type_t; 3222 extern int snd_rawmidi_close(snd_rawmidi_t * rmidi); 3223 extern int snd_rawmidi_drain(snd_rawmidi_t * rmidi); 3224 extern int snd_rawmidi_drop(snd_rawmidi_t * rmidi); 3225 extern void snd_rawmidi_info_free(snd_rawmidi_info_t * obj); 3226 extern const char *snd_rawmidi_info_get_id(const snd_rawmidi_info_t * obj); 3227 extern const char *snd_rawmidi_info_get_name(const snd_rawmidi_info_t * 3228 obj); 3229 extern const char *snd_rawmidi_info_get_subdevice_name(const 3230 snd_rawmidi_info_t * 3231 obj); 3232 extern unsigned int snd_rawmidi_info_get_subdevices_count(const 3233 snd_rawmidi_info_t 3234 * obj); 3235 extern int snd_rawmidi_info_malloc(snd_rawmidi_info_t * *ptr); 3236 extern void snd_rawmidi_info_set_device(snd_rawmidi_info_t * obj, 3237 unsigned int val); 3238 extern void snd_rawmidi_info_set_stream(snd_rawmidi_info_t * obj, 3239 snd_rawmidi_stream_t val); 3240 extern void snd_rawmidi_info_set_subdevice(snd_rawmidi_info_t * obj, 3241 unsigned int val); 3242 extern size_t snd_rawmidi_info_sizeof(void); 3243 extern int snd_rawmidi_nonblock(snd_rawmidi_t * rmidi, int nonblock); 3244 extern int snd_rawmidi_open(snd_rawmidi_t * *in_rmidi, 3245 snd_rawmidi_t * *out_rmidi, const char *name, 3246 int mode); 3247 extern int snd_rawmidi_poll_descriptors(snd_rawmidi_t * rmidi, 3248 struct pollfd *pfds, 3249 unsigned int space); 3250 extern int snd_rawmidi_poll_descriptors_count(snd_rawmidi_t * rmidi); 3251 extern int snd_rawmidi_poll_descriptors_revents(snd_rawmidi_t * rawmidi, 3252 struct pollfd *pfds, 3253 unsigned int nfds, 3254 short unsigned int 3255 *revent); 3256 extern ssize_t snd_rawmidi_read(snd_rawmidi_t * rmidi, void *buffer, 3257 size_t size); 3258 extern ssize_t snd_rawmidi_write(snd_rawmidi_t * rmidi, const void *buffer, 3259 size_t size); 3260 __________________________________________________________ 3261 3262 6.2.16. alsa/seq.h 3263 3264 #define snd_seq_ev_is_prior(ev) \ 3265 (((ev)->flags & SND_SEQ_PRIORITY_MASK) == SND_SEQ_PRIORITY_HIGH) 3266 #define snd_seq_ev_length_type(ev) \ 3267 ((ev)->flags & SND_SEQ_EVENT_LENGTH_MASK) 3268 #define snd_seq_ev_timemode_type(ev) \ 3269 ((ev)->flags & SND_SEQ_TIME_MODE_MASK) 3270 #define snd_seq_ev_timestamp_type(ev) \ 3271 ((ev)->flags & SND_SEQ_TIME_STAMP_MASK) 3272 #define snd_seq_ev_is_channel_type(ev) \ 3273 (snd_seq_event_types[(ev)->type] & (_SND_SEQ_TYPE(SND_SEQ_EVFLG_NOTE) \ 3274 | _SND_SEQ_TYPE(SND_SEQ_EVFLG_CONTROL))) 3275 #define snd_seq_type_check(ev,x) \ 3276 (snd_seq_event_types[(ev)->type] & _SND_SEQ_TYPE(x)) 3277 #define snd_seq_ev_is_fixed(ev) \ 3278 (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_FIXED) 3279 #define snd_seq_ev_is_variable(ev) \ 3280 (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARIABLE) 3281 #define snd_seq_ev_is_varusr(ev) \ 3282 (snd_seq_ev_length_type(ev) == SND_SEQ_EVENT_LENGTH_VARUSR) 3283 #define snd_seq_ev_is_abstime(ev) \ 3284 (snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_ABS) 3285 #define snd_seq_ev_is_reltime(ev) \ 3286 (snd_seq_ev_timemode_type(ev) == SND_SEQ_TIME_MODE_REL) 3287 #define snd_seq_ev_is_real(ev) \ 3288 (snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_REAL) 3289 #define snd_seq_ev_is_tick(ev) \ 3290 (snd_seq_ev_timestamp_type(ev) == SND_SEQ_TIME_STAMP_TICK) 3291 #define snd_seq_ev_is_subscribe_type(ev) \ 3292 snd_seq_type_check(ev, SND_SEQ_EVFLG_CONNECTION) 3293 #define snd_seq_ev_is_control_type(ev) \ 3294 snd_seq_type_check(ev, SND_SEQ_EVFLG_CONTROL) 3295 #define snd_seq_ev_is_fixed_type(ev) \ 3296 snd_seq_type_check(ev, SND_SEQ_EVFLG_FIXED) 3297 #define snd_seq_ev_is_instr_type(ev) \ 3298 snd_seq_type_check(ev, SND_SEQ_EVFLG_INSTR) 3299 #define snd_seq_ev_is_message_type(ev) \ 3300 snd_seq_type_check(ev, SND_SEQ_EVFLG_MESSAGE) 3301 #define snd_seq_ev_is_note_type(ev) \ 3302 snd_seq_type_check(ev, SND_SEQ_EVFLG_NOTE) 3303 #define snd_seq_ev_is_queue_type(ev) \ 3304 snd_seq_type_check(ev, SND_SEQ_EVFLG_QUEUE) 3305 #define snd_seq_ev_is_result_type(ev) \ 3306 snd_seq_type_check(ev, SND_SEQ_EVFLG_RESULT) 3307 #define snd_seq_ev_is_sample_type(ev) \ 3308 snd_seq_type_check(ev, SND_SEQ_EVFLG_SAMPLE) 3309 #define snd_seq_ev_is_user_type(ev) \ 3310 snd_seq_type_check(ev, SND_SEQ_EVFLG_USERS) 3311 #define snd_seq_ev_is_variable_type(ev) \ 3312 snd_seq_type_check(ev, SND_SEQ_EVFLG_VARIABLE) 3313 #define snd_seq_ev_is_varusr_type(ev) \ 3314 snd_seq_type_check(ev, SND_SEQ_EVFLG_VARUSR) 3315 #define snd_seq_ev_is_reserved(ev) (! snd_seq_event_types[(ev)->type]) 3316 #define snd_seq_ev_is_direct(ev) ((ev)->queue == SND_SEQ_QUEUE_DIRECT) 3317 #define _SND_SEQ_TYPE_OPT(x) ((x)<<24) 3318 #define _SND_SEQ_TYPE(x) (1<<(x)) 3319 #define SND_SEQ_PORT_CAP_READ (1<<0) 3320 #define SND_SEQ_PORT_TYPE_SPECIFIC (1<<0) 3321 #define SND_SEQ_REMOVE_INPUT (1<<0) 3322 #define SND_SEQ_PORT_CAP_WRITE (1<<1) 3323 #define SND_SEQ_PORT_TYPE_MIDI_GENERIC (1<<1) 3324 #define SND_SEQ_REMOVE_OUTPUT (1<<1) 3325 #define SND_SEQ_PORT_TYPE_SYNTH (1<<10) 3326 #define SND_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) 3327 #define SND_SEQ_PORT_TYPE_SAMPLE (1<<12) 3328 #define SND_SEQ_PORT_TYPE_HARDWARE (1<<16) 3329 #define SND_SEQ_PORT_TYPE_SOFTWARE (1<<17) 3330 #define SND_SEQ_PORT_TYPE_SYNTHESIZER (1<<18) 3331 #define SND_SEQ_PORT_TYPE_PORT (1<<19) 3332 #define SND_SEQ_PORT_CAP_SYNC_READ (1<<2) 3333 #define SND_SEQ_PORT_TYPE_MIDI_GM (1<<2) 3334 #define SND_SEQ_REMOVE_DEST (1<<2) 3335 #define SND_SEQ_PORT_TYPE_APPLICATION (1<<20) 3336 #define SND_SEQ_PORT_CAP_SYNC_WRITE (1<<3) 3337 #define SND_SEQ_PORT_TYPE_MIDI_GS (1<<3) 3338 #define SND_SEQ_REMOVE_DEST_CHANNEL (1<<3) 3339 #define SND_SEQ_PORT_CAP_DUPLEX (1<<4) 3340 #define SND_SEQ_PORT_TYPE_MIDI_XG (1<<4) 3341 #define SND_SEQ_REMOVE_TIME_BEFORE (1<<4) 3342 #define SND_SEQ_PORT_CAP_SUBS_READ (1<<5) 3343 #define SND_SEQ_PORT_TYPE_MIDI_MT32 (1<<5) 3344 #define SND_SEQ_REMOVE_TIME_AFTER (1<<5) 3345 #define SND_SEQ_PORT_CAP_SUBS_WRITE (1<<6) 3346 #define SND_SEQ_PORT_TYPE_MIDI_GM2 (1<<6) 3347 #define SND_SEQ_REMOVE_TIME_TICK (1<<6) 3348 #define SND_SEQ_PORT_CAP_NO_EXPORT (1<<7) 3349 #define SND_SEQ_REMOVE_EVENT_TYPE (1<<7) 3350 #define SND_SEQ_REMOVE_IGNORE_OFF (1<<8) 3351 #define SND_SEQ_REMOVE_TAG_MATCH (1<<9) 3352 #define SND_SEQ_OPEN_DUPLEX (SND_SEQ_OPEN_OUTPUT|SND_SEQ_OPEN_INPUT) 3353 #define SND_SEQ_CLIENT_SYSTEM 0 3354 #define SND_SEQ_PORT_SYSTEM_TIMER 0 3355 #define SND_SEQ_NONBLOCK 0x0001 3356 #define SND_SEQ_OPEN_OUTPUT 1 3357 #define SND_SEQ_PORT_SYSTEM_ANNOUNCE 1 3358 #define SND_SEQ_OPEN_INPUT 2 3359 #define SND_SEQ_ADDRESS_UNKNOWN 253 3360 #define SND_SEQ_QUEUE_DIRECT 253 3361 #define SND_SEQ_ADDRESS_SUBSCRIBERS 254 3362 #define SND_SEQ_ADDRESS_BROADCAST 255 3363 3364 typedef struct sndrv_seq_client_info snd_seq_client_info_t; 3365 typedef struct sndrv_seq_client_pool snd_seq_client_pool_t; 3366 typedef enum snd_seq_client_type { 3367 SND_SEQ_USER_CLIENT = 1, 3368 SND_SEQ_KERNEL_CLIENT = 2 3369 } snd_seq_client_type_t; 3370 typedef struct sndrv_seq_port_info snd_seq_port_info_t; 3371 typedef struct sndrv_seq_port_subscribe snd_seq_port_subscribe_t; 3372 typedef enum { 3373 SND_SEQ_QUERY_SUBS_READ, 3374 SND_SEQ_QUERY_SUBS_WRITE = 1 3375 } snd_seq_query_subs_type_t; 3376 typedef struct sndrv_seq_query_subs snd_seq_query_subscribe_t; 3377 typedef struct sndrv_seq_queue_info snd_seq_queue_info_t; 3378 typedef struct sndrv_seq_queue_status snd_seq_queue_status_t; 3379 typedef struct sndrv_seq_queue_tempo snd_seq_queue_tempo_t; 3380 typedef struct sndrv_seq_queue_timer snd_seq_queue_timer_t; 3381 typedef enum { 3382 SND_SEQ_TIMER_ALSA, 3383 SND_SEQ_TIMER_MIDI_CLOCK = 1, 3384 SND_SEQ_TIMER_MIDI_TICK = 2 3385 } snd_seq_queue_timer_type_t; 3386 typedef struct sndrv_seq_remove_events snd_seq_remove_events_t; 3387 typedef struct sndrv_seq_system_info snd_seq_system_info_t; 3388 typedef struct _snd_seq snd_seq_t; 3389 typedef enum _snd_seq_type { 3390 SND_SEQ_TYPE_HW, 3391 SND_SEQ_TYPE_SHM = 1, 3392 SND_SEQ_TYPE_INET = 2 3393 } snd_seq_type_t; 3394 extern int snd_seq_alloc_named_queue(snd_seq_t * seq, const char *name); 3395 extern int snd_seq_alloc_queue(snd_seq_t * handle); 3396 extern int snd_seq_client_id(snd_seq_t * handle); 3397 extern void snd_seq_client_info_copy(snd_seq_client_info_t * dst, 3398 const snd_seq_client_info_t * src); 3399 extern void snd_seq_client_info_free(snd_seq_client_info_t * ptr); 3400 extern int snd_seq_client_info_get_client(const snd_seq_client_info_t * 3401 info); 3402 extern const char *snd_seq_client_info_get_name(snd_seq_client_info_t * 3403 info); 3404 extern int snd_seq_client_info_get_num_ports(const snd_seq_client_info_t * 3405 info); 3406 extern snd_seq_client_type_t snd_seq_client_info_get_type(const 3407 snd_seq_client_info_t 3408 * info); 3409 extern int snd_seq_client_info_malloc(snd_seq_client_info_t * *ptr); 3410 extern void snd_seq_client_info_set_client(snd_seq_client_info_t * info, 3411 int client); 3412 extern void snd_seq_client_info_set_name(snd_seq_client_info_t * info, 3413 const char *name); 3414 extern size_t snd_seq_client_info_sizeof(void); 3415 extern int snd_seq_close(snd_seq_t * handle); 3416 extern int snd_seq_create_port(snd_seq_t * handle, 3417 snd_seq_port_info_t * info); 3418 extern int snd_seq_delete_port(snd_seq_t * handle, int port); 3419 extern int snd_seq_drain_output(snd_seq_t * handle); 3420 extern int snd_seq_drop_output(snd_seq_t * handle); 3421 extern int snd_seq_drop_output_buffer(snd_seq_t * handle); 3422 extern int snd_seq_event_input(snd_seq_t * handle, snd_seq_event_t * *ev); 3423 extern int snd_seq_event_input_pending(snd_seq_t * seq, 3424 int fetch_sequencer); 3425 extern ssize_t snd_seq_event_length(snd_seq_event_t * ev); 3426 extern int snd_seq_event_output(snd_seq_t * handle, snd_seq_event_t * ev); 3427 extern int snd_seq_event_output_direct(snd_seq_t * handle, 3428 snd_seq_event_t * ev); 3429 extern const unsigned int snd_seq_event_types[]; 3430 extern int snd_seq_free_event(snd_seq_event_t * ev); 3431 extern int snd_seq_free_queue(snd_seq_t * handle, int q); 3432 extern int snd_seq_get_any_client_info(snd_seq_t * handle, int client, 3433 snd_seq_client_info_t * info); 3434 extern int snd_seq_get_any_port_info(snd_seq_t * handle, int client, 3435 int port, snd_seq_port_info_t * info); 3436 extern int snd_seq_get_client_info(snd_seq_t * handle, 3437 snd_seq_client_info_t * info); 3438 extern size_t snd_seq_get_input_buffer_size(snd_seq_t * handle); 3439 extern size_t snd_seq_get_output_buffer_size(snd_seq_t * handle); 3440 extern int snd_seq_get_port_info(snd_seq_t * handle, int port, 3441 snd_seq_port_info_t * info); 3442 extern int snd_seq_get_port_subscription(snd_seq_t * handle, 3443 snd_seq_port_subscribe_t * sub); 3444 extern int snd_seq_get_queue_status(snd_seq_t * handle, int q, 3445 snd_seq_queue_status_t * status); 3446 extern int snd_seq_get_queue_tempo(snd_seq_t * handle, int q, 3447 snd_seq_queue_tempo_t * tempo); 3448 extern int snd_seq_nonblock(snd_seq_t * handle, int nonblock); 3449 extern int snd_seq_open(snd_seq_t * *handle, const char *name, int streams, 3450 int mode); 3451 extern int snd_seq_poll_descriptors(snd_seq_t * handle, 3452 struct pollfd *pfds, 3453 unsigned int space, short int events); 3454 extern int snd_seq_poll_descriptors_count(snd_seq_t * handle, 3455 short int events); 3456 extern int snd_seq_poll_descriptors_revents(snd_seq_t * seq, 3457 struct pollfd *pfds, 3458 unsigned int nfds, 3459 short unsigned int *revents); 3460 extern void snd_seq_port_info_copy(snd_seq_port_info_t * dst, 3461 const snd_seq_port_info_t * src); 3462 extern void snd_seq_port_info_free(snd_seq_port_info_t * ptr); 3463 extern const snd_seq_addr_t *snd_seq_port_info_get_addr(const 3464 snd_seq_port_info_t 3465 * info); 3466 extern unsigned int snd_seq_port_info_get_capability(const 3467 snd_seq_port_info_t * 3468 info); 3469 extern int snd_seq_port_info_get_client(const snd_seq_port_info_t * info); 3470 extern const char *snd_seq_port_info_get_name(const snd_seq_port_info_t* 3471 info); 3472 extern int snd_seq_port_info_get_port(const snd_seq_port_info_t * info); 3473 extern unsigned int snd_seq_port_info_get_type(const snd_seq_port_info_t * 3474 info); 3475 extern int snd_seq_port_info_malloc(snd_seq_port_info_t * *ptr); 3476 extern void snd_seq_port_info_set_capability(snd_seq_port_info_t * info, 3477 unsigned int capability); 3478 extern void snd_seq_port_info_set_client(snd_seq_port_info_t * info, 3479 int client); 3480 extern void snd_seq_port_info_set_midi_channels(snd_seq_port_info_t * info, 3481 int channels); 3482 extern void snd_seq_port_info_set_name(snd_seq_port_info_t * info, 3483 const char *name); 3484 extern void snd_seq_port_info_set_port(snd_seq_port_info_t * info, 3485 int port); 3486 extern void snd_seq_port_info_set_port_specified(snd_seq_port_info_t * 3487 info, int val); 3488 extern void snd_seq_port_info_set_timestamp_queue(snd_seq_port_info_t * 3489 info, int queue); 3490 extern void snd_seq_port_info_set_timestamp_real(snd_seq_port_info_t * 3491 info, int realtime); 3492 extern void snd_seq_port_info_set_timestamping(snd_seq_port_info_t * info, 3493 int enable); 3494 extern void snd_seq_port_info_set_type(snd_seq_port_info_t * info, 3495 unsigned int type); 3496 extern size_t snd_seq_port_info_sizeof(void); 3497 extern void snd_seq_port_subscribe_copy(snd_seq_port_subscribe_t * dst, 3498 const snd_seq_port_subscribe_t * 3499 src); 3500 extern void snd_seq_port_subscribe_free(snd_seq_port_subscribe_t * ptr); 3501 extern const snd_seq_addr_t *snd_seq_port_subscribe_get_dest(const 3502 snd_seq_port_subscribe_t 3503 * info); 3504 extern int snd_seq_port_subscribe_get_exclusive(const 3505 snd_seq_port_subscribe_t * 3506 info); 3507 extern int snd_seq_port_subscribe_get_queue(const snd_seq_port_subscribe_t 3508 * info); 3509 extern const snd_seq_addr_t *snd_seq_port_subscribe_get_sender(const 3510 snd_seq_port_subscribe_t 3511 * info); 3512 extern int snd_seq_port_subscribe_get_time_real(const 3513 snd_seq_port_subscribe_t * 3514 info); 3515 extern int snd_seq_port_subscribe_get_time_update(const 3516 snd_seq_port_subscribe_t 3517 * info); 3518 extern int snd_seq_port_subscribe_malloc(snd_seq_port_subscribe_t * *ptr); 3519 extern void snd_seq_port_subscribe_set_dest(snd_seq_port_subscribe_t * 3520 info, 3521 const snd_seq_addr_t * addr); 3522 extern void snd_seq_port_subscribe_set_exclusive(snd_seq_port_subscribe_t * 3523 info, int val); 3524 extern void snd_seq_port_subscribe_set_queue(snd_seq_port_subscribe_t * 3525 info, int q); 3526 extern void snd_seq_port_subscribe_set_sender(snd_seq_port_subscribe_t * 3527 info, 3528 const snd_seq_addr_t * addr); 3529 extern void snd_seq_port_subscribe_set_time_real(snd_seq_port_subscribe_t * 3530 info, int val); 3531 extern void snd_seq_port_subscribe_set_time_update(snd_seq_port_subscribe_t 3532 * info, int val); 3533 extern size_t snd_seq_port_subscribe_sizeof(void); 3534 extern int snd_seq_query_next_client(snd_seq_t * handle, 3535 snd_seq_client_info_t * info); 3536 extern int snd_seq_query_next_port(snd_seq_t * handle, 3537 snd_seq_port_info_t * info); 3538 extern int snd_seq_query_port_subscribers(snd_seq_t * seq, 3539 snd_seq_query_subscribe_t * 3540 subs); 3541 extern void snd_seq_query_subscribe_copy(snd_seq_query_subscribe_t * dst, 3542 const snd_seq_query_subscribe_t * 3543 src); 3544 extern void snd_seq_query_subscribe_free(snd_seq_query_subscribe_t * ptr); 3545 extern const snd_seq_addr_t *snd_seq_query_subscribe_get_addr(const 3546 snd_seq_query_subscribe_t 3547 * info); 3548 extern int snd_seq_query_subscribe_get_exclusive(const 3549 snd_seq_query_subscribe_t 3550 * info); 3551 extern int snd_seq_query_subscribe_get_index(const 3552 snd_seq_query_subscribe_t * 3553 info); 3554 extern int snd_seq_query_subscribe_get_queue(const 3555 snd_seq_query_subscribe_t * 3556 info); 3557 extern const snd_seq_addr_t *snd_seq_query_subscribe_get_root(const 3558 snd_seq_query_subscribe_t 3559 * info); 3560 extern int snd_seq_query_subscribe_get_time_real(const 3561 snd_seq_query_subscribe_t 3562 * info); 3563 extern int snd_seq_query_subscribe_get_time_update(const 3564 snd_seq_query_subscribe_t 3565 * info); 3566 extern int snd_seq_query_subscribe_malloc(snd_seq_query_subscribe_t * 3567 *ptr); 3568 extern void snd_seq_query_subscribe_set_index(snd_seq_query_subscribe_t* 3569 info, int _index); 3570 extern void snd_seq_query_subscribe_set_root(snd_seq_query_subscribe_t * 3571 info, 3572 const snd_seq_addr_t * addr); 3573 extern void snd_seq_query_subscribe_set_type(snd_seq_query_subscribe_t * 3574 info, 3575 snd_seq_query_subs_type_t 3576 type); 3577 extern size_t snd_seq_query_subscribe_sizeof(void); 3578 extern void snd_seq_queue_status_copy(snd_seq_queue_status_t * dst, 3579 const snd_seq_queue_status_t * src); 3580 extern void snd_seq_queue_status_free(snd_seq_queue_status_t * ptr); 3581 extern const snd_seq_real_time_t *snd_seq_queue_status_get_real_time(const 3582 snd_seq_queue_status_t 3583 * 3584 info); 3585 extern snd_seq_tick_time_t snd_seq_queue_status_get_tick_time(const 3586 snd_seq_queue_status_t 3587 * info); 3588 extern int snd_seq_queue_status_malloc(snd_seq_queue_status_t * *ptr); 3589 extern size_t snd_seq_queue_status_sizeof(void); 3590 extern void snd_seq_queue_tempo_copy(snd_seq_queue_tempo_t * dst, 3591 const snd_seq_queue_tempo_t * src); 3592 extern void snd_seq_queue_tempo_free(snd_seq_queue_tempo_t * ptr); 3593 extern int snd_seq_queue_tempo_get_ppq(const snd_seq_queue_tempo_t * info); 3594 extern unsigned int snd_seq_queue_tempo_get_tempo(const 3595 snd_seq_queue_tempo_t* 3596 info); 3597 extern int snd_seq_queue_tempo_malloc(snd_seq_queue_tempo_t * *ptr); 3598 extern void snd_seq_queue_tempo_set_ppq(snd_seq_queue_tempo_t * info, 3599 int ppq); 3600 extern void snd_seq_queue_tempo_set_tempo(snd_seq_queue_tempo_t * info, 3601 unsigned int tempo); 3602 extern size_t snd_seq_queue_tempo_sizeof(void); 3603 extern int snd_seq_set_client_info(snd_seq_t * handle, 3604 snd_seq_client_info_t * info); 3605 extern int snd_seq_set_input_buffer_size(snd_seq_t * handle, size_t size); 3606 extern int snd_seq_set_output_buffer_size(snd_seq_t * handle, size_t size); 3607 extern int snd_seq_set_port_info(snd_seq_t * handle, int port, 3608 snd_seq_port_info_t * info); 3609 extern int snd_seq_set_queue_tempo(snd_seq_t * handle, int q, 3610 snd_seq_queue_tempo_t * tempo); 3611 extern int snd_seq_subscribe_port(snd_seq_t * handle, 3612 snd_seq_port_subscribe_t * sub); 3613 extern int snd_seq_system_info(snd_seq_t * handle, 3614 snd_seq_system_info_t * info); 3615 extern void snd_seq_system_info_copy(snd_seq_system_info_t * dst, 3616 const snd_seq_system_info_t * src); 3617 extern void snd_seq_system_info_free(snd_seq_system_info_t * ptr); 3618 extern int snd_seq_system_info_get_clients(const snd_seq_system_info_t * 3619 info); 3620 extern int snd_seq_system_info_get_ports(const snd_seq_system_info_t * 3621 info); 3622 extern int snd_seq_system_info_get_queues(const snd_seq_system_info_t * 3623 info); 3624 extern int snd_seq_system_info_malloc(snd_seq_system_info_t * *ptr); 3625 extern size_t snd_seq_system_info_sizeof(void); 3626 extern int snd_seq_unsubscribe_port(snd_seq_t * handle, 3627 snd_seq_port_subscribe_t * sub); 3628 __________________________________________________________ 3629 3630 6.2.17. alsa/seq_event.h 3631 3632 #define SND_SEQ_TIME_STAMP_TICK (0<<0) 3633 #define SND_SEQ_TIME_MODE_ABS (0<<1) 3634 #define SND_SEQ_EVENT_LENGTH_FIXED (0<<2) 3635 #define SND_SEQ_PRIORITY_NORMAL (0<<4) 3636 #define SND_SEQ_TIME_STAMP_MASK (1<<0) 3637 #define SND_SEQ_TIME_STAMP_REAL (1<<0) 3638 #define SND_SEQ_TIME_MODE_MASK (1<<1) 3639 #define SND_SEQ_TIME_MODE_REL (1<<1) 3640 #define SND_SEQ_EVENT_LENGTH_VARIABLE (1<<2) 3641 #define SND_SEQ_PRIORITY_HIGH (1<<4) 3642 #define SND_SEQ_PRIORITY_MASK (1<<4) 3643 #define SND_SEQ_EVENT_LENGTH_VARUSR (2<<2) 3644 #define SND_SEQ_EVENT_LENGTH_MASK (3<<2) 3645 3646 typedef struct snd_seq_addr { 3647 unsigned char client; 3648 unsigned char port; 3649 } snd_seq_addr_t; 3650 typedef struct snd_seq_connect { 3651 snd_seq_addr_t sender; 3652 snd_seq_addr_t dest; 3653 } snd_seq_connect_t; 3654 typedef struct snd_seq_ev_ctrl { 3655 unsigned char channel; 3656 unsigned char unused[3]; 3657 unsigned int param; 3658 int value; 3659 } snd_seq_ev_ctrl_t; 3660 typedef struct snd_seq_ev_ext { 3661 unsigned int len; 3662 void *ptr; 3663 } __attribute__ ((packed)) snd_seq_ev_ext_t; 3664 typedef struct snd_seq_ev_note { 3665 unsigned char channel; 3666 unsigned char note; 3667 unsigned char velocity; 3668 unsigned char off_velocity; 3669 unsigned int duration; 3670 } snd_seq_ev_note_t; 3671 typedef struct snd_seq_ev_queue_control { 3672 unsigned char queue; 3673 unsigned char unused[3]; 3674 union { 3675 int value; /* affected value (e.g. tempo) */ 3676 snd_seq_timestamp_t time; /* time */ 3677 unsigned int position; /* sync position */ 3678 snd_seq_queue_skew_t skew; /* queue skew */ 3679 unsigned int d32[2]; /* any data */ 3680 unsigned char d8[8]; /* any data */ 3681 } param; 3682 } snd_seq_ev_queue_control_t; 3683 typedef struct snd_seq_ev_raw32 { 3684 unsigned int d[3]; 3685 } snd_seq_ev_raw32_t; 3686 typedef struct snd_seq_ev_raw8 { 3687 unsigned char d[12]; 3688 } snd_seq_ev_raw8_t; 3689 typedef struct snd_seq_event { 3690 snd_seq_event_type_t type; 3691 unsigned char flags; 3692 unsigned char tag; 3693 unsigned char queue; 3694 snd_seq_timestamp_t time; 3695 snd_seq_addr_t source; 3696 snd_seq_addr_t dest; 3697 union { 3698 snd_seq_ev_note_t note; /* note information */ 3699 snd_seq_ev_ctrl_t control; /* MIDI control information */ 3700 snd_seq_ev_raw8_t raw8; /* raw8 data */ 3701 snd_seq_ev_raw32_t raw32; /* raw32 data */ 3702 snd_seq_ev_ext_t ext; /* external data */ 3703 snd_seq_ev_queue_control_t queue; /* queue control */ 3704 snd_seq_timestamp_t time; /* timestamp */ 3705 snd_seq_addr_t addr; /* address */ 3706 snd_seq_connect_t connect; /* connect information */ 3707 snd_seq_result_t result; /* operation result code */ 3708 } data; 3709 } snd_seq_event_t; 3710 typedef unsigned char snd_seq_event_type_t; 3711 typedef struct snd_seq_queue_skew { 3712 unsigned int value; 3713 unsigned int base; 3714 } snd_seq_queue_skew_t; 3715 union snd_seq_timestamp { 3716 snd_seq_tick_time_t tick; 3717 struct snd_seq_real_time time; 3718 }; 3719 typedef struct snd_seq_real_time { 3720 unsigned int tv_sec; 3721 unsigned int tv_nsec; 3722 } snd_seq_real_time_t; 3723 typedef struct snd_seq_result { 3724 int event; 3725 int result; 3726 } snd_seq_result_t; 3727 typedef unsigned int snd_seq_tick_time_t; 3728 typedef union snd_seq_timestamp { 3729 snd_seq_tick_time_t tick; 3730 struct snd_seq_real_time time; 3731 } snd_seq_timestamp_t; 3732 __________________________________________________________ 3733 3734 6.2.18. alsa/seq_midi_event.h 3735 3736 typedef struct snd_midi_event snd_midi_event_t; 3737 extern long int snd_midi_event_decode(snd_midi_event_t * dev, 3738 unsigned char *buf, long int count, 3739 const snd_seq_event_t * ev); 3740 extern long int snd_midi_event_encode(snd_midi_event_t * dev, 3741 const unsigned char *buf, 3742 long int count, 3743 snd_seq_event_t * ev); 3744 extern int snd_midi_event_encode_byte(snd_midi_event_t * dev, int c, 3745 snd_seq_event_t * ev); 3746 extern void snd_midi_event_free(snd_midi_event_t * dev); 3747 extern void snd_midi_event_init(snd_midi_event_t * dev); 3748 extern int snd_midi_event_new(size_t bufsize, snd_midi_event_t * *rdev); 3749 extern void snd_midi_event_reset_decode(snd_midi_event_t * dev); 3750 extern void snd_midi_event_reset_encode(snd_midi_event_t * dev); 3751 __________________________________________________________ 3752 3753 6.2.19. alsa/seqmid.h 3754 3755 #define snd_seq_ev_set_dest(ev,c,p) \ 3756 ((ev)->dest.client = (c), (ev)->dest.port = (p)) 3757 #define snd_seq_ev_set_broadcast(ev) \ 3758 ((ev)->dest.client = SND_SEQ_ADDRESS_BROADCAST, (ev)->dest.port= \ 3759 SND_SEQ_ADDRESS_BROADCAST) 3760 #define snd_seq_ev_set_subs(ev) \ 3761 ((ev)->dest.client = SND_SEQ_ADDRESS_SUBSCRIBERS, (ev)->dest.port = \ 3762 SND_SEQ_ADDRESS_UNKNOWN) 3763 #define snd_seq_ev_set_fixed(ev) \ 3764 ((ev)->flags &= ~SND_SEQ_EVENT_LENGTH_MASK, (ev)->flags |= \ 3765 SND_SEQ_EVENT_LENGTH_FIXED) 3766 #define snd_seq_ev_set_chanpress(ev,ch,val) \ 3767 ((ev)->type = SND_SEQ_EVENT_CHANPRESS, snd_seq_ev_set_fixed(ev), \ 3768 (ev)->data.control.channel = (ch), (ev)->data.control.value = (val)) 3769 #define snd_seq_ev_set_controller(ev,ch,cc,val) \ 3770 ((ev)->type = SND_SEQ_EVENT_CONTROLLER, snd_seq_ev_set_fixed(ev), \ 3771 (ev)->data.control.channel = (ch), (ev)->data.control.param = (cc), \ 3772 (ev)->data.control.value = (val)) 3773 #define snd_seq_ev_set_keypress(ev,ch,key,vel) \ 3774 ((ev)->type = SND_SEQ_EVENT_KEYPRESS, snd_seq_ev_set_fixed(ev),\ 3775 (ev)->data.note.channel = (ch), (ev)->data.note.note = (key), \ 3776 (ev)->data.note.velocity = (vel)) 3777 #define snd_seq_ev_set_pgmchange(ev,ch,val) \ 3778 ((ev)->type = SND_SEQ_EVENT_PGMCHANGE, snd_seq_ev_set_fixed(ev), \ 3779 (ev)->data.control.channel = (ch), (ev)->data.control.value = (val)) 3780 #define snd_seq_ev_set_pitchbend(ev,ch,val) \ 3781 ((ev)->type = SND_SEQ_EVENT_PITCHBEND, snd_seq_ev_set_fixed(ev), \ 3782 (ev)->data.control.channel = (ch), (ev)->data.control.value = (val)) 3783 #define snd_seq_ev_set_direct(ev) ((ev)->queue = SND_SEQ_QUEUE_DIRECT) 3784 #define snd_seq_ev_set_source(ev,p) ((ev)->source.port = (p)) 3785 #define snd_seq_ev_set_tag(ev,t) ((ev)->tag = (t)) 3786 #define snd_seq_ev_clear(ev) memset(ev, 0, sizeof(snd_seq_event_t)) 3787 3788 extern int snd_seq_connect_from(snd_seq_t * seq, int my_port, 3789 int src_client, int src_port); 3790 extern int snd_seq_connect_to(snd_seq_t * seq, int my_port, 3791 int dest_client, int dest_port); 3792 extern int snd_seq_control_queue(snd_seq_t * seq, int q, int type, 3793 int value, snd_seq_event_t * ev); 3794 extern int snd_seq_create_simple_port(snd_seq_t * seq, const char *name, 3795 unsigned int caps, 3796 unsigned int type); 3797 extern int snd_seq_delete_simple_port(snd_seq_t * seq, int port); 3798 extern int snd_seq_disconnect_from(snd_seq_t * seq, int my_port, 3799 int src_client, int src_port); 3800 extern int snd_seq_disconnect_to(snd_seq_t * seq, int my_port, 3801 int dest_client, int dest_port); 3802 extern int snd_seq_parse_address(snd_seq_t * seq, snd_seq_addr_t * addr, 3803 const char *str); 3804 extern int snd_seq_set_client_name(snd_seq_t * seq, const char *name); 3805 extern int snd_seq_sync_output_queue(snd_seq_t * seq); 3806 __________________________________________________________ 3807 3808 6.2.20. alsa/timer.h 3809 3810 #define SND_TIMER_OPEN_NONBLOCK (1<<0) 3811 #define SND_TIMER_OPEN_TREAD (1<<1) 3812 #define SND_TIMER_GLOBAL_SYSTEM 0 3813 #define SND_TIMER_GLOBAL_RTC 1 3814 #define SND_TIMER_GLOBAL_HPET 2 3815 3816 typedef struct sndrv_timer_ginfo snd_timer_ginfo_t; 3817 typedef struct sndrv_timer_gparams snd_timer_gparams_t; 3818 typedef struct sndrv_timer_gstatus snd_timer_gstatus_t; 3819 typedef struct sndrv_timer_id snd_timer_id_t; 3820 typedef struct sndrv_timer_info snd_timer_info_t; 3821 typedef struct sndrv_timer_params snd_timer_params_t; 3822 typedef struct _snd_timer_query snd_timer_query_t; 3823 typedef struct sndrv_timer_status snd_timer_status_t; 3824 typedef struct _snd_timer snd_timer_t; 3825 typedef enum _snd_timer_type { 3826 SND_TIMER_TYPE_HW, 3827 SND_TIMER_TYPE_SHM = 1, 3828 SND_TIMER_TYPE_INET = 2 3829 } snd_timer_type_t; 3830 extern int snd_timer_close(snd_timer_t * handle); 3831 extern int snd_timer_continue(snd_timer_t * handle); 3832 extern void snd_timer_id_copy(snd_timer_id_t * dst, 3833 const snd_timer_id_t * src); 3834 extern void snd_timer_id_free(snd_timer_id_t * obj); 3835 extern int snd_timer_id_get_card(snd_timer_id_t * id); 3836 extern int snd_timer_id_get_class(snd_timer_id_t * id); 3837 extern int snd_timer_id_get_device(snd_timer_id_t * id); 3838 extern int snd_timer_id_get_sclass(snd_timer_id_t * id); 3839 extern int snd_timer_id_get_subdevice(snd_timer_id_t * id); 3840 extern int snd_timer_id_malloc(snd_timer_id_t * *ptr); 3841 extern void snd_timer_id_set_card(snd_timer_id_t * id, int card); 3842 extern void snd_timer_id_set_class(snd_timer_id_t * id, int dev_class); 3843 extern void snd_timer_id_set_device(snd_timer_id_t * id, int device); 3844 extern void snd_timer_id_set_sclass(snd_timer_id_t * id, int dev_sclass); 3845 extern void snd_timer_id_set_subdevice(snd_timer_id_t * id, int subdevice); 3846 extern size_t snd_timer_id_sizeof(void); 3847 extern int snd_timer_info(snd_timer_t * handle, snd_timer_info_t * timer); 3848 extern void snd_timer_info_copy(snd_timer_info_t * dst, 3849 const snd_timer_info_t * src); 3850 extern void snd_timer_info_free(snd_timer_info_t * obj); 3851 extern int snd_timer_info_get_card(snd_timer_info_t * info); 3852 extern const char *snd_timer_info_get_id(snd_timer_info_t * info); 3853 extern const char *snd_timer_info_get_name(snd_timer_info_t * info); 3854 extern long int snd_timer_info_get_resolution(snd_timer_info_t * info); 3855 extern int snd_timer_info_malloc(snd_timer_info_t * *ptr); 3856 extern size_t snd_timer_info_sizeof(void); 3857 extern int snd_timer_open(snd_timer_t * *handle, const char *name, 3858 int mode); 3859 extern int snd_timer_params(snd_timer_t * handle, 3860 snd_timer_params_t * params); 3861 extern long int snd_timer_params_get_ticks(snd_timer_params_t * params); 3862 extern int snd_timer_params_malloc(snd_timer_params_t * *ptr); 3863 extern int snd_timer_params_set_auto_start(snd_timer_params_t * params, 3864 int auto_start); 3865 extern void snd_timer_params_set_ticks(snd_timer_params_t * params, 3866 long int ticks); 3867 extern int snd_timer_poll_descriptors(snd_timer_t * handle, 3868 struct pollfd *pfds, 3869 unsigned int space); 3870 extern int snd_timer_poll_descriptors_count(snd_timer_t * handle); 3871 extern ssize_t snd_timer_read(snd_timer_t * handle, void *buffer, 3872 size_t size); 3873 extern int snd_timer_start(snd_timer_t * handle); 3874 extern int snd_timer_status(snd_timer_t * handle, 3875 snd_timer_status_t * status); 3876 extern int snd_timer_stop(snd_timer_t * handle); 3877 3878 III. Network Security Services 3879 3880 Table of Contents 3881 7. Libraries 3882 3883 7.1. Interfaces for libnspr4 3884 3885 7.1.1. Netscape Portable Runtime 3886 3887 7.2. Data Definitions for libnspr4 3888 3889 7.2.1. nspr4/nspr.h 3890 7.2.2. nspr4/plarena.h 3891 7.2.3. nspr4/plhash.h 3892 7.2.4. nspr4/prclist.h 3893 7.2.5. nspr4/prerror.h 3894 7.2.6. nspr4/prinit.h 3895 7.2.7. nspr4/prinrval.h 3896 7.2.8. nspr4/prio.h 3897 7.2.9. nspr4/private/pprio.h 3898 7.2.10. nspr4/prlock.h 3899 7.2.11. nspr4/prmon.h 3900 7.2.12. nspr4/prnetdb.h 3901 7.2.13. nspr4/prthread.h 3902 7.2.14. nspr4/prtime.h 3903 7.2.15. nspr4/prtypes.h 3904 3905 7.3. Interfaces for libnss3 3906 3907 7.3.1. NSS Utility 3908 3909 7.4. Data Definitions for libnss3 3910 3911 7.4.1. nss3/blapit.h 3912 7.4.2. nss3/cert.h 3913 7.4.3. nss3/certt.h 3914 7.4.4. nss3/cmsreclist.h 3915 7.4.5. nss3/cryptoht.h 3916 7.4.6. nss3/hasht.h 3917 7.4.7. nss3/key.h 3918 7.4.8. nss3/keyhi.h 3919 7.4.9. nss3/keyt.h 3920 7.4.10. nss3/keythi.h 3921 7.4.11. nss3/nss.h 3922 7.4.12. nss3/nssb64.h 3923 7.4.13. nss3/nssb64t.h 3924 7.4.14. nss3/nssilckt.h 3925 7.4.15. nss3/nssrwlkt.h 3926 7.4.16. nss3/ocspt.h 3927 7.4.17. nss3/pk11pub.h 3928 7.4.18. nss3/pkcs11t.h 3929 7.4.19. nss3/pkcs7t.h 3930 7.4.20. nss3/secasn1t.h 3931 7.4.21. nss3/seccomon.h 3932 7.4.22. nss3/secdert.h 3933 7.4.23. nss3/secdigt.h 3934 7.4.24. nss3/secmodt.h 3935 7.4.25. nss3/secoidt.h 3936 7.4.26. nss3/secpkcs5.h 3937 7.4.27. nss3/secport.h 3938 3939 7.5. Interfaces for libssl3 3940 3941 7.5.1. NSS SSL 3942 3943 7.6. Data Definitions for libssl3 3944 3945 7.6.1. nss3/ecl-exp.h 3946 7.6.2. nss3/ssl.h 3947 7.6.3. nss3/sslerr.h 3948 7.6.4. nss3/sslproto.h 3949 7.6.5. nss3/sslt.h 3950 __________________________________________________________ 3951 3952 Chapter 7. Libraries 3953 3954 7.1. Interfaces for libnspr4 3955 3956 Table 7-1 defines the library name and shared object name for 3957 the libnspr4 library 3958 3959 Table 7-1. libnspr4 Definition 3960 Library: libnspr4 3961 SONAME: libnspr4.so 3962 3963 The behavior of the interfaces in this library is specified by 3964 the following specifications: 3965 3966 [NSPR] NSPR Reference 3967 __________________________________________________________ 3968 3969 7.1.1. Netscape Portable Runtime 3970 __________________________________________________________ 3971 3972 7.1.1.1. Interfaces for Netscape Portable Runtime 3973 3974 An LSB conforming implementation shall provide the generic 3975 functions for Netscape Portable Runtime specified in Table 7-2, 3976 with the full mandatory functionality as described in the 3977 referenced underlying specification. 3978 3979 Table 7-2. libnspr4 - Netscape Portable Runtime Function 3980 Interfaces 3981 PR_Accept [NSPR] PR_Bind [NSPR] PR_Cleanup [NSPR] 3982 PR_Close [NSPR] PR_Connect [NSPR] PR_CreateIOLayerStub [NSPR] 3983 PR_EnumerateAddrInfo [NSPR] PR_FreeAddrInfo [NSPR] 3984 PR_GetAddrInfoByName [NSPR] 3985 PR_GetDefaultIOMethods [NSPR] PR_GetError [NSPR] 3986 PR_GetLayersIdentity [NSPR] 3987 PR_GetSocketOption [NSPR] PR_GetUniqueIdentity [NSPR] 3988 PR_ImportTCPSocket [NSPR] 3989 PR_Interrupt [NSPR] PR_Listen [NSPR] PR_MillisecondsToInterval 3990 [NSPR] 3991 PR_NetAddrToString [NSPR] PR_Now [NSPR] PR_OpenTCPSocket [NSPR] 3992 PR_OpenUDPSocket [NSPR] PR_Poll [NSPR] PR_PopIOLayer [NSPR] 3993 PR_PushIOLayer [NSPR] PR_Read [NSPR] PR_Recv [NSPR] 3994 PR_RecvFrom [NSPR] PR_SecondsToInterval [NSPR] PR_Send [NSPR] 3995 PR_SendTo [NSPR] PR_SetError [NSPR] PR_SetSocketOption [NSPR] 3996 PR_Shutdown [NSPR] PR_StringToNetAddr [NSPR] PR_Write [NSPR] 3997 __________________________________________________________ 3998 3999 7.2. Data Definitions for libnspr4 4000 4001 This section defines global identifiers and their values that 4002 are associated with interfaces contained in libnspr4. These 4003 definitions are organized into groups that correspond to system 4004 headers. This convention is used as a convenience for the 4005 reader, and does not imply the existence of these headers, or 4006 their content. Where an interface is defined as requiring a 4007 particular system header file all of the data definitions for 4008 that system header file presented here shall be in effect. 4009 4010 This section gives data definitions to promote binary 4011 application portability, not to repeat source interface 4012 definitions available elsewhere. System providers and 4013 application developers should use this ABI to supplement - not 4014 to replace - source interface definition specifications. 4015 4016 This specification uses the ISO C (1999) C Language as the 4017 reference programming language, and data definitions are 4018 specified in ISO C format. The C language is used here as a 4019 convenient notation. Using a C language description of these 4020 data objects does not preclude their use by other programming 4021 languages. 4022 __________________________________________________________ 4023 4024 7.2.1. nspr4/nspr.h 4025 4026 #define nspr_h___ 4027 __________________________________________________________ 4028 4029 7.2.2. nspr4/plarena.h 4030 4031 #define plarena_h___ 4032 4033 typedef struct PLArenaPool { 4034 struct PLArena first; 4035 struct PLArena *current; 4036 PRUint32 arenasize; 4037 PRUword mask; 4038 } PLArenaPool; 4039 struct PLArena { 4040 struct PLArena *next; 4041 PRUword base; 4042 PRUword limit; 4043 PRUword avail; 4044 }; 4045 __________________________________________________________ 4046 4047 7.2.3. nspr4/plhash.h 4048 4049 #define plhash_h___ 4050 4051 typedef PRUint32 PLHashNumber; 4052 typedef PRIntn(*PLHashComparator) (const void *, const void *); 4053 typedef struct PLHashAllocOps { 4054 void *(*allocTable) (void *, PRSize); 4055 void (*freeTable) (void *, void *); 4056 struct PLHashEntry *(*allocEntry) (void *, const void *); 4057 void (*freeEntry) (void *, struct PLHashEntry *, PRUintn); 4058 } PLHashAllocOps; 4059 typedef PLHashNumber(*PLHashFunction) (const void *); 4060 struct PLHashEntry { 4061 struct PLHashEntry *next; 4062 PLHashNumber keyHash; 4063 const void *key; 4064 void *value; 4065 }; 4066 struct PLHashTable { 4067 struct PLHashEntry **buckets; 4068 PRUint32 nentries; 4069 PRUint32 shift; 4070 PLHashFunction keyHash; 4071 PLHashComparator keyCompare; 4072 PLHashComparator valueCompare; 4073 const PLHashAllocOps *allocOps; 4074 void *allocPriv; 4075 }; 4076 __________________________________________________________ 4077 4078 7.2.4. nspr4/prclist.h 4079 4080 #define prclist_h___ 4081 4082 typedef struct PRCListStr { 4083 PRCList *next; 4084 PRCList *prev; 4085 } PRCList; 4086 __________________________________________________________ 4087 4088 7.2.5. nspr4/prerror.h 4089 4090 #define prerror_h___ 4091 4092 typedef PRInt32 PRErrorCode; 4093 extern PRErrorCode PR_GetError(void); 4094 extern void PR_SetError(PRErrorCode errorCode, PRInt32 oserr); 4095 __________________________________________________________ 4096 4097 7.2.6. nspr4/prinit.h 4098 4099 #define prinit_h___ 4100 4101 extern PRStatus PR_Cleanup(void); 4102 __________________________________________________________ 4103 4104 7.2.7. nspr4/prinrval.h 4105 4106 #define prinrval_h 4107 4108 typedef PRUint32 PRIntervalTime; 4109 extern PRIntervalTime PR_MillisecondsToInterval(PRUint32 milli); 4110 extern PRIntervalTime PR_SecondsToInterval(PRUint32 seconds); 4111 __________________________________________________________ 4112 4113 7.2.8. nspr4/prio.h 4114 4115 #define prio_h___ 4116 4117 typedef enum PRDescType { 4118 PR_DESC_FILE = 1, 4119 PR_DESC_SOCKET_TCP = 2, 4120 PR_DESC_SOCKET_UDP = 3, 4121 PR_DESC_LAYERED = 4, 4122 PR_DESC_PIPE = 5 4123 } PRDescType; 4124 typedef struct PRIPv6Addr { 4125 union { 4126 PRUint8 _S6_u8[15]; 4127 PRUint16 _S6_u16[7]; 4128 PRUint32 _S6_u32[3]; 4129 PRUint64 _S6_u64[1]; 4130 } _S6_un; 4131 } PRIPv6Addr; 4132 typedef enum PRTransmitFileFlags { 4133 PR_TRANSMITFILE_KEEP_OPEN, 4134 PR_TRANSMITFILE_CLOSE_SOCKET = 1 4135 } PRTransmitFileFlags; 4136 typedef struct PRLinger { 4137 PRBool polarity; 4138 PRIntervalTime linger; 4139 } PRLinger; 4140 typedef struct PRFilePrivate PRFilePrivate; 4141 typedef struct PRFileDesc { 4142 const struct PRIOMethods *methods; 4143 PRFilePrivate *secret; 4144 PRFileDesc *lower; 4145 PRFileDesc *higher; 4146 void (*dtor) (PRFileDesc *); 4147 PRDescIdentity identity; 4148 } PRFileDesc; 4149 typedef union PRNetAddr { 4150 struct { 4151 PRUint16 family; 4152 char data[14]; 4153 } raw; 4154 struct { 4155 PRUint16 family; 4156 PRUint16 port; 4157 PRUint32 ip; 4158 char pad[7]; 4159 } inet; 4160 struct { 4161 PRUint16 family; 4162 PRUint16 port; 4163 PRUint32 flowinfo; 4164 PRIPv6Addr ip; 4165 PRUint32 scope_id; 4166 } ipv6; 4167 struct { 4168 PRUint16 family; 4169 char path[103]; 4170 } local; 4171 } PRNetAddr; 4172 typedef struct PRMcastRequest { 4173 union PRNetAddr mcaddr; 4174 union PRNetAddr ifaddr; 4175 } PRMcastRequest; 4176 typedef struct PRIOVec { 4177 char *iov_base; 4178 int iov_len; 4179 } PRIOVec; 4180 typedef struct PRSocketOptionData { 4181 PRSockOption option; 4182 union { 4183 PRUintn ip_ttl; 4184 PRUintn mcast_ttl; 4185 PRUintn tos; 4186 PRBool non_blocking; 4187 PRBool reuse_addr; 4188 PRBool keep_alive; 4189 PRBool mcast_loopback; 4190 PRBool no_delay; 4191 PRBool broadcast; 4192 PRSize max_segment; 4193 PRSize recv_buffer_size; 4194 PRSize send_buffer_size; 4195 PRLinger linger; 4196 PRMcastRequest add_member; 4197 PRMcastRequest drop_member; 4198 union PRNetAddr mcast_if; 4199 } value; 4200 } PRSocketOptionData; 4201 typedef PRStatus(*PRFsyncFN) (PRFileDesc *); 4202 typedef PRStatus(*PRListenFN) (PRFileDesc *, PRIntn); 4203 typedef enum PRSeekWhence { 4204 PR_SEEK_SET, 4205 PR_SEEK_CUR = 1, 4206 PR_SEEK_END = 2 4207 } PRSeekWhence; 4208 typedef PRInt32(*PRAcceptreadFN) (PRFileDesc *, PRFileDesc * *, 4209 PRNetAddr * *, void *, PRInt32, 4210 PRIntervalTime); 4211 typedef PRStatus(*PRCloseFN) (PRFileDesc *); 4212 typedef PRInt32(*PRTransmitfileFN) (PRFileDesc *, PRFileDesc *, 4213 const void *, PRInt32, 4214 PRTransmitFileFlags, PRIntervalTime); 4215 typedef enum PRSockOption { 4216 PR_SockOpt_Nonblocking, 4217 PR_SockOpt_Linger = 1, 4218 PR_SockOpt_Reuseaddr = 2, 4219 PR_SockOpt_Keepalive = 3, 4220 PR_SockOpt_RecvBufferSize = 4, 4221 PR_SockOpt_SendBufferSize = 5, 4222 PR_SockOpt_IpTimeToLive = 6, 4223 PR_SockOpt_IpTypeOfService = 7, 4224 PR_SockOpt_AddMember = 8, 4225 PR_SockOpt_DropMember = 9, 4226 PR_SockOpt_McastInterface = 10, 4227 PR_SockOpt_McastTimeToLive = 11, 4228 PR_SockOpt_McastLoopback = 12, 4229 PR_SockOpt_NoDelay = 13, 4230 PR_SockOpt_MaxSegment = 14, 4231 PR_SockOpt_Broadcast = 15, 4232 PR_SockOpt_Last = 16 4233 } PRSockOption; 4234 typedef PRFileDesc *(*PRAcceptFN) (PRFileDesc *, PRNetAddr *, 4235 PRIntervalTime); 4236 typedef PRStatus(*PRConnectcontinueFN) (PRFileDesc *, PRInt16); 4237 typedef PRInt32(*PRReadFN) (PRFileDesc *, void *, PRInt32); 4238 typedef struct PRFileInfo64 { 4239 PRFileType type; 4240 PROffset64 size; 4241 PRTime creationTime; 4242 PRTime modifyTime; 4243 } PRFileInfo64; 4244 typedef PRStatus(*PRGetsocketoptionFN) (PRFileDesc *, 4245 PRSocketOptionData *); 4246 typedef PRInt32(*PRSendtoFN) (PRFileDesc *, const void *, PRInt32, PRIntn, 4247 const PRNetAddr *, PRIntervalTime); 4248 typedef PRStatus(*PRGetsocknameFN) (PRFileDesc *, PRNetAddr *); 4249 typedef PRInt32(*PRSendFN) (PRFileDesc *, const void *, PRInt32, PRIntn, 4250 PRIntervalTime); 4251 typedef PROffset32(*PRSeekFN) (PRFileDesc *, PROffset32, PRSeekWhence); 4252 typedef PRInt64(*PRAvailable64FN) (PRFileDesc *); 4253 typedef PRInt32(*PRAvailableFN) (PRFileDesc *); 4254 typedef struct PRFileInfo { 4255 PRFileType type; 4256 PROffset32 size; 4257 PRTime creationTime; 4258 PRTime modifyTime; 4259 } PRFileInfo; 4260 typedef PROffset64(*PRSeek64FN) (PRFileDesc *, PROffset64, PRSeekWhence); 4261 typedef PRStatus(*PRSetsocketoptionFN) (PRFileDesc *, 4262 const PRSocketOptionData *); 4263 typedef PRInt32(*PRRecvFN) (PRFileDesc *, void *, PRInt32, PRIntn, 4264 PRIntervalTime); 4265 typedef struct PRSendFileData { 4266 PRFileDesc *fd; 4267 PRUint32 file_offset; 4268 PRSize file_nbytes; 4269 const void *header; 4270 PRInt32 hlen; 4271 const void *trailer; 4272 PRInt32 tlen; 4273 } PRSendFileData; 4274 typedef PRIntn PRDescIdentity; 4275 typedef PRStatus(*PRConnectFN) (PRFileDesc *, const PRNetAddr *, 4276 PRIntervalTime); 4277 typedef PRInt32(*PRSendfileFN) (PRFileDesc *, PRSendFileData *, 4278 PRTransmitFileFlags, PRIntervalTime); 4279 typedef PRInt32(*PRRecvfromFN) (PRFileDesc *, void *, PRInt32, PRIntn, 4280 PRNetAddr *, PRIntervalTime); 4281 typedef struct PRPollDesc { 4282 PRFileDesc *fd; 4283 PRInt16 in_flags; 4284 PRInt16 out_flags; 4285 } PRPollDesc; 4286 typedef PRInt32(*PRWriteFN) (PRFileDesc *, const void *, PRInt32); 4287 typedef PRStatus(*PRFileInfo64FN) (PRFileDesc *, PRFileInfo64 *); 4288 typedef PRStatus(*PRShutdownFN) (PRFileDesc *, PRIntn); 4289 typedef PRIntn(*PRReservedFN) (PRFileDesc *); 4290 typedef PRStatus(*PRFileInfoFN) (PRFileDesc *, PRFileInfo *); 4291 typedef PRInt32(*PRWritevFN) (PRFileDesc *, const PRIOVec *, PRInt32, 4292 PRIntervalTime); 4293 typedef enum PRFileType { 4294 PR_FILE_FILE = 1, 4295 PR_FILE_DIRECTORY = 2, 4296 PR_FILE_OTHER = 3 4297 } PRFileType; 4298 typedef PRStatus(*PRBindFN) (PRFileDesc *, const PRNetAddr *); 4299 typedef PRInt16(*PRPollFN) (PRFileDesc *, PRInt16, PRInt16 *); 4300 struct PRIOMethods { 4301 PRDescType file_type; 4302 PRCloseFN close; 4303 PRReadFN read; 4304 PRWriteFN write; 4305 PRAvailableFN available; 4306 PRAvailable64FN available64; 4307 PRFsyncFN fsync; 4308 PRSeekFN seek; 4309 PRSeek64FN seek64; 4310 PRFileInfoFN fileInfo; 4311 PRFileInfo64FN fileInfo64; 4312 PRWritevFN writev; 4313 PRConnectFN connect; 4314 PRAcceptFN accept; 4315 PRBindFN bind; 4316 PRListenFN listen; 4317 PRShutdownFN shutdown; 4318 PRRecvFN recv; 4319 PRSendFN send; 4320 PRRecvfromFN recvfrom; 4321 PRSendtoFN sendto; 4322 PRPollFN poll; 4323 PRAcceptreadFN acceptread; 4324 PRTransmitfileFN transmitfile; 4325 PRGetsocknameFN getsockname; 4326 PRGetpeernameFN getpeername; 4327 PRReservedFN reserved_fn_6; 4328 PRReservedFN reserved_fn_5; 4329 PRGetsocketoptionFN getsocketoption; 4330 PRSetsocketoptionFN setsocketoption; 4331 PRSendfileFN sendfile; 4332 PRConnectcontinueFN connectcontinue; 4333 PRReservedFN reserved_fn_3; 4334 PRReservedFN reserved_fn_2; 4335 PRReservedFN reserved_fn_1; 4336 PRReservedFN reserved_fn_0; 4337 }; 4338 typedef PRStatus(*PRGetpeernameFN) (PRFileDesc *, PRNetAddr *); 4339 typedef enum PRShutdownHow { 4340 PR_SHUTDOWN_RCV, 4341 PR_SHUTDOWN_SEND = 1, 4342 PR_SHUTDOWN_BOTH = 2 4343 } PRShutdownHow; 4344 extern PRFileDesc *PR_Accept(PRFileDesc * fd, PRNetAddr * addr, 4345 PRIntervalTime timeout); 4346 extern PRStatus PR_Bind(PRFileDesc * fd, const PRNetAddr * addr); 4347 extern PRStatus PR_Close(PRFileDesc * fd); 4348 extern PRStatus PR_Connect(PRFileDesc * fd, const PRNetAddr * addr, 4349 PRIntervalTime timeout); 4350 extern PRFileDesc *PR_CreateIOLayerStub(PRDescIdentity ident, 4351 const struct PRIOMethods *methods); 4352 extern const struct PRIOMethods *PR_GetDefaultIOMethods(void); 4353 extern PRDescIdentity PR_GetLayersIdentity(PRFileDesc * fd); 4354 extern PRStatus PR_GetSocketOption(PRFileDesc * fd, 4355 PRSocketOptionData * data); 4356 extern PRDescIdentity PR_GetUniqueIdentity(const char *layer_name); 4357 extern PRStatus PR_Listen(PRFileDesc * fd, PRIntn backlog); 4358 extern PRFileDesc *PR_OpenTCPSocket(PRIntn af); 4359 extern PRFileDesc *PR_OpenUDPSocket(PRIntn af); 4360 extern PRInt32 PR_Poll(PRPollDesc * pds, PRIntn npds, 4361 PRIntervalTime timeout); 4362 extern PRFileDesc *PR_PopIOLayer(PRFileDesc * fd_stack, PRDescIdentity id); 4363 extern PRStatus PR_PushIOLayer(PRFileDesc * fd_stack, PRDescIdentity id, 4364 PRFileDesc * layer); 4365 extern PRInt32 PR_Read(PRFileDesc * fd, void *buf, PRInt32 amount); 4366 extern PRInt32 PR_Recv(PRFileDesc * fd, void *buf, PRInt32 amount, 4367 PRIntn flags, PRIntervalTime timeout); 4368 extern PRInt32 PR_RecvFrom(PRFileDesc * fd, void *buf, PRInt32 amount, 4369 PRIntn flags, PRNetAddr * addr, 4370 PRIntervalTime timeout); 4371 extern PRInt32 PR_Send(PRFileDesc * fd, const void *buf, PRInt32 amount, 4372 PRIntn flags, PRIntervalTime timeout); 4373 extern PRInt32 PR_SendTo(PRFileDesc * fd, const void *buf, PRInt32 amount, 4374 PRIntn flags, const PRNetAddr * addr, 4375 PRIntervalTime timeout); 4376 extern PRStatus PR_SetSocketOption(PRFileDesc * fd, 4377 const PRSocketOptionData * data); 4378 extern PRStatus PR_Shutdown(PRFileDesc * fd, PRShutdownHow how); 4379 extern PRInt32 PR_Write(PRFileDesc * fd, const void *buf, PRInt32 amount); 4380 __________________________________________________________ 4381 4382 7.2.9. nspr4/private/pprio.h 4383 4384 #define pprio_h___ 4385 4386 typedef PRInt32 PROsfd; 4387 extern PRFileDesc *PR_ImportTCPSocket(PROsfd osfd); 4388 __________________________________________________________ 4389 4390 7.2.10. nspr4/prlock.h 4391 4392 #define prlock_h___ 4393 4394 typedef struct PRLock PRLock; 4395 __________________________________________________________ 4396 4397 7.2.11. nspr4/prmon.h 4398 4399 #define prmon_h___ 4400 4401 typedef struct PRMonitor PRMonitor; 4402 __________________________________________________________ 4403 4404 7.2.12. nspr4/prnetdb.h 4405 4406 #define prnetdb_h___ 4407 4408 typedef struct PRHostEnt { 4409 char *h_name; 4410 char **h_aliases; 4411 PRInt32 h_addrtype; 4412 PRInt32 h_length; 4413 char **h_addr_list; 4414 } PRHostEnt; 4415 typedef struct PRAddrInfo PRAddrInfo; 4416 extern void *PR_EnumerateAddrInfo(void *enumPtr, 4417 const PRAddrInfo * addrInfo, 4418 PRUint16 port, PRNetAddr * result); 4419 extern void PR_FreeAddrInfo(PRAddrInfo * addrInfo); 4420 extern PRAddrInfo *PR_GetAddrInfoByName(const char *hostname, PRUint16 af, 4421 PRIntn flags); 4422 extern PRStatus PR_NetAddrToString(const PRNetAddr * addr, char *string, 4423 PRUint32 size); 4424 extern PRStatus PR_StringToNetAddr(const char *string, PRNetAddr * addr); 4425 __________________________________________________________ 4426 4427 7.2.13. nspr4/prthread.h 4428 4429 #define prthread_h___ 4430 4431 typedef struct PRThread PRThread; 4432 extern PRStatus PR_Interrupt(PRThread * thread); 4433 __________________________________________________________ 4434 4435 7.2.14. nspr4/prtime.h 4436 4437 #define prtime_h___ 4438 4439 typedef PRInt64 PRTime; 4440 extern PRTime PR_Now(void); 4441 __________________________________________________________ 4442 4443 7.2.15. nspr4/prtypes.h 4444 4445 #define prtypes_h___ 4446 4447 typedef int PRInt32; 4448 typedef unsigned long int PRUword; 4449 typedef int PRIntn; 4450 typedef unsigned long int PRUint64; 4451 typedef unsigned char PRUint8; 4452 typedef short int PRInt16; 4453 typedef long int PRInt64; 4454 typedef PRIntn PRBool; 4455 typedef unsigned short PRUint16; 4456 typedef unsigned int PRUint32; 4457 typedef size_t PRSize; 4458 typedef unsigned int PRUintn; 4459 typedef PRInt64 PROffset64; 4460 typedef PRInt32 PROffset32; 4461 typedef enum { 4462 PR_FAILURE = -1, 4463 PR_SUCCESS 4464 } PRStatus; 4465 __________________________________________________________ 4466 4467 7.3. Interfaces for libnss3 4468 4469 Table 7-3 defines the library name and shared object name for 4470 the libnss3 library 4471 4472 Table 7-3. libnss3 Definition 4473 Library: libnss3 4474 SONAME: libnss3.so 4475 4476 The behavior of the interfaces in this library is specified by 4477 the following specifications: 4478 4479 [NSS SSL] Mozilla's NSS SSL Reference 4480 __________________________________________________________ 4481 4482 7.3.1. NSS Utility 4483 __________________________________________________________ 4484 4485 7.3.1.1. Interfaces for NSS Utility 4486 4487 An LSB conforming implementation shall provide the generic 4488 functions for NSS Utility specified in Table 7-4, with the full 4489 mandatory functionality as described in the referenced 4490 underlying specification. 4491 4492 Table 7-4. libnss3 - NSS Utility Function Interfaces 4493 CERT_CheckCertValidTimes(NSS_3.2) [NSS SSL] 4494 CERT_DestroyCertificate(NSS_3.2) [NSS SSL] 4495 CERT_DupCertificate(NSS_3.2) [NSS SSL] 4496 CERT_FreeNicknames(NSS_3.2) [NSS SSL] 4497 CERT_GetCertNicknames(NSS_3.2) [NSS SSL] 4498 CERT_GetDefaultCertDB(NSS_3.2) [NSS SSL] 4499 CERT_VerifyCertName(NSS_3.2) [NSS SSL] 4500 CERT_VerifyCertNow(NSS_3.2) [NSS SSL] NSS_Init(NSS_3.2) [NSS 4501 SSL] 4502 NSS_InitReadWrite(NSS_3.2) [NSS SSL] NSS_NoDB_Init(NSS_3.2) 4503 [NSS SSL] NSS_Shutdown(NSS_3.2) [NSS SSL] 4504 PK11_FindCertFromNickname(NSS_3.2) [NSS SSL] 4505 PK11_FindKeyByAnyCert(NSS_3.2) [NSS SSL] 4506 PK11_GetSlotName(NSS_3.2) [NSS SSL] 4507 PK11_GetTokenName(NSS_3.2) [NSS SSL] PK11_IsHW(NSS_3.2) [NSS 4508 SSL] PK11_IsPresent(NSS_3.2) [NSS SSL] 4509 PK11_IsReadOnly(NSS_3.2) [NSS SSL] 4510 PK11_SetPasswordFunc(NSS_3.2) [NSS SSL] 4511 SECKEY_DestroyPrivateKey(NSS_3.2) [NSS SSL] 4512 __________________________________________________________ 4513 4514 7.4. Data Definitions for libnss3 4515 4516 This section defines global identifiers and their values that 4517 are associated with interfaces contained in libnss3. These 4518 definitions are organized into groups that correspond to system 4519 headers. This convention is used as a convenience for the 4520 reader, and does not imply the existence of these headers, or 4521 their content. Where an interface is defined as requiring a 4522 particular system header file all of the data definitions for 4523 that system header file presented here shall be in effect. 4524 4525 This section gives data definitions to promote binary 4526 application portability, not to repeat source interface 4527 definitions available elsewhere. System providers and 4528 application developers should use this ABI to supplement - not 4529 to replace - source interface definition specifications. 4530 4531 This specification uses the ISO C (1999) C Language as the 4532 reference programming language, and data definitions are 4533 specified in ISO C format. The C language is used here as a 4534 convenient notation. Using a C language description of these 4535 data objects does not preclude their use by other programming 4536 languages. 4537 __________________________________________________________ 4538 4539 7.4.1. nss3/blapit.h 4540 4541 #define _BLAPIT_H_ 4542 #define PQG_PBITS_TO_INDEX(bits) \ 4543 (((bits) < 512 || (bits) > 1024 || (bits) % 64) ? -1 : \ 4544 (int)((bits)-512)/64) 4545 #define PQG_INDEX_TO_PBITS(j) \ 4546 (((unsigned)(j) > 8) ? -1 : (512 + 64 * (j))) 4547 #define NSS_AES 0 4548 #define NSS_DES 0 4549 #define NSS_RC2 0 4550 #define NSS_RC5 0 4551 #define NSS_AES_CBC 1 4552 #define NSS_DES_CBC 1 4553 #define NSS_RC2_CBC 1 4554 #define NSS_RC5_CBC 1 4555 #define DSA_MAX_P_BITS 1024 4556 #define DH_MIN_P_BITS 128 4557 #define RSA_MIN_MODULUS_BITS 128 4558 #define AES_BLOCK_SIZE 16 4559 #define DSA_Q_BITS 160 4560 #define NSS_DES_EDE3 2 4561 #define DSA_SUBPRIME_LEN 20 4562 #define NSS_FREEBL_DEFAULT_CHUNKSIZE 2048 4563 #define DH_MAX_P_BITS 2236 4564 #define NSS_DES_EDE3_CBC 3 4565 #define DSA_SIGNATURE_LEN 40 4566 #define DSA_MIN_P_BITS 512 4567 #define AES_KEY_WRAP_BLOCK_SIZE 8 4568 #define AES_KEY_WRAP_IV_BYTES 8 4569 #define DES_KEY_LENGTH 8 4570 4571 typedef struct PQGParamsStr { 4572 PLArenaPool *arena; 4573 SECItem prime; 4574 SECItem subPrime; 4575 SECItem base; 4576 } PQGParams; 4577 typedef struct PQGVerifyStr { 4578 PLArenaPool *arena; 4579 unsigned int counter; 4580 SECItem seed; 4581 SECItem h; 4582 } PQGVerify; 4583 __________________________________________________________ 4584 4585 7.4.2. nss3/cert.h 4586 4587 #define _CERT_H_ 4588 4589 extern SECCertTimeValidity CERT_CheckCertValidTimes(CERTCertificate * cert, 4590 PRTime t, 4591 PRBool allowOverride); 4592 extern void CERT_DestroyCertificate(CERTCertificate * cert); 4593 extern CERTCertificate *CERT_DupCertificate(CERTCertificate * c); 4594 extern void CERT_FreeNicknames(CERTCertNicknames * nicknames); 4595 extern CERTCertNicknames *CERT_GetCertNicknames(CERTCertDBHandle * handle, 4596 int what, void *wincx); 4597 extern CERTCertDBHandle *CERT_GetDefaultCertDB(void); 4598 extern SECStatus CERT_VerifyCertName(CERTCertificate * cert, 4599 const char *hostname); 4600 extern SECStatus CERT_VerifyCertNow(CERTCertDBHandle * handle, 4601 CERTCertificate * cert, 4602 PRBool checkSig, 4603 SECCertUsage certUsage, void *wincx); 4604 __________________________________________________________ 4605 4606 7.4.3. nss3/certt.h 4607 4608 #define _CERTT_H_ 4609 #define NS_CERT_TYPE_CA \ 4610 ( NS_CERT_TYPE_SSL_CA | NS_CERT_TYPE_EMAIL_CA | \ 4611 NS_CERT_TYPE_OBJECT_SIGNING_CA | EXT_KEY_USAGE_STATUS_RESPONDER) 4612 #define NS_CERT_TYPE_APP \ 4613 ( NS_CERT_TYPE_SSL_CLIENT | NS_CERT_TYPE_SSL_SERVER | \ 4614 NS_CERT_TYPE_EMAIL | NS_CERT_TYPE_OBJECT_SIGNING ) 4615 #define SEC_GET_TRUST_FLAGS(trust,type) \ 4616 (((type)==trustSSL)?((trust)->sslFlags): \ 4617 (((type)==trustEmail)?((trust)->emailFlags): \ 4618 (((type)==trustObjectSigning)?((trust)->objectSigningFlags):0))) 4619 #define KU_ALL \ 4620 (KU_DIGITAL_SIGNATURE | KU_NON_REPUDIATION | KU_KEY_ENCIPHERMENT | \ 4621 KU_DATA_ENCIPHERMENT | KU_KEY_AGREEMENT | KU_KEY_CERT_SIGN | \ 4622 KU_CRL_SIGN) 4623 #define CERT_LIST_END(n,l) (((void *)n) == ((void *)&l->list)) 4624 #define CERT_LIST_NEXT(n) ((CERTCertListNode *)n->links.next) 4625 #define CERT_LIST_HEAD(l) ((CERTCertListNode *)PR_LIST_HEAD(&l->list)) 4626 #define certificateUsageSSLClient (0x0001) 4627 #define certificateUsageSSLServer (0x0002) 4628 #define certificateUsageSSLServerWithStepUp (0x0004) 4629 #define certificateUsageSSLCA (0x0008) 4630 #define certificateUsageEmailSigner (0x0010) 4631 #define certificateUsageEmailRecipient (0x0020) 4632 #define certificateUsageObjectSigner (0x0040) 4633 #define certificateUsageUserCertImport (0x0080) 4634 #define NS_CERT_TYPE_OBJECT_SIGNING_CA (0x01) 4635 #define certificateUsageVerifyCA (0x0100) 4636 #define KU_CRL_SIGN (0x02) 4637 #define NS_CERT_TYPE_EMAIL_CA (0x02) 4638 #define RF_CERTIFICATE_HOLD (0x02) 4639 #define certificateUsageProtectedObjectSigner (0x0200) 4640 #define KU_KEY_CERT_SIGN (0x04) 4641 #define NS_CERT_TYPE_SSL_CA (0x04) 4642 #define RF_CESSATION_OF_OPERATION (0x04) 4643 #define certificateUsageStatusResponder (0x0400) 4644 #define KU_KEY_AGREEMENT (0x08) 4645 #define NS_CERT_TYPE_RESERVED (0x08) 4646 #define RF_SUPERSEDED (0x08) 4647 #define certificateUsageAnyCA (0x0800) 4648 #define KU_DATA_ENCIPHERMENT (0x10) 4649 #define NS_CERT_TYPE_OBJECT_SIGNING (0x10) 4650 #define RF_AFFILIATION_CHANGED (0x10) 4651 #define KU_KEY_ENCIPHERMENT (0x20) 4652 #define NS_CERT_TYPE_EMAIL (0x20) 4653 #define RF_CA_COMPROMISE (0x20) 4654 #define KU_NON_REPUDIATION (0x40) 4655 #define NS_CERT_TYPE_SSL_SERVER (0x40) 4656 #define RF_KEY_COMPROMISE (0x40) 4657 #define EXT_KEY_USAGE_STATUS_RESPONDER (0x4000) 4658 #define KU_KEY_AGREEMENT_OR_ENCIPHERMENT (0x4000) 4659 #define KU_DIGITAL_SIGNATURE (0x80) 4660 #define NS_CERT_TYPE_SSL_CLIENT (0x80) 4661 #define RF_UNUSED (0x80) 4662 #define EXT_KEY_USAGE_TIME_STAMP (0x8000) 4663 #define KU_NS_GOVT_APPROVED (0x8000) 4664 #define CERT_UNLIMITED_PATH_CONSTRAINT -2 4665 #define SEC_CERTIFICATE_REQUEST_VERSION 0 4666 #define SEC_CERTIFICATE_VERSION_1 0 4667 #define SEC_CRL_VERSION_1 0 4668 #define SEC_CERTIFICATE_VERSION_2 1 4669 #define SEC_CERT_CLASS_CA 1 4670 #define SEC_CERT_NICKNAMES_ALL 1 4671 #define SEC_CRL_VERSION_2 1 4672 #define SEC_CERTIFICATE_VERSION_3 2 4673 #define SEC_CERT_CLASS_SERVER 2 4674 #define SEC_CERT_NICKNAMES_USER 2 4675 #define CERT_MAX_CERT_CHAIN 20 4676 #define SEC_CERT_CLASS_USER 3 4677 #define SEC_CERT_NICKNAMES_SERVER 3 4678 #define SEC_CERT_CLASS_EMAIL 4 4679 #define SEC_CERT_NICKNAMES_CA 4 4680 #define certificateUsageHighest certificateUsageAnyCA 4681 #define CERT_LIST_EMPTY(l) CERT_LIST_END(CERT_LIST_HEAD(l), l) 4682 4683 typedef struct CERTAVAStr { 4684 SECItem type; 4685 SECItem value; 4686 } CERTAVA; 4687 typedef struct CERTAttributeStr { 4688 SECItem attrType; 4689 SECItem **attrValue; 4690 } CERTAttribute; 4691 typedef struct CERTAuthInfoAccessStr { 4692 SECItem method; 4693 SECItem derLocation; 4694 CERTGeneralName *location; 4695 } CERTAuthInfoAccess; 4696 typedef struct CERTAuthKeyIDStr { 4697 SECItem keyID; 4698 CERTGeneralName *authCertIssuer; 4699 SECItem authCertSerialNumber; 4700 SECItem **DERAuthCertIssuer; 4701 } CERTAuthKeyID; 4702 typedef struct CERTBasicConstraintsStr { 4703 PRBool isCA; 4704 int pathLenConstraint; 4705 } CERTBasicConstraints; 4706 typedef struct NSSTrustDomainStr CERTCertDBHandle; 4707 typedef struct CERTCertExtensionStr { 4708 SECItem id; 4709 SECItem critical; 4710 SECItem value; 4711 } CERTCertExtension; 4712 typedef struct CERTCertListStr { 4713 PRCList list; 4714 PLArenaPool *arena; 4715 } CERTCertList; 4716 typedef struct CERTCertListNodeStr { 4717 PRCList links; 4718 CERTCertificate *cert; 4719 void *appData; 4720 } CERTCertListNode; 4721 typedef struct CERTCertNicknamesStr { 4722 PLArenaPool *arena; 4723 void *head; 4724 int numnicknames; 4725 char **nicknames; 4726 int what; 4727 int totallen; 4728 } CERTCertNicknames; 4729 typedef struct CERTCertTrustStr { 4730 unsigned int sslFlags; 4731 unsigned int emailFlags; 4732 unsigned int objectSigningFlags; 4733 } CERTCertTrust; 4734 typedef struct CERTSignedDataStr { 4735 SECItem data; 4736 SECAlgorithmID signatureAlgorithm; 4737 SECItem signature; 4738 } CERTSignedData; 4739 typedef struct CERTCertificateListStr { 4740 SECItem *certs; 4741 int len; 4742 PLArenaPool *arena; 4743 } CERTCertificateList; 4744 typedef struct CERTNameStr { 4745 PLArenaPool *arena; 4746 CERTRDN **rdns; 4747 } CERTName; 4748 typedef struct CERTCrlStr { 4749 PLArenaPool *arena; 4750 SECItem version; 4751 SECAlgorithmID signatureAlg; 4752 SECItem derName; 4753 CERTName name; 4754 SECItem lastUpdate; 4755 SECItem nextUpdate; 4756 CERTCrlEntry **entries; 4757 CERTCertExtension **extensions; 4758 } CERTCrl; 4759 typedef struct CERTCrlDistributionPointsStr { 4760 CRLDistributionPoint **distPoints; 4761 } CERTCrlDistributionPoints; 4762 typedef struct CERTCrlEntryStr { 4763 SECItem serialNumber; 4764 SECItem revocationDate; 4765 CERTCertExtension **extensions; 4766 } CERTCrlEntry; 4767 typedef struct CERTCrlHeadNodeStr { 4768 PLArenaPool *arena; 4769 CERTCertDBHandle *dbhandle; 4770 CERTCrlNode *first; 4771 CERTCrlNode *last; 4772 } CERTCrlHeadNode; 4773 typedef struct CERTCrlNodeStr { 4774 CERTCrlNode *next; 4775 int type; 4776 CERTSignedCrl *crl; 4777 } CERTCrlNode; 4778 typedef struct CERTDistNamesStr { 4779 PLArenaPool *arena; 4780 int nnames; 4781 SECItem *names; 4782 void *head; 4783 } CERTDistNames; 4784 typedef struct OtherNameStr { 4785 SECItem name; 4786 SECItem oid; 4787 } OtherName; 4788 typedef struct CERTGeneralNameListStr { 4789 PLArenaPool *arena; 4790 CERTGeneralName *name; 4791 int refCount; 4792 int len; 4793 PRLock *lock; 4794 } CERTGeneralNameList; 4795 typedef struct CERTIssuerAndSNStr { 4796 SECItem derIssuer; 4797 CERTName issuer; 4798 SECItem serialNumber; 4799 } CERTIssuerAndSN; 4800 typedef struct CERTSubjectPublicKeyInfoStr { 4801 PLArenaPool *arena; 4802 SECAlgorithmID algorithm; 4803 SECItem subjectPublicKey; 4804 } CERTSubjectPublicKeyInfo; 4805 typedef struct CERTGeneralNameStr { 4806 CERTGeneralNameType type; 4807 union { 4808 CERTName directoryName; 4809 OtherName OthName; 4810 SECItem other; 4811 } name; 4812 SECItem derDirectoryName; 4813 PRCList l; 4814 } CERTGeneralName; 4815 typedef struct CERTNameConstraintsStr { 4816 CERTNameConstraint *permited; 4817 CERTNameConstraint *excluded; 4818 SECItem **DERPermited; 4819 SECItem **DERExcluded; 4820 } CERTNameConstraints; 4821 typedef struct CERTOKDomainNameStr { 4822 CERTOKDomainName *next; 4823 char name[1]; 4824 } CERTOKDomainName; 4825 typedef struct CERTPrivKeyUsagePeriodStr { 4826 SECItem notBefore; 4827 SECItem notAfter; 4828 PLArenaPool *arena; 4829 } CERTPrivKeyUsagePeriod; 4830 typedef struct CERTRDNStr { 4831 CERTAVA **avas; 4832 } CERTRDN; 4833 typedef struct CERTSignedCrlStr { 4834 PLArenaPool *arena; 4835 CERTCrl crl; 4836 void *reserved1; 4837 PRBool reserved2; 4838 PRBool isperm; 4839 PRBool istemp; 4840 int referenceCount; 4841 CERTCertDBHandle *dbhandle; 4842 CERTSignedData signatureWrap; 4843 char *url; 4844 SECItem *derCrl; 4845 PK11SlotInfo *slot; 4846 CK_OBJECT_HANDLE pkcs11ID; 4847 void *opaque; 4848 } CERTSignedCrl; 4849 typedef struct CERTValidityStr { 4850 PLArenaPool *arena; 4851 SECItem notBefore; 4852 SECItem notAfter; 4853 } CERTValidity; 4854 typedef struct CERTStatusConfigStr { 4855 CERTStatusChecker statusChecker; 4856 CERTStatusDestroy statusDestroy; 4857 void *statusContext; 4858 } CERTStatusConfig; 4859 typedef struct CERTSubjectListStr { 4860 PLArenaPool *arena; 4861 int ncerts; 4862 char *emailAddr; 4863 CERTSubjectNode *head; 4864 CERTSubjectNode *tail; 4865 void *entry; 4866 } CERTSubjectList; 4867 typedef struct CERTSubjectNodeStr { 4868 struct CERTSubjectNodeStr *next; 4869 struct CERTSubjectNodeStr *prev; 4870 SECItem certKey; 4871 SECItem keyID; 4872 } CERTSubjectNode; 4873 typedef struct CERTCertificateRequestStr { 4874 PLArenaPool *arena; 4875 SECItem version; 4876 CERTName subject; 4877 CERTSubjectPublicKeyInfo subjectPublicKeyInfo; 4878 CERTAttribute **attributes; 4879 } CERTCertificateRequest; 4880 typedef struct CERTCertificateStr { 4881 PLArenaPool *arena; 4882 char *subjectName; 4883 char *issuerName; 4884 CERTSignedData signatureWrap; 4885 SECItem derCert; 4886 SECItem derIssuer; 4887 SECItem derSubject; 4888 SECItem derPublicKey; 4889 SECItem certKey; 4890 SECItem version; 4891 SECItem serialNumber; 4892 SECAlgorithmID signature; 4893 CERTName issuer; 4894 CERTValidity validity; 4895 CERTName subject; 4896 CERTSubjectPublicKeyInfo subjectPublicKeyInfo; 4897 SECItem issuerID; 4898 SECItem subjectID; 4899 CERTCertExtension **extensions; 4900 char *emailAddr; 4901 CERTCertDBHandle *dbhandle; 4902 SECItem subjectKeyID; 4903 PRBool keyIDGenerated; 4904 unsigned int keyUsage; 4905 unsigned int rawKeyUsage; 4906 PRBool keyUsagePresent; 4907 PRUint32 nsCertType; 4908 PRBool keepSession; 4909 PRBool timeOK; 4910 CERTOKDomainName *domainOK; 4911 PRBool isperm; 4912 PRBool istemp; 4913 char *nickname; 4914 char *dbnickname; 4915 struct NSSCertificateStr *nssCertificate; 4916 CERTCertTrust *trust; 4917 int referenceCount; 4918 CERTSubjectList *subjectList; 4919 CERTAuthKeyID *authKeyID; 4920 PRBool isRoot; 4921 union { 4922 void *apointer; 4923 struct { 4924 unsigned int hasUnsupportedCriticalExt; 4925 } bits; 4926 } options; 4927 int series; 4928 PK11SlotInfo *slot; 4929 CK_OBJECT_HANDLE pkcs11ID; 4930 PRBool ownSlot; 4931 } CERTCertificate; 4932 typedef struct CERTVerifyLogStr { 4933 PLArenaPool *arena; 4934 unsigned int count; 4935 struct CERTVerifyLogNodeStr *head; 4936 struct CERTVerifyLogNodeStr *tail; 4937 } CERTVerifyLog; 4938 typedef struct CRLDistributionPointStr { 4939 DistributionPointTypes distPointType; 4940 union { 4941 CERTGeneralName *fullName; 4942 CERTRDN relativeName; 4943 } distPoint; 4944 SECItem reasons; 4945 CERTGeneralName *crlIssuer; 4946 SECItem derDistPoint; 4947 SECItem derRelativeName; 4948 SECItem **derCrlIssuer; 4949 SECItem **derFullName; 4950 SECItem bitsmap; 4951 } CRLDistributionPoint; 4952 typedef enum SECCertUsageEnum { 4953 certUsageSSLClient, 4954 certUsageSSLServer = 1, 4955 certUsageSSLServerWithStepUp = 2, 4956 certUsageSSLCA = 3, 4957 certUsageEmailSigner = 4, 4958 certUsageEmailRecipient = 5, 4959 certUsageObjectSigner = 6, 4960 certUsageUserCertImport = 7, 4961 certUsageVerifyCA = 8, 4962 certUsageProtectedObjectSigner = 9, 4963 certUsageStatusResponder = 10, 4964 certUsageAnyCA = 11 4965 } SECCertUsage; 4966 typedef PRInt64 SECCertificateUsage; 4967 typedef enum SECCertTimeValidityEnum { 4968 secCertTimeValid, 4969 secCertTimeExpired = 1, 4970 secCertTimeNotValidYet = 2, 4971 secCertTimeUndetermined = 3 4972 } SECCertTimeValidity; 4973 typedef enum CERTCompareValidityStatusEnum { 4974 certValidityUndetermined, 4975 certValidityChooseB = 1, 4976 certValidityEqual = 2, 4977 certValidityChooseA = 3 4978 } CERTCompareValidityStatus; 4979 typedef enum CERTGeneralNameTypeEnum { 4980 certOtherName = 1, 4981 certRFC822Name = 2, 4982 certDNSName = 3, 4983 certX400Address = 4, 4984 certDirectoryName = 5, 4985 certEDIPartyName = 6, 4986 certURI = 7, 4987 certIPAddress = 8, 4988 certRegisterID = 9 4989 } CERTGeneralNameType; 4990 typedef struct CERTNameConstraintStr { 4991 CERTGeneralName name; 4992 SECItem DERName; 4993 SECItem min; 4994 SECItem max; 4995 PRCList l; 4996 } CERTNameConstraint; 4997 typedef enum DistributionPointTypesEnum { 4998 generalName = 1, 4999 relativeDistinguishedName = 2 5000 } DistributionPointTypes; 5001 struct CERTVerifyLogNodeStr { 5002 CERTCertificate *cert; 5003 long int error; 5004 unsigned int depth; 5005 void *arg; 5006 struct CERTVerifyLogNodeStr *next; 5007 struct CERTVerifyLogNodeStr *prev; 5008 }; 5009 typedef SECStatus(*CERTStatusChecker) (CERTCertDBHandle *, 5010 CERTCertificate *, PRInt64, void*); 5011 typedef SECStatus(*CERTStatusDestroy) (CERTStatusConfig *); 5012 typedef struct { 5013 SECOidTag oid; 5014 SECItem qualifierID; 5015 SECItem qualifierValue; 5016 } CERTPolicyQualifier; 5017 typedef struct { 5018 SECOidTag oid; 5019 SECItem policyID; 5020 CERTPolicyQualifier **policyQualifiers; 5021 } CERTPolicyInfo; 5022 typedef struct { 5023 PLArenaPool *arena; 5024 CERTPolicyInfo **policyInfos; 5025 } CERTCertificatePolicies; 5026 typedef struct { 5027 SECItem organization; 5028 SECItem **noticeNumbers; 5029 } CERTNoticeReference; 5030 typedef struct { 5031 PLArenaPool *arena; 5032 CERTNoticeReference noticeReference; 5033 SECItem derNoticeReference; 5034 SECItem displayText; 5035 } CERTUserNotice; 5036 typedef struct { 5037 PLArenaPool *arena; 5038 SECItem **oids; 5039 } CERTOidSequence; 5040 __________________________________________________________ 5041 5042 7.4.4. nss3/cmsreclist.h 5043 5044 #define _CMSRECLIST_H 5045 5046 typedef struct NSSCMSRecipientStr { 5047 int riIndex; 5048 int subIndex; 5049 enum { 5050 RLIssuerSN, 5051 RLSubjKeyID = 1 5052 } kind; 5053 union { 5054 CERTIssuerAndSN *issuerAndSN; 5055 SECItem *subjectKeyID; 5056 } id; 5057 CERTCertificate *cert; 5058 SECKEYPrivateKey *privkey; 5059 PK11SlotInfo *slot; 5060 } NSSCMSRecipient; 5061 __________________________________________________________ 5062 5063 7.4.5. nss3/cryptoht.h 5064 5065 #define _CRYPTOHT_H_ 5066 5067 typedef struct SGNContextStr SGNContext; 5068 typedef struct VFYContextStr VFYContext; 5069 __________________________________________________________ 5070 5071 7.4.6. nss3/hasht.h 5072 5073 #define _HASHT_H_ 5074 #define MD2_LENGTH 16 5075 #define MD5_LENGTH 16 5076 #define SHA1_LENGTH 20 5077 #define SHA256_LENGTH 32 5078 #define SHA384_LENGTH 48 5079 #define SHA512_LENGTH 64 5080 #define HASH_LENGTH_MAX SHA512_LENGTH 5081 5082 typedef struct SECHashObjectStr { 5083 unsigned int length; 5084 void *(*create) (void); 5085 void *(*clone) (void *); 5086 void (*destroy) (void *, PRBool); 5087 void (*begin) (void *); 5088 void (*update) (void *, const unsigned char *, unsigned int); 5089 void (*end) (void *, unsigned char *, unsigned int *, unsigned int); 5090 unsigned int blocklength; 5091 HASH_HashType type; 5092 } SECHashObject; 5093 typedef struct HASHContextStr { 5094 const struct SECHashObjectStr *hashobj; 5095 void *hash_context; 5096 } HASHContext; 5097 typedef enum { 5098 HASH_AlgNULL, 5099 HASH_AlgMD2 = 1, 5100 HASH_AlgMD5 = 2, 5101 HASH_AlgSHA1 = 3, 5102 HASH_AlgSHA256 = 4, 5103 HASH_AlgSHA384 = 5, 5104 HASH_AlgSHA512 = 6, 5105 HASH_AlgTOTAL = 7 5106 } HASH_HashType; 5107 __________________________________________________________ 5108 5109 7.4.7. nss3/key.h 5110 5111 #define _KEY_H_ 5112 __________________________________________________________ 5113 5114 7.4.8. nss3/keyhi.h 5115 5116 #define _KEYHI_H_ 5117 5118 extern void SECKEY_DestroyPrivateKey(SECKEYPrivateKey * key); 5119 __________________________________________________________ 5120 5121 7.4.9. nss3/keyt.h 5122 5123 #define _KEYT_H_ 5124 __________________________________________________________ 5125 5126 7.4.10. nss3/keythi.h 5127 5128 #define _KEYTHI_H_ 5129 5130 typedef enum { 5131 nullKey, 5132 rsaKey = 1, 5133 dsaKey = 2, 5134 fortezzaKey = 3, 5135 dhKey = 4, 5136 keaKey = 5, 5137 ecKey = 6 5138 } KeyType; 5139 typedef struct SECKEYRSAPublicKeyStr { 5140 PLArenaPool *arena; 5141 SECItem modulus; 5142 SECItem publicExponent; 5143 } SECKEYRSAPublicKey; 5144 typedef struct SECKEYPQGParamsStr { 5145 PLArenaPool *arena; 5146 SECItem prime; 5147 SECItem subPrime; 5148 SECItem base; 5149 } SECKEYPQGParams; 5150 typedef struct SECKEYDSAPublicKeyStr { 5151 SECKEYPQGParams params; 5152 SECItem publicValue; 5153 } SECKEYDSAPublicKey; 5154 typedef struct SECKEYDHParamsStr { 5155 PLArenaPool *arena; 5156 SECItem prime; 5157 SECItem base; 5158 } SECKEYDHParams; 5159 typedef struct SECKEYDHPublicKeyStr { 5160 PLArenaPool *arena; 5161 SECItem prime; 5162 SECItem base; 5163 SECItem publicValue; 5164 } SECKEYDHPublicKey; 5165 typedef SECItem SECKEYECParams; 5166 typedef struct SECKEYECPublicKeyStr { 5167 SECKEYECParams DEREncodedParams; 5168 int size; 5169 SECItem publicValue; 5170 } SECKEYECPublicKey; 5171 typedef struct SECKEYFortezzaPublicKeyStr { 5172 int KEAversion; 5173 int DSSversion; 5174 unsigned char KMID[8]; 5175 SECItem clearance; 5176 SECItem KEApriviledge; 5177 SECItem DSSpriviledge; 5178 SECItem KEAKey; 5179 SECItem DSSKey; 5180 SECKEYPQGParams params; 5181 SECKEYPQGParams keaParams; 5182 } SECKEYFortezzaPublicKey; 5183 typedef struct SECKEYKEAParamsStr { 5184 PLArenaPool *arena; 5185 SECItem hash; 5186 } SECKEYKEAParams; 5187 typedef struct SECKEYKEAPublicKeyStr { 5188 SECKEYKEAParams params; 5189 SECItem publicValue; 5190 } SECKEYKEAPublicKey; 5191 typedef struct SECKEYPublicKeyStr { 5192 PLArenaPool *arena; 5193 KeyType keyType; 5194 PK11SlotInfo *pkcs11Slot; 5195 CK_OBJECT_HANDLE pkcs11ID; 5196 union { 5197 SECKEYRSAPublicKey rsa; 5198 SECKEYDSAPublicKey dsa; 5199 SECKEYDHPublicKey dh; 5200 SECKEYKEAPublicKey kea; 5201 SECKEYFortezzaPublicKey fortezza; 5202 SECKEYECPublicKey ec; 5203 } u; 5204 } SECKEYPublicKey; 5205 typedef struct SECKEYPrivateKeyStr { 5206 PLArenaPool *arena; 5207 KeyType keyType; 5208 PK11SlotInfo *pkcs11Slot; 5209 CK_OBJECT_HANDLE pkcs11ID; 5210 PRBool pkcs11IsTemp; 5211 void *wincx; 5212 PRUint32 staticflags; 5213 } SECKEYPrivateKey; 5214 typedef struct { 5215 PRCList links; 5216 SECKEYPrivateKey *key; 5217 } SECKEYPrivateKeyListNode; 5218 typedef struct { 5219 PRCList list; 5220 PLArenaPool *arena; 5221 } SECKEYPrivateKeyList; 5222 typedef struct { 5223 PRCList list; 5224 PLArenaPool *arena; 5225 } SECKEYPublicKeyList; 5226 __________________________________________________________ 5227 5228 7.4.11. nss3/nss.h 5229 5230 #define __nss_h_ 5231 #define NSS_VERSION "3.11.4" 5232 #define NSS_INIT_READONLY 0x1 5233 #define NSS_INIT_NOROOTINIT 0x10 5234 #define NSS_INIT_NOPK11FINALIZE 0x100 5235 #define NSS_INIT_NOCERTDB 0x2 5236 #define NSS_INIT_OPTIMIZESPACE 0x20 5237 #define NSS_INIT_RESERVED 0x200 5238 #define NSS_INIT_NOMODDB 0x4 5239 #define NSS_INIT_PK11THREADSAFE 0x40 5240 #define NSS_INIT_FORCEOPEN 0x8 5241 #define NSS_INIT_PK11RELOAD 0x80 5242 #define NSS_VMINOR 11 5243 #define NSS_VMAJOR 3 5244 #define NSS_VPATCH 4 5245 #define NSS_INIT_COOPERATE NSS_INIT_PK11THREADSAFE | NSS_INIT_PK11RELOAD | NSS_INIT_NOPK11FINALIZE | NSS_INIT_RESERVED 5246 #define SECMOD_DB "secmod.db" 5247 5248 extern SECStatus NSS_Init(const char *configdir); 5249 extern SECStatus NSS_InitReadWrite(const char *configdir); 5250 extern SECStatus NSS_NoDB_Init(const char *configdir); 5251 extern SECStatus NSS_Shutdown(void); 5252 __________________________________________________________ 5253 5254 7.4.12. nss3/nssb64.h 5255 5256 #define _NSSB64_H_ 5257 __________________________________________________________ 5258 5259 7.4.13. nss3/nssb64t.h 5260 5261 #define _NSSB64T_H_ 5262 5263 typedef struct NSSBase64DecoderStr NSSBase64Decoder; 5264 typedef struct NSSBase64EncoderStr NSSBase64Encoder; 5265 __________________________________________________________ 5266 5267 7.4.14. nss3/nssilckt.h 5268 5269 #define _NSSILCKT_H_ 5270 5271 typedef enum { 5272 nssILockArena, 5273 nssILockSession = 1, 5274 nssILockObject = 2, 5275 nssILockRefLock = 3, 5276 nssILockCert = 4, 5277 nssILockCertDB = 5, 5278 nssILockDBM = 6, 5279 nssILockCache = 7, 5280 nssILockSSL = 8, 5281 nssILockList = 9, 5282 nssILockSlot = 10, 5283 nssILockFreelist = 11, 5284 nssILockOID = 12, 5285 nssILockAttribute = 13, 5286 nssILockPK11cxt = 14, 5287 nssILockRWLock = 15, 5288 nssILockOther = 16, 5289 nssILockSelfServ = 17, 5290 nssILockKeyDB = 18, 5291 nssILockLast = 19 5292 } nssILockType; 5293 __________________________________________________________ 5294 5295 7.4.15. nss3/nssrwlkt.h 5296 5297 #define nssrwlkt_h___ 5298 5299 typedef struct nssRWLockStr NSSRWLock; 5300 __________________________________________________________ 5301 5302 7.4.16. nss3/ocspt.h 5303 5304 #define _OCSPT_H_ 5305 5306 typedef struct CERTOCSPRequestStr CERTOCSPRequest; 5307 typedef struct CERTOCSPResponseStr CERTOCSPResponse; 5308 typedef struct CERTOCSPCertIDStr CERTOCSPCertID; 5309 typedef struct CERTOCSPSingleResponseStr CERTOCSPSingleResponse; 5310 __________________________________________________________ 5311 5312 7.4.17. nss3/pk11pub.h 5313 5314 #define _PK11PUB_H_ 5315 5316 extern CERTCertificate *PK11_FindCertFromNickname(const char *nickname, 5317 void *wincx); 5318 extern SECKEYPrivateKey *PK11_FindKeyByAnyCert(CERTCertificate * cert, 5319 void *wincx); 5320 extern char *PK11_GetSlotName(PK11SlotInfo * slot); 5321 extern char *PK11_GetTokenName(PK11SlotInfo * slot); 5322 extern PRBool PK11_IsHW(PK11SlotInfo * slot); 5323 extern PRBool PK11_IsPresent(PK11SlotInfo * slot); 5324 extern PRBool PK11_IsReadOnly(PK11SlotInfo * slot); 5325 extern void PK11_SetPasswordFunc(PK11PasswordFunc func); 5326 __________________________________________________________ 5327 5328 7.4.18. nss3/pkcs11t.h 5329 5330 #define _PKCS11T_H_ 5331 5332 typedef unsigned char CK_BYTE; 5333 typedef CK_BYTE CK_CHAR; 5334 typedef CK_BYTE CK_UTF8CHAR; 5335 typedef unsigned long int CK_ULONG; 5336 typedef CK_ULONG CK_FLAGS; 5337 typedef void *CK_VOID_PTR; 5338 typedef struct CK_VERSION { 5339 CK_BYTE major; 5340 CK_BYTE minor; 5341 } CK_VERSION; 5342 typedef struct CK_INFO { 5343 CK_VERSION cryptokiVersion; 5344 CK_UTF8CHAR manufacturerID[31]; 5345 CK_FLAGS flags; 5346 CK_UTF8CHAR libraryDescription[31]; 5347 CK_VERSION libraryVersion; 5348 } CK_INFO; 5349 typedef CK_ULONG CK_SLOT_ID; 5350 typedef struct CK_SLOT_INFO { 5351 CK_UTF8CHAR slotDescription[63]; 5352 CK_UTF8CHAR manufacturerID[31]; 5353 CK_FLAGS flags; 5354 CK_VERSION hardwareVersion; 5355 CK_VERSION firmwareVersion; 5356 } CK_SLOT_INFO; 5357 typedef struct CK_TOKEN_INFO { 5358 CK_UTF8CHAR label[31]; 5359 CK_UTF8CHAR manufacturerID[31]; 5360 CK_UTF8CHAR model[15]; 5361 CK_CHAR serialNumber[15]; 5362 CK_FLAGS flags; 5363 CK_ULONG ulMaxSessionCount; 5364 CK_ULONG ulSessionCount; 5365 CK_ULONG ulMaxRwSessionCount; 5366 CK_ULONG ulRwSessionCount; 5367 CK_ULONG ulMaxPinLen; 5368 CK_ULONG ulMinPinLen; 5369 CK_ULONG ulTotalPublicMemory; 5370 CK_ULONG ulFreePublicMemory; 5371 CK_ULONG ulTotalPrivateMemory; 5372 CK_ULONG ulFreePrivateMemory; 5373 CK_VERSION hardwareVersion; 5374 CK_VERSION firmwareVersion; 5375 CK_CHAR utcTime[15]; 5376 } CK_TOKEN_INFO; 5377 typedef CK_ULONG CK_SESSION_HANDLE; 5378 typedef CK_ULONG CK_OBJECT_HANDLE; 5379 typedef CK_ULONG CK_OBJECT_CLASS; 5380 typedef CK_ULONG CK_KEY_TYPE; 5381 typedef CK_ULONG CK_ATTRIBUTE_TYPE; 5382 typedef struct CK_ATTRIBUTE { 5383 CK_ATTRIBUTE_TYPE type; 5384 CK_VOID_PTR pValue; 5385 CK_ULONG ulValueLen; 5386 } CK_ATTRIBUTE; 5387 typedef CK_ATTRIBUTE *CK_ATTRIBUTE_PTR; 5388 typedef CK_ULONG CK_MECHANISM_TYPE; 5389 typedef struct CK_MECHANISM { 5390 CK_MECHANISM_TYPE mechanism; 5391 CK_VOID_PTR pParameter; 5392 CK_ULONG ulParameterLen; 5393 } CK_MECHANISM; 5394 typedef CK_MECHANISM *CK_MECHANISM_PTR; 5395 typedef CK_ULONG CK_RV; 5396 __________________________________________________________ 5397 5398 7.4.19. nss3/pkcs7t.h 5399 5400 #define _PKCS7T_H_ 5401 5402 typedef struct SEC_PKCS7RecipientInfoStr { 5403 SECItem version; 5404 CERTIssuerAndSN *issuerAndSN; 5405 SECAlgorithmID keyEncAlg; 5406 SECItem encKey; 5407 CERTCertificate *cert; 5408 } SEC_PKCS7RecipientInfo; 5409 __________________________________________________________ 5410 5411 7.4.20. nss3/secasn1t.h 5412 5413 #define _SECASN1T_H_ 5414 5415 typedef struct sec_ASN1Template_struct { 5416 unsigned long int kind; 5417 unsigned long int offset; 5418 const void *sub; 5419 unsigned int size; 5420 } SEC_ASN1Template; 5421 typedef struct sec_DecoderContext_struct SEC_ASN1DecoderContext; 5422 typedef struct sec_EncoderContext_struct SEC_ASN1EncoderContext; 5423 typedef enum { 5424 SEC_ASN1_Identifier, 5425 SEC_ASN1_Length = 1, 5426 SEC_ASN1_Contents = 2, 5427 SEC_ASN1_EndOfContents = 3 5428 } SEC_ASN1EncodingPart; 5429 typedef void (*SEC_ASN1NotifyProc) (void *, PRBool, void *, int); 5430 typedef void (*SEC_ASN1WriteProc) (void *, const char *, unsigned long int, 5431 int, SEC_ASN1EncodingPart); 5432 __________________________________________________________ 5433 5434 7.4.21. nss3/seccomon.h 5435 5436 #define _SECCOMMON_H_ 5437 5438 typedef enum { 5439 siBuffer, 5440 siClearDataBuffer = 1, 5441 siCipherDataBuffer = 2, 5442 siDERCertBuffer = 3, 5443 siEncodedCertBuffer = 4, 5444 siDERNameBuffer = 5, 5445 siEncodedNameBuffer = 6, 5446 siAsciiNameString = 7, 5447 siAsciiString = 8, 5448 siDEROID = 9, 5449 siUnsignedInteger = 10, 5450 siUTCTime = 11, 5451 siGeneralizedTime = 12, 5452 siVisibleString = 13, 5453 siUTF8String = 14, 5454 siBMPString = 15 5455 } SECItemType; 5456 typedef struct SECItemStr { 5457 SECItemType type; 5458 unsigned char *data; 5459 unsigned int len; 5460 } SECItem; 5461 typedef enum _SECStatus { 5462 SECWouldBlock = -2, 5463 SECFailure = -1, 5464 SECSuccess 5465 } SECStatus; 5466 typedef enum _SECComparison { 5467 SECLessThan = -1, 5468 SECEqual, 5469 SECGreaterThan = 1 5470 } SECComparison; 5471 __________________________________________________________ 5472 5473 7.4.22. nss3/secdert.h 5474 5475 #define _SECDERT_H_ 5476 5477 typedef struct DERTemplateStr { 5478 unsigned long int kind; 5479 unsigned int offset; 5480 DERTemplate *sub; 5481 unsigned long int arg; 5482 } DERTemplate; 5483 __________________________________________________________ 5484 5485 7.4.23. nss3/secdigt.h 5486 5487 #define _SECDIGT_H_ 5488 5489 typedef struct SGNDigestInfoStr { 5490 PLArenaPool *arena; 5491 SECAlgorithmID digestAlgorithm; 5492 SECItem digest; 5493 } SGNDigestInfo; 5494 __________________________________________________________ 5495 5496 7.4.24. nss3/secmodt.h 5497 5498 #define _SECMODT_H_ 5499 #define SECMOD_MAKE_NSS_FLAGS(fips,slot) \ 5500 "Flags=internal,critical"fips" \ 5501 slotparams=("#slot"={"SECMOD_SLOT_FLAGS"})" 5502 #define SECMOD_FIPS_NAME "NSS Internal FIPS PKCS #11 Module" 5503 #define SECMOD_INT_NAME "NSS Internal PKCS #11 Module" 5504 #define SECMOD_SLOT_FLAGS "slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,SHA256,SHA512]" 5505 #define SECMOD_EXTERNAL 0 5506 #define CRL_IMPORT_DEFAULT_OPTIONS 0x00000000 5507 #define CRL_IMPORT_BYPASS_CHECKS 0x00000001 5508 #define PK11_ATTR_TOKEN 0x00000001L 5509 #define SECMOD_RSA_FLAG 0x00000001L 5510 #define PK11_ATTR_SESSION 0x00000002L 5511 #define SECMOD_DSA_FLAG 0x00000002L 5512 #define PK11_ATTR_PRIVATE 0x00000004L 5513 #define SECMOD_RC2_FLAG 0x00000004L 5514 #define PK11_ATTR_PUBLIC 0x00000008L 5515 #define SECMOD_RC4_FLAG 0x00000008L 5516 #define PK11_ATTR_MODIFIABLE 0x00000010L 5517 #define SECMOD_DES_FLAG 0x00000010L 5518 #define PK11_ATTR_UNMODIFIABLE 0x00000020L 5519 #define SECMOD_DH_FLAG 0x00000020L 5520 #define PK11_ATTR_SENSITIVE 0x00000040L 5521 #define SECMOD_FORTEZZA_FLAG 0x00000040L 5522 #define PK11_ATTR_INSENSITIVE 0x00000080L 5523 #define SECMOD_RC5_FLAG 0x00000080L 5524 #define PK11_ATTR_EXTRACTABLE 0x00000100L 5525 #define SECMOD_SHA1_FLAG 0x00000100L 5526 #define PK11_ATTR_UNEXTRACTABLE 0x00000200L 5527 #define SECMOD_MD5_FLAG 0x00000200L 5528 #define SECMOD_MD2_FLAG 0x00000400L 5529 #define SECMOD_SSL_FLAG 0x00000800L 5530 #define SECMOD_TLS_FLAG 0x00001000L 5531 #define SECMOD_AES_FLAG 0x00002000L 5532 #define SECMOD_SHA256_FLAG 0x00004000L 5533 #define SECMOD_SHA512_FLAG 0x00008000L 5534 #define SECMOD_END_WAIT 0x01 5535 #define SECMOD_WAIT_SIMULATED_EVENT 0x02 5536 #define SECMOD_WAIT_PKCS11_EVENT 0x04 5537 #define SECMOD_RESERVED_FLAG 0X08000000L 5538 #define SECMOD_FRIENDLY_FLAG 0x10000000L 5539 #define PK11_OWN_PW_DEFAULTS 0x20000000L 5540 #define PK11_DISABLE_FLAG 0x40000000L 5541 #define SECMOD_RANDOM_FLAG 0x80000000L 5542 #define CKM_FAKE_RANDOM 0x80000efeL 5543 #define CKM_INVALID_MECHANISM 0xffffffffL 5544 #define SECMOD_INTERNAL 1 5545 #define SECMOD_FIPS 2 5546 #define PK11_PW_AUTHENTICATED "AUTH" 5547 #define PK11_PW_RETRY "RETRY" 5548 #define SECMOD_INT_FLAGS SECMOD_MAKE_NSS_FLAGS("",1) 5549 #define SECMOD_FIPS_FLAGS SECMOD_MAKE_NSS_FLAGS(",fips",3) 5550 #define PK11_PW_TRY "TRY" 5551 5552 typedef struct SECMODModuleStr { 5553 PLArenaPool *arena; 5554 PRBool internal; 5555 PRBool loaded; 5556 PRBool isFIPS; 5557 char *dllName; 5558 char *commonName; 5559 void *library; 5560 void *functionList; 5561 PRLock *refLock; 5562 int refCount; 5563 PK11SlotInfo **slots; 5564 int slotCount; 5565 PK11PreSlotInfo *slotInfo; 5566 int slotInfoCount; 5567 SECMODModuleID moduleID; 5568 PRBool isThreadSafe; 5569 unsigned long int ssl[1]; 5570 char *libraryParams; 5571 void *moduleDBFunc; 5572 SECMODModule *parent; 5573 PRBool isCritical; 5574 PRBool isModuleDB; 5575 PRBool moduleDBOnly; 5576 int trustOrder; 5577 int cipherOrder; 5578 unsigned long int evControlMask; 5579 CK_VERSION cryptokiVersion; 5580 } SECMODModule; 5581 typedef struct SECMODModuleListStr { 5582 SECMODModuleList *next; 5583 SECMODModule *module; 5584 } SECMODModuleList; 5585 typedef NSSRWLock SECMODListLock; 5586 typedef struct PK11SlotInfoStr PK11SlotInfo; 5587 typedef struct PK11PreSlotInfoStr PK11PreSlotInfo; 5588 typedef struct PK11SymKeyStr PK11SymKey; 5589 typedef struct PK11ContextStr PK11Context; 5590 typedef struct PK11SlotListStr PK11SlotList; 5591 typedef struct PK11SlotListElementStr PK11SlotListElement; 5592 typedef unsigned long int SECMODModuleID; 5593 typedef struct PK11DefaultArrayEntryStr PK11DefaultArrayEntry; 5594 typedef struct PK11GenericObjectStr PK11GenericObject; 5595 typedef void (*PK11FreeDataFunc) (void *); 5596 typedef enum { 5597 PK11CertListUnique, 5598 PK11CertListUser = 1, 5599 PK11CertListRootUnique = 2, 5600 PK11CertListCA = 3, 5601 PK11CertListCAUnique = 4, 5602 PK11CertListUserUnique = 5, 5603 PK11CertListAll = 6 5604 } PK11CertListType; 5605 typedef PRUint32 PK11AttrFlags; 5606 typedef enum { 5607 PK11_OriginNULL, 5608 PK11_OriginDerive = 1, 5609 PK11_OriginGenerated = 2, 5610 PK11_OriginFortezzaHack = 3, 5611 PK11_OriginUnwrap = 4 5612 } PK11Origin; 5613 typedef enum { 5614 PK11_DIS_NONE, 5615 PK11_DIS_USER_SELECTED = 1, 5616 PK11_DIS_COULD_NOT_INIT_TOKEN = 2, 5617 PK11_DIS_TOKEN_VERIFY_FAILED = 3, 5618 PK11_DIS_TOKEN_NOT_PRESENT = 4 5619 } PK11DisableReasons; 5620 typedef enum { 5621 PK11_TypeGeneric, 5622 PK11_TypePrivKey = 1, 5623 PK11_TypePubKey = 2, 5624 PK11_TypeCert = 3, 5625 PK11_TypeSymKey = 4 5626 } PK11ObjectType; 5627 typedef char *(*PK11PasswordFunc) (PK11SlotInfo *, PRBool, void *); 5628 typedef struct SECKEYAttributeStr { 5629 SECItem attrType; 5630 SECItem **attrValue; 5631 } SECKEYAttribute; 5632 typedef struct SECKEYPrivateKeyInfoStr { 5633 PLArenaPool *arena; 5634 SECItem version; 5635 SECAlgorithmID algorithm; 5636 SECItem privateKey; 5637 SECKEYAttribute **attributes; 5638 } SECKEYPrivateKeyInfo; 5639 typedef struct SECKEYEncryptedPrivateKeyInfoStr { 5640 PLArenaPool *arena; 5641 SECAlgorithmID algorithm; 5642 SECItem encryptedData; 5643 } SECKEYEncryptedPrivateKeyInfo; 5644 typedef enum { 5645 PK11TokenNotRemovable, 5646 PK11TokenPresent = 1, 5647 PK11TokenChanged = 2, 5648 PK11TokenRemoved = 3 5649 } PK11TokenStatus; 5650 typedef enum { 5651 PK11TokenRemovedOrChangedEvent, 5652 PK11TokenPresentEvent = 1 5653 } PK11TokenEvent; 5654 __________________________________________________________ 5655 5656 7.4.25. nss3/secoidt.h 5657 5658 #define _SECOIDT_H_ 5659 5660 typedef struct SECOidDataStr { 5661 SECItem oid; 5662 SECOidTag offset; 5663 const char *desc; 5664 unsigned long int mechanism; 5665 SECSupportExtenTag supportedExtension; 5666 } SECOidData; 5667 typedef struct SECAlgorithmIDStr { 5668 SECItem algorithm; 5669 SECItem parameters; 5670 } SECAlgorithmID; 5671 typedef enum { 5672 SEC_OID_UNKNOWN, 5673 SEC_OID_MD2 = 1, 5674 SEC_OID_MD4 = 2, 5675 SEC_OID_MD5 = 3, 5676 SEC_OID_SHA1 = 4, 5677 SEC_OID_RC2_CBC = 5, 5678 SEC_OID_RC4 = 6, 5679 SEC_OID_DES_EDE3_CBC = 7, 5680 SEC_OID_RC5_CBC_PAD = 8, 5681 SEC_OID_DES_ECB = 9, 5682 SEC_OID_DES_CBC = 10, 5683 SEC_OID_DES_OFB = 11, 5684 SEC_OID_DES_CFB = 12, 5685 SEC_OID_DES_MAC = 13, 5686 SEC_OID_DES_EDE = 14, 5687 SEC_OID_ISO_SHA_WITH_RSA_SIGNATURE = 15, 5688 SEC_OID_PKCS1_RSA_ENCRYPTION = 16, 5689 SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION = 17, 5690 SEC_OID_PKCS1_MD4_WITH_RSA_ENCRYPTION = 18, 5691 SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION = 19, 5692 SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION = 20, 5693 SEC_OID_PKCS5_PBE_WITH_MD2_AND_DES_CBC = 21, 5694 SEC_OID_PKCS5_PBE_WITH_MD5_AND_DES_CBC = 22, 5695 SEC_OID_PKCS5_PBE_WITH_SHA1_AND_DES_CBC = 23, 5696 SEC_OID_PKCS7 = 24, 5697 SEC_OID_PKCS7_DATA = 25, 5698 SEC_OID_PKCS7_SIGNED_DATA = 26, 5699 SEC_OID_PKCS7_ENVELOPED_DATA = 27, 5700 SEC_OID_PKCS7_SIGNED_ENVELOPED_DATA = 28, 5701 SEC_OID_PKCS7_DIGESTED_DATA = 29, 5702 SEC_OID_PKCS7_ENCRYPTED_DATA = 30, 5703 SEC_OID_PKCS9_EMAIL_ADDRESS = 31, 5704 SEC_OID_PKCS9_UNSTRUCTURED_NAME = 32, 5705 SEC_OID_PKCS9_CONTENT_TYPE = 33, 5706 SEC_OID_PKCS9_MESSAGE_DIGEST = 34, 5707 SEC_OID_PKCS9_SIGNING_TIME = 35, 5708 SEC_OID_PKCS9_COUNTER_SIGNATURE = 36, 5709 SEC_OID_PKCS9_CHALLENGE_PASSWORD = 37, 5710 SEC_OID_PKCS9_UNSTRUCTURED_ADDRESS = 38, 5711 SEC_OID_PKCS9_EXTENDED_CERTIFICATE_ATTRIBUTES = 39, 5712 SEC_OID_PKCS9_SMIME_CAPABILITIES = 40, 5713 SEC_OID_AVA_COMMON_NAME = 41, 5714 SEC_OID_AVA_COUNTRY_NAME = 42, 5715 SEC_OID_AVA_LOCALITY = 43, 5716 SEC_OID_AVA_STATE_OR_PROVINCE = 44, 5717 SEC_OID_AVA_ORGANIZATION_NAME = 45, 5718 SEC_OID_AVA_ORGANIZATIONAL_UNIT_NAME = 46, 5719 SEC_OID_AVA_DN_QUALIFIER = 47, 5720 SEC_OID_AVA_DC = 48, 5721 SEC_OID_NS_TYPE_GIF = 49, 5722 SEC_OID_NS_TYPE_JPEG = 50, 5723 SEC_OID_NS_TYPE_URL = 51, 5724 SEC_OID_NS_TYPE_HTML = 52, 5725 SEC_OID_NS_TYPE_CERT_SEQUENCE = 53, 5726 SEC_OID_MISSI_KEA_DSS_OLD = 54, 5727 SEC_OID_MISSI_DSS_OLD = 55, 5728 SEC_OID_MISSI_KEA_DSS = 56, 5729 SEC_OID_MISSI_DSS = 57, 5730 SEC_OID_MISSI_KEA = 58, 5731 SEC_OID_MISSI_ALT_KEA = 59, 5732 SEC_OID_NS_CERT_EXT_NETSCAPE_OK = 60, 5733 SEC_OID_NS_CERT_EXT_ISSUER_LOGO = 61, 5734 SEC_OID_NS_CERT_EXT_SUBJECT_LOGO = 62, 5735 SEC_OID_NS_CERT_EXT_CERT_TYPE = 63, 5736 SEC_OID_NS_CERT_EXT_BASE_URL = 64, 5737 SEC_OID_NS_CERT_EXT_REVOCATION_URL = 65, 5738 SEC_OID_NS_CERT_EXT_CA_REVOCATION_URL = 66, 5739 SEC_OID_NS_CERT_EXT_CA_CRL_URL = 67, 5740 SEC_OID_NS_CERT_EXT_CA_CERT_URL = 68, 5741 SEC_OID_NS_CERT_EXT_CERT_RENEWAL_URL = 69, 5742 SEC_OID_NS_CERT_EXT_CA_POLICY_URL = 70, 5743 SEC_OID_NS_CERT_EXT_HOMEPAGE_URL = 71, 5744 SEC_OID_NS_CERT_EXT_ENTITY_LOGO = 72, 5745 SEC_OID_NS_CERT_EXT_USER_PICTURE = 73, 5746 SEC_OID_NS_CERT_EXT_SSL_SERVER_NAME = 74, 5747 SEC_OID_NS_CERT_EXT_COMMENT = 75, 5748 SEC_OID_NS_CERT_EXT_LOST_PASSWORD_URL = 76, 5749 SEC_OID_NS_CERT_EXT_CERT_RENEWAL_TIME = 77, 5750 SEC_OID_NS_KEY_USAGE_GOVT_APPROVED = 78, 5751 SEC_OID_X509_SUBJECT_DIRECTORY_ATTR = 79, 5752 SEC_OID_X509_SUBJECT_KEY_ID = 80, 5753 SEC_OID_X509_KEY_USAGE = 81, 5754 SEC_OID_X509_PRIVATE_KEY_USAGE_PERIOD = 82, 5755 SEC_OID_X509_SUBJECT_ALT_NAME = 83, 5756 SEC_OID_X509_ISSUER_ALT_NAME = 84, 5757 SEC_OID_X509_BASIC_CONSTRAINTS = 85, 5758 SEC_OID_X509_NAME_CONSTRAINTS = 86, 5759 SEC_OID_X509_CRL_DIST_POINTS = 87, 5760 SEC_OID_X509_CERTIFICATE_POLICIES = 88, 5761 SEC_OID_X509_POLICY_MAPPINGS = 89, 5762 SEC_OID_X509_POLICY_CONSTRAINTS = 90, 5763 SEC_OID_X509_AUTH_KEY_ID = 91, 5764 SEC_OID_X509_EXT_KEY_USAGE = 92, 5765 SEC_OID_X509_AUTH_INFO_ACCESS = 93, 5766 SEC_OID_X509_CRL_NUMBER = 94, 5767 SEC_OID_X509_REASON_CODE = 95, 5768 SEC_OID_X509_INVALID_DATE = 96, 5769 SEC_OID_X500_RSA_ENCRYPTION = 97, 5770 SEC_OID_RFC1274_UID = 98, 5771 SEC_OID_RFC1274_MAIL = 99, 5772 SEC_OID_PKCS12 = 100, 5773 SEC_OID_PKCS12_MODE_IDS = 101, 5774 SEC_OID_PKCS12_ESPVK_IDS = 102, 5775 SEC_OID_PKCS12_BAG_IDS = 103, 5776 SEC_OID_PKCS12_CERT_BAG_IDS = 104, 5777 SEC_OID_PKCS12_OIDS = 105, 5778 SEC_OID_PKCS12_PBE_IDS = 106, 5779 SEC_OID_PKCS12_SIGNATURE_IDS = 107, 5780 SEC_OID_PKCS12_ENVELOPING_IDS = 108, 5781 SEC_OID_PKCS12_PKCS8_KEY_SHROUDING = 109, 5782 SEC_OID_PKCS12_KEY_BAG_ID = 110, 5783 SEC_OID_PKCS12_CERT_AND_CRL_BAG_ID = 111, 5784 SEC_OID_PKCS12_SECRET_BAG_ID = 112, 5785 SEC_OID_PKCS12_X509_CERT_CRL_BAG = 113, 5786 SEC_OID_PKCS12_SDSI_CERT_BAG = 114, 5787 SEC_OID_PKCS12_PBE_WITH_SHA1_AND_128_BIT_RC4 = 115, 5788 SEC_OID_PKCS12_PBE_WITH_SHA1_AND_40_BIT_RC4 = 116, 5789 SEC_OID_PKCS12_PBE_WITH_SHA1_AND_TRIPLE_DES_CBC = 117, 5790 SEC_OID_PKCS12_PBE_WITH_SHA1_AND_128_BIT_RC2_CBC = 118, 5791 SEC_OID_PKCS12_PBE_WITH_SHA1_AND_40_BIT_RC2_CBC = 119, 5792 SEC_OID_PKCS12_RSA_ENCRYPTION_WITH_128_BIT_RC4 = 120, 5793 SEC_OID_PKCS12_RSA_ENCRYPTION_WITH_40_BIT_RC4 = 121, 5794 SEC_OID_PKCS12_RSA_ENCRYPTION_WITH_TRIPLE_DES = 122, 5795 SEC_OID_PKCS12_RSA_SIGNATURE_WITH_SHA1_DIGEST = 123, 5796 SEC_OID_ANSIX9_DSA_SIGNATURE = 124, 5797 SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST = 125, 5798 SEC_OID_BOGUS_DSA_SIGNATURE_WITH_SHA1_DIGEST = 126, 5799 SEC_OID_VERISIGN_USER_NOTICES = 127, 5800 SEC_OID_PKIX_CPS_POINTER_QUALIFIER = 128, 5801 SEC_OID_PKIX_USER_NOTICE_QUALIFIER = 129, 5802 SEC_OID_PKIX_OCSP = 130, 5803 SEC_OID_PKIX_OCSP_BASIC_RESPONSE = 131, 5804 SEC_OID_PKIX_OCSP_NONCE = 132, 5805 SEC_OID_PKIX_OCSP_CRL = 133, 5806 SEC_OID_PKIX_OCSP_RESPONSE = 134, 5807 SEC_OID_PKIX_OCSP_NO_CHECK = 135, 5808 SEC_OID_PKIX_OCSP_ARCHIVE_CUTOFF = 136, 5809 SEC_OID_PKIX_OCSP_SERVICE_LOCATOR = 137, 5810 SEC_OID_PKIX_REGCTRL_REGTOKEN = 138, 5811 SEC_OID_PKIX_REGCTRL_AUTHENTICATOR = 139, 5812 SEC_OID_PKIX_REGCTRL_PKIPUBINFO = 140, 5813 SEC_OID_PKIX_REGCTRL_PKI_ARCH_OPTIONS = 141, 5814 SEC_OID_PKIX_REGCTRL_OLD_CERT_ID = 142, 5815 SEC_OID_PKIX_REGCTRL_PROTOCOL_ENC_KEY = 143, 5816 SEC_OID_PKIX_REGINFO_UTF8_PAIRS = 144, 5817 SEC_OID_PKIX_REGINFO_CERT_REQUEST = 145, 5818 SEC_OID_EXT_KEY_USAGE_SERVER_AUTH = 146, 5819 SEC_OID_EXT_KEY_USAGE_CLIENT_AUTH = 147, 5820 SEC_OID_EXT_KEY_USAGE_CODE_SIGN = 148, 5821 SEC_OID_EXT_KEY_USAGE_EMAIL_PROTECT = 149, 5822 SEC_OID_EXT_KEY_USAGE_TIME_STAMP = 150, 5823 SEC_OID_OCSP_RESPONDER = 151, 5824 SEC_OID_NETSCAPE_SMIME_KEA = 152, 5825 SEC_OID_FORTEZZA_SKIPJACK = 153, 5826 SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC4 = 154, 5827 SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC4 = 155, 5828 SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_3KEY_TRIPLE_DES_CBC = 156, 5829 SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_2KEY_TRIPLE_DES_CBC = 157, 5830 SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC2_CBC = 158, 5831 SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC2_CBC = 159, 5832 SEC_OID_PKCS12_SAFE_CONTENTS_ID = 160, 5833 SEC_OID_PKCS12_PKCS8_SHROUDED_KEY_BAG_ID = 161, 5834 SEC_OID_PKCS12_V1_KEY_BAG_ID = 162, 5835 SEC_OID_PKCS12_V1_PKCS8_SHROUDED_KEY_BAG_ID = 163, 5836 SEC_OID_PKCS12_V1_CERT_BAG_ID = 164, 5837 SEC_OID_PKCS12_V1_CRL_BAG_ID = 165, 5838 SEC_OID_PKCS12_V1_SECRET_BAG_ID = 166, 5839 SEC_OID_PKCS12_V1_SAFE_CONTENTS_BAG_ID = 167, 5840 SEC_OID_PKCS9_X509_CERT = 168, 5841 SEC_OID_PKCS9_SDSI_CERT = 169, 5842 SEC_OID_PKCS9_X509_CRL = 170, 5843 SEC_OID_PKCS9_FRIENDLY_NAME = 171, 5844 SEC_OID_PKCS9_LOCAL_KEY_ID = 172, 5845 SEC_OID_BOGUS_KEY_USAGE = 173, 5846 SEC_OID_X942_DIFFIE_HELMAN_KEY = 174, 5847 SEC_OID_NETSCAPE_NICKNAME = 175, 5848 SEC_OID_NETSCAPE_RECOVERY_REQUEST = 176, 5849 SEC_OID_CERT_RENEWAL_LOCATOR = 177, 5850 SEC_OID_NS_CERT_EXT_SCOPE_OF_USE = 178, 5851 SEC_OID_CMS_EPHEMERAL_STATIC_DIFFIE_HELLMAN = 179, 5852 SEC_OID_CMS_3DES_KEY_WRAP = 180, 5853 SEC_OID_CMS_RC2_KEY_WRAP = 181, 5854 SEC_OID_SMIME_ENCRYPTION_KEY_PREFERENCE = 182, 5855 SEC_OID_AES_128_ECB = 183, 5856 SEC_OID_AES_128_CBC = 184, 5857 SEC_OID_AES_192_ECB = 185, 5858 SEC_OID_AES_192_CBC = 186, 5859 SEC_OID_AES_256_ECB = 187, 5860 SEC_OID_AES_256_CBC = 188, 5861 SEC_OID_SDN702_DSA_SIGNATURE = 189, 5862 SEC_OID_MS_SMIME_ENCRYPTION_KEY_PREFERENCE = 190, 5863 SEC_OID_SHA256 = 191, 5864 SEC_OID_SHA384 = 192, 5865 SEC_OID_SHA512 = 193, 5866 SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION = 194, 5867 SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION = 195, 5868 SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION = 196, 5869 SEC_OID_AES_128_KEY_WRAP = 197, 5870 SEC_OID_AES_192_KEY_WRAP = 198, 5871 SEC_OID_AES_256_KEY_WRAP = 199, 5872 SEC_OID_ANSIX962_EC_PUBLIC_KEY = 200, 5873 SEC_OID_ANSIX962_ECDSA_SHA1_SIGNATURE = 201, 5874 SEC_OID_ANSIX962_EC_PRIME192V1 = 202, 5875 SEC_OID_ANSIX962_EC_PRIME192V2 = 203, 5876 SEC_OID_ANSIX962_EC_PRIME192V3 = 204, 5877 SEC_OID_ANSIX962_EC_PRIME239V1 = 205, 5878 SEC_OID_ANSIX962_EC_PRIME239V2 = 206, 5879 SEC_OID_ANSIX962_EC_PRIME239V3 = 207, 5880 SEC_OID_ANSIX962_EC_PRIME256V1 = 208, 5881 SEC_OID_SECG_EC_SECP112R1 = 209, 5882 SEC_OID_SECG_EC_SECP112R2 = 210, 5883 SEC_OID_SECG_EC_SECP128R1 = 211, 5884 SEC_OID_SECG_EC_SECP128R2 = 212, 5885 SEC_OID_SECG_EC_SECP160K1 = 213, 5886 SEC_OID_SECG_EC_SECP160R1 = 214, 5887 SEC_OID_SECG_EC_SECP160R2 = 215, 5888 SEC_OID_SECG_EC_SECP192K1 = 216, 5889 SEC_OID_SECG_EC_SECP224K1 = 217, 5890 SEC_OID_SECG_EC_SECP224R1 = 218, 5891 SEC_OID_SECG_EC_SECP256K1 = 219, 5892 SEC_OID_SECG_EC_SECP384R1 = 220, 5893 SEC_OID_SECG_EC_SECP521R1 = 221, 5894 SEC_OID_ANSIX962_EC_C2PNB163V1 = 222, 5895 SEC_OID_ANSIX962_EC_C2PNB163V2 = 223, 5896 SEC_OID_ANSIX962_EC_C2PNB163V3 = 224, 5897 SEC_OID_ANSIX962_EC_C2PNB176V1 = 225, 5898 SEC_OID_ANSIX962_EC_C2TNB191V1 = 226, 5899 SEC_OID_ANSIX962_EC_C2TNB191V2 = 227, 5900 SEC_OID_ANSIX962_EC_C2TNB191V3 = 228, 5901 SEC_OID_ANSIX962_EC_C2ONB191V4 = 229, 5902 SEC_OID_ANSIX962_EC_C2ONB191V5 = 230, 5903 SEC_OID_ANSIX962_EC_C2PNB208W1 = 231, 5904 SEC_OID_ANSIX962_EC_C2TNB239V1 = 232, 5905 SEC_OID_ANSIX962_EC_C2TNB239V2 = 233, 5906 SEC_OID_ANSIX962_EC_C2TNB239V3 = 234, 5907 SEC_OID_ANSIX962_EC_C2ONB239V4 = 235, 5908 SEC_OID_ANSIX962_EC_C2ONB239V5 = 236, 5909 SEC_OID_ANSIX962_EC_C2PNB272W1 = 237, 5910 SEC_OID_ANSIX962_EC_C2PNB304W1 = 238, 5911 SEC_OID_ANSIX962_EC_C2TNB359V1 = 239, 5912 SEC_OID_ANSIX962_EC_C2PNB368W1 = 240, 5913 SEC_OID_ANSIX962_EC_C2TNB431R1 = 241, 5914 SEC_OID_SECG_EC_SECT113R1 = 242, 5915 SEC_OID_SECG_EC_SECT113R2 = 243, 5916 SEC_OID_SECG_EC_SECT131R1 = 244, 5917 SEC_OID_SECG_EC_SECT131R2 = 245, 5918 SEC_OID_SECG_EC_SECT163K1 = 246, 5919 SEC_OID_SECG_EC_SECT163R1 = 247, 5920 SEC_OID_SECG_EC_SECT163R2 = 248, 5921 SEC_OID_SECG_EC_SECT193R1 = 249, 5922 SEC_OID_SECG_EC_SECT193R2 = 250, 5923 SEC_OID_SECG_EC_SECT233K1 = 251, 5924 SEC_OID_SECG_EC_SECT233R1 = 252, 5925 SEC_OID_SECG_EC_SECT239K1 = 253, 5926 SEC_OID_SECG_EC_SECT283K1 = 254, 5927 SEC_OID_SECG_EC_SECT283R1 = 255, 5928 SEC_OID_SECG_EC_SECT409K1 = 256, 5929 SEC_OID_SECG_EC_SECT409R1 = 257, 5930 SEC_OID_SECG_EC_SECT571K1 = 258, 5931 SEC_OID_SECG_EC_SECT571R1 = 259, 5932 SEC_OID_NETSCAPE_AOLSCREENNAME = 260, 5933 SEC_OID_AVA_SURNAME = 261, 5934 SEC_OID_AVA_SERIAL_NUMBER = 262, 5935 SEC_OID_AVA_STREET_ADDRESS = 263, 5936 SEC_OID_AVA_TITLE = 264, 5937 SEC_OID_AVA_POSTAL_ADDRESS = 265, 5938 SEC_OID_AVA_POSTAL_CODE = 266, 5939 SEC_OID_AVA_POST_OFFICE_BOX = 267, 5940 SEC_OID_AVA_GIVEN_NAME = 268, 5941 SEC_OID_AVA_INITIALS = 269, 5942 SEC_OID_AVA_GENERATION_QUALIFIER = 270, 5943 SEC_OID_AVA_HOUSE_IDENTIFIER = 271, 5944 SEC_OID_AVA_PSEUDONYM = 272, 5945 SEC_OID_PKIX_CA_ISSUERS = 273, 5946 SEC_OID_PKCS9_EXTENSION_REQUEST = 274, 5947 SEC_OID_ANSIX962_ECDSA_SIGNATURE_RECOMMENDED_DIGEST = 275, 5948 SEC_OID_ANSIX962_ECDSA_SIGNATURE_SPECIFIED_DIGEST = 276, 5949 SEC_OID_ANSIX962_ECDSA_SHA224_SIGNATURE = 277, 5950 SEC_OID_ANSIX962_ECDSA_SHA256_SIGNATURE = 278, 5951 SEC_OID_ANSIX962_ECDSA_SHA384_SIGNATURE = 279, 5952 SEC_OID_ANSIX962_ECDSA_SHA512_SIGNATURE = 280, 5953 SEC_OID_X509_HOLD_INSTRUCTION_CODE = 281, 5954 SEC_OID_X509_DELTA_CRL_INDICATOR = 282, 5955 SEC_OID_X509_ISSUING_DISTRIBUTION_POINT = 283, 5956 SEC_OID_X509_CERT_ISSUER = 284, 5957 SEC_OID_X509_FRESHEST_CRL = 285, 5958 SEC_OID_X509_INHIBIT_ANY_POLICY = 286, 5959 SEC_OID_X509_SUBJECT_INFO_ACCESS = 287, 5960 SEC_OID_CAMELLIA_128_CBC = 288, 5961 SEC_OID_CAMELLIA_192_CBC = 289, 5962 SEC_OID_CAMELLIA_256_CBC = 290, 5963 SEC_OID_PKCS5_PBKDF2 = 291, 5964 SEC_OID_PKCS5_PBES2 = 292, 5965 SEC_OID_PKCS5_PBMAC1 = 293, 5966 SEC_OID_HMAC_SHA1 = 294, 5967 SEC_OID_HMAC_SHA224 = 295, 5968 SEC_OID_HMAC_SHA256 = 296, 5969 SEC_OID_HMAC_SHA384 = 297, 5970 SEC_OID_HMAC_SHA512 = 298, 5971 SEC_OID_PKIX_TIMESTAMPING = 299, 5972 SEC_OID_PKIX_CA_REPOSITORY = 300, 5973 SEC_OID_ISO_SHA1_WITH_RSA_SIGNATURE = 301, 5974 SEC_OID_TOTAL = 302 5975 } SECOidTag; 5976 typedef enum { 5977 INVALID_CERT_EXTENSION, 5978 UNSUPPORTED_CERT_EXTENSION = 1, 5979 SUPPORTED_CERT_EXTENSION = 2 5980 } SECSupportExtenTag; 5981 __________________________________________________________ 5982 5983 7.4.26. nss3/secpkcs5.h 5984 5985 #define _SECPKCS5_H_ 5986 5987 typedef enum { 5988 pbeBitGenIDNull, 5989 pbeBitGenCipherKey = 1, 5990 pbeBitGenCipherIV = 2, 5991 pbeBitGenIntegrityKey = 3 5992 } PBEBitGenID; 5993 typedef struct PBEBitGenContextStr PBEBitGenContext; 5994 __________________________________________________________ 5995 5996 7.4.27. nss3/secport.h 5997 5998 #define _SECPORT_H_ 5999 6000 typedef PRBool(*PORTCharConversionWSwapFunc) (PRBool, unsigned char *, 6001 unsigned int, 6002 unsigned char *, 6003 unsigned int, unsigned int *, 6004 PRBool); 6005 typedef PRBool(*PORTCharConversionFunc) (PRBool, unsigned char *, 6006 unsigned int, unsigned char *, 6007 unsigned int, unsigned int *); 6008 __________________________________________________________ 6009 6010 7.5. Interfaces for libssl3 6011 6012 Table 7-5 defines the library name and shared object name for 6013 the libssl3 library 6014 6015 Table 7-5. libssl3 Definition 6016 Library: libssl3 6017 SONAME: libssl3.so 6018 6019 The behavior of the interfaces in this library is specified by 6020 the following specifications: 6021 6022 [NSS SSL] Mozilla's NSS SSL Reference 6023 __________________________________________________________ 6024 6025 7.5.1. NSS SSL 6026 __________________________________________________________ 6027 6028 7.5.1.1. Interfaces for NSS SSL 6029 6030 An LSB conforming implementation shall provide the generic 6031 functions for NSS SSL specified in Table 7-6, with the full 6032 mandatory functionality as described in the referenced 6033 underlying specification. 6034 6035 Table 7-6. libssl3 - NSS SSL Function Interfaces 6036 NSS_CmpCertChainWCANames(NSS_3.2) [NSS SSL] 6037 NSS_FindCertKEAType(NSS_3.2) [NSS SSL] 6038 NSS_GetClientAuthData(NSS_3.2) [NSS SSL] 6039 SSL_AuthCertificate(NSS_3.2) [NSS SSL] 6040 SSL_AuthCertificateHook(NSS_3.2) [NSS SSL] 6041 SSL_BadCertHook(NSS_3.2) [NSS SSL] 6042 SSL_CipherPolicyGet(NSS_3.2) [NSS SSL] 6043 SSL_CipherPolicySet(NSS_3.2) [NSS SSL] 6044 SSL_CipherPrefGet(NSS_3.2) [NSS SSL] 6045 SSL_CipherPrefGetDefault(NSS_3.2) [NSS SSL] 6046 SSL_CipherPrefSet(NSS_3.2) [NSS SSL] 6047 SSL_CipherPrefSetDefault(NSS_3.2) [NSS SSL] 6048 SSL_ClearSessionCache(NSS_3.2) [NSS SSL] 6049 SSL_ConfigMPServerSIDCache(NSS_3.2) [NSS SSL] 6050 SSL_ConfigSecureServer(NSS_3.2) [NSS SSL] 6051 SSL_ConfigServerSessionIDCache(NSS_3.2) [NSS SSL] 6052 SSL_DataPending(NSS_3.2) [NSS SSL] SSL_ForceHandshake(NSS_3.2) 6053 [NSS SSL] 6054 SSL_GetClientAuthDataHook(NSS_3.2) [NSS SSL] 6055 SSL_GetSessionID(NSS_3.2) [NSS SSL] 6056 SSL_HandshakeCallback(NSS_3.2) [NSS SSL] 6057 SSL_ImportFD(NSS_3.2) [NSS SSL] 6058 SSL_InheritMPServerSIDCache(NSS_3.2) [NSS SSL] 6059 SSL_InvalidateSession(NSS_3.2) [NSS SSL] 6060 SSL_OptionGet(NSS_3.2) [NSS SSL] SSL_OptionGetDefault(NSS_3.2) 6061 [NSS SSL] SSL_OptionSet(NSS_3.2) [NSS SSL] 6062 SSL_OptionSetDefault(NSS_3.2) [NSS SSL] 6063 SSL_PeerCertificate(NSS_3.2) [NSS SSL] SSL_ReHandshake(NSS_3.2) 6064 [NSS SSL] 6065 SSL_ResetHandshake(NSS_3.2) [NSS SSL] SSL_RevealPinArg(NSS_3.2) 6066 [NSS SSL] SSL_RevealURL(NSS_3.2) [NSS SSL] 6067 SSL_SecurityStatus(NSS_3.2) [NSS SSL] 6068 SSL_SetPKCS11PinArg(NSS_3.2) [NSS SSL] 6069 SSL_SetSockPeerID(NSS_3.2) [NSS SSL] 6070 SSL_SetURL(NSS_3.2) [NSS SSL] 6071 __________________________________________________________ 6072 6073 7.6. Data Definitions for libssl3 6074 6075 This section defines global identifiers and their values that 6076 are associated with interfaces contained in libssl3. These 6077 definitions are organized into groups that correspond to system 6078 headers. This convention is used as a convenience for the 6079 reader, and does not imply the existence of these headers, or 6080 their content. Where an interface is defined as requiring a 6081 particular system header file all of the data definitions for 6082 that system header file presented here shall be in effect. 6083 6084 This section gives data definitions to promote binary 6085 application portability, not to repeat source interface 6086 definitions available elsewhere. System providers and 6087 application developers should use this ABI to supplement - not 6088 to replace - source interface definition specifications. 6089 6090 This specification uses the ISO C (1999) C Language as the 6091 reference programming language, and data definitions are 6092 specified in ISO C format. The C language is used here as a 6093 convenient notation. Using a C language description of these 6094 data objects does not preclude their use by other programming 6095 languages. 6096 __________________________________________________________ 6097 6098 7.6.1. nss3/ecl-exp.h 6099 6100 #define __ecl_exp_h_ 6101 #define ECCurve_SECG_CHAR2_163R2 ECCurve_NIST_B163 6102 #define ECCurve_SECG_CHAR2_233R1 ECCurve_NIST_B233 6103 #define ECCurve_WTLS_11 ECCurve_NIST_B233 6104 #define ECCurve_SECG_CHAR2_283R1 ECCurve_NIST_B283 6105 #define ECCurve_SECG_CHAR2_409R1 ECCurve_NIST_B409 6106 #define ECCurve_SECG_CHAR2_571R1 ECCurve_NIST_B571 6107 #define ECCurve_SECG_CHAR2_163K1 ECCurve_NIST_K163 6108 #define ECCurve_WTLS_3 ECCurve_NIST_K163 6109 #define ECCurve_SECG_CHAR2_233K1 ECCurve_NIST_K233 6110 #define ECCurve_WTLS_10 ECCurve_NIST_K233 6111 #define ECCurve_SECG_CHAR2_283K1 ECCurve_NIST_K283 6112 #define ECCurve_SECG_CHAR2_409K1 ECCurve_NIST_K409 6113 #define ECCurve_SECG_CHAR2_571K1 ECCurve_NIST_K571 6114 #define ECCurve_SECG_PRIME_192R1 ECCurve_NIST_P192 6115 #define ECCurve_X9_62_PRIME_192V1 ECCurve_NIST_P192 6116 #define ECCurve_SECG_PRIME_224R1 ECCurve_NIST_P224 6117 #define ECCurve_WTLS_12 ECCurve_NIST_P224 6118 #define ECCurve_SECG_PRIME_256R1 ECCurve_NIST_P256 6119 #define ECCurve_X9_62_PRIME_256V1 ECCurve_NIST_P256 6120 #define ECCurve_SECG_PRIME_384R1 ECCurve_NIST_P384 6121 #define ECCurve_SECG_PRIME_521R1 ECCurve_NIST_P521 6122 #define ECCurve_WTLS_4 ECCurve_SECG_CHAR2_113R1 6123 #define ECCurve_WTLS_6 ECCurve_SECG_PRIME_112R1 6124 #define ECCurve_WTLS_7 ECCurve_SECG_PRIME_160R1 6125 #define ECCurve_WTLS_5 ECCurve_X9_62_CHAR2_PNB163V1 6126 6127 enum ECField { 6128 ECField_GFp = 0, 6129 ECField_GF2m = 1 6130 }; 6131 typedef struct ECCurveParamsStr { 6132 char *text; 6133 enum ECField field; 6134 unsigned int size; 6135 char *irr; 6136 char *curvea; 6137 char *curveb; 6138 char *genx; 6139 char *geny; 6140 char *order; 6141 int cofactor; 6142 } ECCurveParams; 6143 enum ECCurveName { 6144 ECCurve_noName = 0, 6145 ECCurve_NIST_P192 = 1, 6146 ECCurve_NIST_P224 = 2, 6147 ECCurve_NIST_P256 = 3, 6148 ECCurve_NIST_P384 = 4, 6149 ECCurve_NIST_P521 = 5, 6150 ECCurve_NIST_K163 = 6, 6151 ECCurve_NIST_B163 = 7, 6152 ECCurve_NIST_K233 = 8, 6153 ECCurve_NIST_B233 = 9, 6154 ECCurve_NIST_K283 = 10, 6155 ECCurve_NIST_B283 = 11, 6156 ECCurve_NIST_K409 = 12, 6157 ECCurve_NIST_B409 = 13, 6158 ECCurve_NIST_K571 = 14, 6159 ECCurve_NIST_B571 = 15, 6160 ECCurve_X9_62_PRIME_192V2 = 16, 6161 ECCurve_X9_62_PRIME_192V3 = 17, 6162 ECCurve_X9_62_PRIME_239V1 = 18, 6163 ECCurve_X9_62_PRIME_239V2 = 19, 6164 ECCurve_X9_62_PRIME_239V3 = 20, 6165 ECCurve_X9_62_CHAR2_PNB163V1 = 21, 6166 ECCurve_X9_62_CHAR2_PNB163V2 = 22, 6167 ECCurve_X9_62_CHAR2_PNB163V3 = 23, 6168 ECCurve_X9_62_CHAR2_PNB176V1 = 24, 6169 ECCurve_X9_62_CHAR2_TNB191V1 = 25, 6170 ECCurve_X9_62_CHAR2_TNB191V2 = 26, 6171 ECCurve_X9_62_CHAR2_TNB191V3 = 27, 6172 ECCurve_X9_62_CHAR2_PNB208W1 = 28, 6173 ECCurve_X9_62_CHAR2_TNB239V1 = 29, 6174 ECCurve_X9_62_CHAR2_TNB239V2 = 30, 6175 ECCurve_X9_62_CHAR2_TNB239V3 = 31, 6176 ECCurve_X9_62_CHAR2_PNB272W1 = 32, 6177 ECCurve_X9_62_CHAR2_PNB304W1 = 33, 6178 ECCurve_X9_62_CHAR2_TNB359V1 = 34, 6179 ECCurve_X9_62_CHAR2_PNB368W1 = 35, 6180 ECCurve_X9_62_CHAR2_TNB431R1 = 36, 6181 ECCurve_SECG_PRIME_112R1 = 37, 6182 ECCurve_SECG_PRIME_112R2 = 38, 6183 ECCurve_SECG_PRIME_128R1 = 39, 6184 ECCurve_SECG_PRIME_128R2 = 40, 6185 ECCurve_SECG_PRIME_160K1 = 41, 6186 ECCurve_SECG_PRIME_160R1 = 42, 6187 ECCurve_SECG_PRIME_160R2 = 43, 6188 ECCurve_SECG_PRIME_192K1 = 44, 6189 ECCurve_SECG_PRIME_224K1 = 45, 6190 ECCurve_SECG_PRIME_256K1 = 46, 6191 ECCurve_SECG_CHAR2_113R1 = 47, 6192 ECCurve_SECG_CHAR2_113R2 = 48, 6193 ECCurve_SECG_CHAR2_131R1 = 49, 6194 ECCurve_SECG_CHAR2_131R2 = 50, 6195 ECCurve_SECG_CHAR2_163R1 = 51, 6196 ECCurve_SECG_CHAR2_193R1 = 52, 6197 ECCurve_SECG_CHAR2_193R2 = 53, 6198 ECCurve_SECG_CHAR2_239K1 = 54, 6199 ECCurve_WTLS_1 = 55, 6200 ECCurve_WTLS_8 = 56, 6201 ECCurve_WTLS_9 = 57, 6202 ECCurve_pastLastCurve = 58 6203 }; 6204 __________________________________________________________ 6205 6206 7.6.2. nss3/ssl.h 6207 6208 #define __ssl_h_ 6209 #define SSL_IS_SSL2_CIPHER(which) (((which) & 0xfff0) == 0xff00) 6210 #define SSL_REQUIRE_NEVER ((PRBool)0) 6211 #define SSL_REQUIRE_ALWAYS ((PRBool)1) 6212 #define SSL_REQUIRE_FIRST_HANDSHAKE ((PRBool)2) 6213 #define SSL_REQUIRE_NO_ERROR ((PRBool)3) 6214 #define SSL_SECURITY_STATUS_NOOPT -1 6215 #define SSL_NOT_ALLOWED 0 6216 #define SSL_SECURITY_STATUS_OFF 0 6217 #define SSL_ALLOWED 1 6218 #define SSL_SECURITY 1 6219 #define SSL_SECURITY_STATUS_ON_HIGH 1 6220 #define SSL_REQUIRE_CERTIFICATE 10 6221 #define SSL_ENABLE_FDX 11 6222 #define SSL_V2_COMPATIBLE_HELLO 12 6223 #define SSL_ENABLE_TLS 13 6224 #define SSL_ROLLBACK_DETECTION 14 6225 #define SSL_NO_STEP_DOWN 15 6226 #define SSL_BYPASS_PKCS11 16 6227 #define SSL_NO_LOCKS 17 6228 #define SSL_RESTRICTED 2 6229 #define SSL_SECURITY_STATUS_ON_LOW 2 6230 #define SSL_SOCKS 2 6231 #define SSL_REQUEST_CERTIFICATE 3 6232 #define SSL_HANDSHAKE_AS_CLIENT 5 6233 #define SSL_HANDSHAKE_AS_SERVER 6 6234 #define SSL_ENABLE_SSL2 7 6235 #define SSL_ENABLE_SSL3 8 6236 #define SSL_NO_CACHE 9 6237 #define SSL_ENV_VAR_NAME "SSL_INHERITANCE" 6238 6239 typedef SECStatus(*SSLAuthCertificate) (void *, PRFileDesc *, PRBool, 6240 PRBool); 6241 typedef SECStatus(*SSLGetClientAuthData) (void *, PRFileDesc *, 6242 CERTDistNames *, 6243 CERTCertificate * *, 6244 SECKEYPrivateKey * *); 6245 typedef SECStatus(*SSLBadCertHandler) (void *, PRFileDesc *); 6246 typedef void (*SSLHandshakeCallback) (PRFileDesc *, void *); 6247 extern SECStatus NSS_CmpCertChainWCANames(CERTCertificate * cert, 6248 CERTDistNames * caNames); 6249 extern SSLKEAType NSS_FindCertKEAType(CERTCertificate * cert); 6250 extern SECStatus NSS_GetClientAuthData(void *arg, PRFileDesc * socket, 6251 struct CERTDistNamesStr *caNames, 6252 struct CERTCertificateStr 6253 **pRetCert, 6254 struct SECKEYPrivateKeyStr 6255 **pRetKey); 6256 extern SECStatus SSL_AuthCertificate(void *arg, PRFileDesc * fd, 6257 PRBool checkSig, PRBool isServer); 6258 extern SECStatus SSL_AuthCertificateHook(PRFileDesc * fd, 6259 SSLAuthCertificate f, void *arg); 6260 extern SECStatus SSL_BadCertHook(PRFileDesc * fd, SSLBadCertHandler f, 6261 void *arg); 6262 extern SECStatus SSL_CipherPolicyGet(PRInt32 cipher, PRInt32 * policy); 6263 extern SECStatus SSL_CipherPolicySet(PRInt32 cipher, PRInt32 policy); 6264 extern SECStatus SSL_CipherPrefGet(PRFileDesc * fd, PRInt32 cipher, 6265 PRBool * enabled); 6266 extern SECStatus SSL_CipherPrefGetDefault(PRInt32 cipher, 6267 PRBool * enabled); 6268 extern SECStatus SSL_CipherPrefSet(PRFileDesc * fd, PRInt32 cipher, 6269 PRBool enabled); 6270 extern SECStatus SSL_CipherPrefSetDefault(PRInt32 cipher, PRBool enabled); 6271 extern void SSL_ClearSessionCache(void); 6272 extern SECStatus SSL_ConfigMPServerSIDCache(int maxCacheEntries, 6273 PRUint32 timeout, 6274 PRUint32 ssl3_timeout, 6275 const char *directory); 6276 extern SECStatus SSL_ConfigSecureServer(PRFileDesc * fd, 6277 CERTCertificate * cert, 6278 SECKEYPrivateKey * key, 6279 SSLKEAType kea); 6280 extern SECStatus SSL_ConfigServerSessionIDCache(int maxCacheEntries, 6281 PRUint32 timeout, 6282 PRUint32 ssl3_timeout, 6283 const char *directory); 6284 extern int SSL_DataPending(PRFileDesc * fd); 6285 extern SECStatus SSL_ForceHandshake(PRFileDesc * fd); 6286 extern SECStatus SSL_GetClientAuthDataHook(PRFileDesc * fd, 6287 SSLGetClientAuthData f, 6288 void *a); 6289 extern SECItem *SSL_GetSessionID(PRFileDesc * fd); 6290 extern SECStatus SSL_HandshakeCallback(PRFileDesc * fd, 6291 SSLHandshakeCallback cb, 6292 void *client_data); 6293 extern PRFileDesc *SSL_ImportFD(PRFileDesc * model, PRFileDesc * fd); 6294 extern SECStatus SSL_InheritMPServerSIDCache(const char *envString); 6295 extern SECStatus SSL_InvalidateSession(PRFileDesc * fd); 6296 extern SECStatus SSL_OptionGet(PRFileDesc * fd, PRInt32 option, 6297 PRBool * on); 6298 extern SECStatus SSL_OptionGetDefault(PRInt32 option, PRBool * on); 6299 extern SECStatus SSL_OptionSet(PRFileDesc * fd, PRInt32 option, PRBool on); 6300 extern SECStatus SSL_OptionSetDefault(PRInt32 option, PRBool on); 6301 extern CERTCertificate *SSL_PeerCertificate(PRFileDesc * fd); 6302 extern SECStatus SSL_ReHandshake(PRFileDesc * fd, PRBool flushCache); 6303 extern SECStatus SSL_ResetHandshake(PRFileDesc * fd, PRBool asServer); 6304 extern void *SSL_RevealPinArg(PRFileDesc * socket); 6305 extern char *SSL_RevealURL(PRFileDesc * socket); 6306 extern SECStatus SSL_SecurityStatus(PRFileDesc * fd, int *on, 6307 char **cipher, int *keySize, 6308 int *secretKeySize, char **issuer, 6309 char **subject); 6310 extern SECStatus SSL_SetPKCS11PinArg(PRFileDesc * fd, void *a); 6311 extern SECStatus SSL_SetSockPeerID(PRFileDesc * fd, char *peerID); 6312 extern SECStatus SSL_SetURL(PRFileDesc * fd, const char *url); 6313 __________________________________________________________ 6314 6315 7.6.3. nss3/sslerr.h 6316 6317 #define __SSL_ERR_H_ 6318 #define IS_SSL_ERROR(code) \ 6319 (((code) >= SSL_ERROR_BASE) && ((code) < SSL_ERROR_LIMIT)) 6320 #define SSL_ERROR_BASE (-0x3000) 6321 #define SSL_ERROR_LIMIT (SSL_ERROR_BASE + 1000) 6322 6323 typedef enum { 6324 SSL_ERROR_EXPORT_ONLY_SERVER = (SSL_ERROR_BASE + 0), 6325 SSL_ERROR_US_ONLY_SERVER = (SSL_ERROR_BASE + 1), 6326 SSL_ERROR_NO_CYPHER_OVERLAP = (SSL_ERROR_BASE + 2), 6327 SSL_ERROR_NO_CERTIFICATE = (SSL_ERROR_BASE + 3), 6328 SSL_ERROR_BAD_CERTIFICATE = (SSL_ERROR_BASE + 4), 6329 SSL_ERROR_BAD_CLIENT = (SSL_ERROR_BASE + 6), 6330 SSL_ERROR_BAD_SERVER = (SSL_ERROR_BASE + 7), 6331 SSL_ERROR_UNSUPPORTED_CERTIFICATE_TYPE = (SSL_ERROR_BASE + 8), 6332 SSL_ERROR_UNSUPPORTED_VERSION = (SSL_ERROR_BASE + 9), 6333 SSL_ERROR_WRONG_CERTIFICATE = (SSL_ERROR_BASE + 11), 6334 SSL_ERROR_BAD_CERT_DOMAIN = (SSL_ERROR_BASE + 12), 6335 SSL_ERROR_POST_WARNING = (SSL_ERROR_BASE + 13), 6336 SSL_ERROR_SSL2_DISABLED = (SSL_ERROR_BASE + 14), 6337 SSL_ERROR_BAD_MAC_READ = (SSL_ERROR_BASE + 15), 6338 SSL_ERROR_BAD_MAC_ALERT = (SSL_ERROR_BASE + 16), 6339 SSL_ERROR_BAD_CERT_ALERT = (SSL_ERROR_BASE + 17), 6340 SSL_ERROR_REVOKED_CERT_ALERT = (SSL_ERROR_BASE + 18), 6341 SSL_ERROR_EXPIRED_CERT_ALERT = (SSL_ERROR_BASE + 19), 6342 SSL_ERROR_SSL_DISABLED = (SSL_ERROR_BASE + 20), 6343 SSL_ERROR_FORTEZZA_PQG = (SSL_ERROR_BASE + 21), 6344 SSL_ERROR_UNKNOWN_CIPHER_SUITE = (SSL_ERROR_BASE + 22), 6345 SSL_ERROR_NO_CIPHERS_SUPPORTED = (SSL_ERROR_BASE + 23), 6346 SSL_ERROR_BAD_BLOCK_PADDING = (SSL_ERROR_BASE + 24), 6347 SSL_ERROR_RX_RECORD_TOO_LONG = (SSL_ERROR_BASE + 25), 6348 SSL_ERROR_TX_RECORD_TOO_LONG = (SSL_ERROR_BASE + 26), 6349 SSL_ERROR_RX_MALFORMED_HELLO_REQUEST = (SSL_ERROR_BASE + 27), 6350 SSL_ERROR_RX_MALFORMED_CLIENT_HELLO = (SSL_ERROR_BASE + 28), 6351 SSL_ERROR_RX_MALFORMED_SERVER_HELLO = (SSL_ERROR_BASE + 29), 6352 SSL_ERROR_RX_MALFORMED_CERTIFICATE = (SSL_ERROR_BASE + 30), 6353 SSL_ERROR_RX_MALFORMED_SERVER_KEY_EXCH = (SSL_ERROR_BASE + 31), 6354 SSL_ERROR_RX_MALFORMED_CERT_REQUEST = (SSL_ERROR_BASE + 32), 6355 SSL_ERROR_RX_MALFORMED_HELLO_DONE = (SSL_ERROR_BASE + 33), 6356 SSL_ERROR_RX_MALFORMED_CERT_VERIFY = (SSL_ERROR_BASE + 34), 6357 SSL_ERROR_RX_MALFORMED_CLIENT_KEY_EXCH = (SSL_ERROR_BASE + 35), 6358 SSL_ERROR_RX_MALFORMED_FINISHED = (SSL_ERROR_BASE + 36), 6359 SSL_ERROR_RX_MALFORMED_CHANGE_CIPHER = (SSL_ERROR_BASE + 37), 6360 SSL_ERROR_RX_MALFORMED_ALERT = (SSL_ERROR_BASE + 38), 6361 SSL_ERROR_RX_MALFORMED_HANDSHAKE = (SSL_ERROR_BASE + 39), 6362 SSL_ERROR_RX_MALFORMED_APPLICATION_DATA = (SSL_ERROR_BASE + 40), 6363 SSL_ERROR_RX_UNEXPECTED_HELLO_REQUEST = (SSL_ERROR_BASE + 41), 6364 SSL_ERROR_RX_UNEXPECTED_CLIENT_HELLO = (SSL_ERROR_BASE + 42), 6365 SSL_ERROR_RX_UNEXPECTED_SERVER_HELLO = (SSL_ERROR_BASE + 43), 6366 SSL_ERROR_RX_UNEXPECTED_CERTIFICATE = (SSL_ERROR_BASE + 44), 6367 SSL_ERROR_RX_UNEXPECTED_SERVER_KEY_EXCH = (SSL_ERROR_BASE + 45), 6368 SSL_ERROR_RX_UNEXPECTED_CERT_REQUEST = (SSL_ERROR_BASE + 46), 6369 SSL_ERROR_RX_UNEXPECTED_HELLO_DONE = (SSL_ERROR_BASE + 47), 6370 SSL_ERROR_RX_UNEXPECTED_CERT_VERIFY = (SSL_ERROR_BASE + 48), 6371 SSL_ERROR_RX_UNEXPECTED_CLIENT_KEY_EXCH = (SSL_ERROR_BASE + 49), 6372 SSL_ERROR_RX_UNEXPECTED_FINISHED = (SSL_ERROR_BASE + 50), 6373 SSL_ERROR_RX_UNEXPECTED_CHANGE_CIPHER = (SSL_ERROR_BASE + 51), 6374 SSL_ERROR_RX_UNEXPECTED_ALERT = (SSL_ERROR_BASE + 52), 6375 SSL_ERROR_RX_UNEXPECTED_HANDSHAKE = (SSL_ERROR_BASE + 53), 6376 SSL_ERROR_RX_UNEXPECTED_APPLICATION_DATA = (SSL_ERROR_BASE + 54), 6377 SSL_ERROR_RX_UNKNOWN_RECORD_TYPE = (SSL_ERROR_BASE + 55), 6378 SSL_ERROR_RX_UNKNOWN_HANDSHAKE = (SSL_ERROR_BASE + 56), 6379 SSL_ERROR_RX_UNKNOWN_ALERT = (SSL_ERROR_BASE + 57), 6380 SSL_ERROR_CLOSE_NOTIFY_ALERT = (SSL_ERROR_BASE + 58), 6381 SSL_ERROR_HANDSHAKE_UNEXPECTED_ALERT = (SSL_ERROR_BASE + 59), 6382 SSL_ERROR_DECOMPRESSION_FAILURE_ALERT = (SSL_ERROR_BASE + 60), 6383 SSL_ERROR_HANDSHAKE_FAILURE_ALERT = (SSL_ERROR_BASE + 61), 6384 SSL_ERROR_ILLEGAL_PARAMETER_ALERT = (SSL_ERROR_BASE + 62), 6385 SSL_ERROR_UNSUPPORTED_CERT_ALERT = (SSL_ERROR_BASE + 63), 6386 SSL_ERROR_CERTIFICATE_UNKNOWN_ALERT = (SSL_ERROR_BASE + 64), 6387 SSL_ERROR_GENERATE_RANDOM_FAILURE = (SSL_ERROR_BASE + 65), 6388 SSL_ERROR_SIGN_HASHES_FAILURE = (SSL_ERROR_BASE + 66), 6389 SSL_ERROR_EXTRACT_PUBLIC_KEY_FAILURE = (SSL_ERROR_BASE + 67), 6390 SSL_ERROR_SERVER_KEY_EXCHANGE_FAILURE = (SSL_ERROR_BASE + 68), 6391 SSL_ERROR_CLIENT_KEY_EXCHANGE_FAILURE = (SSL_ERROR_BASE + 69), 6392 SSL_ERROR_ENCRYPTION_FAILURE = (SSL_ERROR_BASE + 70), 6393 SSL_ERROR_DECRYPTION_FAILURE = (SSL_ERROR_BASE + 71), 6394 SSL_ERROR_SOCKET_WRITE_FAILURE = (SSL_ERROR_BASE + 72), 6395 SSL_ERROR_MD5_DIGEST_FAILURE = (SSL_ERROR_BASE + 73), 6396 SSL_ERROR_SHA_DIGEST_FAILURE = (SSL_ERROR_BASE + 74), 6397 SSL_ERROR_MAC_COMPUTATION_FAILURE = (SSL_ERROR_BASE + 75), 6398 SSL_ERROR_SYM_KEY_CONTEXT_FAILURE = (SSL_ERROR_BASE + 76), 6399 SSL_ERROR_SYM_KEY_UNWRAP_FAILURE = (SSL_ERROR_BASE + 77), 6400 SSL_ERROR_PUB_KEY_SIZE_LIMIT_EXCEEDED = (SSL_ERROR_BASE + 78), 6401 SSL_ERROR_IV_PARAM_FAILURE = (SSL_ERROR_BASE + 79), 6402 SSL_ERROR_INIT_CIPHER_SUITE_FAILURE = (SSL_ERROR_BASE + 80), 6403 SSL_ERROR_SESSION_KEY_GEN_FAILURE = (SSL_ERROR_BASE + 81), 6404 SSL_ERROR_NO_SERVER_KEY_FOR_ALG = (SSL_ERROR_BASE + 82), 6405 SSL_ERROR_TOKEN_INSERTION_REMOVAL = (SSL_ERROR_BASE + 83), 6406 SSL_ERROR_TOKEN_SLOT_NOT_FOUND = (SSL_ERROR_BASE + 84), 6407 SSL_ERROR_NO_COMPRESSION_OVERLAP = (SSL_ERROR_BASE + 85), 6408 SSL_ERROR_HANDSHAKE_NOT_COMPLETED = (SSL_ERROR_BASE + 86), 6409 SSL_ERROR_BAD_HANDSHAKE_HASH_VALUE = (SSL_ERROR_BASE + 87), 6410 SSL_ERROR_CERT_KEA_MISMATCH = (SSL_ERROR_BASE + 88), 6411 SSL_ERROR_NO_TRUSTED_SSL_CLIENT_CA = (SSL_ERROR_BASE + 89), 6412 SSL_ERROR_SESSION_NOT_FOUND = (SSL_ERROR_BASE + 90), 6413 SSL_ERROR_DECRYPTION_FAILED_ALERT = (SSL_ERROR_BASE + 91), 6414 SSL_ERROR_RECORD_OVERFLOW_ALERT = (SSL_ERROR_BASE + 92), 6415 SSL_ERROR_UNKNOWN_CA_ALERT = (SSL_ERROR_BASE + 93), 6416 SSL_ERROR_ACCESS_DENIED_ALERT = (SSL_ERROR_BASE + 94), 6417 SSL_ERROR_DECODE_ERROR_ALERT = (SSL_ERROR_BASE + 95), 6418 SSL_ERROR_DECRYPT_ERROR_ALERT = (SSL_ERROR_BASE + 96), 6419 SSL_ERROR_EXPORT_RESTRICTION_ALERT = (SSL_ERROR_BASE + 97), 6420 SSL_ERROR_PROTOCOL_VERSION_ALERT = (SSL_ERROR_BASE + 98), 6421 SSL_ERROR_INSUFFICIENT_SECURITY_ALERT = (SSL_ERROR_BASE + 99), 6422 SSL_ERROR_INTERNAL_ERROR_ALERT = (SSL_ERROR_BASE + 100), 6423 SSL_ERROR_USER_CANCELED_ALERT = (SSL_ERROR_BASE + 101), 6424 SSL_ERROR_NO_RENEGOTIATION_ALERT = (SSL_ERROR_BASE + 102), 6425 SSL_ERROR_SERVER_CACHE_NOT_CONFIGURED = (SSL_ERROR_BASE + 103), 6426 SSL_ERROR_UNSUPPORTED_EXTENSION_ALERT = (SSL_ERROR_BASE + 104), 6427 SSL_ERROR_CERTIFICATE_UNOBTAINABLE_ALERT = (SSL_ERROR_BASE + 105), 6428 SSL_ERROR_UNRECOGNIZED_NAME_ALERT = (SSL_ERROR_BASE + 106), 6429 SSL_ERROR_BAD_CERT_STATUS_RESPONSE_ALERT = (SSL_ERROR_BASE + 107), 6430 SSL_ERROR_BAD_CERT_HASH_VALUE_ALERT = (SSL_ERROR_BASE + 108) 6431 } SSLErrorCodes; 6432 __________________________________________________________ 6433 6434 7.6.4. nss3/sslproto.h 6435 6436 #define __sslproto_h_ 6437 #define SSL_MT_ERROR 0 6438 #define SSL_NULL_WITH_NULL_NULL 0x0000 6439 #define SSL_PE_NO_CYPHERS 0x0001 6440 #define SSL_RSA_WITH_NULL_MD5 0x0001 6441 #define SSL_LIBRARY_VERSION_2 0x0002 6442 #define SSL_PE_NO_CERTIFICATE 0x0002 6443 #define SSL_RSA_WITH_NULL_SHA 0x0002 6444 #define SSL_RSA_EXPORT_WITH_RC4_40_MD5 0x0003 6445 #define SSL_PE_BAD_CERTIFICATE 0x0004 6446 #define SSL_RSA_WITH_RC4_128_MD5 0x0004 6447 #define SSL_RSA_WITH_RC4_128_SHA 0x0005 6448 #define SSL_PE_UNSUPPORTED_CERTIFICATE_TYPE 0x0006 6449 #define SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 0x0006 6450 #define SSL_RSA_WITH_IDEA_CBC_SHA 0x0007 6451 #define SSL_RSA_EXPORT_WITH_DES40_CBC_SHA 0x0008 6452 #define SSL_RSA_WITH_DES_CBC_SHA 0x0009 6453 #define SSL_RSA_WITH_3DES_EDE_CBC_SHA 0x000a 6454 #define SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA 0x000b 6455 #define SSL_DH_DSS_WITH_DES_CBC_SHA 0x000c 6456 #define SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA 0x000d 6457 #define SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA 0x000e 6458 #define SSL_DH_RSA_WITH_DES_CBC_SHA 0x000f 6459 #define SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA 0x0010 6460 #define SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA 0x0011 6461 #define SSL_DHE_DSS_WITH_DES_CBC_SHA 0x0012 6462 #define SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA 0x0013 6463 #define SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA 0x0014 6464 #define SSL_DHE_RSA_WITH_DES_CBC_SHA 0x0015 6465 #define SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA 0x0016 6466 #define SSL_DH_ANON_EXPORT_WITH_RC4_40_MD5 0x0017 6467 #define SSL_DH_ANON_WITH_RC4_128_MD5 0x0018 6468 #define SSL_DH_ANON_EXPORT_WITH_DES40_CBC_SHA 0x0019 6469 #define SSL_DH_ANON_WITH_DES_CBC_SHA 0x001a 6470 #define SSL_DH_ANON_WITH_3DES_EDE_CBC_SHA 0x001b 6471 #define SSL_FORTEZZA_DMS_WITH_NULL_SHA 0x001c 6472 #define SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA 0x001d 6473 #define SSL_FORTEZZA_DMS_WITH_RC4_128_SHA 0x001e 6474 #define TLS_RSA_WITH_AES_128_CBC_SHA 0x002F 6475 #define TLS_DH_DSS_WITH_AES_128_CBC_SHA 0x0030 6476 #define TLS_DH_RSA_WITH_AES_128_CBC_SHA 0x0031 6477 #define TLS_DHE_DSS_WITH_AES_128_CBC_SHA 0x0032 6478 #define TLS_DHE_RSA_WITH_AES_128_CBC_SHA 0x0033 6479 #define TLS_DH_ANON_WITH_AES_128_CBC_SHA 0x0034 6480 #define TLS_RSA_WITH_AES_256_CBC_SHA 0x0035 6481 #define TLS_DH_DSS_WITH_AES_256_CBC_SHA 0x0036 6482 #define TLS_DH_RSA_WITH_AES_256_CBC_SHA 0x0037 6483 #define TLS_DHE_DSS_WITH_AES_256_CBC_SHA 0x0038 6484 #define TLS_DHE_RSA_WITH_AES_256_CBC_SHA 0x0039 6485 #define TLS_DH_ANON_WITH_AES_256_CBC_SHA 0x003A 6486 #define TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA 0x0062 6487 #define TLS_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA 0x0063 6488 #define TLS_RSA_EXPORT1024_WITH_RC4_56_SHA 0x0064 6489 #define TLS_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA 0x0065 6490 #define TLS_DHE_DSS_WITH_RC4_128_SHA 0x0066 6491 #define SSL_AT_MD5_WITH_RSA_ENCRYPTION 0x01 6492 #define SSL_CK_RC4_128_WITH_MD5 0x01 6493 #define SSL_CT_X509_CERTIFICATE 0x01 6494 #define SSL_CK_RC4_128_EXPORT40_WITH_MD5 0x02 6495 #define SSL_CK_RC2_128_CBC_WITH_MD5 0x03 6496 #define SSL_LIBRARY_VERSION_3_0 0x0300 6497 #define SSL_LIBRARY_VERSION_3_1_TLS 0x0301 6498 #define SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5 0x04 6499 #define SSL_CK_IDEA_128_CBC_WITH_MD5 0x05 6500 #define SSL_CK_DES_64_CBC_WITH_MD5 0x06 6501 #define SSL_CK_DES_192_EDE3_CBC_WITH_MD5 0x07 6502 #define TLS_ECDH_ECDSA_WITH_NULL_SHA 0xC001 6503 #define TLS_ECDH_ECDSA_WITH_RC4_128_SHA 0xC002 6504 #define TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 0xC003 6505 #define TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0xC004 6506 #define TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0xC005 6507 #define TLS_ECDHE_ECDSA_WITH_NULL_SHA 0xC006 6508 #define TLS_ECDHE_ECDSA_WITH_RC4_128_SHA 0xC007 6509 #define TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA 0xC008 6510 #define TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0xC009 6511 #define TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0xC00A 6512 #define TLS_ECDH_RSA_WITH_NULL_SHA 0xC00B 6513 #define TLS_ECDH_RSA_WITH_RC4_128_SHA 0xC00C 6514 #define TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 0xC00D 6515 #define TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 0xC00E 6516 #define TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 0xC00F 6517 #define TLS_ECDHE_RSA_WITH_NULL_SHA 0xC010 6518 #define TLS_ECDHE_RSA_WITH_RC4_128_SHA 0xC011 6519 #define TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 0xC012 6520 #define TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 0xC013 6521 #define TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 0xC014 6522 #define TLS_ECDH_anon_WITH_NULL_SHA 0xC015 6523 #define TLS_ECDH_anon_WITH_RC4_128_SHA 0xC016 6524 #define TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA 0xC017 6525 #define TLS_ECDH_anon_WITH_AES_128_CBC_SHA 0xC018 6526 #define TLS_ECDH_anon_WITH_AES_256_CBC_SHA 0xC019 6527 #define SSL_RSA_FIPS_WITH_DES_CBC_SHA 0xfefe 6528 #define SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA 0xfeff 6529 #define SSL_RSA_OLDFIPS_WITH_3DES_EDE_CBC_SHA 0xffe0 6530 #define SSL_RSA_OLDFIPS_WITH_DES_CBC_SHA 0xffe1 6531 #define SSL_HL_CLIENT_FINISHED_HBYTES 1 6532 #define SSL_HL_SERVER_FINISHED_HBYTES 1 6533 #define SSL_HL_SERVER_VERIFY_HBYTES 1 6534 #define SSL_MT_CLIENT_HELLO 1 6535 #define SSL_HL_CLIENT_MASTER_KEY_HBYTES 10 6536 #define SSL_HL_SERVER_HELLO_HBYTES 11 6537 #define SSL_HL_REQUEST_CERTIFICATE_HBYTES 2 6538 #define SSL_MT_CLIENT_MASTER_KEY 2 6539 #define SSL_HL_ERROR_HBYTES 3 6540 #define SSL_MT_CLIENT_FINISHED 3 6541 #define SSL_MT_SERVER_HELLO 4 6542 #define SSL_MT_SERVER_VERIFY 5 6543 #define SSL_HL_CLIENT_CERTIFICATE_HBYTES 6 6544 #define SSL_MT_SERVER_FINISHED 6 6545 #define SSL_MT_REQUEST_CERTIFICATE 7 6546 #define SSL_MT_CLIENT_CERTIFICATE 8 6547 #define SSL_HL_CLIENT_HELLO_HBYTES 9 6548 __________________________________________________________ 6549 6550 7.6.5. nss3/sslt.h 6551 6552 #define __sslt_h_ 6553 6554 typedef enum { 6555 ssl_kea_null, 6556 ssl_kea_rsa = 1, 6557 ssl_kea_dh = 2, 6558 ssl_kea_fortezza = 3, 6559 ssl_kea_ecdh = 4, 6560 ssl_kea_size = 5 6561 } SSLKEAType; 6562 typedef enum { 6563 ssl_sign_null, 6564 ssl_sign_rsa = 1, 6565 ssl_sign_dsa = 2, 6566 ssl_sign_ecdsa = 3 6567 } SSLSignType; 6568 typedef enum { 6569 ssl_auth_null, 6570 ssl_auth_rsa = 1, 6571 ssl_auth_dsa = 2, 6572 ssl_auth_kea = 3, 6573 ssl_auth_ecdsa = 4 6574 } SSLAuthType; 6575 typedef enum { 6576 ssl_calg_null, 6577 ssl_calg_rc4 = 1, 6578 ssl_calg_rc2 = 2, 6579 ssl_calg_des = 3, 6580 ssl_calg_3des = 4, 6581 ssl_calg_idea = 5, 6582 ssl_calg_fortezza = 6, 6583 ssl_calg_aes = 7, 6584 ssl_calg_camellia = 8 6585 } SSLCipherAlgorithm; 6586 typedef enum { 6587 ssl_mac_null, 6588 ssl_mac_md5 = 1, 6589 ssl_mac_sha = 2, 6590 ssl_hmac_md5 = 3, 6591 ssl_hmac_sha = 4 6592 } SSLMACAlgorithm; 6593 typedef struct SSLChannelInfoStr { 6594 PRUint32 length; 6595 PRUint16 protocolVersion; 6596 PRUint16 cipherSuite; 6597 PRUint32 authKeyBits; 6598 PRUint32 keaKeyBits; 6599 PRUint32 creationTime; 6600 PRUint32 lastAccessTime; 6601 PRUint32 expirationTime; 6602 PRUint32 sessionIDLength; 6603 PRUint8 sessionID[31]; 6604 } SSLChannelInfo; 6605 typedef struct SSLCipherSuiteInfoStr { 6606 PRUint16 length; 6607 PRUint16 cipherSuite; 6608 const char *cipherSuiteName; 6609 const char *authAlgorithmName; 6610 SSLAuthType authAlgorithm; 6611 const char *keaTypeName; 6612 SSLKEAType keaType; 6613 const char *symCipherName; 6614 SSLCipherAlgorithm symCipher; 6615 PRUint16 symKeyBits; 6616 PRUint16 symKeySpace; 6617 PRUint16 effectiveKeyBits; 6618 const char *macAlgorithmName; 6619 SSLMACAlgorithm macAlgorithm; 6620 PRUint16 macBits; 6621 PRUintn isFIPS:1; 6622 PRUintn isExportable:1; 6623 PRUintn nonStandard:1; 6624 PRUintn reservedBits:29; 6625 } SSLCipherSuiteInfo; 6626 6627 IV. Java Interpreter 6628 6629 Table of Contents 6630 8. Java Interpreter 6631 6632 8.1. Introduction 6633 8.2. Java Interpreter Location 6634 8.3. Java Interpreter Version 6635 8.4. Operators and Functions 6636 8.5. Java Interpreter Command 6637 6638 java -- launch a Java application 6639 __________________________________________________________ 6640 6641 Chapter 8. Java Interpreter 6642 6643 8.1. Introduction 6644 6645 The Java interpreter API is described in the Java Platform SE 6 6646 API, with the following requirements for an LSB conforming 6647 runtime. 6648 __________________________________________________________ 6649 6650 8.2. Java Interpreter Location 6651 6652 The Java interpreter binary, or a link to the binary, shall 6653 exist at /usr/bin/java. 6654 __________________________________________________________ 6655 6656 8.3. Java Interpreter Version 6657 6658 The default installed Java version shall be Java 6 Platform 6659 Standard Edition or greater. Applications can depend on the 6660 Java 6 Platform SE interfaces. 6661 __________________________________________________________ 6662 6663 8.4. Operators and Functions 6664 6665 Core Java operators, subroutines, and built-in functions shall 6666 be present and shall operate as defined in Java Platform SE 6 6667 API. 6668 __________________________________________________________ 6669 6670 8.5. Java Interpreter Command 6671 6672 Table of Contents 6673 java -- launch a Java application 6674 6675 This section contains a description of the java command. 6676 6677 java 6678 6679 Name 6680 6681 java -- launch a Java application 6682 6683 Synopsis 6684 6685 java [-?] [-Dproperty=value] [-classpath] [-cp] [-help] [-jar 6686 file.jar] [-version] [arguments...] 6687 6688 Description 6689 6690 The java command shall launch a Java application by 6691 initializing a Java runtime environment, loading the class 6692 specified on the command line, and calling the main method of 6693 that class. 6694 6695 The method's declaration must be as follows. 6696 6697 public static void main(String args[]) 6698 6699 By default, the first argument specified that is not an option 6700 shall be the fully-qualified name of the class to invoke. This 6701 behavior may be changed by the addition of the -jar option, in 6702 which case the first argument specified that is not an option 6703 shall be the name of a JAR file. Any arguments specified after 6704 the class name or JAR file name that are not command-line 6705 options are passed to the main function. 6706 6707 The Java runtime shall search for the classes used, including 6708 the startup class, in three locations: the bootstrap class 6709 path, the extensions that are currently installed, and the user 6710 class path. 6711 6712 Options 6713 6714 -? 6715 6716 This option is a synonym for -help. 6717 -classpath classpath 6718 6719 This option shall specify a list of locations to search for 6720 class files, including directories, JAR files, and ZIP files. 6721 Locations in the class path shall be delimited by colons (:). 6722 6723 The -classpath option shall override the CLASSPATH environment 6724 variable. If the -classpath option is not specified and 6725 CLASSPATH is not set, then the user class path shall simply 6726 consist of the current directory (.). 6727 6728 The class path element * shall specify all files in the current 6729 directory with the extension .jar. or .JAR. Example: if the 6730 only JAR files in the directory foo are bar.jar and bas.JAR, 6731 then the class path element foo/* shall be equivalent to 6732 bar.jar:bas.JAR. The order of JAR files in this case shall be 6733 unspecified. The CLASSPATH environment variable functions in 6734 the same way. 6735 6736 Wildcards in the class path shall be expanded before the 6737 initialization of the Java virtual machine. However, Java 6738 programs can examine unexpanded wildcards if they query the 6739 environment. Example: System.getenv("CLASSPATH"). 6740 -cp classpath 6741 6742 This option is a synonym for -classpath. 6743 -Dproperty=value 6744 6745 This option shall set the value of a system property. 6746 -help 6747 6748 This option shall display usage information for the command, 6749 then exit. 6750 -jar jarfile 6751 6752 This option shall specify a JAR file containing a program to 6753 execute. Its first argument must be the name of a JAR file with 6754 both class and resource files. The JAR file's manifest must 6755 contain a line of this form: Main-Class: classname. The class 6756 name classname must specify the class containing the main 6757 function for the application. 6758 6759 If this option is specified, all other user class path settings 6760 shall be ignored. 6761 6762 JAR files that can be specified with this option shall also be 6763 runnable without this option by setting their execute 6764 permissions. 6765 -version 6766 6767 This option shall display version information for the command, 6768 then exit. 6769 6770 V. Trial Use Module 6771 6772 Table of Contents 6773 9. Trial Use Module 6774 6775 9.1. Introduction 6776 9.2. Xdg-utils 6777 6778 9.2.1. Xdg-utils Commands 6779 __________________________________________________________ 6780 6781 Chapter 9. Trial Use Module 6782 6783 9.1. Introduction 6784 6785 The Trial Use Module decribes components in Trial Use status. 6786 Trial Use Specifications are non-mandatory components of the 6787 Linux Standard Base. 6788 __________________________________________________________ 6789 6790 9.2. Xdg-utils 6791 6792 Xdg-utils is a set of command line utilities that assist 6793 applications with a variety of desktop integration tasks. Some 6794 of the utilities focus on tasks commonly required during the 6795 installation of a desktop application. The remainder focus on 6796 integration with the desktop environment while the application 6797 is running. 6798 6799 These utilities operate as described at xdg-utils reference 6800 __________________________________________________________ 6801 6802 9.2.1. Xdg-utils Commands 6803 6804 An LSB conforming implementation shall provide the commands and 6805 utilities as described in Table 9-1, with at least the behavior 6806 described as mandatory in the referenced underlying 6807 specification, with the following exceptions: 6808 6809 1. If any operand (except one which follows --) starts with a 6810 hyphen, the behavior is unspecified. 6811 6812 Rationale (Informative): Applications should place options 6813 before operands, or use --, as needed. This text is needed 6814 because, by default, GNU option parsing differs from POSIX, 6815 unless the environment variable POSIXLY_CORRECT is set. For 6816 example, ls . -a in GNU ls means to list the current 6817 directory, showing all files (that is, "." is an operand and 6818 -a is an option). In POSIX, "." and -a are both operands, 6819 and the command means to list the current directory, and 6820 also the file named -a. Suggesting that applications rely on 6821 the setting of the POSIXLY_CORRECT environment variable, or 6822 try to set it, seems worse than just asking the applications 6823 to invoke commands in ways which work with either the POSIX 6824 or GNU behaviors. 6825 6826 Table 9-1. Commands And Utilities 6827 xdg-desktop-icon [1] xdg-email [1] xdg-mime [1] xdg-screensaver 6828 [1] 6829 xdg-desktop-menu [1] xdg-icon-resource [1] xdg-open [1] 6830 6831 Referenced Specification(s) 6832 6833 [1]. xdg-utils reference 6834 __________________________________________________________ 6835 6836 Appendix A. GNU Free Documentation License (Informative) 6837 6838 This specification is published under the terms of the GNU Free 6839 Documentation License, Version 1.1, March 2000 6840 6841 Copyright (C) 2000 Free Software Foundation, Inc. 59 Temple 6842 Place, Suite 330, Boston, MA 02111-1307 USA Everyone is 6843 permitted to copy and distribute verbatim copies of this 6844 license document, but changing it is not allowed. 6845 __________________________________________________________ 6846 6847 A.1. PREAMBLE 6848 6849 The purpose of this License is to make a manual, textbook, or 6850 other written document "free" in the sense of freedom: to 6851 assure everyone the effective freedom to copy and redistribute 6852 it, with or without modifying it, either commercially or 6853 noncommercially. Secondarily, this License preserves for the 6854 author and publisher a way to get credit for their work, while 6855 not being considered responsible for modifications made by 6856 others. 6857 6858 This License is a kind of "copyleft", which means that 6859 derivative works of the document must themselves be free in the 6860 same sense. It complements the GNU General Public License, 6861 which is a copyleft license designed for free software. 6862 6863 We have designed this License in order to use it for manuals 6864 for free software, because free software needs free 6865 documentation: a free program should come with manuals 6866 providing the same freedoms that the software does. But this 6867 License is not limited to software manuals; it can be used for 6868 any textual work, regardless of subject matter or whether it is 6869 published as a printed book. We recommend this License 6870 principally for works whose purpose is instruction or 6871 reference. 6872 __________________________________________________________ 6873 6874 A.2. APPLICABILITY AND DEFINITIONS 6875 6876 This License applies to any manual or other work that contains 6877 a notice placed by the copyright holder saying it can be 6878 distributed under the terms of this License. The "Document", 6879 below, refers to any such manual or work. Any member of the 6880 public is a licensee, and is addressed as "you". 6881 6882 A "Modified Version" of the Document means any work containing 6883 the Document or a portion of it, either copied verbatim, or 6884 with modifications and/or translated into another language. 6885 6886 A "Secondary Section" is a named appendix or a front-matter 6887 section of the Document that deals exclusively with the 6888 relationship of the publishers or authors of the Document to 6889 the Document's overall subject (or to related matters) and 6890 contains nothing that could fall directly within that overall 6891 subject. (For example, if the Document is in part a textbook of 6892 mathematics, a Secondary Section may not explain any 6893 mathematics.) The relationship could be a matter of historical 6894 connection with the subject or with related matters, or of 6895 legal, commercial, philosophical, ethical or political position 6896 regarding them. 6897 6898 The "Invariant Sections" are certain Secondary Sections whose 6899 titles are designated, as being those of Invariant Sections, in 6900 the notice that says that the Document is released under this 6901 License. 6902 6903 The "Cover Texts" are certain short passages of text that are 6904 listed, as Front-Cover Texts or Back-Cover Texts, in the notice 6905 that says that the Document is released under this License. 6906 6907 A "Transparent" copy of the Document means a machine-readable 6908 copy, represented in a format whose specification is available 6909 to the general public, whose contents can be viewed and edited 6910 directly and straightforwardly with generic text editors or 6911 (for images composed of pixels) generic paint programs or (for 6912 drawings) some widely available drawing editor, and that is 6913 suitable for input to text formatters or for automatic 6914 translation to a variety of formats suitable for input to text 6915 formatters. A copy made in an otherwise Transparent file format 6916 whose markup has been designed to thwart or discourage 6917 subsequent modification by readers is not Transparent. A copy 6918 that is not "Transparent" is called "Opaque". 6919 6920 Examples of suitable formats for Transparent copies include 6921 plain ASCII without markup, Texinfo input format, LaTeX input 6922 format, SGML or XML using a publicly available DTD, and 6923 standard-conforming simple HTML designed for human 6924 modification. Opaque formats include PostScript, PDF, 6925 proprietary formats that can be read and edited only by 6926 proprietary word processors, SGML or XML for which the DTD 6927 and/or processing tools are not generally available, and the 6928 machine-generated HTML produced by some word processors for 6929 output purposes only. 6930 6931 The "Title Page" means, for a printed book, the title page 6932 itself, plus such following pages as are needed to hold, 6933 legibly, the material this License requires to appear in the 6934 title page. For works in formats which do not have any title 6935 page as such, "Title Page" means the text near the most 6936 prominent appearance of the work's title, preceding the 6937 beginning of the body of the text. 6938 __________________________________________________________ 6939 6940 A.3. VERBATIM COPYING 6941 6942 You may copy and distribute the Document in any medium, either 6943 commercially or noncommercially, provided that this License, 6944 the copyright notices, and the license notice saying this 6945 License applies to the Document are reproduced in all copies, 6946 and that you add no other conditions whatsoever to those of 6947 this License. You may not use technical measures to obstruct or 6948 control the reading or further copying of the copies you make 6949 or distribute. However, you may accept compensation in exchange 6950 for copies. If you distribute a large enough number of copies 6951 you must also follow the conditions in section 3. 6952 6953 You may also lend copies, under the same conditions stated 6954 above, and you may publicly display copies. 6955 __________________________________________________________ 6956 6957 A.4. COPYING IN QUANTITY 6958 6959 If you publish printed copies of the Document numbering more 6960 than 100, and the Document's license notice requires Cover 6961 Texts, you must enclose the copies in covers that carry, 6962 clearly and legibly, all these Cover Texts: Front-Cover Texts 6963 on the front cover, and Back-Cover Texts on the back cover. 6964 Both covers must also clearly and legibly identify you as the 6965 publisher of these copies. The front cover must present the 6966 full title with all words of the title equally prominent and 6967 visible. You may add other material on the covers in addition. 6968 Copying with changes limited to the covers, as long as they 6969 preserve the title of the Document and satisfy these 6970 conditions, can be treated as verbatim copying in other 6971 respects. 6972 6973 If the required texts for either cover are too voluminous to 6974 fit legibly, you should put the first ones listed (as many as 6975 fit reasonably) on the actual cover, and continue the rest onto 6976 adjacent pages. 6977 6978 If you publish or distribute Opaque copies of the Document 6979 numbering more than 100, you must either include a 6980 machine-readable Transparent copy along with each Opaque copy, 6981 or state in or with each Opaque copy a publicly-accessible 6982 computer-network location containing a complete Transparent 6983 copy of the Document, free of added material, which the general 6984 network-using public has access to download anonymously at no 6985 charge using public-standard network protocols. If you use the 6986 latter option, you must take reasonably prudent steps, when you 6987 begin distribution of Opaque copies in quantity, to ensure that 6988 this Transparent copy will remain thus accessible at the stated 6989 location until at least one year after the last time you 6990 distribute an Opaque copy (directly or through your agents or 6991 retailers) of that edition to the public. 6992 6993 It is requested, but not required, that you contact the authors 6994 of the Document well before redistributing any large number of 6995 copies, to give them a chance to provide you with an updated 6996 version of the Document. 6997 __________________________________________________________ 6998 6999 A.5. MODIFICATIONS 7000 7001 You may copy and distribute a Modified Version of the Document 7002 under the conditions of sections 2 and 3 above, provided that 7003 you release the Modified Version under precisely this License, 7004 with the Modified Version filling the role of the Document, 7005 thus licensing distribution and modification of the Modified 7006 Version to whoever possesses a copy of it. In addition, you 7007 must do these things in the Modified Version: 7008 7009 A. Use in the Title Page (and on the covers, if any) a title 7010 distinct from that of the Document, and from those of 7011 previous versions (which should, if there were any, be 7012 listed in the History section of the Document). You may use 7013 the same title as a previous version if the original 7014 publisher of that version gives permission. 7015 B. List on the Title Page, as authors, one or more persons or 7016 entities responsible for authorship of the modifications in 7017 the Modified Version, together with at least five of the 7018 principal authors of the Document (all of its principal 7019 authors, if it has less than five). 7020 C. State on the Title page the name of the publisher of the 7021 Modified Version, as the publisher. 7022 D. Preserve all the copyright notices of the Document. 7023 E. Add an appropriate copyright notice for your modifications 7024 adjacent to the other copyright notices. 7025 F. Include, immediately after the copyright notices, a license 7026 notice giving the public permission to use the Modified 7027 Version under the terms of this License, in the form shown 7028 in the Addendum below. 7029 G. Preserve in that license notice the full lists of Invariant 7030 Sections and required Cover Texts given in the Document's 7031 license notice. 7032 H. Include an unaltered copy of this License. 7033 I. Preserve the section entitled "History", and its title, and 7034 add to it an item stating at least the title, year, new 7035 authors, and publisher of the Modified Version as given on 7036 the Title Page. If there is no section entitled "History" 7037 in the Document, create one stating the title, year, 7038 authors, and publisher of the Document as given on its 7039 Title Page, then add an item describing the Modified 7040 Version as stated in the previous sentence. 7041 J. Preserve the network location, if any, given in the 7042 Document for public access to a Transparent copy of the 7043 Document, and likewise the network locations given in the 7044 Document for previous versions it was based on. These may 7045 be placed in the "History" section. You may omit a network 7046 location for a work that was published at least four years 7047 before the Document itself, or if the original publisher of 7048 the version it refers to gives permission. 7049 K. In any section entitled "Acknowledgements" or 7050 "Dedications", preserve the section's title, and preserve 7051 in the section all the substance and tone of each of the 7052 contributor acknowledgements and/or dedications given 7053 therein. 7054 L. Preserve all the Invariant Sections of the Document, 7055 unaltered in their text and in their titles. Section 7056 numbers or the equivalent are not considered part of the 7057 section titles. 7058 M. Delete any section entitled "Endorsements". Such a section 7059 may not be included in the Modified Version. 7060 N. Do not retitle any existing section as "Endorsements" or to 7061 conflict in title with any Invariant Section. 7062 7063 If the Modified Version includes new front-matter sections or 7064 appendices that qualify as Secondary Sections and contain no 7065 material copied from the Document, you may at your option 7066 designate some or all of these sections as invariant. To do 7067 this, add their titles to the list of Invariant Sections in the 7068 Modified Version's license notice. These titles must be 7069 distinct from any other section titles. 7070 7071 You may add a section entitled "Endorsements", provided it 7072 contains nothing but endorsements of your Modified Version by 7073 various parties--for example, statements of peer review or that 7074 the text has been approved by an organization as the 7075 authoritative definition of a standard. 7076 7077 You may add a passage of up to five words as a Front-Cover 7078 Text, and a passage of up to 25 words as a Back-Cover Text, to 7079 the end of the list of Cover Texts in the Modified Version. 7080 Only one passage of Front-Cover Text and one of Back-Cover Text 7081 may be added by (or through arrangements made by) any one 7082 entity. If the Document already includes a cover text for the 7083 same cover, previously added by you or by arrangement made by 7084 the same entity you are acting on behalf of, you may not add 7085 another; but you may replace the old one, on explicit 7086 permission from the previous publisher that added the old one. 7087 7088 The author(s) and publisher(s) of the Document do not by this 7089 License give permission to use their names for publicity for or 7090 to assert or imply endorsement of any Modified Version. 7091 __________________________________________________________ 7092 7093 A.6. COMBINING DOCUMENTS 7094 7095 You may combine the Document with other documents released 7096 under this License, under the terms defined in section 4 above 7097 for modified versions, provided that you include in the 7098 combination all of the Invariant Sections of all of the 7099 original documents, unmodified, and list them all as Invariant 7100 Sections of your combined work in its license notice. 7101 7102 The combined work need only contain one copy of this License, 7103 and multiple identical Invariant Sections may be replaced with 7104 a single copy. If there are multiple Invariant Sections with 7105 the same name but different contents, make the title of each 7106 such section unique by adding at the end of it, in parentheses, 7107 the name of the original author or publisher of that section if 7108 known, or else a unique number. Make the same adjustment to the 7109 section titles in the list of Invariant Sections in the license 7110 notice of the combined work. 7111 7112 In the combination, you must combine any sections entitled 7113 "History" in the various original documents, forming one 7114 section entitled "History"; likewise combine any sections 7115 entitled "Acknowledgements", and any sections entitled 7116 "Dedications". You must delete all sections entitled 7117 "Endorsements." 7118 __________________________________________________________ 7119 7120 A.7. COLLECTIONS OF DOCUMENTS 7121 7122 You may make a collection consisting of the Document and other 7123 documents released under this License, and replace the 7124 individual copies of this License in the various documents with 7125 a single copy that is included in the collection, provided that 7126 you follow the rules of this License for verbatim copying of 7127 each of the documents in all other respects. 7128 7129 You may extract a single document from such a collection, and 7130 distribute it individually under this License, provided you 7131 insert a copy of this License into the extracted document, and 7132 follow this License in all other respects regarding verbatim 7133 copying of that document. 7134 __________________________________________________________ 7135 7136 A.8. AGGREGATION WITH INDEPENDENT WORKS 7137 7138 A compilation of the Document or its derivatives with other 7139 separate and independent documents or works, in or on a volume 7140 of a storage or distribution medium, does not as a whole count 7141 as a Modified Version of the Document, provided no compilation 7142 copyright is claimed for the compilation. Such a compilation is 7143 called an "aggregate", and this License does not apply to the 7144 other self-contained works thus compiled with the Document, on 7145 account of their being thus compiled, if they are not 7146 themselves derivative works of the Document. 7147 7148 If the Cover Text requirement of section 3 is applicable to 7149 these copies of the Document, then if the Document is less than 7150 one quarter of the entire aggregate, the Document's Cover Texts 7151 may be placed on covers that surround only the Document within 7152 the aggregate. Otherwise they must appear on covers around the 7153 whole aggregate. 7154 __________________________________________________________ 7155 7156 A.9. TRANSLATION 7157 7158 Translation is considered a kind of modification, so you may 7159 distribute translations of the Document under the terms of 7160 section 4. Replacing Invariant Sections with translations 7161 requires special permission from their copyright holders, but 7162 you may include translations of some or all Invariant Sections 7163 in addition to the original versions of these Invariant 7164 Sections. You may include a translation of this License 7165 provided that you also include the original English version of 7166 this License. In case of a disagreement between the translation 7167 and the original English version of this License, the original 7168 English version will prevail. 7169 __________________________________________________________ 7170 7171 A.10. TERMINATION 7172 7173 You may not copy, modify, sublicense, or distribute the 7174 Document except as expressly provided for under this License. 7175 Any other attempt to copy, modify, sublicense or distribute the 7176 Document is void, and will automatically terminate your rights 7177 under this License. However, parties who have received copies, 7178 or rights, from you under this License will not have their 7179 licenses terminated so long as such parties remain in full 7180 compliance. 7181 __________________________________________________________ 7182 7183 A.11. FUTURE REVISIONS OF THIS LICENSE 7184 7185 The Free Software Foundation may publish new, revised versions 7186 of the GNU Free Documentation License from time to time. Such 7187 new versions will be similar in spirit to the present version, 7188 but may differ in detail to address new problems or concerns. 7189 See http://www.gnu.org/copyleft/. 7190 7191 Each version of the License is given a distinguishing version 7192 number. If the Document specifies that a particular numbered 7193 version of this License "or any later version" applies to it, 7194 you have the option of following the terms and conditions 7195 either of that specified version or of any later version that 7196 has been published (not as a draft) by the Free Software 7197 Foundation. If the Document does not specify a version number 7198 of this License, you may choose any version ever published (not 7199 as a draft) by the Free Software Foundation. 7200 __________________________________________________________ 7201 7202 A.12. How to use this License for your documents 7203 7204 To use this License in a document you have written, include a 7205 copy of the License in the document and put the following 7206 copyright and license notices just after the title page: 7207 7208 Copyright (c) YEAR YOUR NAME. Permission is granted to copy, 7209 distribute and/or modify this document under the terms of 7210 the GNU Free Documentation License, Version 1.1 or any later 7211 version published by the Free Software Foundation; with the 7212 Invariant Sections being LIST THEIR TITLES, with the 7213 Front-Cover Texts being LIST, and with the Back-Cover Texts 7214 being LIST. A copy of the license is included in the section 7215 entitled "GNU Free Documentation License". 7216 7217 If you have no Invariant Sections, write "with no Invariant 7218 Sections" instead of saying which ones are invariant. If you 7219 have no Front-Cover Texts, write "no Front-Cover Texts" instead 7220 of "Front-Cover Texts being LIST"; likewise for Back-Cover 7221 Texts. 7222 7223 If your document contains nontrivial examples of program code, 7224 we recommend releasing these examples in parallel under your 7225 choice of free software license, such as the GNU General Public 7226 License, to permit their use in free software.