func CreateIface() (*Interface, error) {
	iface, err := TapInterface()
	if err == nil {
		iface.ParseIP(10, 0, 40, 1)
		iface.Up()
	}
	return iface, err
}
CreateIface creates network interface
package main
import (
	"fmt"
	"golang.org/x/net/icmp"
	"github.com/codegangsta/cli"
)
func RunServer(c *cli.Context) {
	iface, err := CreateIface()
	if err != nil {
		panic(fmt.Sprintf("creating interface error: %v\n", err))
	}
	defer iface.Close()
	conn, err := ListenICMP()
	if err != nil {
		panic(fmt.Sprintf("listen icmp packet error: %v\n", err))
	}
	defer conn.Close()
	data := make(chan []byte)
	go func() {
		for {
			buffer := make([]byte, 1522)
			_, err := iface.Read(buffer)
			if err == nil {
				data <- buffer
			}
		}
	}()
	for {
		select {
		case buffer := <-data:
			fmt.Println(string(buffer[:]))
		}
	}
}