FreeNOS
|
Ethernet address file. More...
#include <EthernetAddress.h>
Public Member Functions | |
EthernetAddress (const u32 inode, Ethernet *eth) | |
Constructor. More... | |
virtual | ~EthernetAddress () |
Destructor. More... | |
virtual FileSystem::Result | read (IOBuffer &buffer, Size &size, const Size offset) |
Read Ethernet address. More... | |
virtual FileSystem::Result | write (IOBuffer &buffer, Size &size, const Size offset) |
Set new Ethernet address. More... | |
Public Member Functions inherited from File | |
File (const u32 inode, const FileSystem::FileType type=FileSystem::RegularFile, const UserID uid=ZERO, const GroupID gid=ZERO) | |
Constructor function. More... | |
virtual | ~File () |
Destructor function. More... | |
u32 | getInode () const |
Get inode number. More... | |
FileSystem::FileType | getType () const |
Retrieve our filetype. More... | |
virtual FileSystem::Result | status (FileSystem::FileStat &st) |
Retrieve file statistics. More... | |
virtual bool | canRead () const |
Check if the File has data ready for reading. More... | |
virtual bool | canWrite () const |
Check if the File can be written to. More... | |
Private Attributes | |
Ethernet * | m_eth |
Ethernet object pointer. More... | |
Additional Inherited Members | |
Protected Attributes inherited from File | |
const u32 | m_inode |
Inode number. More... | |
const FileSystem::FileType | m_type |
Type of this file. More... | |
UserID | m_uid |
Owner of the file. More... | |
GroupID | m_gid |
Group of the file. More... | |
FileSystem::FileModes | m_access |
Access permissions. More... | |
Size | m_size |
Size of the file, in bytes. More... | |
Ethernet address file.
Definition at line 36 of file EthernetAddress.h.
Constructor.
inode | Inode number |
eth | Ethernet pointer |
Definition at line 21 of file EthernetAddress.cpp.
References File::m_size.
|
virtual |
Destructor.
Definition at line 29 of file EthernetAddress.cpp.
|
virtual |
Read Ethernet address.
buffer | Input/Output buffer to output bytes to. |
size | Maximum number of bytes to read on input. On output, the actual number of bytes read. |
offset | Offset inside the file to start reading. |
Reimplemented from File.
Definition at line 33 of file EthernetAddress.cpp.
References Ethernet::getAddress(), m_eth, File::m_size, FileSystem::Success, and IOBuffer::write().
|
virtual |
Set new Ethernet address.
buffer | Input/Output buffer to input bytes from. |
size | Maximum number of bytes to write on input. On output, the actual number of bytes written. |
offset | Offset inside the file to start writing. |
Reimplemented from File.
Definition at line 52 of file EthernetAddress.cpp.
References FileSystem::NotSupported.
|
private |