Exemplo n.º 1
0
wtap_open_return_val vms_open(wtap *wth, int *err, gchar **err_info)
{
    /* Look for VMS header */
    if (!vms_check_file_type(wth, err, err_info)) {
        if (*err != 0 && *err != WTAP_ERR_SHORT_READ)
            return WTAP_OPEN_ERROR;
        return WTAP_OPEN_NOT_MINE;
    }

    wth->file_encap = WTAP_ENCAP_RAW_IP;
    wth->file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_VMS;
    wth->snapshot_length = 0; /* not known */
    wth->subtype_read = vms_read;
    wth->subtype_seek_read = vms_seek_read;
    wth->file_tsprec = WTAP_TSPREC_CSEC;

    return WTAP_OPEN_MINE;
}
Exemplo n.º 2
0
int vms_open(wtap *wth, int *err, gchar **err_info)
{
    /* Look for VMS header */
    if (!vms_check_file_type(wth, err, err_info)) {
        if (*err != 0 && *err != WTAP_ERR_SHORT_READ)
            return -1;
        return 0;
    }

    wth->file_encap = WTAP_ENCAP_RAW_IP;
    wth->file_type = WTAP_FILE_VMS;
    wth->snapshot_length = 0; /* not known */
    wth->subtype_read = vms_read;
    wth->subtype_seek_read = vms_seek_read;
    wth->tsprecision = WTAP_FILE_TSPREC_CSEC;

    return 1;
}