|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * The contents of this file constitute Original Code as defined in and ! 7: * are subject to the Apple Public Source License Version 1.1 (the ! 8: * "License"). You may not use this file except in compliance with the ! 9: * License. Please obtain a copy of the License at ! 10: * http://www.apple.com/publicsource and read it before using this file. ! 11: * ! 12: * This Original Code and all software distributed under the License are ! 13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 17: * License for the specific language governing rights and limitations ! 18: * under the License. ! 19: * ! 20: * @APPLE_LICENSE_HEADER_END@ ! 21: */ ! 22: /* ! 23: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 24: * ! 25: * IONetworkStack.h - An IOKit proxy for the BSD network stack. ! 26: * ! 27: * HISTORY ! 28: * ! 29: */ ! 30: ! 31: #ifndef _IONETWORKSTACK_H ! 32: #define _IONETWORKSTACK_H ! 33: ! 34: #include <libkern/c++/OSString.h> ! 35: ! 36: class IONetworkInterface; ! 37: ! 38: class IONetworkStack : public IOService ! 39: { ! 40: OSDeclareDefaultStructors(IONetworkStack) ! 41: ! 42: private: ! 43: IONetworkInterface * _netif; // provider. ! 44: struct ifnet * _ifp; // provider's ifnet pointer. ! 45: IOLock * _lock; // serialization lock. ! 46: ! 47: enum { ! 48: kIONetworkStackStateInit, ! 49: kIONetworkStackStateAttached, ! 50: kIONetworkStackStateDetaching, ! 51: kIONetworkStackStateDetached, ! 52: } _state; ! 53: ! 54: OSString * _assignInterfaceName(IONetworkInterface * netif); ! 55: ! 56: static void initialize(); ! 57: ! 58: static void ifDetachCallbackHandler(struct ifnet * ifp); ! 59: ! 60: protected: ! 61: virtual void free(); ! 62: ! 63: virtual bool sendIfDetachRequest(); ! 64: virtual void ifDetachCallback(); ! 65: ! 66: public: ! 67: virtual bool init(OSDictionary * properties); ! 68: ! 69: virtual IOService * probe(IOService * provider, SInt32 * score); ! 70: ! 71: virtual bool start(IOService * provider); ! 72: ! 73: virtual void stop(IOService * provider); ! 74: ! 75: virtual IOReturn message(UInt32 type, IOService * provider, ! 76: void * argument = 0); ! 77: }; ! 78: ! 79: #endif /* !_IONETWORKSTACK_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.