]> git.proxmox.com Git - qemu.git/blobdiff - slirp/mbuf.h
slirp: cleanup leftovers from misc.h
[qemu.git] / slirp / mbuf.h
index 55170e517bd2e6c11b97e4133370df09169815af..3f3ab095b1030eb61d5e9f14116bd6179440d08c 100644 (file)
@@ -82,12 +82,13 @@ struct m_hdr {
 struct mbuf {
        struct  m_hdr m_hdr;
        Slirp *slirp;
+       bool    arp_requested;
+       uint64_t expiration_date;
+       /* start of dynamic buffer area, must be last element */
        union M_dat {
                char    m_dat_[1]; /* ANSI don't like 0 sized arrays */
                char    *m_ext_;
        } M_dat;
-    bool     arp_requested;
-    uint64_t expiration_date;
 };
 
 #define m_next         m_hdr.mh_next
@@ -115,6 +116,7 @@ struct mbuf {
                                         * it rather than putting it on the free list */
 
 void m_init(Slirp *);
+void m_cleanup(Slirp *slirp);
 struct mbuf * m_get(Slirp *);
 void m_free(struct mbuf *);
 void m_cat(register struct mbuf *, register struct mbuf *);
@@ -123,4 +125,9 @@ void m_adj(struct mbuf *, int);
 int m_copy(struct mbuf *, struct mbuf *, int, int);
 struct mbuf * dtom(Slirp *, void *);
 
+static inline void ifs_init(struct mbuf *ifm)
+{
+    ifm->ifs_next = ifm->ifs_prev = ifm;
+}
+
 #endif