Changeset 36075 in vbox for trunk/include
- Timestamp:
- Feb 24, 2011 4:36:48 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/intnet.h
r35346 r36075 4 4 5 5 /* 6 * Copyright (C) 2006-201 0Oracle Corporation6 * Copyright (C) 2006-2011 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 829 829 830 830 /** @name IntNetR0Open flags. 831 * 832 * The desired policy options must be specified explicitly, if omitted it is 833 * understood that whatever is current or default is fine with the caller. 834 * 835 * @todo Move the policies out of the flags, use three new parameters. 836 * 831 837 * @{ */ 832 838 /** Share the MAC address with the host when sending something to the wire via the trunk. 833 839 * This is typically used when the trunk is a NetFlt for a wireless interface. */ 834 840 #define INTNET_OPEN_FLAGS_SHARED_MAC_ON_WIRE RT_BIT_32(0) 835 /** Whether new participants should be subjected to access check or not. */ 836 #define INTNET_OPEN_FLAGS_PUBLIC RT_BIT_32(1) 837 /** Ignore any requests for promiscuous mode. */ 838 #define INTNET_OPEN_FLAGS_IGNORE_PROMISC RT_BIT_32(2) 839 /** Ignore any requests for promiscuous mode, quietly applied/ignored on open. */ 840 #define INTNET_OPEN_FLAGS_QUIETLY_IGNORE_PROMISC RT_BIT_32(3) 841 /** Ignore any requests for promiscuous mode on the trunk wire connection. */ 842 #define INTNET_OPEN_FLAGS_IGNORE_PROMISC_TRUNK_WIRE RT_BIT_32(4) 843 /** Ignore any requests for promiscuous mode on the trunk wire connection, quietly applied/ignored on open. */ 844 #define INTNET_OPEN_FLAGS_QUIETLY_IGNORE_PROMISC_TRUNK_WIRE RT_BIT_32(5) 845 /** Ignore any requests for promiscuous mode on the trunk host connection. */ 846 #define INTNET_OPEN_FLAGS_IGNORE_PROMISC_TRUNK_HOST RT_BIT_32(6) 847 /** Ignore any requests for promiscuous mode on the trunk host connection, quietly applied/ignored on open. */ 848 #define INTNET_OPEN_FLAGS_QUIETLY_IGNORE_PROMISC_TRUNK_HOST RT_BIT_32(7) 849 /** The mask of flags which causes flag incompatibilities. */ 850 #define INTNET_OPEN_FLAGS_COMPATIBILITY_XOR_MASK (RT_BIT_32(0) | RT_BIT_32(1) | RT_BIT_32(2) | RT_BIT_32(4) | RT_BIT_32(6)) 851 /** The mask of flags is always ORed in, even on open. (the quiet stuff) */ 852 #define INTNET_OPEN_FLAGS_SECURITY_OR_MASK (RT_BIT_32(3) | RT_BIT_32(5) | RT_BIT_32(7)) 841 /** Require that the current security and promiscuous policies of the network 842 * is exactly as the ones specified in this open network request. 843 * 844 * Use this with INTNET_OPEN_FLAGS_REQUIRE_AS_RESTRICTIVE_POLICIES to prevent 845 * restrictions from being lifted. If no further policy changes are desired, 846 * apply the relevant _FIXED flags. */ 847 #define INTNET_OPEN_FLAGS_REQUIRE_EXACT RT_BIT_32(1) 848 /** Require that the security and promiscuous policies of the network is at 849 * least as restrictive as specified this request specifies and prevent them 850 * being lifted later on. */ 851 #define INTNET_OPEN_FLAGS_REQUIRE_AS_RESTRICTIVE_POLICIES RT_BIT_32(2) 852 853 /** Network access policy: Fixed if set, changable if clear. */ 854 #define INTNET_OPEN_FLAGS_ACCESS_FIXED RT_BIT_32(3) 855 /** Network access policy: Public network. */ 856 #define INTNET_OPEN_FLAGS_ACCESS_PUBLIC RT_BIT_32(4) 857 /** Network access policy: Restricted network. */ 858 #define INTNET_OPEN_FLAGS_ACCESS_RESTRICTED RT_BIT_32(5) 859 860 /** Promiscuous mode policy: Is it fixed or changable by new participants? */ 861 #define INTNET_OPEN_FLAGS_PROMISC_FIXED RT_BIT_32(6) 862 /** Promiscuous mode policy: Allow the clients to request it. */ 863 #define INTNET_OPEN_FLAGS_PROMISC_ALLOW_CLIENTS RT_BIT_32(7) 864 /** Promiscuous mode policy: Deny the clients from requesting it. */ 865 #define INTNET_OPEN_FLAGS_PROMISC_DENY_CLIENTS RT_BIT_32(8) 866 /** Promiscuous mode policy: Allow the trunk-host to request it. */ 867 #define INTNET_OPEN_FLAGS_PROMISC_ALLOW_TRUNK_HOST RT_BIT_32(9) 868 /** Promiscuous mode policy: Deny the trunk-host from requesting it. */ 869 #define INTNET_OPEN_FLAGS_PROMISC_DENY_TRUNK_HOST RT_BIT_32(10) 870 /** Promiscuous mode policy: Allow the trunk-wire to request it. */ 871 #define INTNET_OPEN_FLAGS_PROMISC_ALLOW_TRUNK_WIRE RT_BIT_32(11) 872 /** Promiscuous mode policy: Deny the trunk-wire from requesting it. */ 873 #define INTNET_OPEN_FLAGS_PROMISC_DENY_TRUNK_WIRE RT_BIT_32(12) 874 875 /** Interface policies: Is it fixed or changable (by admin). 876 * @note Per interface, not network wide. */ 877 #define INTNET_OPEN_FLAGS_IF_FIXED RT_BIT_32(13) 878 /** Interface promiscuous mode policy: Allow the interface to request it. */ 879 #define INTNET_OPEN_FLAGS_IF_PROMISC_ALLOW RT_BIT_32(14) 880 /** Interface promiscuous mode policy: Deny the interface from requesting it. */ 881 #define INTNET_OPEN_FLAGS_IF_PROMISC_DENY RT_BIT_32(15) 882 /** Interface promiscuous mode policy: See unrelated trunk traffic. */ 883 #define INTNET_OPEN_FLAGS_IF_PROMISC_SEE_TRUNK RT_BIT_32(16) 884 /** Interface promiscuous mode policy: No unrelated trunk traffic visible. */ 885 #define INTNET_OPEN_FLAGS_IF_PROMISC_NO_TRUNK RT_BIT_32(17) 886 887 /** Trunk policy: Fixed if set, changable if clear. 888 * @remarks The DISABLED options are considered more restrictive by 889 * INTNET_OPEN_FLAGS_REQUIRE_AS_RESTRICTIVE_POLICIES. */ 890 #define INTNET_OPEN_FLAGS_TRUNK_FIXED RT_BIT_32(18) 891 /** Trunk policy: The host end should be enabled. */ 892 #define INTNET_OPEN_FLAGS_TRUNK_HOST_ENABLED RT_BIT_32(19) 893 /** Trunk policy: The host end should be disabled. */ 894 #define INTNET_OPEN_FLAGS_TRUNK_HOST_DISABLED RT_BIT_32(20) 895 /** Trunk policy: The host should only see packets destined for it. */ 896 #define INTNET_OPEN_FLAGS_TRUNK_HOST_CHASTE_MODE RT_BIT_32(21) 897 /** Trunk policy: The host should see all packets. */ 898 #define INTNET_OPEN_FLAGS_TRUNK_HOST_PROMISC_MODE RT_BIT_32(22) 899 /** Trunk policy: The wire end should be enabled. */ 900 #define INTNET_OPEN_FLAGS_TRUNK_WIRE_ENABLED RT_BIT_32(23) 901 /** Trunk policy: The wire end should be disabled. */ 902 #define INTNET_OPEN_FLAGS_TRUNK_WIRE_DISABLED RT_BIT_32(24) 903 /** Trunk policy: The wire should only see packets destined for it. */ 904 #define INTNET_OPEN_FLAGS_TRUNK_WIRE_CHASTE_MODE RT_BIT_32(25) 905 /** Trunk policy: The wire should see all packets. */ 906 #define INTNET_OPEN_FLAGS_TRUNK_WIRE_PROMISC_MODE RT_BIT_32(26) 907 908 853 909 /** The mask of valid flags. */ 854 #define INTNET_OPEN_FLAGS_MASK UINT32_C(0x000000ff) 910 #define INTNET_OPEN_FLAGS_MASK UINT32_C(0x03ffffff) 911 /** The mask of all flags use to fix (lock) settings. */ 912 #define INTNET_OPEN_FLAGS_FIXED_MASK \ 913 ( INTNET_OPEN_FLAGS_ACCESS_FIXED \ 914 | INTNET_OPEN_FLAGS_PROMISC_FIXED \ 915 | INTNET_OPEN_FLAGS_IF_FIXED \ 916 | INTNET_OPEN_FLAGS_TRUNK_FIXED ) 917 918 /** The mask of all policy pairs. */ 919 #define INTNET_OPEN_FLAGS_PAIR_MASK \ 920 ( INTNET_OPEN_FLAGS_ACCESS_PUBLIC | INTNET_OPEN_FLAGS_ACCESS_RESTRICTED \ 921 | INTNET_OPEN_FLAGS_PROMISC_ALLOW_CLIENTS | INTNET_OPEN_FLAGS_PROMISC_DENY_CLIENTS \ 922 | INTNET_OPEN_FLAGS_PROMISC_ALLOW_TRUNK_HOST | INTNET_OPEN_FLAGS_PROMISC_DENY_TRUNK_HOST \ 923 | INTNET_OPEN_FLAGS_PROMISC_ALLOW_TRUNK_WIRE | INTNET_OPEN_FLAGS_PROMISC_DENY_TRUNK_WIRE \ 924 | INTNET_OPEN_FLAGS_IF_PROMISC_ALLOW | INTNET_OPEN_FLAGS_IF_PROMISC_DENY \ 925 | INTNET_OPEN_FLAGS_IF_PROMISC_SEE_TRUNK | INTNET_OPEN_FLAGS_IF_PROMISC_NO_TRUNK \ 926 | INTNET_OPEN_FLAGS_TRUNK_HOST_ENABLED | INTNET_OPEN_FLAGS_TRUNK_HOST_DISABLED \ 927 | INTNET_OPEN_FLAGS_TRUNK_HOST_PROMISC_MODE | INTNET_OPEN_FLAGS_TRUNK_HOST_CHASTE_MODE \ 928 | INTNET_OPEN_FLAGS_TRUNK_WIRE_ENABLED | INTNET_OPEN_FLAGS_TRUNK_WIRE_DISABLED \ 929 | INTNET_OPEN_FLAGS_TRUNK_WIRE_PROMISC_MODE | INTNET_OPEN_FLAGS_TRUNK_WIRE_CHASTE_MODE \ 930 ) 931 /** The mask of all relaxed policy bits. */ 932 #define INTNET_OPEN_FLAGS_RELAXED_MASK \ 933 ( INTNET_OPEN_FLAGS_ACCESS_PUBLIC \ 934 | INTNET_OPEN_FLAGS_PROMISC_ALLOW_CLIENTS \ 935 | INTNET_OPEN_FLAGS_PROMISC_ALLOW_TRUNK_HOST \ 936 | INTNET_OPEN_FLAGS_PROMISC_ALLOW_TRUNK_WIRE \ 937 | INTNET_OPEN_FLAGS_IF_PROMISC_ALLOW \ 938 | INTNET_OPEN_FLAGS_IF_PROMISC_SEE_TRUNK \ 939 | INTNET_OPEN_FLAGS_TRUNK_HOST_ENABLED \ 940 | INTNET_OPEN_FLAGS_TRUNK_WIRE_PROMISC_MODE \ 941 | INTNET_OPEN_FLAGS_TRUNK_WIRE_ENABLED \ 942 | INTNET_OPEN_FLAGS_TRUNK_WIRE_PROMISC_MODE \ 943 ) 944 /** The mask of all strict policy bits. */ 945 #define INTNET_OPEN_FLAGS_STRICT_MASK \ 946 ( INTNET_OPEN_FLAGS_ACCESS_RESTRICTED \ 947 | INTNET_OPEN_FLAGS_PROMISC_DENY_CLIENTS \ 948 | INTNET_OPEN_FLAGS_PROMISC_DENY_TRUNK_HOST \ 949 | INTNET_OPEN_FLAGS_PROMISC_DENY_TRUNK_WIRE \ 950 | INTNET_OPEN_FLAGS_IF_PROMISC_DENY \ 951 | INTNET_OPEN_FLAGS_IF_PROMISC_NO_TRUNK \ 952 | INTNET_OPEN_FLAGS_TRUNK_HOST_DISABLED \ 953 | INTNET_OPEN_FLAGS_TRUNK_HOST_CHASTE_MODE \ 954 | INTNET_OPEN_FLAGS_TRUNK_WIRE_DISABLED \ 955 | INTNET_OPEN_FLAGS_TRUNK_WIRE_CHASTE_MODE \ 956 ) 855 957 /** @} */ 856 958
Note:
See TracChangeset
for help on using the changeset viewer.