ng_socket.c (cd72f2180bfff020d03180e6eba1c3a0e0125468) ng_socket.c (48e3128b34dad9618402f1f4095f7655e779843c)
1
2/*
3 * ng_socket.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

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

596 if ((error = fget(td, fd, &fp)) != 0)
597 return (error);
598
599 /* Depending on what kind of resource it is, act differently. For
600 * devices, we treat it as a file. For an AF_NETGRAPH socket,
601 * shortcut straight to the node. */
602 switch (fp->f_type) {
603 case DTYPE_VNODE:
1
2/*
3 * ng_socket.c
4 *
5 * Copyright (c) 1996-1999 Whistle Communications, Inc.
6 * All rights reserved.
7 *
8 * Subject to the following obligations and disclaimer of warranty, use and

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

596 if ((error = fget(td, fd, &fp)) != 0)
597 return (error);
598
599 /* Depending on what kind of resource it is, act differently. For
600 * devices, we treat it as a file. For an AF_NETGRAPH socket,
601 * shortcut straight to the node. */
602 switch (fp->f_type) {
603 case DTYPE_VNODE:
604 vn = fp->un_data.vnode;
604 vn = fp->f_data;
605 if (vn && (vn->v_type == VCHR)) {
606 /* for a VCHR, actually reference the FILE */
607 fp->f_count++;
608 /* XXX then what :) */
609 /* how to pass on to other modules? */
610 } else {
611 fdrop(fp, td);
612 TRAP_ERROR;

--- 482 unchanged lines hidden ---
605 if (vn && (vn->v_type == VCHR)) {
606 /* for a VCHR, actually reference the FILE */
607 fp->f_count++;
608 /* XXX then what :) */
609 /* how to pass on to other modules? */
610 } else {
611 fdrop(fp, td);
612 TRAP_ERROR;

--- 482 unchanged lines hidden ---