00001 // $Id: vin.h,v 1.4 2004/07/05 23:25:39 alpha Exp $ 00002 // 00003 // Copyright (c) 1999-2004 Darius Rad 00004 // 00005 // This file is part of the OpenOtto project. 00006 // 00007 // OpenOtto is free software; you can redistribute it and/or modify 00008 // it under the terms of the GNU General Public License as published by 00009 // the Free Software Foundation; either version 2 of the License, or 00010 // (at your option) any later version. 00011 // 00012 00015 00016 00017 #ifndef _OTTO_VIN_H 00018 #define _OTTO_VIN_H 00019 00020 00022 union otto_vin 00023 { 00024 char vin[17]; 00025 struct 00026 { 00027 char country; 00028 char manufacturer; 00029 char type; 00030 char features[5]; 00031 char check; 00032 char year; 00033 char plant; 00034 char seq[6]; 00035 } 00036 fields; 00037 }; 00038 00040 struct otto_vin_decoded 00041 { 00042 char *vin; 00043 char *country; 00044 char *manufacturer; 00045 char *make; 00046 char *model; 00047 char *series; 00048 char *body; 00049 char *engine; 00050 char *transmission; 00051 char *weight; 00052 char *emission; 00053 char *restraint; 00054 char *year; 00055 char *plant; 00056 char *serial; 00057 }; 00058 00061 int 00062 otto_vinchecksum( 00063 union otto_vin *vin 00064 ); 00065 00068 int 00069 otto_vinlookup( 00070 union otto_vin *vin, 00071 struct otto_vin_decoded *decoded 00072 ); 00073 00074 00075 #endif