text: struct ext2_superblock
  {
  
      unsigned int nodeCount;
      unsigned int blockCount;
      unsigned int blockCountSuper;
      unsigned int blockCountUnalloc;
      unsigned int nodeCountUnalloc;
      unsigned int superblockIndex;
      unsigned int blockSize;
      unsigned int fragmentSize;
      unsigned int blockCountGroup;
      unsigned int fragmentCountGroup;
      unsigned int nodeCountGroup;
      unsigned int lastMountTime;
      unsigned int lastWriteTime;
      unsigned short currentCheckCount;
      unsigned short maxCheckCount;
      unsigned short signature;
      unsigned short state;
      unsigned short error;
      unsigned short minorVersion;
      unsigned int lastCheckTime;
      unsigned int forcedIntervalTime;
      unsigned int osId;
      unsigned int majorVersion;
      unsigned short userId;
      unsigned short groupId;
      unsigned int firstUnreservedNode;
      unsigned short nodeSize;
      unsigned short superblockGroup;
      unsigned int optionalAttributes;
      unsigned int requiredFeatures;
      unsigned int unsupportedFeatures;
      unsigned char system[16];
      unsigned char volume[16];
      unsigned char lastmount[64];
      unsigned int algorithm;
      unsigned char filePreallocBlocks;
      unsigned char directoryPreallocBlocks;
      unsigned short unused;
      unsigned char journal[16];
      unsigned int journalNode;
      unsigned int journalDevice;
      unsigned int firstOrphan;
  
  };
  
  struct ext2_blockgroup
  {
  
      unsigned int blockUsageAddress;
      unsigned int nodeUsageAddress;
      unsigned int blockTableAddress;
      unsigned short blockCountUnalloc;
      unsigned short nodeCountUnalloc;
      unsigned short directoryCount;
  
  };
  
  struct ext2_node
  {
  
      unsigned short type;
      unsigned short userId;
      unsigned int sizeLow;
      unsigned int lastAccessTime;
      unsigned int creationTime;
      unsigned int lastModificationTime;
      unsigned int deletionTime;
      unsigned short groupId;
      unsigned short hardCount;
      unsigned int sectorCount;
      unsigned int flags;
      unsigned int osSpecific;
      unsigned int pointer0;
      unsigned int pointer1;
      unsigned int pointer2;
      unsigned int pointer3;
      unsigned int pointer4;
      unsigned int pointer5;
      unsigned int pointer6;
      unsigned int pointer7;
      unsigned int pointer8;
      unsigned int pointer9;
      unsigned int pointer10;
      unsigned int pointer11;
      unsigned int singlyIndirectPointer;
      unsigned int doublyIndirectPointer;
      unsigned int tripplyIndirectPointer;
      unsigned int generation;
      unsigned int extendedAttributes;
      unsigned int sizeHigh;
      unsigned int fragmentBlockAddress;
  
  };
  
  struct ext2_entry
  {
  
      unsigned int node;
      unsigned char size[2];
      unsigned char length;
      unsigned char type;
  
  };
  
  struct ext2_protocol
  {
  
      struct block_protocol base;
      unsigned int (*validate)(struct base_block *interface, struct base_device *device);
      void (*read_blockgroup)(struct base_block *interface, struct base_device *device, unsigned int id, struct ext2_blockgroup *bg);
      void (*read_node)(struct base_block *interface, struct base_device *device, unsigned int id, struct ext2_blockgroup *bg, struct ext2_node *node);
      void (*read_content)(struct base_block *interface, struct base_device *device, struct ext2_node *node, void *buffer);
  
  };
  
  struct ext2_filesystem
  {
  
      struct service_protocol base;
      struct ext2_protocol *protocol;
      struct base_block *interface;
  
  };
  
  void ext2_init_protocol(struct ext2_protocol *protocol);
  void ext2_init_filesystem(struct ext2_filesystem *filesystem, struct ext2_protocol *protocol, struct base_block *interface);
  