Loading...
Searching...
No Matches
Switch_factory Class Reference
Virtio Net Switch

The IPC interface for creating ports. More...

Inheritance diagram for Switch_factory:
Collaboration diagram for Switch_factory:

## Public Member Functions

long | op_create (L4::Factory::Rights, L4::Ipc::Cap< void > &res, l4_umword_t type, L4::Ipc::Varg_list_ref va)
| Handle factory protocol.
Public Member Functions inherited from L4::Epiface_t0< L4::Factory, L4::Epiface >
Type_info::Demand | get_buffer_demand () const
| Get the server-side buffer demand based in IFACE.
Cap< L4::Factory > | obj_cap () const
| Get the (typed) capability to this object.
Public Member Functions inherited from L4::Epiface
| Epiface ()
| Make a server object.
virtual | ~Epiface ()=0
| Destroy the object.
Stored_cap | obj_cap () const
| Get the capability to the kernel object belonging to this object.
Server_iface * | server_iface () const
| Get pointer to server interface at which the object is currently registered.
int | set_server (Server_iface *srv, Cap< void > cap, bool managed=false)
| Set server registration info for the object.
void | set_obj_cap (Cap< void > const &cap)
| Deprecated server registration function.

## Additional Inherited Members

Public Types inherited from L4::Epiface_t0< L4::Factory, L4::Epiface >
typedef L4::Factory | Interface
| Data type of the IPC interface definition.
Public Types inherited from L4::Epiface
typedef Ipc_svr::Server_iface | Server_iface
| Type for abstract server interface.
typedef Ipc_svr::Server_iface::Demand | Demand
| Type for server-side receive buffer demand.

## Detailed Description

The IPC interface for creating ports.

The Switch factory provides an IPC interface to create ports. Ports are the only option for a client to communicate with the switch and, thus, with other network devices.

The Switch_factory gets constructed when the net switch application gets started. It thereafter gets registered on the switch's server to serve IPC create calls.

Definition at line 114 of file main.cc.

## Member Function Documentation

## op_create()

long Switch_factory::op_create | ( | L4::Factory::Rights | ,
|  | L4::Ipc::Cap< void > & | res,
|  | l4_umword_t | type,
|  | L4::Ipc::Varg_list_ref | va )

inline

Handle factory protocol.

This function is invoked after an incoming factory::create request and creates a new port or statistics interface if possible.

Definition at line 528 of file main.cc.

References L4_EINVAL.

The documentation for this class was generated from the following file:

- pkg/virtio-net-switch/server/switch/main.cc