libbsm.h (185573) | libbsm.h (186647) |
---|---|
1/*- | 1/*- |
2 * Copyright (c) 2004 Apple Inc. | 2 * Copyright (c) 2004-2008 Apple Inc. |
3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright --- 10 unchanged lines hidden (view full) --- 21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 * POSSIBILITY OF SUCH DAMAGE. 28 * | 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright --- 10 unchanged lines hidden (view full) --- 21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 * POSSIBILITY OF SUCH DAMAGE. 28 * |
29 * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#35 $ | 29 * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#40 $ |
30 */ 31 32#ifndef _LIBBSM_H_ 33#define _LIBBSM_H_ 34 35/* 36 * NB: definitions, etc., marked with "OpenSSH compatibility" were introduced 37 * solely to allow OpenSSH to compile; Darwin/Apple code should not use them. --- 504 unchanged lines hidden (view full) --- 542 * local port 2 bytes 543 * address type/length 4 bytes 544 * local Internet address 4 bytes/16 bytes (IPv4/IPv6 address) 545 * remote port 4 bytes 546 * address type/length 4 bytes 547 * remote Internet address 4 bytes/16 bytes (IPv4/IPv6 address) 548 */ 549typedef struct { | 30 */ 31 32#ifndef _LIBBSM_H_ 33#define _LIBBSM_H_ 34 35/* 36 * NB: definitions, etc., marked with "OpenSSH compatibility" were introduced 37 * solely to allow OpenSSH to compile; Darwin/Apple code should not use them. --- 504 unchanged lines hidden (view full) --- 542 * local port 2 bytes 543 * address type/length 4 bytes 544 * local Internet address 4 bytes/16 bytes (IPv4/IPv6 address) 545 * remote port 4 bytes 546 * address type/length 4 bytes 547 * remote Internet address 4 bytes/16 bytes (IPv4/IPv6 address) 548 */ 549typedef struct { |
550 u_int16_t domain; |
|
550 u_int16_t type; | 551 u_int16_t type; |
552 u_int16_t atype; |
|
551 u_int16_t l_port; | 553 u_int16_t l_port; |
552 u_int32_t l_ad_type; 553 u_int32_t l_addr; | 554 u_int32_t l_addr[4]; |
554 u_int32_t r_port; | 555 u_int32_t r_port; |
555 u_int32_t r_ad_type; 556 u_int32_t r_addr; | 556 u_int32_t r_addr[4]; |
557} au_socket_ex32_t; 558 559/* 560 * socket family 2 bytes 561 * local port 2 bytes 562 * socket address 4 bytes/16 bytes (IPv4/IPv6 address) 563 */ 564typedef struct { --- 254 unchanged lines hidden (view full) --- 819/* 820 * Functions relating to XML output. 821 */ 822void au_print_xml_header(FILE *outfp); 823void au_print_xml_footer(FILE *outfp); 824__END_DECLS 825 826/* | 557} au_socket_ex32_t; 558 559/* 560 * socket family 2 bytes 561 * local port 2 bytes 562 * socket address 4 bytes/16 bytes (IPv4/IPv6 address) 563 */ 564typedef struct { --- 254 unchanged lines hidden (view full) --- 819/* 820 * Functions relating to XML output. 821 */ 822void au_print_xml_header(FILE *outfp); 823void au_print_xml_footer(FILE *outfp); 824__END_DECLS 825 826/* |
827 * Functions relating to BSM<->errno conversion. 828 */ 829int au_bsm_to_errno(u_char bsm_error, int *errorp); 830u_char au_errno_to_bsm(int error); 831const char *au_strerror(u_char bsm_error); 832 833/* |
|
827 * The remaining APIs are associated with Apple's BSM implementation, in 828 * particular as relates to Mach IPC auditing and triggers passed via Mach 829 * IPC. 830 */ 831#ifdef __APPLE__ 832#include <sys/appleapiopts.h> 833 834/************************************************************************** --- 90 unchanged lines hidden (view full) --- 925 * @return - AUC_AUDITING or AUC_NOAUDIT if no error occurred. 926 * Otherwise the function can return any of the errno values defined for 927 * setaudit(2), or AU_UNIMPL if audit does not appear to be supported by 928 * the system. 929 * 930 * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE. 931 */ 932int au_get_state(void); | 834 * The remaining APIs are associated with Apple's BSM implementation, in 835 * particular as relates to Mach IPC auditing and triggers passed via Mach 836 * IPC. 837 */ 838#ifdef __APPLE__ 839#include <sys/appleapiopts.h> 840 841/************************************************************************** --- 90 unchanged lines hidden (view full) --- 932 * @return - AUC_AUDITING or AUC_NOAUDIT if no error occurred. 933 * Otherwise the function can return any of the errno values defined for 934 * setaudit(2), or AU_UNIMPL if audit does not appear to be supported by 935 * the system. 936 * 937 * XXXRW: In Apple's bsm-8, these are marked __APPLE_API_PRIVATE. 938 */ 939int au_get_state(void); |
940 941/* 942 * Initialize the audit notification. If it has not already been initialized 943 * it will automatically on the first call of au_get_state(). 944 */ 945uint32_t au_notify_initialize(void); 946 947/* 948 * Cancel audit notification and free the resources associated with it. 949 * Responsible code that no longer needs to use au_get_state() should call 950 * this. 951 */ 952int au_notify_terminate(void); |
|
933__END_DECLS 934 935/* OpenSSH compatibility */ 936int cannot_audit(int); 937 938__BEGIN_DECLS 939/* 940 * audit_set_terminal_id() --- 297 unchanged lines hidden --- | 953__END_DECLS 954 955/* OpenSSH compatibility */ 956int cannot_audit(int); 957 958__BEGIN_DECLS 959/* 960 * audit_set_terminal_id() --- 297 unchanged lines hidden --- |