ng_atm.c (121816) | ng_atm.c (123812) |
---|---|
1/* 2 * Copyright (c) 2001-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 * 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 * 29 * Netgraph module to connect NATM interfaces to netgraph. 30 */ 31 32#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2001-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 * 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 * 29 * Netgraph module to connect NATM interfaces to netgraph. 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netgraph/atm/ng_atm.c 121816 2003-10-31 18:32:15Z brooks $"); | 33__FBSDID("$FreeBSD: head/sys/netgraph/atm/ng_atm.c 123812 2003-12-24 18:51:01Z alfred $"); |
34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> 38#include <sys/malloc.h> 39#include <sys/mbuf.h> 40#include <sys/errno.h> 41#include <sys/syslog.h> --- 512 unchanged lines hidden (view full) --- 554 ev->busy ? NGM_HIGH_WATER_PASSED : NGM_LOW_WATER_PASSED, 555 sizeof(struct ngm_queue_state), M_NOWAIT); 556 if (mesg == NULL) 557 break; 558 qstate = (struct ngm_queue_state *)mesg->data; 559 560 /* XXX have to figure out how to get that info */ 561 | 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> 38#include <sys/malloc.h> 39#include <sys/mbuf.h> 40#include <sys/errno.h> 41#include <sys/syslog.h> --- 512 unchanged lines hidden (view full) --- 554 ev->busy ? NGM_HIGH_WATER_PASSED : NGM_LOW_WATER_PASSED, 555 sizeof(struct ngm_queue_state), M_NOWAIT); 556 if (mesg == NULL) 557 break; 558 qstate = (struct ngm_queue_state *)mesg->data; 559 560 /* XXX have to figure out how to get that info */ 561 |
562 NG_SEND_MSG_HOOK(error, node, mesg, vcc->hook, NULL); | 562 NG_SEND_MSG_HOOK(error, node, mesg, vcc->hook, 0); |
563 break; 564 } 565 566 case ATMEV_VCC_CHANGED: 567 { 568 struct atmev_vcc_changed *ev = arg; 569 struct ngm_atm_vcc_change *chg; 570 571 if (priv->manage == NULL) 572 break; 573 NG_MKMESSAGE(mesg, NGM_ATM_COOKIE, NGM_ATM_VCC_CHANGE, 574 sizeof(struct ngm_atm_vcc_change), M_NOWAIT); 575 if (mesg == NULL) 576 break; 577 chg = (struct ngm_atm_vcc_change *)mesg->data; 578 chg->vci = ev->vci; 579 chg->vpi = ev->vpi; 580 chg->state = (ev->up != 0); 581 chg->node = NG_NODE_ID(node); | 563 break; 564 } 565 566 case ATMEV_VCC_CHANGED: 567 { 568 struct atmev_vcc_changed *ev = arg; 569 struct ngm_atm_vcc_change *chg; 570 571 if (priv->manage == NULL) 572 break; 573 NG_MKMESSAGE(mesg, NGM_ATM_COOKIE, NGM_ATM_VCC_CHANGE, 574 sizeof(struct ngm_atm_vcc_change), M_NOWAIT); 575 if (mesg == NULL) 576 break; 577 chg = (struct ngm_atm_vcc_change *)mesg->data; 578 chg->vci = ev->vci; 579 chg->vpi = ev->vpi; 580 chg->state = (ev->up != 0); 581 chg->node = NG_NODE_ID(node); |
582 NG_SEND_MSG_HOOK(error, node, mesg, priv->manage, NULL); | 582 NG_SEND_MSG_HOOK(error, node, mesg, priv->manage, 0); |
583 break; 584 } 585 586 case ATMEV_IFSTATE_CHANGED: 587 { 588 struct atmev_ifstate_changed *ev = arg; 589 struct ngm_atm_if_change *chg; 590 591 if (priv->manage == NULL) 592 break; 593 NG_MKMESSAGE(mesg, NGM_ATM_COOKIE, NGM_ATM_IF_CHANGE, 594 sizeof(struct ngm_atm_if_change), M_NOWAIT); 595 if (mesg == NULL) 596 break; 597 chg = (struct ngm_atm_if_change *)mesg->data; 598 chg->carrier = (ev->carrier != 0); 599 chg->running = (ev->running != 0); 600 chg->node = NG_NODE_ID(node); | 583 break; 584 } 585 586 case ATMEV_IFSTATE_CHANGED: 587 { 588 struct atmev_ifstate_changed *ev = arg; 589 struct ngm_atm_if_change *chg; 590 591 if (priv->manage == NULL) 592 break; 593 NG_MKMESSAGE(mesg, NGM_ATM_COOKIE, NGM_ATM_IF_CHANGE, 594 sizeof(struct ngm_atm_if_change), M_NOWAIT); 595 if (mesg == NULL) 596 break; 597 chg = (struct ngm_atm_if_change *)mesg->data; 598 chg->carrier = (ev->carrier != 0); 599 chg->running = (ev->running != 0); 600 chg->node = NG_NODE_ID(node); |
601 NG_SEND_MSG_HOOK(error, node, mesg, priv->manage, NULL); | 601 NG_SEND_MSG_HOOK(error, node, mesg, priv->manage, 0); |
602 break; 603 } 604 605 case ATMEV_ACR_CHANGED: 606 { 607 struct atmev_acr_changed *ev = arg; 608 struct ngm_atm_acr_change *acr; 609 --- 10 unchanged lines hidden (view full) --- 620 if (mesg == NULL) 621 break; 622 acr = (struct ngm_atm_acr_change *)mesg->data; 623 acr->node = NG_NODE_ID(node); 624 acr->vci = ev->vci; 625 acr->vpi = ev->vpi; 626 acr->acr = ev->acr; 627 | 602 break; 603 } 604 605 case ATMEV_ACR_CHANGED: 606 { 607 struct atmev_acr_changed *ev = arg; 608 struct ngm_atm_acr_change *acr; 609 --- 10 unchanged lines hidden (view full) --- 620 if (mesg == NULL) 621 break; 622 acr = (struct ngm_atm_acr_change *)mesg->data; 623 acr->node = NG_NODE_ID(node); 624 acr->vci = ev->vci; 625 acr->vpi = ev->vpi; 626 acr->acr = ev->acr; 627 |
628 NG_SEND_MSG_HOOK(error, node, mesg, vcc->hook, NULL); | 628 NG_SEND_MSG_HOOK(error, node, mesg, vcc->hook, 0); |
629 break; 630 } 631 } 632} 633 634/* 635 * Use send_fn to get the right lock 636 */ --- 798 unchanged lines hidden --- | 629 break; 630 } 631 } 632} 633 634/* 635 * Use send_fn to get the right lock 636 */ --- 798 unchanged lines hidden --- |