mwifiex/mxm_wifiex/wlan_src/mapp/mlanconfig/config/mef.conf

168 lines
6.5 KiB
Text
Raw Normal View History

# File : mef.conf
######################### MEF Configuration command ##################
mefcfg={
#Criteria: bit0-broadcast, bit1-unicast, bit3-multicast
Criteria=2 # Unicast frames are received during hostsleepmode
NumEntries=1 # Number of activated MEF entries
#mef_entry_0: example filters to match TCP destination port 80 send by 192.168.0.88 pkt or magic pkt.
mef_entry_0={
#mode: bit0--hostsleep mode, bit1--non hostsleep mode
mode=1 # HostSleep mode
#action: 0--discard and not wake host, 1--discard and wake host 3--allow and wake host
action=3 # Allow and Wake host
filter_num=3 # Number of filter
#RPN only support "&&" and "||" operator,space can not be removed between operator.
RPN=Filter_0 && Filter_1 || Filter_2
#Byte comparison filter's type is 0x41,Decimal comparison filter's type is 0x42,
#Bit comparison filter's type is 0x43
#Filter_0 is decimal comparison filter, it always with type=0x42
#Decimal filter always has type, pattern, offset, numbyte 4 field
#Filter_0 will match rx pkt with TCP destination port 80
Filter_0={
type=0x42 # decimal comparison filter
pattern=80 # 80 is the decimal constant to be compared
offset=44 # 44 is the byte offset of the field in RX pkt to be compare
numbyte=2 # 2 is the number of bytes of the field
}
#Filter_1 is Byte comparison filter, it always with type=0x41
#Byte filter always has type, byte, repeat, offset 4 filed
#Filter_1 will match rx pkt send by IP address 192.168.0.88
Filter_1={
type=0x41 # Byte comparison filter
repeat=1 # 1 copies of 'c0:a8:00:58'
byte=c0:a8:00:58 # 'c0:a8:00:58' is the byte sequence constant with each byte
# in hex format, with ':' as delimiter between two byte.
offset=34 # 34 is the byte offset of the equal length field of rx'd pkt.
}
#Filter_2 is Magic packet, it will looking for 16 contiguous copies of '00:50:43:20:01:02' from
# the rx pkt's offset 14
Filter_2={
type=0x41 # Byte comparison filter
repeat=16 # 16 copies of '00:50:43:20:01:02'
byte=00:50:43:20:01:02 # '00:50:43:20:01:02' is the byte sequence constant
offset=14 # 14 is the byte offset of the equal length field of rx'd pkt.
}
}
}
#--------------------------examples for MEF filters--------------------------------
# example: filters to match ARP packet with protocol addr 192.168.0.104
# mef_entry_0={
# mode=1 # HostSleep mode
# action=3 # Allow and Wake host
# filter_num=3 # Number of filter
# RPN=Filter_0 && Filter_1 && Filter_2
# #Filter_0 looking for rx pkt with DA is broadcast address
# Filter_0={
# type=0x41
# repeat=6
# byte=ff
# offset=0
# }
# #Filter_1 looking for rx pkt with EtherType is 0x0806(ARP)
# Filter_1={
# type=0x41
# repeat=1
# byte=08:06
# offset=20
# }
# #Filter_2 looking for rx pkt with ARP target protocol addr 192.168.0.104
# Filter_2={
# type=0x41
# repeat=1
# byte=c0:a8:00:68
# offset=46
# }
# }
#-------------------------------------------------------------------------------------
# example: filter to check if the destination MAC address is unicast pkt
# mef_entry_0={
# mode=1 # HostSleep mode
# action=3 # Allow and Wake host
# filter_num=3 # Number of filter
# RPN=Filter_0
# #Filter_0 is Bit comparison filter, it always with type=0x43
# #Byte filter always has type, byte, mask, offset 4 filed
# #"byte" is the byte sequence constant with each byte in hex format, with ':' as delimiter between two byte
# #"mask" is also with each byte in hex format, with ':' as delimiter between two byte
# #"byte" should has the same length as "mask"
# #Filter_0 will check if the destination MAC address is unicast pkt
# Filter_0={
# type=0x43 #Bit comparison filter
# byte=00 #00 is the 1-byte sequence constant
# offset=0 #0 is the byte offset of the rx pkt
# mask=01 #1 is the 1-byte mask
# }
# }
#--------------------------------------------------------------------------------------------------
# example: Disable MEF filters
# mefcfg={
# #Criteria: bit0-broadcast, bit1-unicast, bit3-multicast
# Criteria=2 # Unicast frames are received during hostsleepmode
# NumEntries=0 # Number of activated MEF entries
# }
#--------------------------------------------------------------------------------------------------
# example: Test MEF filters
# mefcfg={
# Criteria=1
# NumEntries=1
# mef_entry_0={
# mode=4 # Test Mode
# action=16 # Invoke Test
# filter_num=0
# }
# }
#-----------------------------------------------------------------------------------------------------
# example: Test MEF filters
# mefcfg={
# Criteria=1
# NumEntries=1
# mef_entry_0={
# mode=4
# action=0
# filter_num=1
# RPN=Filter_0
# Filter_0={
# type=0x44 # test filter
# repeat=2 # 2 copies of 'BE:EF'
# byte=BE:EF # 'BE:EF' is the byte sequence constant
# offset=18 # 18 is the byte offset of the equal length field of rx'd pkt.
# dest=00:50:43:20:5a:82 # '00:50:43:20:5a:82' is the byte sequence constant
# }
# }
# }
#----------------------------------------------------------------------------------------------------
#example: Filter broadcast/ipv4 multicast/ipv6 multicast packets in non hostsleep mode
#mefcfg={
# Criteria=9 # broadcast and multicast frames
# NumEntries=1 # Number of activated MEF entries
# mef_entry_0={
# mode=2 # non HostSleep mode
# action=0 # discard and not wake host
# filter_num=3 # Number of filter
# RPN=Filter_0 || Filter_1 || Filter_2
# Filter_0={ # IPV4 multicast
# type=0x41 # byte comparison filter
# byte=01:00:5e # 01:00:5e is the byte constant to be compared
# offset=0 # 0 is the byte offset of the equal length field of rx'd pkt.
# repeat=1 #
# }
# Filter_1={ # broadcast packet check
# type=0x41 # Byte comparison filter
# repeat=6 # 6 copies of 'ff', means broadcast
# byte=ff # 'ff'(0xff) is the byte sequence constant with each byte
# # in hex format, with ':' as delimiter between two byte.
# offset=0 # 0 is the byte offset of the equal length field of rx'd pkt.
# }
# Filter_2={ # IPV6 multicast
# type=0x41 # byte comparison filter
# byte=33:33 # 33:33 is the byte constant to be compared
# offset=0 # 0 is the byte offset of the equal length field of rx'd pkt.
# repeat=1 #
# }
# }
#}
#------------------------------------------------------------------------------------------------------