ng_socket.c (e088dd4c440b5b61294a40e65c8898fa68bf19c9) | ng_socket.c (397c19d1753d210247d77eb3ca33d1c7c1eb2fa9) |
---|---|
1/* 2 * ng_socket.c 3 */ 4 5/*- 6 * Copyright (c) 1996-1999 Whistle Communications, Inc. 7 * All rights reserved. 8 * --- 675 unchanged lines hidden (view full) --- 684 /* Depending on what kind of resource it is, act differently. For 685 * devices, we treat it as a file. For an AF_NETGRAPH socket, 686 * shortcut straight to the node. */ 687 switch (fp->f_type) { 688 case DTYPE_VNODE: 689 vn = fp->f_data; 690 if (vn && (vn->v_type == VCHR)) { 691 /* for a VCHR, actually reference the FILE */ | 1/* 2 * ng_socket.c 3 */ 4 5/*- 6 * Copyright (c) 1996-1999 Whistle Communications, Inc. 7 * All rights reserved. 8 * --- 675 unchanged lines hidden (view full) --- 684 /* Depending on what kind of resource it is, act differently. For 685 * devices, we treat it as a file. For an AF_NETGRAPH socket, 686 * shortcut straight to the node. */ 687 switch (fp->f_type) { 688 case DTYPE_VNODE: 689 vn = fp->f_data; 690 if (vn && (vn->v_type == VCHR)) { 691 /* for a VCHR, actually reference the FILE */ |
692 fp->f_count++; | 692 fhold(fp); |
693 /* XXX then what :) */ 694 /* how to pass on to other modules? */ 695 } else { 696 fdrop(fp, td); 697 TRAP_ERROR; 698 return (EINVAL); 699 } 700 break; --- 440 unchanged lines hidden --- | 693 /* XXX then what :) */ 694 /* how to pass on to other modules? */ 695 } else { 696 fdrop(fp, td); 697 TRAP_ERROR; 698 return (EINVAL); 699 } 700 break; --- 440 unchanged lines hidden --- |