Exemplo n.º 1
0
static int
ngd_attach(struct socket *so, int proto, struct thread *td)
{
	struct ngpcb *const pcbp = sotongpcb(so);

	if (pcbp != NULL)
		return (EISCONN);
	return (ng_attach_data(so));
}
Exemplo n.º 2
0
static void
ngd_attach(netmsg_t msg)
{
	struct socket *so = msg->attach.base.nm_so;
	struct ngpcb *const pcbp = sotongpcb(so);
	int error;

	if (pcbp != NULL)
		error =  EISCONN;
	else
		error = ng_attach_data(so);
	lwkt_replymsg(&msg->connect.base.lmsg, error);
}