Files
amiga-smbfs/source_code/smbfs.h
T
Olaf Barthel d29f359e49 smbfs 1.67 (27.5.2005)
- Replaced the long NT date conversion code with something hopefully
  much more robust. The results so far are both encouraging and
  irritating. Dates that previously came out as "unknown" are now
  processed, but there are differences between the dates shown in the
  directory listing and by listing the files by name. Go figure...

- Transplanted some more code from Samba to handle directory entry
  data conversion.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/amiga-smbfs/trunk@5 26594b9e-b914-4e86-b7a1-9402bd427170
2005-05-27 09:48:26 +00:00

160 lines
4.7 KiB
C

/*
* $Id: smbfs.h,v 1.2 2005-05-27 09:48:26 obarthel Exp $
*
* :ts=4
*
* SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
*
* Copyright (C) 2000-2005 by Olaf `Olsen' Barthel <olsen@sourcery.han.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _SMBFS_H
#define _SMBFS_H 1
/****************************************************************************/
#ifndef _SYSTEM_HEADERS_H
#include "system_headers.h"
#endif /* _SYSTEM_HEADERS_H */
#ifndef _ASSERT_H
#include "assert.h"
#endif /* _ASSERT_H */
/****************************************************************************/
#define SAME (0)
#define OK (0)
#define NOT !
/****************************************************************************/
#ifndef ZERO
#define ZERO ((BPTR)NULL)
#endif /* ZERO */
/****************************************************************************/
#ifndef AMIGA_COMPILER_H
/****************************************************************************/
#if defined(__SASC)
#define FAR __far
#define ASM __asm
#define REG(r,p) register __##r p
#define INLINE __inline
#endif /* __SASC */
#if defined(__GNUC__)
#define FAR
#define ASM
#define REG(r,p) p __asm(#r)
#define INLINE __inline__
#endif /* __GNUC__ */
/****************************************************************************/
#ifndef VARARGS68K
#define VARARGS68K
#endif /* VARARGS68K */
/*****************************************************************************/
#endif /* AMIGA_COMPILER_H */
/*****************************************************************************/
#ifndef min
#define min(a,b) ((a) < (b) ? (a) : (b))
#endif /* min */
/****************************************************************************/
#if defined(__SASC)
extern struct Library * FAR AbsExecBase;
#else
#ifndef AbsExecBase
#define AbsExecBase (*(struct Library **)4)
#endif /* AbsExecBase */
#endif /* __SASC */
/****************************************************************************/
extern struct Library * SocketBase;
extern struct Library * SysBase;
extern struct Library * DOSBase;
/****************************************************************************/
#if defined(__amigaos4__)
/****************************************************************************/
extern struct ExecIFace * IExec;
extern struct DOSIFace * IDOS;
extern struct SocketIFace * ISocket;
/****************************************************************************/
#endif /* __amigaos4__ */
/****************************************************************************/
extern int h_errno;
/****************************************************************************/
extern int BroadcastNameQuery(char *name, char *scope, UBYTE *address);
extern LONG CompareNames(STRPTR a,STRPTR b);
extern LONG GetTimeZoneDelta(VOID);
extern STRPTR amitcp_strerror(int error);
extern STRPTR host_strerror(int error);
extern time_t MakeTime(const struct tm * const tm);
extern ULONG GetCurrentTime(VOID);
extern VOID LocalTime(time_t seconds,struct tm * tm);
extern VOID VARARGS68K ReportError(STRPTR fmt,...);
extern VOID StringToUpper(STRPTR s);
extern VOID VARARGS68K SPrintf(STRPTR buffer, STRPTR formatString,...);
/****************************************************************************/
size_t strlcpy(char *dst, const char *src, size_t siz);
size_t strlcat(char *dst, const char *src, size_t siz);
/****************************************************************************/
extern void smb_encrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24);
extern void smb_nt_encrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24);
/****************************************************************************/
extern VOID FreeMemory(APTR address);
extern APTR AllocateMemory(ULONG size);
#define malloc(s) AllocateMemory(s)
#define free(m) FreeMemory(m)
/****************************************************************************/
#undef memcpy
#define memcpy(to,from,size) ((void)CopyMem((APTR)(from),(APTR)(to),(ULONG)(size)))
/****************************************************************************/
#endif /* _SMBFS_H */