0x000E - Firewall (WinCE)

0x000E - Firewall (WinCE) 1:

This module is based on operating system-specific functions and is not automatically supported by all devices. The module is only available for Windows CE and Windows Embedded Compact.

Module for configuring the Windows CE firewall.

Table 0x8nn1 contains general firewall settings. The tables from 0x8nn2 onwards describe the firewall rules.

0x8nn0 – Module Header

SubIndex

Type

Name

Value

Type

Access

00

VAR

Len

 

UNSIGNED16

read-only

01

VAR

Address

0x000E 00nn

UNSIGNED32

read-only

02

VAR

Type

Firewall CE

VISIBLE STRING

read-only

03

VAR

Name

Firewall CE

VISIBLE STRING

read-only

04

VAR

Dev type

0x000E 2710

UNSIGNED32

read-only

0x8nn1 – Firewall Settings

SubIndex

Type

Name

Type

Access

00

VAR

Len

UNSIGNED16

read-only

01

VAR

Activate IPv4

BOOLEAN

read-write

02

VAR

Activate IPv6

BOOLEAN

read-write

03

VAR

Persist

BOOLEAN

read-write

0x8nn2 – Flags

SubIndex

Type

Name

Type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

Flags1 .. Len

UNSIGNED32

read-only

FWF_BLOCK = 01

FWF_ALLOW = 02

FWF_LOG = 04

FWF_INBOUND = 08

FWF_OUTBOUND = 16

FWF_DISABLED = 20

0x8nn3 – Mask

SubIndex

type

name

type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

Mask1 .. Len

ENUM

read-only

FWM_PRIVATE_HOST     = 0x0001

FWM_PUBLIC_HOST     = 0x0002

FWM_PORT         = 0x0004

FWM_TYPE         = 0x0008

FWM_CODE         = 0x0010

FWM_PROTOCOL     = 0x0020

FWM_ACTION     = 0x0040

FWM_TIME_OF_DAY     = 0x0080 (not supported)

FWM_DAY_OF_WEEK     = 0x0100 (not supported)

FWM_DAY         = 0x0200 (not supported)

FWM_MONTH        = 0x0400 (not supported)

FWM_PUBLIC_HOST_MASK = 0x0800

FWM_PUBLIC_HOST_PREFIX = 0x1000

0x8nn4 – Private Host

SubIndex

type

name

type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

IP String 1 .. Len

VISIBLE STRING

read-only

Only valid if the flags (0x8nn2) contain FWM_PRIVATE_HOST.

0x8nn5 – Public Host

SubIndex

type

name

type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

IP String 1 .. Len

VISIBLE STRING

read-only

Only valid if the flags (0x8nn2) contain FWM_PUBLIC_HOST. The content is then a textual representation of an IPv4 or IPv6 address (depending on the protocol type that is specified in 0x8nn6).

0x8nn6 – Public Host Mask

SubIndex

type

name

type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

Mask1 .. Len

VISIBLE STRING

read-only

Only valid if the flags (0x8nn2) contain FWM_PUBLIC_HOST_MASK. If this is an IPv4 rule, this is the subnet mask. If this is an IPv6 rule, this is the "prefix length".

0x8nn7 – protocol

SubIndex

type

name

type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

Protocol 1 .. Len

UNSIGNED32

read-only

Only valid if the flags (0x8nn2) contain FWM_PROTOCOL.

0x8nn8 – Action

SubIndex

type

name

type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

Action 1 .. Len

ENUM

read-only

BLOCK = 0x01 ALLOW = 0x02 ALLOW_RESPONSE = 0x03

0x8nn9 – port area

SubIndex

type

name

type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

Protocol 1 .. Len

UNSIGNED32

read-only

Only valid if the flags (0x8nn2) contain FWM_PORT. Hiword is Max Port; Loword is Min Port. Max Port must be greater than or equal to Min Port.

0x8nnA – Type & Code

SubIndex

type

name

type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

Protocol 1.. Len

UNSIGNED16

read-only

Hibyte is code; lobyte is type. The validity depends on the flags FWM_TYPE and FWM_CODE (0x8nn2).

0x8nnB – description

SubIndex

type

name

type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

Description 1 .. Len

VISIBLE STRING

read-only

0x8nnC – UID

SubIndex

type

name

type

Access

00

VAR

Len

UNSIGNED16

read-only

01 .. Len

VAR

UID 1 .. Len

UNSIGNED32

read-only

Service transfer objects

0xBnn0 – Add Rule (Service Transfer Object)

InputData

type

name

UNSIGNED32

cbData

UNSIGNED32

Flags

UNSIGNED32

Mask

union { char szPrivateHost[8*5]; WORD family; };

If FWF_PRIVATE_HOST is set this is the Private host Ip Address. Otherwise this is the Address Family to which the rule applies (AF_INET or AF_INET6)

Char[8*5]

Public Host IP

union { BYTE b[4]; UINT publicHostPrefixLength; };

If FWM_PUBLIC_HOST_MASK is set this is the public host mask for an IPv4 Address. If FWM_PUBLIC_HOST_PREFIX is set this is the public host prfix length for an IPv6 Address.

UNSIGNED32

Protocol

UNSIGNED32

Actions

UNSIGNED32

PortRange (HIWORD = max | LOWORD = min)

UNSIGNED16

type & Code (HBYTE = code | LOBYTE = type)

UNSIGNED32

DescriptionLen

char[DescriptionLen]

szDescription

0xBnn1 – Delete Rule (Service Transfer Object)

InputData

type

name

UNSIGNED32

UId (From Table 8x8nnC)