func NewHeader(r io.Reader) (Header, error) {
	raw, err := NewRawHeader(r)
	if err != nil {
		return Header{}, err
	}

	h := raw.Header()
	numOptionBytes := (int(h.IHL) - 5) * 8
	if numOptionBytes < 0 {
		return h, ErrInvalidIHL
	} else if numOptionBytes > 0 {
		h.Options = make([]byte, numOptionBytes)
		_, err = r.Read(h.Options)
	}

	return h, err
}
// NewHeader reads a header from a Reader.
NewHeader reads a header from a Reader.
// NewHeader reads a header from a Reader .
func NewHeader(r io.Reader) (Header, error) {
	raw, err := NewRawHeader(r)
	if err != nil {
		return Header{}, err
	}
	h := raw.Header()
	numOptionBytes := (int(h.IHL) - 5) * 8
	if numOptionBytes < 0 {
		return h, ErrInvalidIHL
	} else if numOptionBytes > 0 {
		h.Options = make([]byte, numOptionBytes)
		_, err = r.Read(h.Options)
	}
	return h, err
}
func NewHeader ( r io . Reader ) ( Header , error ) { raw , err := NewRawHeader ( r ) if err != nil { return Header { } , err } h := raw . Header ( ) numOptionBytes := ( int ( h . IHL ) - 5 ) * 8 if numOptionBytes < 0 { return h , ErrInvalidIHL } else if numOptionBytes > 0 { h . Options = make ( [ ] byte , numOptionBytes ) _ , err = r . Read ( h . Options ) } return h , err }
NewHeader reads a header from a Reader.
NewHeader reads a header from a Reader .