/* * Endpoint - Linux SBP2 Disk Target * * Copyright (C) 2003 Oracle. All rights reserved. * * Author: Manish Singh * * 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 recieved a copy of the GNU General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 021110-1307, USA. */ #ifndef __SBP2_PAGE_TABLE_H__ #define __SBP2_PAGE_TABLE_H__ #include typedef struct _SBP2Page SBP2Page; typedef struct _SBP2PageNormalized SBP2PageNormalized; struct _SBP2Page { #if G_BYTE_ORDER == G_BIG_ENDIAN guint segment_length : 16; guint segment_base_hi : 16; #else guint segment_base_hi : 16; guint segment_length : 16; #endif guint32 segment_base_lo; }; struct _SBP2PageNormalized { /* TODO */ guint32 unimplmented1; guint32 unimplmented2; }; static inline void sbp2_pointer_from_page (SBP2Pointer *p, SBP2Page *page) { p->addr_lo = page->segment_base_lo; p->addr_hi = page->segment_base_hi; } #endif /* __SBP2_PAGE_TABLE_H__ */