func (ConnRes) Service() ServiceID {
	return ConnResService
}
Service returns the service identifier for connection responses.
package knxnet
import (
	"errors"
	"github.com/vapourismo/knx-go/knx/util"
)
type TunnelLayer uint8
const (
	TunnelLayerData TunnelLayer = 0x02
	TunnelLayerRaw TunnelLayer = 0x04
	TunnelLayerBusmon TunnelLayer = 0x80
)
type ConnReq struct {
	Control HostInfo
	Tunnel  HostInfo
	Layer   TunnelLayer
}
func (ConnReq) Service() ServiceID {
	return ConnReqService
}
var hostInfoSize = HostInfo{}.Size()
func (ConnReq) Size() uint {
	return 2*hostInfoSize + 4
}
func (req *ConnReq) Pack(buffer []byte) {
	util.PackSome(buffer, &req.Control, &req.Tunnel)
	buffer = buffer[2*hostInfoSize:]
	buffer[0] = 4
	buffer[1] = 4
	buffer[2] = byte(req.Layer)
	buffer[3] = 0
}
func (req *ConnReq) Unpack(data []byte) (n uint, err error) {
	var length, connType, reserved uint8
	n, err = util.UnpackSome(
		data, &req.Control, &req.Tunnel, &length, &connType, (*uint8)(&req.Layer), &reserved,
	)
	if err != nil {
		return
	}
	if length != 4 {
		return n, errors.New("Invalid connection request info structure length")
	}
	if connType != 4 {
		return n, errors.New("Invalid connection type")
	}
	return
}
type ConnRes struct {
	Channel uint8
	Status  ErrCode
	Control HostInfo
}