00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #import <OmniBase/OBObject.h>
00011
00012
00013
00014 @class ONHostAddress;
00015 @class NSArray;
00016 @class NSData;
00017
00018 typedef enum _ONInterfaceCategory {
00019 ONUnknownInterfaceCategory,
00020 ONEtherInterfaceCategory,
00021 ONPPPInterfaceCategory,
00022 ONLoopbackInterfaceCategory,
00023 ONTunnelInterfaceCategory
00024 } ONInterfaceCategory;
00025
00026 @interface ONInterface : OBObject
00027 {
00028 NSString *name;
00029 NSArray *interfaceAddresses;
00030
00031 NSDictionary *destinationAddresses;
00032 NSDictionary *broadcastAddresses;
00033 NSDictionary *netmaskAddresses;
00034
00035 ONInterfaceCategory interfaceCategory;
00036 int interfaceType;
00037 unsigned int maximumTransmissionUnit;
00038 unsigned int flags;
00039 unsigned int index;
00040 }
00041
00042 + (NSArray *)getInterfaces:(BOOL)rescan;
00043 + (NSArray *)interfaces;
00044
00045 - (NSString *)name;
00046 - (ONHostAddress *)interfaceAddress;
00047 - (ONHostAddress *)linkLayerAddress;
00048
00049 - (NSArray *)addresses;
00050 - (ONHostAddress *)destinationAddressForAddress:(ONHostAddress *)localAddress;
00051 - (ONHostAddress *)broadcastAddressForAddress:(ONHostAddress *)localAddress;
00052 - (ONHostAddress *)netmaskAddressForAddress:(ONHostAddress *)localAddress;
00053
00054 - (ONInterfaceCategory)interfaceCategory;
00055 - (int)interfaceType;
00056 - (int)index;
00057
00058 - (unsigned int)maximumTransmissionUnit;
00059
00060 - (BOOL)isUp;
00061 - (BOOL)supportsBroadcast;
00062 - (BOOL)isLoopback;
00063 - (BOOL)isPointToPoint;
00064 - (BOOL)supportsAddressResolutionProtocol;
00065 - (BOOL)supportsPromiscuousMode;
00066 - (BOOL)isSimplex;
00067 - (BOOL)supportsMulticast;
00068
00069 @end