Diff for /qemu/slirp/mbuf.h between versions 1.1.1.3 and 1.1.1.4

version 1.1.1.3, 2018/04/24 16:54:26 version 1.1.1.4, 2018/04/24 17:25:34
Line 41 Line 41
 /*  /*
  * Macros for type conversion   * Macros for type conversion
  * mtod(m,t) -  convert mbuf pointer to data pointer of correct type   * mtod(m,t) -  convert mbuf pointer to data pointer of correct type
  * dtom(x) -    convert data pointer within mbuf to mbuf pointer (XXX)  
  */   */
 #define mtod(m,t)       ((t)(m)->m_data)  #define mtod(m,t)       ((t)(m)->m_data)
 /* #define      dtom(x)         ((struct mbuf *)((int)(x) & ~(M_SIZE-1))) */  
   
 /* XXX About mbufs for slirp:  /* XXX About mbufs for slirp:
  * Only one mbuf is ever used in a chain, for each "cell" of data.   * Only one mbuf is ever used in a chain, for each "cell" of data.
Line 86  struct m_hdr { Line 84  struct m_hdr {
   
 struct mbuf {  struct mbuf {
         struct  m_hdr m_hdr;          struct  m_hdr m_hdr;
           Slirp *slirp;
         union M_dat {          union M_dat {
                 char    m_dat_[1]; /* ANSI don't like 0 sized arrays */                  char    m_dat_[1]; /* ANSI don't like 0 sized arrays */
                 char    *m_ext_;                  char    *m_ext_;
Line 116  struct mbuf { Line 115  struct mbuf {
 #define M_DOFREE                0x08    /* when m_free is called on the mbuf, free()  #define M_DOFREE                0x08    /* when m_free is called on the mbuf, free()
                                          * it rather than putting it on the free list */                                           * it rather than putting it on the free list */
   
 /*  void m_init(Slirp *);
  * Mbuf statistics. XXX  struct mbuf * m_get(Slirp *);
  */  void m_free(struct mbuf *);
   void m_cat(register struct mbuf *, register struct mbuf *);
 struct mbstat {  void m_inc(struct mbuf *, int);
         int mbs_alloced;                /* Number of mbufs allocated */  void m_adj(struct mbuf *, int);
   int m_copy(struct mbuf *, struct mbuf *, int, int);
 };  struct mbuf * dtom(Slirp *, void *);
   
 extern struct   mbstat mbstat;  
 extern int mbuf_alloced;  
 extern struct mbuf m_freelist, m_usedlist;  
 extern int mbuf_max;  
   
 void m_init _P((void));  
 struct mbuf * m_get _P((void));  
 void m_free _P((struct mbuf *));  
 void m_cat _P((register struct mbuf *, register struct mbuf *));  
 void m_inc _P((struct mbuf *, int));  
 void m_adj _P((struct mbuf *, int));  
 int m_copy _P((struct mbuf *, struct mbuf *, int, int));  
 struct mbuf * dtom _P((void *));  
   
 #endif  #endif

Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.4


unix.superglobalmegacorp.com