// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package ipv6

import (
	
	
	
)

var (
	errInvalidConn     = errors.New("invalid connection")
	errMissingAddress  = errors.New("missing address")
	errHeaderTooShort  = errors.New("header too short")
	errInvalidConnType = errors.New("invalid conn type")
	errNotImplemented  = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)
)

func boolint( bool) int {
	if  {
		return 1
	}
	return 0
}

func netAddrToIP16( net.Addr) net.IP {
	switch v := .(type) {
	case *net.UDPAddr:
		if  := .IP.To16();  != nil && .To4() == nil {
			return 
		}
	case *net.IPAddr:
		if  := .IP.To16();  != nil && .To4() == nil {
			return 
		}
	}
	return nil
}

func opAddr( net.Addr) net.Addr {
	switch .(type) {
	case *net.TCPAddr:
		if  == nil {
			return nil
		}
	case *net.UDPAddr:
		if  == nil {
			return nil
		}
	case *net.IPAddr:
		if  == nil {
			return nil
		}
	}
	return 
}