| 1296 | } |
| 1297 | |
| 1298 | static int |
| 1299 | send_acname(sessp sp, const struct pppoe_tag *tag) |
| 1300 | { |
| 1301 | int error, tlen; |
| 1302 | struct ng_mesg *msg; |
| 1303 | struct ngpppoe_sts *sts; |
| 1304 | |
| 1305 | CTR2(KTR_NET, "%20s: called %d", __func__, sp->Session_ID); |
| 1306 | |
| 1307 | NG_MKMESSAGE(msg, NGM_PPPOE_COOKIE, NGM_PPPOE_ACNAME, |
| 1308 | sizeof(struct ngpppoe_sts), M_NOWAIT); |
| 1309 | if (msg == NULL) |
| 1310 | return (ENOMEM); |
| 1311 | |
| 1312 | sts = (struct ngpppoe_sts *)msg->data; |
| 1313 | tlen = min(NG_HOOKSIZ - 1, ntohs(tag->tag_len)); |
| 1314 | strncpy(sts->hook, (const char *)(tag + 1), tlen); |
| 1315 | sts->hook[tlen] = '\0'; |
| 1316 | NG_SEND_MSG_ID(error, NG_HOOK_NODE(sp->hook), msg, sp->creator, 0); |
| 1317 | |
| 1318 | return (error); |
| 1319 | } |
| 1320 | |
| 1321 | static int |
| 1322 | send_sessionid(sessp sp) |
no test coverage detected