def bpf_select(fds_list, timeout=None):
 bpf_scks_buffered = list()
 select_fds = list()
 for tmp_fd in fds_list:
  if isBPFSocket(tmp_fd):
   if tmp_fd.buffered_frames():
    bpf_scks_buffered.append(tmp_fd)
    continue
  select_fds.append(tmp_fd)
 if len(select_fds):
  if (timeout is None):
   timeout = 0.05
  (ready_list, _, _) = select(select_fds, [], [], timeout)
  return (bpf_scks_buffered + ready_list)
 else:
  return bpf_scks_buffered

def bpf_select ( fds_list , timeout = None ) : bpf_scks_buffered = list ( ) select_fds = list ( ) for tmp_fd in fds_list : if isBPFSocket ( tmp_fd ) : if tmp_fd . buffered_frames ( ) : bpf_scks_buffered . append ( tmp_fd ) continue select_fds . append ( tmp_fd ) if len ( select_fds ) : if ( timeout is None ) : timeout = 0.05 ( ready_list , _ , _ ) = select ( select_fds , [ ] , [ ] , timeout ) return ( bpf_scks_buffered + ready_list ) else : return bpf_scks_buffered
a call to recv() can return several frames .