Research Article

Task-Oriented Network Abnormal Behavior Detection Method

Algorithm 1

Security label extraction algorithm.
Input: IPv4 data packet: ipStream
Output: Security label: secLabel
(1)secLabel = []
(2)if ipStream[0] > 0x45 then
(3) if ipStream [20] = = 0x7f then
(4)  headerLen = (ipStream[0] - 0x40) <<2
(5)  secLabel = ipStream[20, headerLen - 1]
(6) end if
(7)end if
(8)return secLabel