code: func WithLibnetwork(daemon *Daemon, c *container.Container) coci.SpecOpts {
  	return func(ctx context.Context, _ coci.Client, _ *containers.Container, s *coci.Spec) error {
  		if s.Hooks == nil {
  			s.Hooks = &specs.Hooks{}
  		}
  		for _, ns := range s.Linux.Namespaces {
  			if ns.Type == "network" && ns.Path == "" && !c.Config.NetworkDisabled {
  				target := filepath.Join("/proc", strconv.Itoa(os.Getpid()), "exe")
  				s.Hooks.Prestart = append(s.Hooks.Prestart, specs.Hook{
  					Path: target,
  					Args: []string{
  						"libnetwork-setkey",
  						"-exec-root=" + daemon.configStore.GetExecRoot(),
  						c.ID,
  						daemon.netController.ID(),
  					},
  				})
  			}
  		}
  		return nil
  	}
  }
docs: // WithLibnetwork sets the libnetwork hook