1*8f911486Smiod /* $OpenBSD: file.h,v 1.12 2014/12/13 14:44:59 miod Exp $ */ 2e08c8b61Smaja 3bff609efSmaja /* 4bff609efSmaja * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. 5bff609efSmaja * 6bff609efSmaja * Redistribution and use in source and binary forms, with or without 7bff609efSmaja * modification, are permitted provided that the following conditions 8bff609efSmaja * are met: 9bff609efSmaja * 1. Redistributions of source code must retain the above copyright 10bff609efSmaja * notice, this list of conditions and the following disclaimer. 11bff609efSmaja * 2. Redistributions in binary form must reproduce the above copyright 12bff609efSmaja * notice, this list of conditions and the following disclaimer in the 13bff609efSmaja * documentation and/or other materials provided with the distribution. 14bff609efSmaja * 15bff609efSmaja * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16bff609efSmaja * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17bff609efSmaja * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18bff609efSmaja * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19bff609efSmaja * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20bff609efSmaja * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21bff609efSmaja * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22bff609efSmaja * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23bff609efSmaja * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24bff609efSmaja * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25bff609efSmaja * 26*8f911486Smiod * $OpenBSD: file.h,v 1.12 2014/12/13 14:44:59 miod Exp $ 27bff609efSmaja * 28bff609efSmaja */ 29bff609efSmaja 30bff609efSmaja #ifndef _FILE_H_ 31bff609efSmaja #define _FILE_H_ 32bff609efSmaja 33694e69a1Smaja #define INFO_PRINT 1 34694e69a1Smaja 3505230cd5Smiod const char *FileTypeName(mopd_imagetype); 3605230cd5Smiod 3705230cd5Smiod void mopFilePutLX(u_char *, int, u_int32_t, int); 3805230cd5Smiod void mopFilePutBX(u_char *, int, u_int32_t, int); 3905230cd5Smiod u_int32_t mopFileGetLX(u_char *, int, int); 4005230cd5Smiod u_int32_t mopFileGetBX(u_char *, int, int); 41*8f911486Smiod u_int64_t mopFileGetLXX(u_char *, int, int); 42*8f911486Smiod u_int64_t mopFileGetBXX(u_char *, int, int); 43861d1778Savsm ssize_t mopFileRead(struct dllist *, u_char *); 4405230cd5Smiod void mopFileSwapX(u_char *, int, int); 4505230cd5Smiod 4605230cd5Smiod int CheckMopFile(int); 4705230cd5Smiod int GetMopFileInfo(struct dllist *, int); 4805230cd5Smiod 4905230cd5Smiod int CheckElfFile(int); 50*8f911486Smiod int GetElf32FileInfo(struct dllist *, int); 51*8f911486Smiod int GetElf64FileInfo(struct dllist *, int); 5205230cd5Smiod 5305230cd5Smiod int CheckAOutFile(int); 5405230cd5Smiod int GetAOutFileInfo(struct dllist *, int); 5505230cd5Smiod 5605230cd5Smiod int GetFileInfo(struct dllist *, int); 57bff609efSmaja 58fd0d495eSheko #endif /* _FILE_H_ */ 59