Ask Your Question

TingHsu's profile - activity

2024-04-17 12:47:17 +0000 received badge  Notable Question (source)
2022-05-13 16:09:30 +0000 received badge  Popular Question (source)
2020-12-09 15:19:18 +0000 received badge  Famous Question (source)
2020-03-06 05:17:26 +0000 received badge  Popular Question (source)
2020-03-06 05:17:26 +0000 received badge  Notable Question (source)
2018-07-12 05:37:31 +0000 asked a question Disable protocol and decoded by my lua script

Disable protocol and decoded by my lua script Hi I got an question , can I disable IEEE 802.11 protocol and write a lua

2018-07-09 02:59:03 +0000 commented question Can I change the frame's color every cycle?

Yes , I want exactly what you mentioned

2018-07-09 02:41:43 +0000 edited question Can I change the frame's color every cycle?

Can I change the frame's color every cycle? Hi I like to know if is it possible that I can change the frame's color ever

2018-07-09 02:40:09 +0000 commented question Can I change the frame's color every cycle?

Yes, I would like to have different background color the picture is just an example to explain the situation , I apologi

2018-07-06 08:45:36 +0000 edited question Can I change the frame's color every cycle?

Can I change the frame's color every cycle? Hi I like to know if is it possible that I can change the frame's color ever

2018-07-06 08:45:36 +0000 received badge  Editor (source)
2018-07-06 08:44:57 +0000 asked a question Can I change the frame's color every cycle?

Can I change the frame's color every cycle? Hi I like to know if is it possible that I can change the frame's color ever

2018-06-29 08:34:18 +0000 marked best answer lua script for 80211ah

Hi I am currently trying to write a Lua dissector as a plugin on wireshark, but a problem came out String[......]:3:Bad argument #2 to 'Proto' (Proto_new:there can not be two protocols with the same description)

here are my codes, please help me to fix this problem ,thanks a lot!!

do
--Create a new dissector 
PROTO_80211ah = Proto("80211ah","IEEE80211ah")


--IEEE 802.11ah QoS Data
local f_80211ah_Type                = ProtoField.bytes("80211ah.Type","Type")
local f_80211ah_FrameControlField       = ProtoField.bytes("80211ah.FrameControlField","FrameControlField")
--local f_80211ah_Duration          = ProtoField.bytes("80211ah.Duration","Duration")
local f_80211ah_ReceiverAddress         = ProtoField.bytes("80211ah.ReceiverAddress","ReceiverAddress")
local f_80211ah_DestinationAddress      = ProtoField.bytes("80211ah.DestinationAddress","DestinationAddress")
local f_80211ah_TransmitterAddress      = ProtoField.bytes("80211ah.TransmitterAddress","TransmitterAddress")
local f_80211ah_SourceAddress           = ProtoField.bytes("80211ah.SourceAddress","SourceAddress")
local f_80211ah_BSSID               = ProtoField.bytes("80211ah.BSSID","BSSID" )
local f_80211ah_StaAddress          = ProtoField.bytes("80211ah.StaAddress","StaAddress")
--local f_80211ah_FragmentNumber        = ProtoField.bytes("80211ah.FragmentNumber","FragmentNumber")
--local f_80211ah_SequenceNumber        = ProtoField.bytes("80211ah.SequenceNumber","SequenceNumber")
local f_80211ah_QoSControl          = ProtoField.bytes("80211ah.QoSControl","QoSControl")

local f_80211ah_LogicLinkControl        = ProtoField.bytes("80211ah.LogicLinkControl","LogicLinkControl")

--Internet Protocol Version 4 
local f_80211ah_DifferentiatedServicesField     = ProtoField.bytes("80211ah.DifferentiatedServicesField","DifferentiatedServicesField")
local f_80211ah_TotalLength         = ProtoField.bytes("80211ah.TotalLength","TotalLength")
local f_80211ah_Identification          = ProtoField.bytes("80211ah.Identification","Identification")
local f_80211ah_Flags               = ProtoField.bytes("80211ah.Flags","Flags")
local f_80211ah_FragmentOffest          = ProtoField.bytes("80211ah.FragmentOffest","FragmentOffest")
local f_80211ah_TimeToLive          = ProtoField.bytes("80211ah.TimeToLive","TimeToLive")
local f_80211ah_Protocol            = ProtoField.bytes("80211ah.Protocol","Protocol")
local f_80211ah_HeaderChecksum          = ProtoField.bytes("80211ah.HeaderChecksum","HeaderChecksum")
local f_80211ah_Source              = ProtoField.bytes("80211ah.Source","Source")
local f_80211ah_Destination         = ProtoField.bytes("80211ah.Destination","Destination")

--802.11ah Protocol
local f_80211ah_SourcePort          = ProtoField.bytes("80211ah.SourcePort","SourcePort")
local f_80211ah_DestinationPort         = ProtoField.bytes("80211ah.DestinationPort","DestinationPort")
local f_80211ah_Length              = ProtoField.bytes("80211ah.Length","Length")


PROTO_80211ah.fields={f_80211ah_Type,f_80211ah_FrameControlField, f_80211ah_Duration, f_80211ah_ReceiverAddress, f_80211ah_DestinationAddress, f_80211ah_TransmitterAddress, f_80211ah_SourceAddress, f_80211ah_BSSID, f_80211ah_StaAddress, f_80211ah_FragmentNumber, f_80211ah_SequenceNumber, f_80211ah_QoSControl, f_80211ah_LogicLinkControl, f_80211ah_DifferentiatedServicesField, f_80211ah_TotalLength, f_80211ah_Identification, f_80211ah_Flags, f_80211ah_FragmentOffest, f_80211ah_TimeToLive, f_80211ah_Protocol, f_80211ah_HeaderChecksum, f_80211ah_Source, f_80211ah_Destination, f_80211ah_SourcePort, f_80211ah_DestinationPort, f_80211ah_Length}

local data_dis = Dissector.get("data")
--The Dissector function
function PROTO_80211ah.dissector (buffer,pinfo,tree)
    length = buffer:len()
    if length == 0 then return end


    --show protocol name in protocol column
    pinfo.cols.protocol = PROTO_80211ah.name

    local subtree = tree:add(PROTO_80211ah, buffer(), "80211ah Protocol Data")

    --dissect field one by one , and add to protocol tree

    subtree:add_le(Type,buffer(0,1))
    subtree:add_le(FrameControlField,buffer(0,2))
    subtree:add_le(Duration,buffer(3,4))
    subtree:add_le(ReceiverAddress,buffer(5,10))
    subtree:add_le(DestinationAddress,buffer(17,22))
    subtree:add_le(TransmitterAddress,buffer(11,16))
    subtree:add_le(SourceAddress,buffer(11,16))
    subtree:add_le(BSSID,buffer(5,10))
    subtree:add_le(StaAddress,buffer(11,16))    
    subtree:add_le(FragmentNumber,buffer(23,24))
    subtree:add_le(SequenceNumber,buffer(23,24))
    subtree:add_le(QoSControl,buffer(25,26))
    subtree:add_le(LogicalLinkControl,buffer(27,34))    
    subtree:add_le(version,buffer(34,35))
    subtree:add_le(HeaderLength,buffer(34,35))
    subtree:add_le(DifferentiatedServicesField,buffer(35,36))
    subtree:add_le(TotalLength,buffer(37,38))
    subtree:add_le(Identification,buffer(39,40))
    subtree:add_le(Flags,buffer(41,41))
    subtree:add_le(FragmentOffset,buffer(41,42))
    subtree:add_le(TimeToLive,buffer(43,43))
    subtree:add_le(Protocol,buffer(44,44))
    subtree:add_le(HeaderChecksum,buffer(45,46))
    subtree:add_le(Source,buffer(47,50))
    subtree:add_le(Destination,buffer(51,54))
    subtree:add_le(SourcePort,buffer(55,56))
    subtree:add_le(DestinationPort,buffer(57,58))
    subtree:add_le ...
(more)
2018-06-29 08:34:18 +0000 received badge  Scholar (source)
2018-06-29 08:34:12 +0000 commented answer lua script for 80211ah

YES you're right there is a bug with 2.2.6 Thanks you so much !!!!

2018-06-29 02:53:36 +0000 commented answer lua script for 80211ah

I use version 2.2.6 in ns-3 This is my github link text

2018-06-29 02:14:56 +0000 commented answer lua script for 80211ah

@cmaynard hello thanks for your reply could you give me your email address I want to show you some screen shots thank

2018-06-29 02:06:19 +0000 commented answer lua script for 80211ah

@cmaynard Yes I've searched both way and there is only one plugin/protocol called 80211ah may I ask you what system do

2018-06-28 14:06:35 +0000 commented answer lua script for 80211ah

@grahamb Hello sir First thank you for helping me about the codes but the problem still occur Can you give me your e

2018-06-21 02:29:48 +0000 commented answer lua script for 80211ah

Hi this dissector is the only one i have in Wireshark and there wasn't any protocol description as the same as "IEEE8

2018-06-14 02:34:59 +0000 asked a question lua script for 80211ah

lua script for 80211ah Hi I am currently trying to write a Lua dissector as a plugin on wireshark, but a problem came o