ng_iface.c (437ffe182391fbcd9826ce327abbd175515b687d) ng_iface.c (1164db57e40de8efae073eba01ba85bb26ae5a8d)
1/*
2 * ng_iface.c
3 *
4 * Copyright (c) 1996-1999 Whistle Communications, Inc.
5 * All rights reserved.
6 *
7 * Subject to the following obligations and disclaimer of warranty, use and
8 * redistribution of this software, in source or object code forms, with or

--- 172 unchanged lines hidden (view full) ---

181 },
182 {
183 NGM_CISCO_COOKIE,
184 NGM_CISCO_GET_IPADDR,
185 "getipaddr",
186 NULL,
187 &ng_cisco_ipaddr_type
188 },
1/*
2 * ng_iface.c
3 *
4 * Copyright (c) 1996-1999 Whistle Communications, Inc.
5 * All rights reserved.
6 *
7 * Subject to the following obligations and disclaimer of warranty, use and
8 * redistribution of this software, in source or object code forms, with or

--- 172 unchanged lines hidden (view full) ---

181 },
182 {
183 NGM_CISCO_COOKIE,
184 NGM_CISCO_GET_IPADDR,
185 "getipaddr",
186 NULL,
187 &ng_cisco_ipaddr_type
188 },
189 {
190 NGM_IFACE_COOKIE,
191 NGM_IFACE_GET_IFINDEX,
192 "getifindex",
193 NULL,
194 &ng_parse_uint32_type
195 },
189 { 0 }
190};
191
192/* Node type descriptor */
193static struct ng_type typestruct = {
194 NG_ABI_VERSION,
195 NG_IFACE_NODE_TYPE,
196 NULL,

--- 465 unchanged lines hidden (view full) ---

662 case NGM_IFACE_BROADCAST:
663 ifp->if_flags &= ~IFF_POINTOPOINT;
664 ifp->if_flags |= IFF_BROADCAST;
665 break;
666 }
667 break;
668 }
669
196 { 0 }
197};
198
199/* Node type descriptor */
200static struct ng_type typestruct = {
201 NG_ABI_VERSION,
202 NG_IFACE_NODE_TYPE,
203 NULL,

--- 465 unchanged lines hidden (view full) ---

669 case NGM_IFACE_BROADCAST:
670 ifp->if_flags &= ~IFF_POINTOPOINT;
671 ifp->if_flags |= IFF_BROADCAST;
672 break;
673 }
674 break;
675 }
676
677 case NGM_IFACE_GET_IFINDEX:
678 NG_MKRESPONSE(resp, msg, sizeof(uint32_t), M_NOWAIT);
679 if (resp == NULL) {
680 error = ENOMEM;
681 break;
682 }
683 *((uint32_t *)resp->data) = priv->ifp->if_index;
684 break;
685
670 default:
671 error = EINVAL;
672 break;
673 }
674 break;
675 case NGM_CISCO_COOKIE:
676 switch (msg->header.cmd) {
677 case NGM_CISCO_GET_IPADDR: /* we understand this too */

--- 143 unchanged lines hidden ---
686 default:
687 error = EINVAL;
688 break;
689 }
690 break;
691 case NGM_CISCO_COOKIE:
692 switch (msg->header.cmd) {
693 case NGM_CISCO_GET_IPADDR: /* we understand this too */

--- 143 unchanged lines hidden ---