File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,16 @@ while true do
40
40
for k , v in pairs (info ) do
41
41
if k == ' flags' or k == ' change' then
42
42
print (k .. ' :' , string.format (' 0x%x' , v ))
43
+ elseif k == ' type' then
44
+ if v == socket .ARPHRD_ETHER then
45
+ print (k .. ' :' , ' ether' )
46
+ elseif v == socket .ARPHRD_LOOPBACK then
47
+ print (k .. ' :' , ' loopback' )
48
+ elseif v == socket .ARPHRD_IEEE80211_RADIOTAP then
49
+ print (k .. ' :' , ' ieee802.11/radiotap' )
50
+ else
51
+ print (k .. ' :' , v )
52
+ end
43
53
else
44
54
print (k .. ' :' , v )
45
55
end
Original file line number Diff line number Diff line change @@ -1136,6 +1136,8 @@ int luaopen_eco_core_socket(lua_State *L)
1136
1136
lua_add_constant (L , "ETH_P_ALL" , ETH_P_ALL );
1137
1137
1138
1138
lua_add_constant (L , "ARPHRD_ETHER" , ARPHRD_ETHER );
1139
+ lua_add_constant (L , "ARPHRD_LOOPBACK" , ARPHRD_LOOPBACK );
1140
+ lua_add_constant (L , "ARPHRD_IEEE80211_RADIOTAP" , ARPHRD_IEEE80211_RADIOTAP );
1139
1141
1140
1142
lua_add_constant (L , "ARPOP_REQUEST" , ARPOP_REQUEST );
1141
1143
lua_add_constant (L , "ARPOP_REPLY" , ARPOP_REPLY );
You can’t perform that action at this time.
0 commit comments