func Check(args *skel.CmdArgs) error {
	conf, result, err := parseConfigFromBytes(args.StdinData)
	if err != nil {
		return err
	}
	if conf.PrevResult == nil {
		return fmt.Errorf("missing prevResult from earlier plugin")
	}
	conf.ContainerID = args.ContainerID
	p := NewPlugin(conf)
	if err := p.Check(conf, result); err != nil {
		return err
	}
	return nil
}
Check initializes an instance of Plugin and performs
necessary checks.
package firewall
import (
	"fmt"
	"github.com/containernetworking/cni/pkg/skel"
	"github.com/containernetworking/cni/pkg/types"
	current "github.com/containernetworking/cni/pkg/types/040"
)
func Add(args *skel.CmdArgs) error {
	conf, result, err := parseConfigFromBytes(args.StdinData)
	if err != nil {
		return err
	}
	if conf.PrevResult == nil {
		return fmt.Errorf("missing prevResult from earlier plugin")
	}
	conf.ContainerID = args.ContainerID
	p := NewPlugin(conf)
	if err := p.Add(conf, result); err != nil {
		return err
	}
	if result == nil {
		result = &current.Result{}
	}
	return types.PrintResult(result, conf.CNIVersion)
}