Lines Matching full:role
46 ** should set the PAN role explicitly.
115 ** profile role. This should be called after PAN_Register.
116 ** This can be called any time to change the PAN role
118 ** Parameters: role - is bit map of roles to be active
119 ** PAN_ROLE_CLIENT is for PANU role
120 ** PAN_ROLE_GN_SERVER is for GN role
121 ** PAN_ROLE_NAP_SERVER is for NAP role
125 ** p_user_name - Service name for PANU role
126 ** p_gn_name - Service name for GN role
127 ** p_nap_name - Service name for NAP role
130 ** Returns PAN_SUCCESS - if the role is set successfully
131 ** PAN_FAILURE - if the role is not valid
134 tPAN_RESULT PAN_SetRole (UINT8 role,
146 /* If the role is not a valid combination reject it */
147 if ((!(role & (PAN_ROLE_CLIENT | PAN_ROLE_GN_SERVER | PAN_ROLE_NAP_SERVER))) &&
148 role != PAN_ROLE_INACTIVE)
150 PAN_TRACE_ERROR ("PAN role %d is invalid", role);
154 /* If the current active role is same as the role being set do nothing */
155 if (pan_cb.role == role)
157 PAN_TRACE_EVENT ("PAN role already was set to: %d", role);
167 PAN_TRACE_API ("PAN_SetRole() called with role 0x%x", role);
173 if (role & PAN_ROLE_NAP_SERVER)
186 /* If the NAP role is already active and now being cleared delete the record */
187 else if (pan_cb.role & PAN_ROLE_NAP_SERVER)
205 if (role & PAN_ROLE_GN_SERVER)
218 /* If the GN role is already active and now being cleared delete the record */
219 else if (pan_cb.role & PAN_ROLE_GN_SERVER)
237 if (role & PAN_ROLE_CLIENT)
249 /* If the PANU role is already active and now being cleared delete the record */
250 else if (pan_cb.role & PAN_ROLE_CLIENT)
264 if (role == PAN_ROLE_INACTIVE)
267 pan_cb.role = role;
268 PAN_TRACE_EVENT ("PAN role set to: %d", role);
282 ** src_role - Role of the local device for the connection
283 ** dst_role - Role of the remote device for the connection
284 ** PAN_ROLE_CLIENT is for PANU role
285 ** PAN_ROLE_GN_SERVER is for GN role
286 ** PAN_ROLE_NAP_SERVER is for NAP role
312 if (!(pan_cb.role & src_role))
314 PAN_TRACE_ERROR ("PAN is not active for the role %d", src_role);
322 PAN_TRACE_ERROR ("Either source %d or destination role %d is invalid", src_role, dst_role);
329 /* If we are PANU for this role validate destination role */
337 ** another connection in PANU role
361 /* If destination is PANU role validate source role */
366 PAN_TRACE_ERROR ("Device already have a connection in PANU role");
383 /* The role combination is not valid */
432 PAN_TRACE_DEBUG ("PAN_Connect() current active role set to %d", src_role);
514 if (pan_cb.role == PAN_ROLE_INACTIVE || !pan_cb.num_conns) {
575 if (pan_cb.role == PAN_ROLE_INACTIVE || (!(pan_cb.num_conns)))