"Fossies" - the Fresh Open Source Software Archive

Member "pidentd-3.0.19/src/pdes.h" (20 Jan 1999, 1017 Bytes) of package /linux/misc/old/pidentd-3.0.19.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "pdes.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2 ** pdes.h - Pidentd DES encryption stuff
    3 **
    4 ** Copyright (c) 1997-1999 Peter Eriksson <pen@lysator.liu.se>
    5 **
    6 ** This program is free software; you can redistribute it and/or
    7 ** modify it as you wish - as long as you don't claim that you wrote
    8 ** it.
    9 **
   10 ** This program is distributed in the hope that it will be useful,
   11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
   12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   13 */
   14 
   15 #ifndef PIDENTD_PDES_H
   16 #define PIDENTD_PDES_H
   17 
   18 struct info
   19 {
   20     uint32_t checksum;
   21     uint16_t random;
   22     /* FIXME: uid_t isn't necessarily short.  */
   23     uint16_t uid;
   24     uint32_t date;
   25     uint32_t ip_local;
   26     uint32_t ip_remote;
   27     uint16_t port_local;
   28     uint16_t port_remote;
   29 };
   30 
   31 typedef union data
   32 {
   33     struct info   fields;
   34     uint32_t        longs[6];
   35     unsigned char chars[24];
   36 } data;
   37 
   38 struct kernel;
   39 
   40 extern int pdes_init(char *keyfile);
   41 extern int pdes_encrypt(struct kernel *kp, char buffer[33]);
   42 extern int pdes_decrypt(void);
   43      
   44 #endif
   45