Deleted Added
full compact
39c39
< * $FreeBSD: head/sys/netgraph/ng_pppoe.c 68876 2000-11-18 15:17:43Z dwmalone $
---
> * $FreeBSD: head/sys/netgraph/ng_pppoe.c 69922 2000-12-12 18:52:14Z julian $
119a120,126
> NGM_PPPOE_SERVICE,
> "pppoe_service",
> &ngpppoe_init_data_state_type,
> NULL
> },
> {
> NGM_PPPOE_COOKIE,
154d160
< ng_pppoe_rcvdata,
527,530d532
< *
< * If this were a device node than this work would be done in the attach()
< * routine and the constructor would return EINVAL as you should not be able
< * to creatednodes that depend on hardware (unless you can add the hardware :)
563a566
> * All other hook names need only be unique. (the framework checks this).
620a624
> case NGM_PPPOE_SERVICE:
655a660,667
>
> /*
> * PPPOE_SERVICE advertisments are set up
> * on sessions that are in PRIMED state.
> */
> if (msg->header.cmd == NGM_PPPOE_SERVICE) {
> break;
> }
738d749
<
773a785,803
> case NGM_PPPOE_SERVICE:
> /*
> * Check the session is primed.
> * for now just allow ONE service to be advertised.
> * If you do it twice you just overwrite.
> */
> if (sp->state |= PPPOE_PRIMED) {
> printf("pppoe: Session not primed\n");
> LEAVE(EISCONN);
> }
> neg->service.hdr.tag_type = PTT_SRV_NAME;
> neg->service.hdr.tag_len =
> htons((u_int16_t)ourmsg->data_len);
>
> if (ourmsg->data_len)
> bcopy(ourmsg->data, neg->service.data,
> ourmsg->data_len);
> neg->service_len = ourmsg->data_len;
> break;
831c861
< struct mbuf **ret_m, meta_p *ret_meta)
---
> struct mbuf **ret_m, meta_p *ret_meta, struct ng_mesg **resp)
1270a1301,1311
> /*
> * If we have a NULL service request
> * and have an extra service defined in this hook,
> * then also add a tag for the extra service.
> * XXX this is a hack. eventually we should be able
> * to support advertising many services, not just one
> */
> if (((tag == NULL) || (tag->tag_len == 0))
> && (neg->service.hdr.tag_len != 0)) {
> insert_tag(sp, &neg->service.hdr); /* SERVICE */
> }
1274d1314
< /* XXX maybe put the tag in the session store */
1585a1626,1627
> if (msg == NULL)
> return (ENOMEM);
1588c1630
< error = ng_send_msg(sp->hook->node, msg, sp->creator, NULL);
---
> error = ng_send_msg(sp->hook->node, msg, sp->creator, NULL, NULL, NULL);