# 2.11BSD#431 - /usr/src/sys/h/mbuf.h

##### Variables

    m_want            X
    mbstat            X
    mclfree           X
    mclrefcnt         X
    mfree             X
    nmbclusters       X

##### Macros

    MCLALLOC          X
    MCLBYTES          X
    MCLFREE           X
    MCLGET            X
    MCLOFSET          X
    MCLSHIFT          X
    MFREE             X
    MGET              X
    MLEN              X
    MMAXOFF           X
    MMINOFF           X
    MPG_CLUSTERS      X
    MPG_MBUFS         X
    MPG_SPACE         X
    MPULL_EXTRA       X
    MSIZE             X
    MTAIL             X
    MTOCL             X
    MT_ATABLE         X
    MT_DATA           X
    MT_FREE           X
    MT_FTABLE         X
    MT_HEADER         X
    MT_HTABLE         X
    MT_IFADDR         X
    MT_PCB            X
    MT_RIGHTS         X
    MT_RTABLE         X
    MT_SOCKET         X
    MT_SONAME         X
    MT_SOOPTS         X
    MT_ZOMBIE         X
    M_COPYALL         X
    M_DONTWAIT        X
    M_DONTWAITLONG    X
    M_HASCL           X
    M_WAIT            X
    NMBCLUSTERS       X
    NMBPCL            X
    NMBTYPES          X
    NMBUFS            X
    cltom             X
    dtom              X
    mtocl             X
    mtod              X

##### struct's

    mbstat            X
    mbuf              X

       1: /*
       2:  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
       3:  * All rights reserved.
       4:  *
       5:  * Redistribution and use in source and binary forms are permitted
       6:  * provided that this notice is preserved and that due credit is given
       7:  * to the University of California at Berkeley. The name of the University
       8:  * may not be used to endorse or promote products derived from this
       9:  * software without specific prior written permission. This software
      10:  * is provided ``as is'' without express or implied warranty.
      11:  *
      12:  *	@(#)mbuf.h	7.8.2 (2.11BSD GTE) 12/31/93
      13:  */
      14:
      15: /*
      16:  * The default values for NMBUFS and NMBCLUSTERS (160 and 12 respectively)
      17:  * result in approximately 32K bytes of buffer memory being allocated to
      18:  * the network.  Taking into account the other data used by the network,
      19:  * this leaves approximately 8K bytes free, so the formula is roughly:
      20:  *
      21:  * (NMBUFS / 8) + NMBCLUSTERS < 40
      22:  */
      23: #define NMBUFS      170         /* number of mbufs */
      24: #define MSIZE       128         /* size of an mbuf */
      25:
      26: #if CLBYTES > 1024
      27: #define MCLBYTES    1024
      28: #define MCLSHIFT    10
      29: #define MCLOFSET    (MCLBYTES - 1)
      30: #else
      31: #define MCLBYTES    CLBYTES
      32: #define MCLSHIFT    CLSHIFT
      33: #define MCLOFSET    CLOFSET
      34: #endif
      35:
      36: #define MMINOFF     8           /* mbuf header length */
      37: #define MTAIL       2
      38: #define MMAXOFF     (MSIZE-MTAIL)       /* offset where data ends */
      39: #define MLEN        (MSIZE-MMINOFF-MTAIL)   /* mbuf data length */
      40: #define NMBCLUSTERS 12
      41: #define NMBPCL      (CLBYTES/MSIZE)     /* # mbufs per cluster */
      42:
      43: /*
      44:  * Macros for type conversion
      45:  */
      46:
      47: /* network cluster number to virtual address, and back */
      48: #define cltom(x) ((struct mbuf *)((int)mbutl + ((x) << MCLSHIFT)))
      49: #define mtocl(x) (((int)x - (int)mbutl) >> MCLSHIFT)
      50:
      51: /* address in mbuf to mbuf head */
      52: #define dtom(x)     ((struct mbuf *)((int)x & ~(MSIZE-1)))
      53:
      54: /* mbuf head, to typed data */
      55: #define mtod(x,t)   ((t)((int)(x) + (x)->m_off))
      56:
      57: struct mbuf {
      58:     struct  mbuf *m_next;       /* next buffer in chain */
      59:     u_short m_off;          /* offset of data */
      60:     short   m_len;          /* amount of data in this mbuf */
      61:     short   m_type;         /* mbuf type (0 == free) */
      62:     u_char  m_dat[MLEN];        /* data storage */
      63:     struct  mbuf *m_act;        /* link in higher-level mbuf list */
      64: };
      65:
      66: /* mbuf types */
      67: #define MT_FREE     0   /* should be on free list */
      68: #define MT_DATA     1   /* dynamic (data) allocation */
      69: #define MT_HEADER   2   /* packet header */
      70: #define MT_SOCKET   3   /* socket structure */
      71: #define MT_PCB      4   /* protocol control block */
      72: #define MT_RTABLE   5   /* routing tables */
      73: #define MT_HTABLE   6   /* IMP host tables */
      74: #define MT_ATABLE   7   /* address resolution tables */
      75: #define MT_SONAME   8   /* socket name */
      76: #define MT_ZOMBIE   9   /* zombie proc status */
      77: #define MT_SOOPTS   10  /* socket options */
      78: #define MT_FTABLE   11  /* fragment reassembly header */
      79: #define MT_RIGHTS   12  /* access rights */
      80: #define MT_IFADDR   13  /* interface address */
      81: #define NMBTYPES    16
      82:
      83: /* flags to m_get */
      84: #define M_DONTWAIT  0
      85: #define M_WAIT      1
      86: #define M_DONTWAITLONG  2
      87:
      88: /* flags to m_pgalloc */
      89: #define MPG_MBUFS   0       /* put new mbufs on free list */
      90: #define MPG_CLUSTERS    1       /* put new clusters on free list */
      91: #define MPG_SPACE   2       /* don't free; caller wants space */
      92:
      93: /* length to m_copy to copy all */
      94: #define M_COPYALL   077776
      95:
      96: /*
      97:  * m_pullup will pull up additional length if convenient;
      98:  * should be enough to hold headers of second-level and higher protocols.
      99:  */
     100: #define MPULL_EXTRA 32
     101:
     102: #define MGET(m, i, t) \
     103:     { int ms = splimp(); \
     104:       if ((m)=mfree) \
     105:         { if ((m)->m_type != MT_FREE) panic("mget"); (m)->m_type = t; \
     106:           mbstat.m_mtypes[MT_FREE]--; mbstat.m_mtypes[t]++; \
     107:           mfree = (m)->m_next; (m)->m_next = 0; \
     108:           (m)->m_off = MMINOFF; } \
     109:       else \
     110:         (m) = m_more((((ms&0340) <= 0100) && (i==M_DONTWAIT)) ? M_DONTWAITLONG : i, t); \
     111:       splx(ms); }
     112: /*
     113:  * Mbuf page cluster macros.
     114:  * MCLALLOC allocates mbuf page clusters.
     115:  * Note that it works only with a count of 1 at the moment.
     116:  * MCLGET adds such clusters to a normal mbuf.
     117:  * m->m_len is set to MCLBYTES upon success, and to MLEN on failure.
     118:  * MCLFREE frees clusters allocated by MCLALLOC.
     119:  */
     120: #ifndef pdp11
     121: #define MCLALLOC(m, i) \
     122:     { int ms = splimp(); \
     123:       if (mclfree == 0) \
     124:         (void)m_clalloc((i), MPG_CLUSTERS, M_DONTWAIT); \
     125:       if ((m)=mclfree) \
     126:          {++mclrefcnt[mtocl(m)];mbstat.m_clfree--;mclfree = (m)->m_next;} \
     127:       splx(ms); }
     128: #else
     129: #define MCLALLOC(m, i) \
     130:     { int ms = splimp(); \
     131:       if ((m)=mclfree) \
     132:          {++mclrefcnt[mtocl(m)];mbstat.m_clfree--;mclfree = (m)->m_next;} \
     133:       splx(ms); }
     134: #endif
     135: #define M_HASCL(m)  ((m)->m_off >= MSIZE)
     136: #define MTOCL(m)    ((struct mbuf *)(mtod((m), int) &~ MCLOFSET))
     137:
     138: #define MCLGET(m) \
     139:     { struct mbuf *p; \
     140:       MCLALLOC(p, 1); \
     141:       if (p) { \
     142:         (m)->m_off = (int)p - (int)(m); \
     143:         (m)->m_len = MCLBYTES; \
     144:       } else \
     145:         (m)->m_len = MLEN; \
     146:     }
     147: #define MCLFREE(m) { \
     148:     if (--mclrefcnt[mtocl(m)] == 0) \
     149:         { (m)->m_next = mclfree;mclfree = (m);mbstat.m_clfree++;} \
     150:     }
     151: #define MFREE(m, n) \
     152:     { int ms = splimp(); \
     153:       if ((m)->m_type == MT_FREE) panic("mfree"); \
     154:       mbstat.m_mtypes[(m)->m_type]--; mbstat.m_mtypes[MT_FREE]++; \
     155:       (m)->m_type = MT_FREE; \
     156:       if (M_HASCL(m)) { \
     157:         (n) = MTOCL(m); \
     158:         MCLFREE(n); \
     159:       } \
     160:       (n) = (m)->m_next; (m)->m_next = mfree; \
     161:       (m)->m_off = 0; (m)->m_act = 0; mfree = (m); \
     162:       splx(ms); \
     163:       if (m_want) { \
     164:           m_want = 0; \
     165:           WAKEUP((caddr_t)&mfree); \
     166:       } \
     167:     }
     168:
     169: /*
     170:  * Mbuf statistics.
     171:  */
     172: struct mbstat {
     173:     u_short m_mbufs;    /* mbufs obtained from page pool */
     174:     u_short m_clusters; /* clusters obtained from page pool */
     175:     u_short m_space;    /* interface pages obtained from page pool */
     176:     u_short m_clfree;   /* free clusters */
     177:     u_short m_drops;    /* times failed to find space */
     178:     u_short m_wait;     /* times waited for space */
     179:     u_short m_drain;    /* times drained protocols for space */
     180:     u_short m_mtypes[NMBTYPES]; /* type specific mbuf allocations */
     181: };
     182:
     183: #ifdef  SUPERVISOR
     184: extern  struct  mbuf *mbutl;        /* virtual address of net free mem */
     185: struct  mbstat mbstat;
     186: int nmbclusters;
     187: struct  mbuf *mfree, *mclfree;
     188: char    mclrefcnt[NMBCLUSTERS + 1];
     189: int m_want;
     190: struct  mbuf *m_get(),*m_getclr(),*m_free(),*m_more(),*m_copy(),*m_pullup();
     191: #ifndef pdp11
     192: caddr_t m_clalloc();
     193: #endif
     194: #endif

#### Defined variables

m_want defined in line 189; used 3 times

- in line 163-164(2)
- in /usr/src/sys/sys/uipc_mbuf.c line 190

mbstat defined in line 185; used 74 times

- in line 106(2), 126, 132, 149-154(3)
- in /usr/src/new/crash/dispnet.c line 176(2), 186-199(10), 239(3), 351, 362-373(9), 382-383(2), 405(2), 442-445(2)
- in /usr/src/sys/sys/uipc_mbuf.c line 65-67(2), 73-77(2), 132, 189-193(2)
- in /usr/src/ucb/netstat/mbuf.c line 46, 73-107(28)

mclfree defined in line 187; used 9 times

- in line 123-132(5), 149(2)
- in /usr/src/sys/sys/uipc_mbuf.c line 62-63(2)

mclrefcnt defined in line 188; used 4 times

- in line 126, 132, 148
- in /usr/src/sys/sys/uipc_mbuf.c line 264

mfree defined in line 187; used 7 times

- in line 104-107(2), 160-165(3)
- in /usr/src/sys/sys/uipc_mbuf.c line 117, 191

nmbclusters defined in line 186; used 1 times

- in /usr/src/sys/sys/uipc_mbuf.c line 33

#### Defined struct's

mbstat defined in line 172; used 10 times

- in line 185(2)
- in /usr/src/new/crash/dispnet.c line 88(2)
- in /usr/src/ucb/PORT/systat/mbufs.c line 32(2), 114(2)
- in /usr/src/ucb/netstat/mbuf.c line 23(2)

mbuf defined in line 57; used 926 times

- in line 58-63(4), 184-190(6)
- in /usr/src/new/crash/dispnet.c line 59(2), 82(2), 205-210(12), 404(2), 420-422(4), 461-467(6), 506(2), 605(2), 612(2), 627(2), 639(2), 646(2), 656(2), 662(2), 677-678(4), 687(2), 865(2)
- in /usr/src/new/crash/route.c line 49(2), 57-58(4), 82-84(6), 192(2)
- in /usr/src/sbin/route/route.c line 104-107(6), 150(4), 157(2), 191(2)
- in /usr/src/sys/h/socketvar.h line 58(2)
- in /usr/src/sys/net/if.c line 193(2)
- in /usr/src/sys/net/if.h line 54-55(4)
- in /usr/src/sys/net/if_loop.c line 64-69(4), 81(2)
- in /usr/src/sys/net/if_sl.c line 169(2), 198(2), 252-257(4), 371(2), 390(2), 397-399(4), 461(2)
- in /usr/src/sys/net/raw_cb.c line 46(2), 104(2), 144(2)
- in /usr/src/sys/net/raw_usrreq.c line 42-46(4), 89(2), 122-125(4), 136(2), 161(2)
- in /usr/src/sys/net/route.c line 39(2), 45(2), 215-216(4)
- in /usr/src/sys/netimp/if_imp.c line 158(2), 167(2), 353(2), 416(2), 461-465(4), 543(2), 621(2)
- in /usr/src/sys/netimp/if_imphost.c line 31(2), 42(2), 64(2), 125-128(4), 152(2), 158(2), 181-185(4), 205-208(4)
- in /usr/src/sys/netimp/raw_imp.c line 39-42(4)
- in /usr/src/sys/netinet/if_ether.c line 106(2), 153(2), 248(2), 293-298(4)
- in /usr/src/sys/netinet/in.c line 206(2), 229(2)
- in /usr/src/sys/netinet/in_pcb.c line 38(2), 54(2), 117(2), 206(2), 241(2), 255(2)
- in /usr/src/sys/netinet/ip_icmp.c line 58(2), 138(2), 361(2), 394(2), 419-423(4)
- in /usr/src/sys/netinet/ip_input.c line 97-98(4), 311-313(4), 764-774(8), 808-811(4), 861(2), 949(2)
- in /usr/src/sys/netinet/ip_output.c line 38(2), 47-48(4), 54(2), 191(2), 266-273(8), 344(2), 393-394(4), 404(2)
- in /usr/src/sys/netinet/raw_ip.c line 45(2), 57(2), 80(2), 120(2), 135(2)
- in /usr/src/sys/netinet/tcp_input.c line 76(2), 179-184(6), 203(2), 377(2), 1168(2), 1216(2)
- in /usr/src/sys/netinet/tcp_output.c line 53-55(4), 397(2)
- in /usr/src/sys/netinet/tcp_subr.c line 61(2), 111(2), 158(2), 170(2), 231(2)
- in /usr/src/sys/netinet/tcp_timer.c line 94-95(6)
- in /usr/src/sys/netinet/tcp_usrreq.c line 56(2), 142(2), 156(2), 325-330(4)
- in /usr/src/sys/netinet/udp_usrreq.c line 57-62(4), 79(2), 150(2), 195-198(6), 286(2)
- in /usr/src/sys/netns/idp_usrreq.c line 45(2), 75(2), 119-126(6), 145(2), 250-252(4), 363(2), 523(2)
- in /usr/src/sys/netns/ns.c line 72(2), 118(2)
- in /usr/src/sys/netns/ns_error.c line 69-73(4), 164(2), 279(2)
- in /usr/src/sys/netns/ns_input.c line 78-81(4), 107(2), 294(2), 438(2), 447-449(4)
- in /usr/src/sys/netns/ns_ip.c line 58-64(6), 121-126(6), 152(2), 189-192(4), 221-225(4), 274(2), 288(2), 340(2), 409(2)
- in /usr/src/sys/netns/ns_output.c line 36-39(4)
- in /usr/src/sys/netns/ns_pcb.c line 36(2), 51(2), 100(2), 171(2), 203(2), 216(2)
- in /usr/src/sys/netns/spp_usrreq.c line 56(2), 133(2), 240(2), 275(2), 309(2), 599-604(4), 644-647(4), 654(2), 705(2), 1064-1066(4), 1179(2), 1185(2), 1272(2), 1285(2), 1308(2), 1342(2), 1351(2), 1421(2), 1473(2), 1559(2), 1592-1593(6), 1672(2), 1682(2), 1697(2)
- in /usr/src/sys/pdp/in_cksum.c line 28(2)
- in /usr/src/sys/pdpif/if_acc.c line 67(2), 245(2), 318(2), 340(2)
- in /usr/src/sys/pdpif/if_css.c line 87(2), 269(2), 338(2), 351(2)
- in /usr/src/sys/pdpif/if_de.c line 97(2), 391(2), 624(2), 709(2), 753(2), 761(2), 966(2), 973(2), 1041-1043(4)
- in /usr/src/sys/pdpif/if_dmc.c line 185(2), 272(2), 364(2)
- in /usr/src/sys/pdpif/if_ec.c line 93(2), 214(2), 339(2), 472(2), 479-483(6), 617-619(4), 646(2), 652-654(4)
- in /usr/src/sys/pdpif/if_en.c line 175(2), 309(2), 412-416(4)
- in /usr/src/sys/pdpif/if_il.c line 336(2), 462(2), 565(2), 572(2)
- in /usr/src/sys/pdpif/if_qe.c line 362(2), 574(2), 581-584(6), 810(2)
- in /usr/src/sys/pdpif/if_qt.c line 385(2), 604(2), 612-613(6), 787(2)
- in /usr/src/sys/pdpif/if_sri.c line 76(2), 248(2), 328(2), 375(2)
- in /usr/src/sys/pdpif/if_uba.c line 62(2), 69-70(4), 145-147(4)
- in /usr/src/sys/pdpif/if_vv.c line 309(2), 417(2), 559(2), 734-737(4)
- in /usr/src/sys/sys/sys_net.c line 217(2)
- in /usr/src/sys/sys/sys_socket.c line 81(6), 129-130(6)
- in /usr/src/sys/sys/uipc_mbuf.c line 17-18(6), 41-42(4), 54-57(4), 143-147(4), 153-157(4), 166-170(6), 181-185(4), 204-206(4), 227-234(8), 262(2), 281(2), 301-304(4), 333(2), 367-372(6)
- in /usr/src/sys/sys/uipc_socket.c line 47(2), 68(6), 80(2), 87(4), 100(6), 170(6), 192-197(8), 206(4), 213(2), 239(4), 264(6), 284(6), 301-307(8), 426-434(8), 444(4), 590-591(6), 613(6), 640-643(4), 733-735(4), 895(2), 902(2)
- in /usr/src/sys/sys/uipc_socket2.c line 123(2), 140(6), 403-405(4), 424-426(4), 455-457(4), 495-497(4), 529(2), 581-582(4), 623(2)
- in /usr/src/sys/sys/uipc_syscalls.c line 32(2), 83(2), 91(2), 125(2), 170(2), 194(2), 206(2), 378(2), 401(2), 410(2), 521(2), 604(2), 617(2), 637(2), 679(2), 691(2), 715(2), 724(2), 742-748(6)
- in /usr/src/sys/sys/uipc_usrreq.c line 40(2), 284(2), 331(2), 352(2), 490(2), 523(2), 606(2), 615-618(4)
- in /usr/src/ucb/netstat/route.c line 62-67(6), 86-88(6), 160(2)
- in /usr/src/ucb/netstat/unix.c line 98(2), 112-115(4)

#### Defined macros

MCLALLOC defined in line 129; used 2 times

- in line 140
- in /usr/src/sys/net/if_sl.c line 374

MCLBYTES defined in line 31; used 2 times

- in line 29, 143

MCLFREE defined in line 147; used 2 times

- in line 158
- in /usr/src/sys/net/if_sl.c line 169

MCLGET defined in line 138; used 4 times

- in /usr/src/sys/net/if_sl.c line 419
- in /usr/src/sys/pdpif/if_ec.c line 674
- in /usr/src/sys/pdpif/if_uba.c line 91
- in /usr/src/sys/sys/uipc_socket.c line 367

MCLOFSET defined in line 33; used 1 times

- in line 136

MCLSHIFT defined in line 32; used 2 times

- in line 48-49(2)

MFREE defined in line 151; used 12 times

- in /usr/src/sys/net/if.h line 125
- in /usr/src/sys/net/if_sl.c line 348
- in /usr/src/sys/pdpif/if_de.c line 1051
- in /usr/src/sys/pdpif/if_uba.c line 154
- in /usr/src/sys/sys/uipc_mbuf.c line 172, 213
- in /usr/src/sys/sys/uipc_socket.c line 509, 531, 559
- in /usr/src/sys/sys/uipc_socket2.c line 601-606(2), 630

MGET defined in line 102; used 17 times

- in /usr/src/sys/net/if_loop.c line 80
- in /usr/src/sys/net/if_sl.c line 404
- in /usr/src/sys/netimp/if_imp.c line 355
- in /usr/src/sys/netinet/ip_output.c line 200, 281
- in /usr/src/sys/netinet/tcp_output.c line 214
- in /usr/src/sys/netinet/udp_usrreq.c line 232
- in /usr/src/sys/pdpif/if_de.c line 982
- in /usr/src/sys/pdpif/if_ec.c line 660
- in /usr/src/sys/pdpif/if_uba.c line 77
- in /usr/src/sys/sys/uipc_mbuf.c line 149, 159, 198, 256, 383
- in /usr/src/sys/sys/uipc_socket.c line 365
- in /usr/src/sys/sys/uipc_socket2.c line 466

MLEN defined in line 39; used 28 times

- in line 62, 145
- in /usr/src/new/crash/dispnet.c line 688
- in /usr/src/sys/net/if_sl.c line 256, 320(2), 434-436(2)
- in /usr/src/sys/netinet/ip_icmp.c line 112-114(2)
- in /usr/src/sys/pdpif/if_de.c line 995-998(2)
- in /usr/src/sys/pdpif/if_ec.c line 678-681(2)
- in /usr/src/sys/pdpif/if_uba.c line 103-106(2)
- in /usr/src/sys/sys/sys_kern.c line 101, 133
- in /usr/src/sys/sys/uipc_mbuf.c line 162, 381
- in /usr/src/sys/sys/uipc_socket.c line 374
- in /usr/src/sys/sys/uipc_syscalls.c line 93, 204, 412, 612, 750
- in /usr/src/sys/sys/uipc_usrreq.c line 337, 359

MMAXOFF defined in line 38; used 55 times

- in /usr/src/new/crash/dispnet.c line 692
- in /usr/src/sys/h/socketvar.h line 121, 129
- in /usr/src/sys/net/if_loop.c line 75
- in /usr/src/sys/netimp/if_imp.c line 507
- in /usr/src/sys/netimp/raw_imp.c line 54
- in /usr/src/sys/netinet/if_ether.c line 114
- in /usr/src/sys/netinet/ip_icmp.c line 89, 163
- in /usr/src/sys/netinet/ip_input.c line 122
- in /usr/src/sys/netinet/ip_output.c line 205, 280, 288, 422-426(2)
- in /usr/src/sys/netinet/raw_ip.c line 91
- in /usr/src/sys/netinet/tcp_input.c line 204
- in /usr/src/sys/netinet/tcp_output.c line 217
- in /usr/src/sys/netinet/tcp_subr.c line 68
- in /usr/src/sys/netinet/udp_usrreq.c line 72, 238
- in /usr/src/sys/netns/idp_usrreq.c line 142, 152, 171, 282, 288, 302
- in /usr/src/sys/netns/ns_error.c line 120, 183
- in /usr/src/sys/netns/ns_input.c line 97
- in /usr/src/sys/netns/ns_ip.c line 145, 253
- in /usr/src/sys/netns/spp_usrreq.c line 702, 712, 726, 934, 1100, 1106, 1112, 1118
- in /usr/src/sys/pdpif/if_de.c line 856
- in /usr/src/sys/pdpif/if_ec.c line 558
- in /usr/src/sys/pdpif/if_en.c line 476
- in /usr/src/sys/pdpif/if_il.c line 619
- in /usr/src/sys/pdpif/if_qe.c line 632
- in /usr/src/sys/pdpif/if_qt.c line 655
- in /usr/src/sys/pdpif/if_vv.c line 832
- in /usr/src/sys/sys/uipc_mbuf.c line 261, 286-287(2), 376, 388
- in /usr/src/sys/sys/uipc_socket2.c line 537-538(3)

MMINOFF defined in line 36; used 39 times

- in line 39, 108
- in /usr/src/new/crash/dispnet.c line 692
- in /usr/src/sys/net/if_loop.c line 76, 83
- in /usr/src/sys/net/route.c line 309
- in /usr/src/sys/netimp/if_imp.c line 361, 508
- in /usr/src/sys/netinet/ip_input.c line 820
- in /usr/src/sys/netinet/ip_output.c line 280, 422
- in /usr/src/sys/netns/ns_input.c line 456
- in /usr/src/sys/netns/ns_ip.c line 68, 185, 194, 247
- in /usr/src/sys/pdpif/if_de.c line 783, 857, 864, 990
- in /usr/src/sys/pdpif/if_ec.c line 504, 559, 568
- in /usr/src/sys/pdpif/if_en.c line 432, 477, 484
- in /usr/src/sys/pdpif/if_il.c line 620, 627
- in /usr/src/sys/pdpif/if_qe.c line 633, 640
- in /usr/src/sys/pdpif/if_qt.c line 656, 667
- in /usr/src/sys/pdpif/if_uba.c line 98
- in /usr/src/sys/pdpif/if_vv.c line 330, 798, 833, 840
- in /usr/src/sys/sys/uipc_syscalls.c line 36
- in /usr/src/sys/sys/uipc_usrreq.c line 359

MPG_CLUSTERS defined in line 90; used 2 times

- in line 124
- in /usr/src/sys/sys/uipc_mbuf.c line 44

MPG_MBUFS defined in line 89; used 2 times

- in /usr/src/sys/sys/uipc_mbuf.c line 43, 120

MPG_SPACE defined in line 91; never used
MPULL_EXTRA defined in line 100; used 1 times

- in /usr/src/sys/sys/uipc_mbuf.c line 390

MSIZE defined in line 24; used 20 times

- in line 38-41(3), 52, 135
- in /usr/src/new/crash/dispnet.c line 440
- in /usr/src/sys/h/socketvar.h line 120, 128
- in /usr/src/sys/sys/uipc_mbuf.c line 42
- in /usr/src/sys/sys/uipc_socket2.c line 348
- in /usr/src/sys/sys/uipc_syscalls.c line 84, 129, 196, 380(2), 605, 681, 717
- in /usr/src/ucb/netstat/mbuf.c line 100-102(2)

MTAIL defined in line 37; used 2 times

- in line 38-39(2)

MTOCL defined in line 136; used 1 times

- in line 157

MT_ATABLE defined in line 74; used 1 times

- in /usr/src/ucb/netstat/mbuf.c line 36

MT_DATA defined in line 68; used 18 times

- in /usr/src/sys/net/if_sl.c line 404
- in /usr/src/sys/netinet/if_ether.c line 111
- in /usr/src/sys/netinet/tcp_input.c line 252
- in /usr/src/sys/netinet/tcp_output.c line 273
- in /usr/src/sys/netns/idp_usrreq.c line 145, 265
- in /usr/src/sys/netns/ns_input.c line 449
- in /usr/src/sys/netns/spp_usrreq.c line 705, 1087
- in /usr/src/sys/pdpif/if_de.c line 982
- in /usr/src/sys/pdpif/if_ec.c line 660
- in /usr/src/sys/pdpif/if_uba.c line 77
- in /usr/src/sys/sys/uipc_mbuf.c line 72-73(2)
- in /usr/src/sys/sys/uipc_socket.c line 365, 442, 541
- in /usr/src/ucb/netstat/mbuf.c line 30

MT_FREE defined in line 67; used 10 times

- in line 105-106(2), 153-155(3)
- in /usr/src/ucb/netstat/mbuf.c line 78, 87, 94-96(2), 102

MT_FTABLE defined in line 78; used 2 times

- in /usr/src/sys/netinet/ip_input.c line 328
- in /usr/src/ucb/netstat/mbuf.c line 37

MT_HEADER defined in line 69; used 29 times

- in /usr/src/sys/net/if_loop.c line 80
- in /usr/src/sys/net/raw_usrreq.c line 53
- in /usr/src/sys/netimp/if_imp.c line 355, 509, 626
- in /usr/src/sys/netinet/ip_icmp.c line 84
- in /usr/src/sys/netinet/ip_output.c line 200, 281
- in /usr/src/sys/netinet/raw_ip.c line 85
- in /usr/src/sys/netinet/tcp_output.c line 214
- in /usr/src/sys/netinet/tcp_subr.c line 65, 120
- in /usr/src/sys/netinet/udp_usrreq.c line 232
- in /usr/src/sys/netns/idp_usrreq.c line 166
- in /usr/src/sys/netns/ns_error.c line 116
- in /usr/src/sys/netns/ns_ip.c line 191, 248
- in /usr/src/sys/netns/spp_usrreq.c line 716, 924, 1228
- in /usr/src/sys/pdpif/if_de.c line 858
- in /usr/src/sys/pdpif/if_ec.c line 561
- in /usr/src/sys/pdpif/if_il.c line 621
- in /usr/src/sys/pdpif/if_qe.c line 634
- in /usr/src/sys/pdpif/if_qt.c line 658
- in /usr/src/sys/pdpif/if_vv.c line 324, 834
- in /usr/src/sys/sys/uipc_socket.c line 541
- in /usr/src/ucb/netstat/mbuf.c line 31

MT_HTABLE defined in line 73; used 2 times

- in /usr/src/sys/netimp/if_imphost.c line 89
- in /usr/src/ucb/netstat/mbuf.c line 35

MT_IFADDR defined in line 80; used 3 times

- in /usr/src/sys/netinet/in.c line 228
- in /usr/src/sys/netns/ns.c line 117
- in /usr/src/ucb/netstat/mbuf.c line 42

MT_PCB defined in line 71; used 8 times

- in /usr/src/sys/net/raw_cb.c line 49
- in /usr/src/sys/netinet/in_pcb.c line 41
- in /usr/src/sys/netinet/tcp_subr.c line 170
- in /usr/src/sys/netns/ns_ip.c line 64
- in /usr/src/sys/netns/ns_pcb.c line 39
- in /usr/src/sys/netns/spp_usrreq.c line 1220
- in /usr/src/sys/sys/uipc_usrreq.c line 300
- in /usr/src/ucb/netstat/mbuf.c line 33

MT_RIGHTS defined in line 79; used 4 times

- in /usr/src/sys/sys/uipc_socket.c line 516
- in /usr/src/sys/sys/uipc_syscalls.c line 411
- in /usr/src/sys/sys/uipc_usrreq.c line 625
- in /usr/src/ucb/netstat/mbuf.c line 41

MT_RTABLE defined in line 72; used 2 times

- in /usr/src/sys/net/route.c line 302
- in /usr/src/ucb/netstat/mbuf.c line 34

MT_SOCKET defined in line 70; used 3 times

- in /usr/src/sys/sys/uipc_socket.c line 58
- in /usr/src/sys/sys/uipc_socket2.c line 127
- in /usr/src/ucb/netstat/mbuf.c line 32

MT_SONAME defined in line 75; used 11 times

- in /usr/src/sys/netinet/tcp_input.c line 388
- in /usr/src/sys/netns/spp_usrreq.c line 146
- in /usr/src/sys/sys/uipc_socket.c line 495
- in /usr/src/sys/sys/uipc_socket2.c line 466
- in /usr/src/sys/sys/uipc_syscalls.c line 92, 171, 207, 402, 692, 725
- in /usr/src/ucb/netstat/mbuf.c line 38

MT_SOOPTS defined in line 77; used 7 times

- in /usr/src/sys/netinet/ip_input.c line 772
- in /usr/src/sys/netinet/ip_output.c line 367
- in /usr/src/sys/netinet/raw_ip.c line 158
- in /usr/src/sys/netinet/tcp_usrreq.c line 360
- in /usr/src/sys/sys/uipc_socket.c line 744
- in /usr/src/sys/sys/uipc_syscalls.c line 618
- in /usr/src/ucb/netstat/mbuf.c line 40

MT_ZOMBIE defined in line 76; used 1 times

- in /usr/src/ucb/netstat/mbuf.c line 39

M_COPYALL defined in line 94; used 15 times

- in /usr/src/sys/net/raw_usrreq.c line 123
- in /usr/src/sys/netinet/if_ether.c line 411
- in /usr/src/sys/netns/ns_input.c line 107, 447
- in /usr/src/sys/netns/ns_ip.c line 138
- in /usr/src/sys/netns/ns_output.c line 54
- in /usr/src/sys/netns/spp_usrreq.c line 906
- in /usr/src/sys/pdpif/if_ec.c line 499, 524
- in /usr/src/sys/pdpif/if_qe.c line 599
- in /usr/src/sys/pdpif/if_qt.c line 628
- in /usr/src/sys/sys/uipc_mbuf.c line 252, 268
- in /usr/src/sys/sys/uipc_socket.c line 649
- in /usr/src/sys/sys/uipc_usrreq.c line 346

M_DONTWAIT defined in line 84; used 59 times

- in line 110, 124
- in /usr/src/sys/net/if_loop.c line 80
- in /usr/src/sys/net/if_sl.c line 404
- in /usr/src/sys/net/raw_cb.c line 49
- in /usr/src/sys/net/raw_usrreq.c line 53
- in /usr/src/sys/net/route.c line 302
- in /usr/src/sys/netimp/if_imp.c line 355, 509, 626
- in /usr/src/sys/netimp/if_imphost.c line 89
- in /usr/src/sys/netinet/if_ether.c line 111
- in /usr/src/sys/netinet/in_pcb.c line 41
- in /usr/src/sys/netinet/ip_icmp.c line 84
- in /usr/src/sys/netinet/ip_input.c line 328, 772
- in /usr/src/sys/netinet/ip_output.c line 200, 281
- in /usr/src/sys/netinet/raw_ip.c line 85
- in /usr/src/sys/netinet/tcp_input.c line 252, 388
- in /usr/src/sys/netinet/tcp_output.c line 214, 273
- in /usr/src/sys/netinet/tcp_subr.c line 65, 120, 170
- in /usr/src/sys/netns/idp_usrreq.c line 145, 166, 265
- in /usr/src/sys/netns/ns_error.c line 116
- in /usr/src/sys/netns/ns_input.c line 449
- in /usr/src/sys/netns/ns_ip.c line 64, 191, 248
- in /usr/src/sys/netns/ns_pcb.c line 39
- in /usr/src/sys/netns/spp_usrreq.c line 146, 705, 716, 924, 1087, 1220, 1228
- in /usr/src/sys/pdpif/if_de.c line 858, 982
- in /usr/src/sys/pdpif/if_ec.c line 561, 660
- in /usr/src/sys/pdpif/if_en.c line 478
- in /usr/src/sys/pdpif/if_il.c line 621
- in /usr/src/sys/pdpif/if_qe.c line 634
- in /usr/src/sys/pdpif/if_qt.c line 658
- in /usr/src/sys/pdpif/if_uba.c line 77
- in /usr/src/sys/pdpif/if_vv.c line 324, 834
- in /usr/src/sys/sys/uipc_mbuf.c line 123, 256, 383
- in /usr/src/sys/sys/uipc_socket2.c line 127, 466
- in /usr/src/sys/sys/uipc_usrreq.c line 300

M_DONTWAITLONG defined in line 86; used 1 times

- in line 110

M_HASCL defined in line 135; used 2 times

- in line 156
- in /usr/src/sys/netimp/if_imp.c line 352

M_WAIT defined in line 85; used 12 times

- in /usr/src/sys/netinet/in.c line 228
- in /usr/src/sys/netinet/ip_output.c line 367
- in /usr/src/sys/netinet/raw_ip.c line 158
- in /usr/src/sys/netinet/tcp_usrreq.c line 360
- in /usr/src/sys/netinet/udp_usrreq.c line 232
- in /usr/src/sys/netns/ns.c line 117
- in /usr/src/sys/sys/uipc_mbuf.c line 188
- in /usr/src/sys/sys/uipc_socket.c line 58, 365, 442, 744
- in /usr/src/sys/sys/uipc_syscalls.c line 752

NMBCLUSTERS defined in line 40; used 4 times

- in line 188
- in /usr/src/sys/sys/uipc_mbuf.c line 18, 33, 44

NMBPCL defined in line 41; used 1 times

- in /usr/src/sys/sys/uipc_mbuf.c line 64

NMBTYPES defined in line 81; used 3 times

- in line 180
- in /usr/src/ucb/netstat/mbuf.c line 47, 64

NMBUFS defined in line 23; used 3 times

- in /usr/src/sys/sys/uipc_mbuf.c line 17, 43, 77

cltom defined in line 48; never used
dtom defined in line 52; used 56 times

- in /usr/src/sys/net/raw_cb.c line 87
- in /usr/src/sys/net/route.c line 104
- in /usr/src/sys/netimp/if_imphost.c line 95, 152
- in /usr/src/sys/netinet/in_pcb.c line 236
- in /usr/src/sys/netinet/ip_icmp.c line 125, 425
- in /usr/src/sys/netinet/ip_input.c line 283, 311, 359, 374-378(2), 401, 407, 423-424(2), 447-450(2), 816, 871, 902, 949
- in /usr/src/sys/netinet/tcp_input.c line 110, 130-134(2), 160, 170, 1219
- in /usr/src/sys/netinet/tcp_subr.c line 133, 236-242(3)
- in /usr/src/sys/netns/ns_error.c line 137-143(3), 279
- in /usr/src/sys/netns/ns_input.c line 321, 344, 372, 397
- in /usr/src/sys/netns/ns_ip.c line 81, 225
- in /usr/src/sys/netns/ns_pcb.c line 198
- in /usr/src/sys/netns/spp_usrreq.c line 250, 428, 439, 493, 906, 1007, 1230, 1478-1483(3)
- in /usr/src/sys/sys/uipc_socket.c line 130
- in /usr/src/sys/sys/uipc_usrreq.c line 324, 477

mtocl defined in line 49; used 4 times

- in line 126, 132, 148
- in /usr/src/sys/sys/uipc_mbuf.c line 264

mtod defined in line 55; used 264 times

- in line 136
- in /usr/src/new/crash/route.c line 123
- in /usr/src/sbin/route/route.c line 171
- in /usr/src/sys/net/if.h line 136
- in /usr/src/sys/net/if_loop.c line 88
- in /usr/src/sys/net/if_sl.c line 303, 421, 437, 443
- in /usr/src/sys/net/raw_cb.c line 56, 106, 146
- in /usr/src/sys/net/raw_usrreq.c line 60, 100, 297, 303
- in /usr/src/sys/net/route.c line 57, 239, 311
- in /usr/src/sys/netimp/if_imp.c line 174, 180-185(2), 352, 365, 428, 480, 520, 550, 629
- in /usr/src/sys/netimp/if_imphost.c line 46, 71, 93-95(2), 132, 169, 213
- in /usr/src/sys/netimp/raw_imp.c line 59, 66
- in /usr/src/sys/netinet/if_ether.c line 115, 257, 305, 419
- in /usr/src/sys/netinet/in.c line 234-237(3)
- in /usr/src/sys/netinet/in_pcb.c line 44, 73, 121, 246, 260
- in /usr/src/sys/netinet/ip_icmp.c line 90, 118, 142, 168-171(2), 429
- in /usr/src/sys/netinet/ip_input.c line 127, 138, 330, 781, 787-789(2), 821, 963
- in /usr/src/sys/netinet/ip_output.c line 64, 206, 272-274(2), 290-296(3), 371-372(2), 431-433(3), 470
- in /usr/src/sys/netinet/raw_ip.c line 47, 95, 102, 162-163(2)
- in /usr/src/sys/netinet/tcp_input.c line 201, 209, 250, 256-257(2), 392, 1174, 1222
- in /usr/src/sys/netinet/tcp_output.c line 241, 282-283(2)
- in /usr/src/sys/netinet/tcp_subr.c line 70, 129-130(2), 175
- in /usr/src/sys/netinet/tcp_usrreq.c line 206, 268, 344, 365-368(2)
- in /usr/src/sys/netinet/udp_usrreq.c line 77, 241
- in /usr/src/sys/netns/idp_usrreq.c line 49, 153, 164, 176, 283, 290, 303, 328, 339
- in /usr/src/sys/netns/ns.c line 123-126(3)
- in /usr/src/sys/netns/ns_error.c line 75, 121, 167, 188
- in /usr/src/sys/netns/ns_input.c line 111, 374, 459
- in /usr/src/sys/netns/ns_ip.c line 72, 150, 158, 168, 199, 229, 263, 290, 336, 346, 413
- in /usr/src/sys/netns/ns_output.c line 43
- in /usr/src/sys/netns/ns_pcb.c line 42, 60, 103, 205-208(2), 218-221(2)
- in /usr/src/sys/netns/spp_usrreq.c line 61, 81, 150, 388, 508, 624, 729, 742, 880, 911, 937, 1101, 1107, 1113, 1119, 1144, 1153, 1159, 1227, 1234, 1330, 1369
- in /usr/src/sys/pdp/in_cksum.c line 45
- in /usr/src/sys/pdpif/if_de.c line 682-685(2), 779, 787-788(2), 870, 1000, 1020, 1049
- in /usr/src/sys/pdpif/if_ec.c line 420-423(2), 500, 509, 576, 637, 685-689(3)
- in /usr/src/sys/pdpif/if_en.c line 191, 374, 430, 436-437(2), 490
- in /usr/src/sys/pdpif/if_il.c line 633
- in /usr/src/sys/pdpif/if_qe.c line 646
- in /usr/src/sys/pdpif/if_qt.c line 675
- in /usr/src/sys/pdpif/if_uba.c line 108, 129, 152
- in /usr/src/sys/pdpif/if_vv.c line 332, 439, 673-676(2), 791, 802-803(2), 846
- in /usr/src/sys/sys/sys_net.c line 223
- in /usr/src/sys/sys/uipc_mbuf.c line 162, 262-266(3), 293(2), 391(2)
- in /usr/src/sys/sys/uipc_socket.c line 59, 377, 452, 550, 663, 677, 698, 705-714(4), 751-753(2), 763-796(9)
- in /usr/src/sys/sys/uipc_socket2.c line 130, 469, 540(2)
- in /usr/src/sys/sys/uipc_syscalls.c line 95, 177, 208, 404, 414, 620, 698, 734, 756
- in /usr/src/sys/sys/uipc_usrreq.c line 99-103(3), 170, 248-249(2), 303, 333, 339, 354, 361, 494, 531-534(2), 627
- in /usr/src/ucb/netstat/route.c line 103
- in /usr/src/ucb/netstat/unix.c line 113

#### Usage of this include

mbuf.h used 71 times

- in /usr/src/new/crash/dispnet.c line 17
- in /usr/src/new/crash/inet.c line 14
- in /usr/src/new/crash/route.c line 13
- in /usr/src/new/kermit5.188/ckcnet.h line 97
- in /usr/src/sbin/route/route.c line 18
- in /usr/src/sys/net/af.c line 16
- in /usr/src/sys/net/if.c line 16
- in /usr/src/sys/net/if_loop.c line 21
- in /usr/src/sys/net/if_sl.c line 42
- in /usr/src/sys/net/raw_cb.c line 17
- in /usr/src/sys/net/raw_usrreq.c line 16
- in /usr/src/sys/net/route.c line 17
- in /usr/src/sys/netimp/if_imp.c line 19
- in /usr/src/sys/netimp/if_imphost.c line 20
- in /usr/src/sys/netimp/raw_imp.c line 13
- in /usr/src/sys/netinet/if_ether.c line 28
- in /usr/src/sys/netinet/in.c line 17
- in /usr/src/sys/netinet/in_pcb.c line 18
- in /usr/src/sys/netinet/in_proto.c line 19
- in /usr/src/sys/netinet/ip_icmp.c line 17
- in /usr/src/sys/netinet/ip_input.c line 17
- in /usr/src/sys/netinet/ip_output.c line 16
- in /usr/src/sys/netinet/raw_ip.c line 16
- in /usr/src/sys/netinet/tcp_debug.c line 24
- in /usr/src/sys/netinet/tcp_input.c line 17
- in /usr/src/sys/netinet/tcp_output.c line 17
- in /usr/src/sys/netinet/tcp_subr.c line 17
- in /usr/src/sys/netinet/tcp_timer.c line 17
- in /usr/src/sys/netinet/tcp_usrreq.c line 17
- in /usr/src/sys/netinet/udp_usrreq.c line 17
- in /usr/src/sys/netns/idp_usrreq.c line 18
- in /usr/src/sys/netns/ns.c line 17
- in /usr/src/sys/netns/ns_error.c line 18
- in /usr/src/sys/netns/ns_input.c line 18
- in /usr/src/sys/netns/ns_ip.c line 22
- in /usr/src/sys/netns/ns_output.c line 17
- in /usr/src/sys/netns/ns_pcb.c line 19
- in /usr/src/sys/netns/ns_proto.c line 20
- in /usr/src/sys/netns/spp_debug.c line 18
- in /usr/src/sys/netns/spp_usrreq.c line 19
- in /usr/src/sys/pdp/genassym.c line 14
- in /usr/src/sys/pdp/in_cksum.c line 11
- in /usr/src/sys/pdpif/if_acc.c line 21
- in /usr/src/sys/pdpif/if_css.c line 41
- in /usr/src/sys/pdpif/if_de.c line 22
- in /usr/src/sys/pdpif/if_dmc.c line 23
- in /usr/src/sys/pdpif/if_ec.c line 52
- in /usr/src/sys/pdpif/if_en.c line 18
- in /usr/src/sys/pdpif/if_il.c line 33
- in /usr/src/sys/pdpif/if_qe.c line 114
- in /usr/src/sys/pdpif/if_qt.c line 61
- in /usr/src/sys/pdpif/if_sri.c line 18
- in /usr/src/sys/pdpif/if_uba.c line 20
- in /usr/src/sys/pdpif/if_vv.c line 48
- in /usr/src/sys/sys/sys_kern.c line 18
- in /usr/src/sys/sys/sys_net.c line 29
- in /usr/src/sys/sys/sys_socket.c line 20
- in /usr/src/sys/sys/uipc_mbuf.c line 12
- in /usr/src/sys/sys/uipc_proto.c line 19
- in /usr/src/sys/sys/uipc_socket.c line 20
- in /usr/src/sys/sys/uipc_socket2.c line 22
- in /usr/src/sys/sys/uipc_syscalls.c line 20
- in /usr/src/sys/sys/uipc_usrreq.c line 11
- in /usr/src/ucb/PORT/systat/mbufs.c line 12
- in /usr/src/ucb/PORT/systat/netcmds.c line 19
- in /usr/src/ucb/PORT/systat/netstat.c line 18
- in /usr/src/ucb/netstat/inet.c line 23
- in /usr/src/ucb/netstat/mbuf.c line 19
- in /usr/src/ucb/netstat/ns.c line 24
- in /usr/src/ucb/netstat/route.c line 22
- in /usr/src/ucb/netstat/unix.c line 24

Last modified: 1994-01-11 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1260 |