func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error {
	if !c.payloadHandler.ok() {
		return errInvalidConn
	}
	return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on)
}
SetControlMessage sets the per packet IP-level socket options.
package ipv4
import (
	"net"
	"time"
	"golang.org/x/net/internal/socket"
)
type Conn struct {
	genericOpt
}
type genericOpt struct {
	*socket.Conn
}
func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil }
func NewConn(c net.Conn) *Conn {
	cc, _ := socket.NewConn(c)
	return &Conn{
		genericOpt: genericOpt{Conn: cc},
	}
}
type PacketConn struct {
	genericOpt
	dgramOpt
	payloadHandler
}
type dgramOpt struct {
	*socket.Conn
}
func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil }