def get_next_slip(raw):
if not is_slip(raw):<EOL><INDENT>return None, raw<EOL><DEDENT>length = raw[<NUM_LIT:1>:].index(SLIP_END)<EOL>slip_packet = decode(raw[<NUM_LIT:1>:length+<NUM_LIT:1>])<EOL>new_raw = raw[length+<NUM_LIT:2>:]<EOL>return slip_packet, new_raw<EOL>
Get the next slip packet from raw data.

Returns the extracted packet plus the raw data with the remaining data stream.