diff --git a/docs/PyRIC.pdf b/docs/PyRIC.pdf index d60b93e..595bd35 100644 Binary files a/docs/PyRIC.pdf and b/docs/PyRIC.pdf differ diff --git a/docs/PyRIC.tex b/docs/PyRIC.tex index 9b1ae92..2ed874e 100644 --- a/docs/PyRIC.tex +++ b/docs/PyRIC.tex @@ -483,7 +483,7 @@ \subsection{Additional Tools} In the utils directory, PyRIC includes channels.py, hardware.py, rfkill.py and ouifetch.py. These provide a port of rfkill, channel/frequency enumeration and device chipset, driver retrieval as well as some mac address functions. More -information can be found in the Appendices. +information can be found in the Appendices and in README.md. \subsection{Interacting with the Kernel: libnl.py and libio.py} The kernel interfaces, libnl.py and libio.py are located in the lib directory. @@ -741,6 +741,9 @@ \subsection{Functions} \item up(card,[iosock]) (ifconfig card. up), type: ioctl, bring card up \item down(card,[iosock]): (ifconfig card. down), type: ioctl, bring card down +\item block(card): (rfkill block ) type: N/A, soft blocks card +\item unblock(card): (rfkill unblock ) type: N/A, removes the soft +block on card \item inetget(card,[iosock]): (ifconfig card.), type: ioctl, get ip4 address, netmask and broadcast address of card \item inetset(card,ipaddr,netmask,broadcast,[iosock]): (ifconfig card/ @@ -837,8 +840,9 @@ \subsection{Functions} \item rf2ch(f): convert frequency f to channel \end{enumerate} -\section{API: device.py}\label{sec:deviceapi} -Retrieval of the driver and chipset of a given card is found in device.py. +\section{API: hardware.py}\label{sec:deviceapi} +Hardware related: driver, chipset, manufacturer and mac address utility functions +can be found in device.py. \subsection{Constants} \begin{enumerate} @@ -848,11 +852,25 @@ \subsection{Constants} \subsection{Functions} \begin{enumerate} +\item parseoui(path): reads and stores oui data from optional into a dict +\item oui(mac): returns the oui portion of address +\item ulm(mac): returns the ulm portion of address +\item manufacturer(ouis,mac): returns the manufacturer name of given the +dict of +\item randhw(ouis): returns a random mac address given a dict of \item ifcard(dev): returns the device driver and chipset \item ifdriver(dev): returns the device driver \item ifchipset(driver): returns the chipset associated with driver \end{enumerate} +\section{API: ouifetch.py} +The file ouifetch.py retrieves and saves a tab seperated file of oui to +manufacturer name for use by hardware.py functions. From a command line, type: \\ + +\texttt{python ouifetch.py}\\ + +Optional arguments path and verbose can also be specified. + \section{API: rfkill.py}\label{sec:rfkillapi} A port of the command line tool rfkill, rfkill.py writes and reads rfkill\_event structures to /dev/rfkill using fcntl provding functionality to block and unblock @@ -860,8 +878,8 @@ \section{API: rfkill.py}\label{sec:rfkillapi} \subsection{Constants} \begin{enumerate} -\item \textbf{RFKILL\_TYPES}: list of strings corresponding to the types of devices -supported by rfkill +\item \textbf{RFKILL\_STATE}: list of boolean values corresponding to blocked, +unblocked \end{enumerate} \subsection{Functions}