Question : fltdefs.h source, used by Russell (rllibby)

http://www.ndis.com/papers/winpktfilter.htm#W2KPktFilterInterface
The source was remove in ndis papers link;
Where could I find it?  The link.

And I'm also asking;
What <header> shall I convert to run a firewall in vista or 7 from delphi7/9?
Where is the source <?.h>  The link.

Thanks.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
//This was the delphi convertion of fltdefs.h, but where is the source?

unit fltdefs;
////////////////////////////////////////////////////////////////////////////////
//
//   Delphi conversion of fltdefs.h for use with the IPHLPAPI.DLL
//
////////////////////////////////////////////////////////////////////////////////
interface

uses
  Windows;

const
  IPHLPAPI          =  'IPHLPAPI.DLL';

// Byte array
type
  TByteArray        =  Array [0..Pred(MaxInt)] of Byte;
  PByteArray        =  ^TByteArray;

// Data types
type
  FILTER_HANDLE     =  Pointer;
  PFILTER_HANDLE    =  ^FILTER_HANDLE;
  INTERFACE_HANDLE  =  Pointer;
  PINTERFACE_HANDLE =  ^INTERFACE_HANDLE;

// GlobalFilter enumeration
const
  GF_FRAGMENTS      =  2;
  GF_STRONGHOST     =  8;
  GF_FRAGCACHE      =  9;

type
  GLOBAL_FILTER     =  Integer;
  PGLOBAL_FILTER    =  ^GLOBAL_FILTER;

// PFAddressType enumeration
const
  PF_IPV4           =  0;
  PF_IPV6           =  1;

type
  PFADDRESSTYPE     =  Integer;
  PPFADDRESSTYPE    =  ^PFADDRESSTYPE;

// PFForwardAction enumeration
const
  PF_ACTION_FORWARD =  0;
  PF_ACTION_DROP    =  1;

type
  PFFORWARD_ACTION  =  Integer;
  PPFFORWARD_ACTION =  ^PPFFORWARD_ACTION;

// PFFrameType enumeration
const
  PFFT_FILTER       =  1;
  PFFT_FRAG         =  2;
  PFFT_SPOOF        =  3;

type
  PFFRAMETYPE       =  Integer;
  PPFFRAMETYPE      =  ^PFFRAMETYPE;

type
  _PF_FILTER_DESCRIPTOR   =  packed record
     dwFilterFlags:       DWORD;
     dwRule:              DWORD;
     pfatType:            PFADDRESSTYPE;
     SrcAddr:             PByteArray;
     SrcMask:             PByteArray;
     DstAddr:             PByteArray;
     DstMask:             PByteArray;
     dwProtocol:          DWORD;
     fLateBound:          DWORD;
     wSrcPort:            Word;
     wDstPort:            Word;
     wSrcPortHighRange:   Word;
     wDstPortHighRange:   Word;
  end;
  PF_FILTER_DESCRIPTOR    =  _PF_FILTER_DESCRIPTOR;
  PPF_FILTER_DESCRIPTOR   =  ^PF_FILTER_DESCRIPTOR;

type
  _PF_FILTER_STATS        =  packed record
     dwNumPacketsFiltered:DWORD;
     info:                PF_FILTER_DESCRIPTOR;
  end;
  PF_FILTER_STATS         =  _PF_FILTER_STATS;
  PPF_FILTER_STATS        =  ^PF_FILTER_STATS;

type
  _PF_INTERFACE_STATS     =  packed record
     pvDriverContext:     Pointer;
     dwFlags:             DWORD;
     dwInDrops:           DWORD;
     dwOutDrops:          DWORD;
     eaInAction:          PFFORWARD_ACTION;
     eaOutAction:         PFFORWARD_ACTION;
     dwNumInFilters:      DWORD;
     dwNumOutFilters:     DWORD;
     dwFrag:              DWORD;
     dwSpoof:             DWORD;
     dwReserved1:         DWORD;
     dwReserved2:         DWORD;
     liSyn:               LARGE_INTEGER;
     liTotalLogged:       LARGE_INTEGER;
     dwLostLogEntries:    DWORD;
     FilterInfo:          Array [0..0] of PF_FILTER_STATS;
  end;
  PF_INTERFACE_STATS      =  _PF_INTERFACE_STATS;
  PPF_INTERFACE_STATS     =  ^PF_INTERFACE_STATS;

type
  _PF_LATEBIND_INFO       =  packed record
     SrcAddr:             PByteArray;
     DstAddr:             PByteArray;
     Mask:                PByteArray;
  end;
  PF_LATEBIND_INFO        =  _PF_LATEBIND_INFO;
  PPF_LATEBIND_INFO       =  ^PF_LATEBIND_INFO;

type
  _PFLOGFRAME             =  packed record
     Timestamp:           LARGE_INTEGER;
     pfeTypeOfFrame:      PFFRAMETYPE;
     dwTotalSizeUsed:     DWORD;
     dwFilterRule:        DWORD;
     wSizeOfAdditionalData:Word;
     wSizeOfIpHeader:     Word;
     dwInterfaceName:     DWORD;
     dwIPIndex:           DWORD;
     bPacketData:         Array [0..0] of Byte;
  end;
  PFLOGFRAME              =  _PFLOGFRAME;
  PPFLOGFRAME             =  ^PFLOGFRAME;

const
  FILTER_PROTO_ANY        =  $00;
  FILTER_PROTO_ICMP       =  $01;
  FILTER_PROTO_TCP        =  $06;
  FILTER_PROTO_UDP        =  $11;
  FILTER_TCPUDP_PORT_ANY  =  $00;

const
  FILTER_ICMP_TYPE_ANY    =  $FF;
  FILTER_ICMP_CODE_ANY    =  $FF;

const
  FD_FLAGS_NOSYN          =  $01;
  FD_FLAGS_ALLFLAGS       =  FD_FLAGS_NOSYN;

const
  LB_SRC_ADDR_USE_SRCADDR_FLAG  =  $00000001;
  LB_SRC_ADDR_USE_DSTADDR_FLAG  =  $00000002;
  LB_DST_ADDR_USE_SRCADDR_FLAG  =  $00000004;
  LB_DST_ADDR_USE_DSTADDR_FLAG  =  $00000008;
  LB_SRC_MASK_LATE_FLAG         =  $00000010;
  LB_DST_MASK_LATE_FLAG         =  $00000020;

const
  ERROR_BASE                    =  23000;
  PFERROR_NO_PF_INTERFACE       =  (ERROR_BASE + 0); // never returned.
  PFERROR_NO_FILTERS_GIVEN      =  (ERROR_BASE + 1);
  PFERROR_BUFFER_TOO_SMALL      =  (ERROR_BASE + 2);
  ERROR_IPV6_NOT_IMPLEMENTED    =  (ERROR_BASE + 3);

////////////////////////////////////////////////////////////////////////////////
//
// Filter functions exported by IPHLPAPI
//
////////////////////////////////////////////////////////////////////////////////
function   PfCreateInterface(
           dwName:           DWORD;
           inAction:         PFFORWARD_ACTION;
           outAction:        PFFORWARD_ACTION;
           bUseLog:          BOOL;
           bMustBeUnique:    BOOL;
           var ppInterface:  INTERFACE_HANDLE): DWORD;
           stdcall; external IPHLPAPI name '_PfCreateInterface@24';

function   PfDeleteInterface(
           pInterface:       INTERFACE_HANDLE): DWORD;
           stdcall; external IPHLPAPI name '_PfDeleteInterface@4';

function   PfAddFiltersToInterface(
           ih:               INTERFACE_HANDLE;
           cInFilters:       DWORD;
           pfiltIn:          PPF_FILTER_DESCRIPTOR;
           cOutFilters:      DWORD;
           pfiltOut:         PPF_FILTER_DESCRIPTOR;
           pfHandle:         PFILTER_HANDLE): DWORD;
           stdcall; external IPHLPAPI name '_PfAddFiltersToInterface@24';

function   PfRemoveFiltersFromInterface(
           ih:               INTERFACE_HANDLE;
           cInFilters:       DWORD;
           pfiltIn:          PPF_FILTER_DESCRIPTOR;
           cOutFilters:      DWORD;
           pfiltOut:         PPF_FILTER_DESCRIPTOR): DWORD;
           stdcall; external IPHLPAPI name '_PfRemoveFiltersFromInterface@20';

function   PfRemoveFilterHandles(
           pInterface:       INTERFACE_HANDLE;
           cFilters:         DWORD;
           pvHandles:        PFILTER_HANDLE): DWORD;
           stdcall; external IPHLPAPI name '_PfRemoveFilterHandles@12';

function   PfUnBindInterface(
           pInterface:       INTERFACE_HANDLE): DWORD;
           stdcall; external IPHLPAPI name '_PfUnBindInterface@4';

function   PfBindInterfaceToIndex(
           pInterface:       INTERFACE_HANDLE;
           dwIndex:          DWORD;
           pfatLinkType:     PFADDRESSTYPE;
           LinkIPAddress:    PByteArray): DWORD;
           stdcall; external IPHLPAPI name '_PfBindInterfaceToIndex@16';

function   PfBindInterfaceToIPAddress(
           pInterface:       INTERFACE_HANDLE;
           pfatLinkType:     PFADDRESSTYPE;
           IPAddress:        PByteArray): DWORD;
           stdcall; external IPHLPAPI name '_PfBindInterfaceToIPAddress@12';

function   PfRebindFilters(
           pInterface:       INTERFACE_HANDLE;
           pLateBindInfo:    PPF_LATEBIND_INFO): DWORD;
           stdcall; external IPHLPAPI name '_PfRebindFilters@8';

function   PfAddGlobalFilterToInterface(
           pInterface:       INTERFACE_HANDLE;
           gfFilter:         GLOBAL_FILTER): DWORD;
           stdcall; external IPHLPAPI name '_PfAddGlobalFilterToInterface@8';

function   PfRemoveGlobalFilterFromInterface(
           pInterface:       INTERFACE_HANDLE;
           gfFilter:         GLOBAL_FILTER): DWORD;
           stdcall; external IPHLPAPI name '_PfRemoveGlobalFilterFromInterface@8';

////////////////////////////////////////////////////////////////////////////////
//
// Log APIs. Note that there is at most one log and it must be created
// before any interface needing it is created. There is no way to set a
// log onto an existing interface. The log can be applied to any or all of
// the interfaces.
//
///////////////////////////////////////////////////////////////////////
function   PfMakeLog(
           hEvent:           THandle): DWORD;
           stdcall; external IPHLPAPI name '_PfMakeLog@4';

function   PfSetLogBuffer(
           pbBuffer:         PByteArray;
           dwSize:           DWORD;
           dwThreshold:      DWORD;
           dwEntries:        DWORD;
           pdwLoggedEntries: PDWORD;
           pdwLostEntries:   PDWORD;
           pdwSizeUsed:      PDWORD): DWORD;
           stdcall; external IPHLPAPI name '_PfSetLogBuffer@28';

function   PfDeleteLog(
           ): DWORD;
           stdcall; external IPHLPAPI name '_PfDeleteLog@0';

////////////////////////////////////////////////////////////////////////////////
//
// Get statistics. Note pdwBufferSize in an IN/OUT parameter. If
// ERROR_INSUFFICIENT_BUFFER is returned, the common statistics are
// available and the correct byte count is in *pdwBufferSize. If only the
// interface statistics are needed, provide a buffer of size
// PF_INTERFACE_STATS only. If the filter descriptions are also needed,
// then supply a large buffer, or use the returned count from the first call
// to allocate a buffer of sufficient size. Note that for a shared interface,
// this second call may fail with ERROR_INSUFFICIENT_BUFFER. This can happen
// if the other sharers add filters in the interim. This should not happen for
// a UNIQUE interface.
//
////////////////////////////////////////////////////////////////////////////////
function   PfGetInterfaceStatistics(
           pInterface:       INTERFACE_HANDLE;
           ppfStats:         PPF_INTERFACE_STATS;
           pdwBufferSize:    PDWORD;
           fResetCounters:   BOOL): DWORD;
           stdcall; external IPHLPAPI name '_PfGetInterfaceStatistics@16';

////////////////////////////////////////////////////////////////////////////////
//
// Test a packet. This call will evaluate the packet against the given
// interfaces and return the filtering action.
//
////////////////////////////////////////////////////////////////////////////////
function   PfTestPacket(
           pInInterface:     INTERFACE_HANDLE;
           pOutInterface:    INTERFACE_HANDLE;
           cBytes:           DWORD;
           pbPacket:         PByteArray;
           ppAction:         PPFFORWARD_ACTION): DWORD;
           stdcall; external IPHLPAPI name '_PfTestPacket@20';

implementation

end.

Answer : fltdefs.h source, used by Russell (rllibby)

DNS is located in your Domain Controller for people on your domain (network).  Whomever hosts your external DNS whether your ISP or something like Network Solutions you would have to find out.

If you change OWA without updating the DNS records though your users will be unable to find OWA as DNS is how computers find stuff on the internet.  

Thanks
Random Solutions  
 
programming4us programming4us