func (r PFRule) Format() string {
	hostip := ""
	if r.HostIP != nil {
		hostip = r.HostIP.String()
	}
	guestip := ""
	if r.GuestIP != nil {
		guestip = r.GuestIP.String()
	}
	return fmt.Sprintf("%s,%s,%d,%s,%d", r.Proto, hostip, r.HostPort, guestip, r.GuestPort)
}
Format returns the string needed as a command-line argument to VBoxManage.
package driver
import (
	"fmt"
	"net"
)
type PFRule struct {
	Proto     PFProto
	HostIP    net.IP  
	HostPort  uint16
	GuestIP   net.IP  
	GuestPort uint16
}
type PFProto string
const (
	PFTCP = PFProto("tcp")
	PFUDP = PFProto("udp")
)
func (r PFRule) String() string {
	hostip := ""
	if r.HostIP != nil {
		hostip = r.HostIP.String()
	}
	guestip := ""
	if r.GuestIP != nil {
		guestip = r.GuestIP.String()
	}
	return fmt.Sprintf("%s://%s:%d --> %s:%d",
		r.Proto, hostip, r.HostPort,
		guestip, r.GuestPort)
}