def _parse_ndp_options(raw, prev, offset=0, buf_len=None):
 _offset = offset
 if (buf_len is None):
  buf_len = len(raw)
 remaining = (buf_len - offset)
 r = []
 while (offset < (buf_len - 2)):
  if (((buf_len - offset) % 8) != 0):
   raise RuntimeError('Bad option data length')
  (offset, o) = NDOptionBase.unpack_new(raw, offset, buf_len, prev=prev)
  r.append(o)
 return (offset, r)

def _parse_ndp_options ( raw , prev , offset = 0 , buf_len = None ) : _offset = offset if ( buf_len is None ) : buf_len = len ( raw ) remaining = ( buf_len - offset ) r = [ ] while ( offset < ( buf_len - 2 ) ) : if ( ( ( buf_len - offset ) % 8 ) != 0 ) : raise RuntimeError ( 'Bad option data length' ) ( offset , o ) = NDOptionBase . unpack_new ( raw , offset , buf_len , prev = prev ) r . append ( o ) return ( offset , r )
parse icmpv6 options and return .