/* This object's fields can be written-to by Lua during the read-based function callbacks. In other words, when the Lua plugin's  */
CaptureInfo* push_CaptureInfo(lua_State *L, wtap *wth, const gboolean first_time)
/* This object's fields can be written-to by Lua during the read-based function callbacks. In other words, when the Lua plugin's  */
CaptureInfo* push_CaptureInfo(lua_State *L, wtap *wth, const gboolean first_time)
{
        luaL_error(L, "Internal error: wth is NULL!");
        return NULL;
    }
    f = (CaptureInfo) g_malloc0(sizeof(struct _wslua_captureinfo));
    f->wth = wth;
    f->wdh = NULL;
    f->expired = FALSE;
    if (first_time) {
        wth->file_encap = WTAP_ENCAP_UNKNOWN;
        wth->file_tsprec = WTAP_TSPREC_UNKNOWN;
        wth->snapshot_length = 0;
    }
    return pushCaptureInfo(L,f);
}