Lines Matching full:role
45 ** should set the PAN role explicitly.
114 ** profile role. This should be called after PAN_Register.
115 ** This can be called any time to change the PAN role
117 ** Parameters: role - is bit map of roles to be active
118 ** PAN_ROLE_CLIENT is for PANU role
119 ** PAN_ROLE_GN_SERVER is for GN role
120 ** PAN_ROLE_NAP_SERVER is for NAP role
124 ** p_user_name - Service name for PANU role
125 ** p_gn_name - Service name for GN role
126 ** p_nap_name - Service name for NAP role
129 ** Returns PAN_SUCCESS - if the role is set successfully
130 ** PAN_FAILURE - if the role is not valid
133 tPAN_RESULT PAN_SetRole (UINT8 role,
145 /* If the role is not a valid combination reject it */
146 if ((!(role & (PAN_ROLE_CLIENT | PAN_ROLE_GN_SERVER | PAN_ROLE_NAP_SERVER))) &&
147 role != PAN_ROLE_INACTIVE)
149 PAN_TRACE_ERROR1 ("PAN role %d is invalid", role);
153 /* If the current active role is same as the role being set do nothing */
154 if (pan_cb.role == role)
156 PAN_TRACE_EVENT1 ("PAN role already was set to: %d", role);
166 PAN_TRACE_API1 ("PAN_SetRole() called with role 0x%x", role);
172 if (role & PAN_ROLE_NAP_SERVER)
185 /* If the NAP role is already active and now being cleared delete the record */
186 else if (pan_cb.role & PAN_ROLE_NAP_SERVER)
204 if (role & PAN_ROLE_GN_SERVER)
217 /* If the GN role is already active and now being cleared delete the record */
218 else if (pan_cb.role & PAN_ROLE_GN_SERVER)
236 if (role & PAN_ROLE_CLIENT)
248 /* If the PANU role is already active and now being cleared delete the record */
249 else if (pan_cb.role & PAN_ROLE_CLIENT)
263 if (role == PAN_ROLE_INACTIVE)
266 pan_cb.role = role;
267 PAN_TRACE_EVENT1 ("PAN role set to: %d", role);
281 ** src_role - Role of the local device for the connection
282 ** dst_role - Role of the remote device for the connection
283 ** PAN_ROLE_CLIENT is for PANU role
284 ** PAN_ROLE_GN_SERVER is for GN role
285 ** PAN_ROLE_NAP_SERVER is for NAP role
311 if (!(pan_cb.role & src_role))
313 PAN_TRACE_ERROR1 ("PAN is not active for the role %d", src_role);
321 PAN_TRACE_ERROR2 ("Either source %d or destination role %d is invalid", src_role, dst_role);
328 /* If we are PANU for this role validate destination role */
336 ** another connection in PANU role
360 /* If destination is PANU role validate source role */
365 PAN_TRACE_ERROR0 ("Device already have a connection in PANU role");
382 /* The role combination is not valid */
431 PAN_TRACE_DEBUG1 ("PAN_Connect() current active role set to %d", src_role);
517 if (pan_cb.role == PAN_ROLE_INACTIVE || (!(pan_cb.num_conns)))
639 if (pan_cb.role == PAN_ROLE_INACTIVE || (!(pan_cb.num_conns)))