Slips
Stratosphere Linux IPS
Loading...
Searching...
No Matches
StratosphereLinuxIPS.modules.p2ptrust.p2ptrust Namespace Reference

Classes

class  Trust
 

Functions

(str, int) validate_slips_data (str message_data)
 

Function Documentation

◆ validate_slips_data()

(str, int) StratosphereLinuxIPS.modules.p2ptrust.p2ptrust.validate_slips_data ( str  message_data)
Check that message received from p2p_data_request channel has correct
format:  json serialized {
                'ip': str(saddr),
                'profileid' : str(profileid),
                'twid' :  str(twid),
                'proto' : str(proto),
                'ip_state' : 'srcip',
                'stime': starttime,
                'uid': uid,
                'cache_age': cache_age
            }

If the message is correct, the two values are returned as a tuple (str, int).
If not, (None, None) is returned.
:param message_data: data from slips request channel
:return: the received msg or None tuple