Progetti Linux

git-svn-id: svn://10.65.10.50/trunk@11940 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2004-04-06 21:28:46 +00:00
parent 47c3c3483b
commit 0bee10929f
26 changed files with 119 additions and 99 deletions

View File

@ -1,18 +1,16 @@
EUTRON SPA EUTRON
INFORMATION SECURITY SOLUTION
Phone +39-(0)35-697011
Fax +39-(0)35-697092
Internet : http://www.smartkey.eutron.it Internet : http://www.smartkey.eutron.it
Technical support : helpdesk@eutron.it Helpdesk email : helpdesk@eutron.it
Commercial info : info@eutron.it Commercial email : info@eutron.it
Commercial phone : 035697080
Fax : 035697092
SmartKey Parallel and USB driver for Linux SmartKey Parallel and USB driver for Linux
------------------------------------------ ------------------------------------------
Questo driver funziona per kernel dal 2.4.20 al 2.4.21 compilato con gcc-3.2.3 Questo driver funziona per kernel dal 2.4.21-144 (Suse 9) compilato con gcc-3.2.3
Il pacchetto fornisce un'interfaccia tra i programmi scritti in Il pacchetto fornisce un'interfaccia tra i programmi scritti in
linguaggio C e il driver della chiave SMARTKEY. L'interfaccia e` linguaggio C e il driver della chiave SMARTKEY. L'interfaccia e`
@ -21,33 +19,44 @@ Questo permette un facile trasporto in ambiente Unix dei programmi
sviluppati per il sistema operativo MS-DOS. sviluppati per il sistema operativo MS-DOS.
CONTENUTO DEL PACCHETTO CONTENUTO
----------------------- ---------
Il pacchetto e` costituito dai seguenti file: Il pacchetto e` costituito dai seguenti file:
LEGGIMI Contiene delle informazioni relative al pacchetto. clink.o
E' il file che state leggendo. Costituisce l'interfaccia tra le applicazioni in linguaggio C e
clink.o Costituisce l'interfaccia tra le applicazioni in il driver della chiave SMARTKEY.
linguaggio C e il driver della chiave SMARTKEY.
clink.h Definisce la struttura dell'interfaccia di clink.o. clink.h
Deve essere incluso nei file C che utilizzano la Definisce la struttura dell'interfaccia di clink.o. Deve essere
chiave SMARTKEY. incluso nei file C che utilizzano la chiave SMARTKEY.
smartdem.c Esempio di utilizzo della chiave SMARTKEY scritto in
linguaggio C. smartdem.c
smartdem Forma eseguibile del programma esempio. Esempio di utilizzo della chiave SMARTKEY scritto in linguaggio C.
skey*.o Driver della chiave
skinstall Script per l'installazione automatica smartdem
skuninstall Script per la disinstallazione automatica Forma eseguibile del programma esempio.
skeyver Utility per impostare la versione del kernel nel modulo skey.o
skey*.o
Driver della chiave
skinstall
Script per l'installazione automatica
skuninstall
Script per la disinstallazione automatica
skeyver
Utility per impostare la versione del kernel nel modulo skey.o
SUPPORTO USB SUPPORTO USB
------------ ------------
Il driver SmartKey, come ogni altro driver USB, richiede che i moduli USB Il driver SmartKey, come ogni altro driver USB, richiede che i moduli
del kernel siano caricati ed attivi. USB del kernel siano caricati ed attivi. Generalmente questo si puo'
Generalmente questo si puo' ottenere con i comandi : ottenere con i comandi :
insmod usbcore insmod usbcore
insmod usb-uhci insmod usb-uhci
@ -188,24 +197,21 @@ Per installare il driver si segua la procedura seguente:
e' avvenuto. e' avvenuto.
UTILIZZO UTILIZZO
-------- --------
Per utilizzare l'interfaccia clink.o e` necessario copiare il file nel Per utilizzare l'interfaccia clink.o e` necessario copiare il file nel
direttorio di lavoro e collegarlo agli altri file oggetto costituenti direttorio di lavoro e collegarlo agli altri file oggetto costituenti il
il programma da proteggere. Nei file del programma applicativo che programma da proteggere. Nei file del programma applicativo che
utilizzano il modulo clink.o e` necessario includere il file clink.h. utilizzano il modulo clink.o e` necessario includere il file clink.h.
Nel caso in cui il compilatore C utilizzato non sia ANSI-C e`
necessario usare l'opzione di compilazione -DNO_ANSI_C.
CONFIGURAZIONE CONFIGURAZIONE
-------------- --------------
Se si sta utilizzando una porta Parallela PCI che usa un indirizzo di IO Se si sta utilizzando una porta Parallela PCI che usa un indirizzo di IO
non standard, e' necessario specificare l'indirizzo effettivo di IO della non standard, e' necessario specificare l'indirizzo effettivo di IO
porta con l'argomento "port" del modulo. della porta con l'argomento "port" del modulo.
L'argomento accetta fino a tre valori separati da virgole. I valori di L'argomento accetta fino a tre valori separati da virgole. I valori di
default sono 0x378, 0x278, 0x3bc. default sono 0x378, 0x278, 0x3bc.
@ -220,8 +226,8 @@ o
Su sistemi con bus usb OHCI (Open Host Controller Interface), Su sistemi con bus usb OHCI (Open Host Controller Interface),
generalmenti presenti su tutte le schede aggiuntive PCI USB, generalmenti presenti su tutte le schede aggiuntive PCI USB, e'
e' necessario aggiungere l'argomento "fastusb=0" necessario aggiungere l'argomento "fastusb=0"
Per esempio : Per esempio :

View File

@ -1,50 +1,62 @@
EUTRON SPA EUTRON
INFORMATION SECURITY SOLUTION
Phone +39-(0)35-697011
Fax +39-(0)35-697092
Internet : http://www.smartkey.eutron.com Internet : http://www.smartkey.eutron.com
Technical support : helpdesk@eutron.com Helpdesk email : helpdesk@eutron.com
Commercial info : info@eutron.com Commercial email : info@eutron.com
Commercial phone : +39-035697080
Fax : +39-035697092
SmartKey Parallel and USB driver for Linux SmartKey Parallel and USB driver for Linux
------------------------------------------ ------------------------------------------
This driver works for kernel from 2.4.20 to 2.4.21 compiled with gcc-3.2.3 This driver works for kernel from 2.4.21-144 (Suse 9) compiled with gcc-3.2.3
The application provides an interface between the C language and The application provides an interface between the C language and the
the driver of the SMARTKEY key. The application is totally compatible driver of the SMARTKEY key. The application is totally compatible with
with the one available under MS-DOS. This makes it easy to port the one available under MS-DOS. This makes it easy to port programs
programs written for the MS-DOS operating system to the Unix environment. written for the MS-DOS operating system to the Unix environment.
CONTENTS OF THE APPLICATION CONTENTS
--------------------------- --------
The application contains the following files: The package contains the following files:
README This contains information about the application. clink.o
It's the file you are reading now. This is the interface between C programs and the SMARTKEY
clink.o This is the interface between C programs and the SMARTKEY
driver. driver.
clink.h This outlines the structure of the clink.o interface.
It has to be used in the C files that use the SMARTKEY key. clink.h
smartdem.c An example, written in C, of how to use the SMARTKEY key. This outlines the structure of the clink.o interface. It has to be used
smartdem Executable of the sample program. in the C files that use the SMARTKEY key.
skey*.o Drivers of the key
skinstall Script for automatic installation smartdem.c
skuninstall Script for automatic uninstalling An example, written in C, of how to use the SMARTKEY key.
skeyver Utility for setting the version of the kernel in the skey.o
smartdem
Executable of the sample program.
skey*.o
Drivers of the key
skinstall
Script for automatic installation
skuninstall
Script for automatic uninstalling
skeyver
Utility for setting the version of the kernel in the skey.o
module module
USB SUPPORT USB SUPPORT
----------- -----------
The Smarkey driver, like any other USB driver, requires that the USB The Smarkey driver, like any other USB driver, requires that the USB
modules of the kernel are active and running. modules of the kernel are active and running. Generally you can obtain
Generally you can obtain this running these commands : this running these commands :
insmod usbcore insmod usbcore
insmod usb-uhci insmod usb-uhci
@ -60,12 +72,12 @@ for PCs with an USB controller OHCI by Compaq, iMacs, OPTi, SiS, ALi...
UPGRADING UPGRADING
--------- ---------
To upgrade from the previous version of the SmartKey driver you need To upgrade from the previous version of the SmartKey driver you need to
to relink your application with the new clink.o object. relink your application with the new clink.o object.
If you don't relink, your application will work only with the first USB If you don't relink, your application will work only with the first USB
key inserted and with the parallel port addresses 0x3BC and 0x378. key inserted and with the parallel port addresses 0x3BC and 0x378. You
You will lose the access at the parallel port at address 0x278 substituted will lose the access at the parallel port at address 0x278 substituted
with the first USB key. with the first USB key.
@ -77,16 +89,16 @@ Start the skinstall script with root rights using the commands:
chmod a+x skinstall chmod a+x skinstall
./skinstall ./skinstall
The installation will configure the system for the automatic loading of the The installation will configure the system for the automatic loading of
SmartKey module the first time it is run. the SmartKey module the first time it is run.
To uninstall the driver use the commands: To uninstall the driver use the commands:
chmod a+x skuninstall chmod a+x skuninstall
./skuninstall ./skuninstall
Every time the version of the kernel changes, you will have to perform the Every time the version of the kernel changes, you will have to perform
installation again. the installation again.
To start the demo application use the commands: To start the demo application use the commands:

View File

@ -1,6 +1,6 @@
/* /*
* SmartKey Driver * SmartKey Driver
* Copyright EUTRON 1993-2002 * Copyright EUTRON 1993-2004
*/ */
#ifndef __SMARTKEY_H #ifndef __SMARTKEY_H

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
/* /*
* SmartKey Demo Program * SmartKey Demo Program
* Copyright EUTRON 1993-2002 * Copyright EUTRON 1993-2004
*/ */
#include <string.h> #include <string.h>
@ -57,7 +57,7 @@ int main(void)
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
printf("SmartKey found on port %d\n", skey.lpt); printf("SmartKey found on port %d\n", (unsigned)skey.lpt);
/* Scrambling */ /* Scrambling */
printf("Scrambling "); printf("Scrambling ");
@ -109,14 +109,15 @@ int main(void)
case SKEY_EP : printf("model EP"); break; case SKEY_EP : printf("model EP"); break;
case SKEY_SP : printf("model SP"); break; case SKEY_SP : printf("model SP"); break;
case SKEY_NET : printf("model NET"); break; case SKEY_NET : printf("model NET"); break;
default : printf("model unknow"); break; default : printf("model unknown"); break;
} }
switch (skey.data[1]) { switch (skey.data[1]) {
case '0' : printf(", memory 0 byte"); break; case '0' : printf(", memory 0 byte"); break;
case '1' : printf(", memory 64 byte"); break; case '1' : printf(", memory 64 byte"); break;
case '2' : printf(", memory 192 byte"); break; case '2' : printf(", memory 192 byte"); break;
case '3' : printf(", memory 416 byte"); break; case '3' : printf(", memory 416 byte"); break;
default : printf(", memory unknow"); break; case '4' : printf(", memory 896 byte"); break;
default : printf(", memory unknown"); break;
} }
printf("\n"); printf("\n");
@ -138,21 +139,22 @@ int main(void)
case SKEY_EP : printf("model EP"); break; case SKEY_EP : printf("model EP"); break;
case SKEY_SP : printf("model SP"); break; case SKEY_SP : printf("model SP"); break;
case SKEY_NET : printf("model NET"); break; case SKEY_NET : printf("model NET"); break;
default : printf("model unknow"); break; default : printf("model unknown"); break;
} }
switch (skey.data[1]) { switch (skey.data[1]) {
case '0' : printf(", memory 0 byte"); break; case '0' : printf(", memory 0 byte"); break;
case '1' : printf(", memory 64 byte"); break; case '1' : printf(", memory 64 byte"); break;
case '2' : printf(", memory 192 byte"); break; case '2' : printf(", memory 192 byte"); break;
case '3' : printf(", memory 416 byte"); break; case '3' : printf(", memory 416 byte"); break;
default : printf(", memory unknow"); break; case '4' : printf(", memory 896 byte"); break;
default : printf(", memory unknown"); break;
} }
switch (skey.data[2]) { switch (skey.data[2]) {
case 0 : printf(", type A"); break; case 0 : printf(", type A"); break;
case 1 : printf(", type B"); break; case 1 : printf(", type B"); break;
case 2 : printf(", type ASIC"); break; case 2 : printf(", type ASIC"); break;
case 3 : printf(", type USB"); break; case 3 : printf(", type USB"); break;
default : printf(", type unknow"); break; default : printf(", type unknown"); break;
} }
printf("\n"); printf("\n");

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.