Exemple #1
0
int win_grab(async_sess_t *sess, sysarg_t pos_id, sysarg_t grab_flags)
{
	async_exch_t *exch = async_exchange_begin(sess);
	int ret = async_req_2_0(exch, WINDOW_GRAB, pos_id, grab_flags);
	async_exchange_end(exch);

	return ret;
}
Exemple #2
0
/** Set whether defective (erroneous) packets are received.
 *
 * @param[in]  dev_sess
 * @param[out] mode     Bitmask specifying allowed errors
 *
 * @return EOK If the operation was successfully completed
 *
 */
int nic_defective_set_mode(async_sess_t *dev_sess, uint32_t mode)
{
	async_exch_t *exch = async_exchange_begin(dev_sess);
	int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
	    NIC_DEFECTIVE_SET_MODE, mode);
	async_exchange_end(exch);
	
	return rc;
}
Exemple #3
0
/** Remove Wake-On-LAN virtue.
 *
 * @param[in] dev_sess
 * @param[in] id       Virtue identifier
 *
 * @return EOK If the operation was successfully completed
 *
 */
int nic_wol_virtue_remove(async_sess_t *dev_sess, nic_wv_id_t id)
{
	async_exch_t *exch = async_exchange_begin(dev_sess);
	int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
	    NIC_WOL_VIRTUE_REMOVE, (sysarg_t) id);
	async_exchange_end(exch);
	
	return rc;
}
Exemple #4
0
/** Set whether broadcast packets are received.
 *
 * @param[in] dev_sess
 * @param[in] mode     Current operation mode
 *
 * @return EOK If the operation was successfully completed
 *
 */
int nic_broadcast_set_mode(async_sess_t *dev_sess, nic_broadcast_mode_t mode)
{
	async_exch_t *exch = async_exchange_begin(dev_sess);
	int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
	    NIC_BROADCAST_SET_MODE, mode);
	async_exchange_end(exch);
	
	return rc;
}
Exemple #5
0
/** Enable auto-negotiation.
 *
 * The advertisement argument can only limit some modes,
 * it can never force the NIC to advertise unsupported modes.
 *
 * The allowed modes are defined in "nic/eth_phys.h" in the C library.
 *
 * @param[in] dev_sess
 * @param[in] advertisement Allowed advertised modes. Use 0 for all modes.
 *
 * @return EOK If the operation was successfully completed
 *
 */
int nic_autoneg_enable(async_sess_t *dev_sess, uint32_t advertisement)
{
	async_exch_t *exch = async_exchange_begin(dev_sess);
	int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
	    NIC_AUTONEG_ENABLE, (sysarg_t) advertisement);
	async_exchange_end(exch);
	
	return rc;
}
Exemple #6
0
/** Request the device to change its state
 *
 * @param[in] dev_sess
 * @param[in] state    New state
 *
 * @return EOK If the operation was successfully completed
 *
 */
int nic_set_state(async_sess_t *dev_sess, nic_device_state_t state)
{
	async_exch_t *exch = async_exchange_begin(dev_sess);
	int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
	    NIC_SET_STATE, state);
	async_exchange_end(exch);
	
	return rc;
}
Exemple #7
0
int fb_sequence_add_imagemap(async_sess_t *sess, sequence_handle_t sequence,
                             imagemap_handle_t imagemap)
{
    async_exch_t *exch = async_exchange_begin(sess);
    int ret = async_req_2_0(exch, FB_SEQUENCE_ADD_IMAGEMAP, sequence,
                            imagemap);
    async_exchange_end(exch);

    return ret;
}
Exemple #8
0
/** Add service to category.
 *
 * @param svc_id	Service ID
 * @param cat_id	Category ID
 * @return		EOK on success or negative error code
 */
int loc_service_add_to_cat(service_id_t svc_id, service_id_t cat_id)
{
	async_exch_t *exch;
	sysarg_t retval;
	
	exch = loc_exchange_begin_blocking(LOC_PORT_SUPPLIER);
	retval = async_req_2_0(exch, LOC_SERVICE_ADD_TO_CAT, svc_id, cat_id);
	loc_exchange_end(exch);
	
	return retval;
}
Exemple #9
0
int vbd_label_create(vbd_t *vbd, service_id_t sid, label_type_t ltype)
{
	async_exch_t *exch;
	int retval;

	exch = async_exchange_begin(vbd->sess);
	retval = async_req_2_0(exch, VBD_LABEL_CREATE, sid, ltype);
	async_exchange_end(exch);

	if (retval != EOK)
		return EIO;

	return EOK;
}