| 1 | /* $Id: iphlpapi.cpp,v 1.2 2001-10-10 16:22:19 phaller Exp $ */
|
|---|
| 2 | /*
|
|---|
| 3 | * IPHLPAPI library
|
|---|
| 4 | *
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 | /****************************************************************************
|
|---|
| 9 | * includes
|
|---|
| 10 | ****************************************************************************/
|
|---|
| 11 |
|
|---|
| 12 | #include <odin.h>
|
|---|
| 13 | #include <odinwrap.h>
|
|---|
| 14 | #include <os2sel.h>
|
|---|
| 15 |
|
|---|
| 16 | #include <os2win.h>
|
|---|
| 17 | #include <odinwrap.h>
|
|---|
| 18 | #include <winversion.h>
|
|---|
| 19 |
|
|---|
| 20 | #include "iphlpapi.h"
|
|---|
| 21 |
|
|---|
| 22 | ODINDEBUGCHANNEL(IPHLPAPI-IPHLPAPI)
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 | //******************************************************************************
|
|---|
| 26 | //******************************************************************************
|
|---|
| 27 | ODINFUNCTION2(DWORD, GetAdaptersInfo,
|
|---|
| 28 | PIP_ADAPTER_INFO, pAdapterInfo,
|
|---|
| 29 | PULONG, pOutBufLen)
|
|---|
| 30 | {
|
|---|
| 31 | dprintf(("GetAdaptersInfo not implemented"));
|
|---|
| 32 |
|
|---|
| 33 | static PIP_ADAPTER_INFO pipAdapters = NULL;
|
|---|
| 34 | static ULONG ulAdaptersSize = 0;
|
|---|
| 35 |
|
|---|
| 36 | if (NULL == pipAdapters)
|
|---|
| 37 | {
|
|---|
| 38 | // gather the information and save it
|
|---|
| 39 |
|
|---|
| 40 | // determine number of IP adapters (interfaces) in the system
|
|---|
| 41 |
|
|---|
| 42 | // os2_ioctl() SIOSTATIF42
|
|---|
| 43 | }
|
|---|
| 44 |
|
|---|
| 45 | // OK, just copy over the information as far as possible
|
|---|
| 46 |
|
|---|
| 47 | return ERROR_SUCCESS;
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 | //******************************************************************************
|
|---|
| 52 | //******************************************************************************
|
|---|
| 53 | ODINFUNCTION2(DWORD, GetNetworkParams,
|
|---|
| 54 | PFIXED_INFO, pFixedInfo,
|
|---|
| 55 | PULONG, pOutBufLen)
|
|---|
| 56 | {
|
|---|
| 57 | dprintf(("GetNetworkParams not implemented"));
|
|---|
| 58 | return ERROR_NOT_SUPPORTED; //NT returns this
|
|---|
| 59 | }
|
|---|
| 60 | //******************************************************************************
|
|---|
| 61 | //******************************************************************************
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 | DWORD AddIPAddress(IPAddr Address, // IP address to add
|
|---|
| 65 | IPMask IpMask, // subnet mask for IP address
|
|---|
| 66 | DWORD IfIndex, // index of adapter
|
|---|
| 67 | PULONG NTEContext, // Net Table Entry context
|
|---|
| 68 | PULONG NTEInstance // Net Table Entry Instance
|
|---|
| 69 | );
|
|---|
| 70 | // SIOCAIFADDR
|
|---|
| 71 |
|
|---|
| 72 | DWORD DeleteIPAddress(
|
|---|
| 73 | ULONG NTEContext // net table entry context
|
|---|
| 74 | );
|
|---|
| 75 | // SIOCDIFADDR
|
|---|