Skip to content

Commit

Permalink
Remove references to Netfront.
Browse files Browse the repository at this point in the history
  • Loading branch information
pgj committed Aug 9, 2012
1 parent 3f1245f commit 42c41a2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
24 changes: 12 additions & 12 deletions packages/mirage-platform/lib/netif.ml
Expand Up @@ -47,33 +47,33 @@ let unplug id =
Console.log (sprintf "Netif.unplug %s: not implemented yet" id);
()

let create fn =
let create f =
Console.log (sprintf "Netif.create: not implemented yet");
return ()

let write nf page =
Console.log (sprintf "Netif.write %s: not implemented yet" nf.backend);
let write ifc page =
Console.log (sprintf "Netif.write %s: not implemented yet" ifc.backend);
return ()

let writev nf pages =
Console.log (sprintf "Netif.writev %s: not implemented yet" nf.backend);
let writev ifc pages =
Console.log (sprintf "Netif.writev %s: not implemented yet" ifc.backend);
return ()

let listen nf fn =
Console.log (sprintf "Netif.listen %s: not implemented yet" nf.backend);
let listen ifc fn =
Console.log (sprintf "Netif.listen %s: not implemented yet" ifc.backend);
return ()

let enumerate () =
Console.log (sprintf "Netif.enumerate: not implemented yet");
return []

let mac nf =
Console.log (sprintf "Netif.mac %s: not implemented yet" nf.backend);
let mac ifc =
Console.log (sprintf "Netif.mac %s: not implemented yet" ifc.backend);
""

let ethid nf =
string_of_int nf.backend_id
let ethid ifc =
string_of_int ifc.backend_id

let get_writebuf nf =
let get_writebuf ifc =
let page = Io_page.get() in
return page
16 changes: 8 additions & 8 deletions packages/mirage-platform/lib/netif.mli
Expand Up @@ -14,19 +14,18 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)

(** kFreeBSD Netfront interface for Ethernet I/O *)
(** kFreeBSD network interface for Ethernet I/O *)

(** Type of a single netfront interface *)
(** Type of a single interface *)
type t

(** Textual id which is unique per netfront interface *)
(** Textual id which is unique per interface *)
type id = string

(** Create a hotplug interface that will spawn a new thread
per network interface.
@param fn Callback function that is invoked for every new netfront
interface.
@param fn Callback function that is invoked for every new interface.
@return Blocking thread that will unplug all the attached interfaces
if cancelled.
*)
Expand All @@ -46,14 +45,15 @@ val write : t -> Io_page.t -> unit Lwt.t
(** Output a list of Io_pages to an interface as a single packet *)
val writev : t -> Io_page.t list -> unit Lwt.t

(** Listen endlesses on a Netfront, and invoke the callback function as frames are
(** Listen endlesses on the interface, and invoke the callback function as frames are
received. *)
val listen : t -> (Io_page.t -> unit Lwt.t) -> unit Lwt.t

(** Enumerate all the currently available Netfronts (which may or may not be attached) *)
(** Enumerate all the currently available network interfaces (which may or may
not be attached) *)
val enumerate : unit -> id list Lwt.t

(** Return the MAC address of the Netfront *)
(** Return the MAC address of the interface *)
val ethid : t -> string
val mac : t -> string

Expand Down

0 comments on commit 42c41a2

Please sign in to comment.