reactos/lib/dnslib/addr.c
Hermès Bélusca-Maïto e1ef078741 Create this branch to work on loading of different Kernel-Debugger DLL providers, and see whether it is possible to move KDBG from ntoskrnl to a new DLL called, say, KDROSDBG.DLL.
The idea then would be to have the following behaviour (when specifying the following options in the kernel command line):

/DEBUGPORT=COMi --> load KDCOM.DLL and use COMi port (i == 1,2,3,4) if possible.
/DEBUGPORT=FOO  --> load KDFOO.DLL (useful for KDUSB.DLL, KD1394.DLL, KDBAZIS.DLL for VirtualKD, etc...)
/DEBUGPORT=ROSDBG:[COMi|SCREEN|FILE|GDB|...] --> load KDROSDBG.DLL which contains the ROS kernel debugger, and use COMi or SCREEN or... as output port.

svn path=/branches/kd++/; revision=58883
2013-04-28 13:26:45 +00:00

66 lines
1.5 KiB
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS DNS Shared Library
* FILE: lib/dnslib/addr.c
* PURPOSE: Contains the Address Family Information Tables
*/
/* INCLUDES ******************************************************************/
#include "precomp.h"
/* DATA **********************************************************************/
DNS_FAMILY_INFO AddrFamilyTable[3] =
{
{
AF_INET,
DNS_TYPE_A,
sizeof(IP4_ADDRESS),
sizeof(SOCKADDR_IN),
FIELD_OFFSET(SOCKADDR_IN, sin_addr)
},
{
AF_INET6,
DNS_TYPE_AAAA,
sizeof(IP6_ADDRESS),
sizeof(SOCKADDR_IN6),
FIELD_OFFSET(SOCKADDR_IN6, sin6_addr)
},
{
AF_ATM,
DNS_TYPE_ATMA,
sizeof(ATM_ADDRESS),
sizeof(SOCKADDR_ATM),
FIELD_OFFSET(SOCKADDR_ATM, satm_number)
}
};
/* FUNCTIONS *****************************************************************/
PDNS_FAMILY_INFO
WINAPI
FamilyInfo_GetForFamily(IN WORD AddressFamily)
{
/* Check which family this is */
switch (AddressFamily)
{
case AF_INET:
/* Return IPv4 Family Info */
return &AddrFamilyTable[0];
case AF_INET6:
/* Return IPv6 Family Info */
return &AddrFamilyTable[1];
case AF_ATM:
/* Return ATM Family Info */
return &AddrFamilyTable[2];
default:
/* Invalid family */
return NULL;
}
}