Lines Matching full:sg
95 struct sockaddr_ng *const sg = (struct sockaddr_ng *) sbuf; in NgMkSockNode() local
98 strlcpy(sg->sg_data, name, NG_NODESIZ); in NgMkSockNode()
99 sg->sg_family = AF_NETGRAPH; in NgMkSockNode()
100 sg->sg_len = strlen(sg->sg_data) + 1 + NGSA_OVERHEAD; in NgMkSockNode()
101 if (bind(cs, (struct sockaddr *) sg, sg->sg_len) < 0) { in NgMkSockNode()
104 NGLOG("bind(%s)", sg->sg_data); in NgMkSockNode()
140 struct sockaddr_ng *const sg = (struct sockaddr_ng *) sbuf; in NgMkSockNode() local
151 snprintf(sg->sg_data, NG_NODESIZ + 1, "%s:", namebuf); in NgMkSockNode()
152 sg->sg_family = AF_NETGRAPH; in NgMkSockNode()
153 sg->sg_len = strlen(sg->sg_data) + 1 + NGSA_OVERHEAD; in NgMkSockNode()
154 if (connect(ds, (struct sockaddr *) sg, sg->sg_len) < 0) { in NgMkSockNode()
157 NGLOG("connect(%s)", sg->sg_data); in NgMkSockNode()
273 struct sockaddr_ng *const sg = (struct sockaddr_ng *) sgbuf; in NgSendData() local
277 sg->sg_family = AF_NETGRAPH; in NgSendData()
278 strlcpy(sg->sg_data, hook, NG_HOOKSIZ); in NgSendData()
279 sg->sg_len = strlen(sg->sg_data) + 1 + NGSA_OVERHEAD; in NgSendData()
284 _NgDebugSockaddr(sg); in NgSendData()
290 if (sendto(ds, buf, len, 0, (struct sockaddr *) sg, sg->sg_len) < 0) { in NgSendData()
293 NGLOG("sendto(%s)", sg->sg_data); in NgSendData()