2 * Copyright (c) 2007-2008, Chelsio Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
11 * 2. Neither the name of the Chelsio Corporation nor the names of its
12 * contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
34 /* Get the t3cdev associated with an ifnet */
35 #define T3CDEV(ifp) (&(((struct port_info *)(ifp)->if_softc))->adapter->tdev)
46 char name[T3CNAMSIZ]; /* T3C device name */
48 TAILQ_ENTRY(t3cdev) entry; /* for list linking */
49 struct ifnet *lldev; /* LL dev associated with T3C messages */
50 struct adapter *adapter;
51 int (*send)(struct t3cdev *dev, struct mbuf *m);
52 int (*recv)(struct t3cdev *dev, struct mbuf **m, int n);
53 int (*ctl)(struct t3cdev *dev, unsigned int req, void *data);
54 void (*arp_update)(struct t3cdev *dev, struct rtentry *neigh, uint8_t *enaddr, struct sockaddr *sa);
55 void *priv; /* driver private data */
56 void *l2opt; /* optional layer 2 data */
57 void *l3opt; /* optional layer 3 data */
58 void *l4opt; /* optional layer 4 data */
59 void *ulp; /* ulp stuff */
62 #endif /* _T3CDEV_H_ */