Ms Basic Connect V3 service

Ms Basic Connect V3 service — Support for the Ms Basic Connect V3 service.

Functions

Types and Values

Description

This section implements support for requests, responses and notifications in the Ms Basic Connect V3 service.

Functions

mbim_tai_free ()

void
mbim_tai_free (MbimTai *var);

Frees the memory allocated for the MbimTai.

Parameters

var

a MbimTai.

 

Since: 1.28


mbim_packet_filter_v3_array_free ()

void
mbim_packet_filter_v3_array_free (MbimPacketFilterV3Array *array);

Frees the memory allocated for the array of MbimPacketFilterV3 structs.

Parameters

array

a NULL terminated array of MbimPacketFilterV3 structs.

 

Since: 1.28


mbim_message_ms_basic_connect_v3_subscriber_ready_status_response_parse ()

gboolean
mbim_message_ms_basic_connect_v3_subscriber_ready_status_response_parse
                               (const MbimMessage *message,
                                MbimSubscriberReadyState *out_ready_state,
                                MbimSubscriberReadyStatusFlag *out_flags,
                                gchar **out_subscriber_id,
                                gchar **out_sim_icc_id,
                                MbimReadyInfoFlag *out_ready_info,
                                guint32 *out_telephone_numbers_count,
                                gchar ***out_telephone_numbers,
                                GError **error);

Parses and returns parameters of the 'Subscriber Ready Status' response command in the 'Ms Basic Connect V3' service.

Parameters

message

the MbimMessage.

 

out_ready_state

return location for a MbimSubscriberReadyState, or NULL if the 'ReadyState' field is not needed.

[out][optional][transfer none]

out_flags

return location for a MbimSubscriberReadyStatusFlag, or NULL if the 'Flags' field is not needed.

[out][optional][transfer none]

out_subscriber_id

return location for a newly allocated string, or NULL if the 'SubscriberId' field is not needed. Free the returned value with g_free().

[out][optional][transfer full]

out_sim_icc_id

return location for a newly allocated string, or NULL if the 'SimIccId' field is not needed. Free the returned value with g_free().

[out][optional][transfer full]

out_ready_info

return location for a MbimReadyInfoFlag, or NULL if the 'ReadyInfo' field is not needed.

[out][optional][transfer none]

out_telephone_numbers_count

return location for a guint32, or NULL if the 'TelephoneNumbersCount' field is not needed.

[out][optional][transfer none]

out_telephone_numbers

return location for a newly allocated array of strings, or NULL if the 'TelephoneNumbers' field is not needed. Free the returned value with g_strfreev().

[out][optional][transfer full][type GStrv]

error

return location for error or NULL.

 

Returns

TRUE if the message was correctly parsed, FALSE if error is set.

Since: 1.28


mbim_message_ms_basic_connect_v3_subscriber_ready_status_notification_parse ()

gboolean
mbim_message_ms_basic_connect_v3_subscriber_ready_status_notification_parse
                               (const MbimMessage *message,
                                MbimSubscriberReadyState *out_ready_state,
                                MbimSubscriberReadyStatusFlag *out_flags,
                                gchar **out_subscriber_id,
                                gchar **out_sim_icc_id,
                                MbimReadyInfoFlag *out_ready_info,
                                guint32 *out_telephone_numbers_count,
                                gchar ***out_telephone_numbers,
                                GError **error);

Parses and returns parameters of the 'Subscriber Ready Status' notification command in the 'Ms Basic Connect V3' service.

Parameters

message

the MbimMessage.

 

out_ready_state

return location for a MbimSubscriberReadyState, or NULL if the 'ReadyState' field is not needed.

[out][optional][transfer none]

out_flags

return location for a MbimSubscriberReadyStatusFlag, or NULL if the 'Flags' field is not needed.

[out][optional][transfer none]

out_subscriber_id

return location for a newly allocated string, or NULL if the 'SubscriberId' field is not needed. Free the returned value with g_free().

[out][optional][transfer full]

out_sim_icc_id

return location for a newly allocated string, or NULL if the 'SimIccId' field is not needed. Free the returned value with g_free().

[out][optional][transfer full]

out_ready_info

return location for a MbimReadyInfoFlag, or NULL if the 'ReadyInfo' field is not needed.

[out][optional][transfer none]

out_telephone_numbers_count

return location for a guint32, or NULL if the 'TelephoneNumbersCount' field is not needed.

[out][optional][transfer none]

out_telephone_numbers

return location for a newly allocated array of strings, or NULL if the 'TelephoneNumbers' field is not needed. Free the returned value with g_strfreev().

[out][optional][transfer full][type GStrv]

error

return location for error or NULL.

 

Returns

TRUE if the message was correctly parsed, FALSE if error is set.

Since: 1.28


mbim_message_ms_basic_connect_v3_packet_service_response_parse ()

gboolean
mbim_message_ms_basic_connect_v3_packet_service_response_parse
                               (const MbimMessage *message,
                                guint32 *out_nw_error,
                                MbimPacketServiceState *out_packet_service_state,
                                MbimDataClassV3 *out_highest_available_data_class,
                                guint64 *out_uplink_speed,
                                guint64 *out_downlink_speed,
                                MbimFrequencyRange *out_frequency_range,
                                MbimDataSubclass *out_data_subclass,
                                MbimTai **out_tai,
                                GError **error);

Parses and returns parameters of the 'Packet Service' response command in the 'Ms Basic Connect V3' service.

Parameters

message

the MbimMessage.

 

out_nw_error

return location for a guint32, or NULL if the 'NwError' field is not needed.

[out][optional][transfer none]

out_packet_service_state

return location for a MbimPacketServiceState, or NULL if the 'PacketServiceState' field is not needed.

[out][optional][transfer none]

out_highest_available_data_class

return location for a MbimDataClassV3, or NULL if the 'HighestAvailableDataClass' field is not needed.

[out][optional][transfer none]

out_uplink_speed

return location for a guint64, or NULL if the 'UplinkSpeed' field is not needed.

[out][optional][transfer none]

out_downlink_speed

return location for a guint64, or NULL if the 'DownlinkSpeed' field is not needed.

[out][optional][transfer none]

out_frequency_range

return location for a MbimFrequencyRange, or NULL if the 'FrequencyRange' field is not needed.

[out][optional][transfer none]

out_data_subclass

return location for a MbimDataSubclass, or NULL if the 'DataSubclass' field is not needed.

[out][optional][transfer none]

out_tai

return location for a newly allocated MbimTai, or NULL if the 'Tai' field is not needed. Free the returned value with mbim_tai_free().

[out][optional][transfer full]

error

return location for error or NULL.

 

Returns

TRUE if the message was correctly parsed, FALSE if error is set.

Since: 1.28


mbim_message_ms_basic_connect_v3_packet_service_notification_parse ()

gboolean
mbim_message_ms_basic_connect_v3_packet_service_notification_parse
                               (const MbimMessage *message,
                                guint32 *out_nw_error,
                                MbimPacketServiceState *out_packet_service_state,
                                MbimDataClassV3 *out_highest_available_data_class,
                                guint64 *out_uplink_speed,
                                guint64 *out_downlink_speed,
                                MbimFrequencyRange *out_frequency_range,
                                MbimDataSubclass *out_data_subclass,
                                MbimTai **out_tai,
                                GError **error);

Parses and returns parameters of the 'Packet Service' notification command in the 'Ms Basic Connect V3' service.

Parameters

message

the MbimMessage.

 

out_nw_error

return location for a guint32, or NULL if the 'NwError' field is not needed.

[out][optional][transfer none]

out_packet_service_state

return location for a MbimPacketServiceState, or NULL if the 'PacketServiceState' field is not needed.

[out][optional][transfer none]

out_highest_available_data_class

return location for a MbimDataClassV3, or NULL if the 'HighestAvailableDataClass' field is not needed.

[out][optional][transfer none]

out_uplink_speed

return location for a guint64, or NULL if the 'UplinkSpeed' field is not needed.

[out][optional][transfer none]

out_downlink_speed

return location for a guint64, or NULL if the 'DownlinkSpeed' field is not needed.

[out][optional][transfer none]

out_frequency_range

return location for a MbimFrequencyRange, or NULL if the 'FrequencyRange' field is not needed.

[out][optional][transfer none]

out_data_subclass

return location for a MbimDataSubclass, or NULL if the 'DataSubclass' field is not needed.

[out][optional][transfer none]

out_tai

return location for a newly allocated MbimTai, or NULL if the 'Tai' field is not needed. Free the returned value with mbim_tai_free().

[out][optional][transfer full]

error

return location for error or NULL.

 

Returns

TRUE if the message was correctly parsed, FALSE if error is set.

Since: 1.28


mbim_message_ms_basic_connect_v3_connect_query_new ()

MbimMessage *
mbim_message_ms_basic_connect_v3_connect_query_new
                               (guint32 session_id,
                                GError **error);

Create a new request for the 'Connect' query command in the 'Ms Basic Connect V3' service.

Parameters

session_id

the 'SessionId' field, given as a guint32.

[in]

error

return location for error or NULL.

 

Returns

a newly allocated MbimMessage, which should be freed with mbim_message_unref().

Since: 1.28


mbim_message_ms_basic_connect_v3_connect_set_new ()

MbimMessage *
mbim_message_ms_basic_connect_v3_connect_set_new
                               (guint32 session_id,
                                MbimActivationCommand activation_command,
                                MbimCompression compression,
                                MbimAuthProtocol auth_protocol,
                                MbimContextIpType ip_type,
                                const MbimUuid *context_type,
                                MbimAccessMediaType media_preference,
                                const gchar *access_string,
                                const gchar *user_name,
                                const gchar *password,
                                const GList *unnamed_ies,
                                GError **error);

Create a new request for the 'Connect' set command in the 'Ms Basic Connect V3' service.

Parameters

session_id

the 'SessionId' field, given as a guint32.

[in]

activation_command

the 'ActivationCommand' field, given as a MbimActivationCommand.

[in]

compression

the 'Compression' field, given as a MbimCompression.

[in]

auth_protocol

the 'AuthProtocol' field, given as a MbimAuthProtocol.

[in]

ip_type

the 'IpType' field, given as a MbimContextIpType.

[in]

context_type

the 'ContextType' field, given as a MbimUuid.

[in]

media_preference

the 'MediaPreference' field, given as a MbimAccessMediaType.

[in]

access_string

the 'AccessString' field, given as a string.

[in]

user_name

the 'UserName' field, given as a string.

[in]

password

the 'Password' field, given as a string.

[in]

unnamed_ies

the 'UnnamedIes' field, given as a list of # items.

[in][element-type MbimTlv][transfer none]

error

return location for error or NULL.

 

Returns

a newly allocated MbimMessage, which should be freed with mbim_message_unref().

Since: 1.28


mbim_message_ms_basic_connect_v3_connect_response_parse ()

gboolean
mbim_message_ms_basic_connect_v3_connect_response_parse
                               (const MbimMessage *message,
                                guint32 *out_session_id,
                                MbimActivationState *out_activation_state,
                                MbimVoiceCallState *out_voice_call_state,
                                MbimContextIpType *out_ip_type,
                                const MbimUuid **out_context_type,
                                guint32 *out_nw_error,
                                MbimAccessMediaType *out_media_preference,
                                gchar **out_access_string,
                                GList **out_unnamed_ies,
                                GError **error);

Parses and returns parameters of the 'Connect' response command in the 'Ms Basic Connect V3' service.

Parameters

message

the MbimMessage.

 

out_session_id

return location for a guint32, or NULL if the 'SessionId' field is not needed.

[out][optional][transfer none]

out_activation_state

return location for a MbimActivationState, or NULL if the 'ActivationState' field is not needed.

[out][optional][transfer none]

out_voice_call_state

return location for a MbimVoiceCallState, or NULL if the 'VoiceCallState' field is not needed.

[out][optional][transfer none]

out_ip_type

return location for a MbimContextIpType, or NULL if the 'IpType' field is not needed.

[out][optional][transfer none]

out_context_type

return location for a MbimUuid, or NULL if the 'ContextType' field is not needed. Do not free the returned value, it is owned by message .

[out][optional][transfer none]

out_nw_error

return location for a guint32, or NULL if the 'NwError' field is not needed.

[out][optional][transfer none]

out_media_preference

return location for a MbimAccessMediaType, or NULL if the 'MediaPreference' field is not needed.

[out][optional][transfer none]

out_access_string

return location for a newly allocated string, or NULL if the 'AccessString' field is not needed. Free the returned value with g_free().

[out][optional][transfer full]

out_unnamed_ies

return location for a newly allocated list of MbimTlv items, or NULL if the 'UnnamedIes' field is not needed. Free the returned value with g_list_free_full() using mbim_tlv_unref() as GDestroyNotify.

[out][optional][element-type MbimTlv][transfer full]

error

return location for error or NULL.

 

Returns

TRUE if the message was correctly parsed, FALSE if error is set.

Since: 1.28


mbim_message_ms_basic_connect_v3_connect_notification_parse ()

gboolean
mbim_message_ms_basic_connect_v3_connect_notification_parse
                               (const MbimMessage *message,
                                guint32 *out_session_id,
                                MbimActivationState *out_activation_state,
                                MbimVoiceCallState *out_voice_call_state,
                                MbimContextIpType *out_ip_type,
                                const MbimUuid **out_context_type,
                                guint32 *out_nw_error,
                                MbimAccessMediaType *out_media_preference,
                                gchar **out_access_string,
                                GList **out_unnamed_ies,
                                GError **error);

Parses and returns parameters of the 'Connect' notification command in the 'Ms Basic Connect V3' service.

Parameters

message

the MbimMessage.

 

out_session_id

return location for a guint32, or NULL if the 'SessionId' field is not needed.

[out][optional][transfer none]

out_activation_state

return location for a MbimActivationState, or NULL if the 'ActivationState' field is not needed.

[out][optional][transfer none]

out_voice_call_state

return location for a MbimVoiceCallState, or NULL if the 'VoiceCallState' field is not needed.

[out][optional][transfer none]

out_ip_type

return location for a MbimContextIpType, or NULL if the 'IpType' field is not needed.

[out][optional][transfer none]

out_context_type

return location for a MbimUuid, or NULL if the 'ContextType' field is not needed. Do not free the returned value, it is owned by message .

[out][optional][transfer none]

out_nw_error

return location for a guint32, or NULL if the 'NwError' field is not needed.

[out][optional][transfer none]

out_media_preference

return location for a MbimAccessMediaType, or NULL if the 'MediaPreference' field is not needed.

[out][optional][transfer none]

out_access_string

return location for a newly allocated string, or NULL if the 'AccessString' field is not needed. Free the returned value with g_free().

[out][optional][transfer full]

out_unnamed_ies

return location for a newly allocated list of MbimTlv items, or NULL if the 'UnnamedIes' field is not needed. Free the returned value with g_list_free_full() using mbim_tlv_unref() as GDestroyNotify.

[out][optional][element-type MbimTlv][transfer full]

error

return location for error or NULL.

 

Returns

TRUE if the message was correctly parsed, FALSE if error is set.

Since: 1.28


mbim_message_ms_basic_connect_v3_ip_packet_filters_query_new ()

MbimMessage *
mbim_message_ms_basic_connect_v3_ip_packet_filters_query_new
                               (guint32 session_id,
                                guint32 packet_filters_count,
                                const MbimPacketFilterV3 *const *packet_filters,
                                GError **error);

Create a new request for the 'IP Packet Filters' query command in the 'Ms Basic Connect V3' service.

Parameters

session_id

the 'SessionId' field, given as a guint32.

[in]

packet_filters_count

the 'PacketFiltersCount' field, given as a guint32.

[in]

packet_filters

the 'PacketFilters' field, given as an array of MbimPacketFilterV3 items.

[in][array zero-terminated=1][element-type MbimPacketFilterV3]

error

return location for error or NULL.

 

Returns

a newly allocated MbimMessage, which should be freed with mbim_message_unref().

Since: 1.28


mbim_message_ms_basic_connect_v3_ip_packet_filters_set_new ()

MbimMessage *
mbim_message_ms_basic_connect_v3_ip_packet_filters_set_new
                               (guint32 session_id,
                                guint32 packet_filters_count,
                                const MbimPacketFilterV3 *const *packet_filters,
                                GError **error);

Create a new request for the 'IP Packet Filters' set command in the 'Ms Basic Connect V3' service.

Parameters

session_id

the 'SessionId' field, given as a guint32.

[in]

packet_filters_count

the 'PacketFiltersCount' field, given as a guint32.

[in]

packet_filters

the 'PacketFilters' field, given as an array of MbimPacketFilterV3 items.

[in][array zero-terminated=1][element-type MbimPacketFilterV3]

error

return location for error or NULL.

 

Returns

a newly allocated MbimMessage, which should be freed with mbim_message_unref().

Since: 1.28


mbim_message_ms_basic_connect_v3_ip_packet_filters_response_parse ()

gboolean
mbim_message_ms_basic_connect_v3_ip_packet_filters_response_parse
                               (const MbimMessage *message,
                                guint32 *out_session_id,
                                guint32 *out_packet_filters_count,
                                MbimPacketFilterV3Array **out_packet_filters,
                                GError **error);

Parses and returns parameters of the 'IP Packet Filters' response command in the 'Ms Basic Connect V3' service.

Parameters

message

the MbimMessage.

 

out_session_id

return location for a guint32, or NULL if the 'SessionId' field is not needed.

[out][optional][transfer none]

out_packet_filters_count

return location for a guint32, or NULL if the 'PacketFiltersCount' field is not needed.

[out][optional][transfer none]

out_packet_filters

return location for a newly allocated array of MbimPacketFilterV3 items, or NULL if the 'PacketFilters' field is not needed. Free the returned value with mbim_packet_filter_v3_array_free().

[out][optional][transfer full][array zero-terminated=1][element-type MbimPacketFilterV3]

error

return location for error or NULL.

 

Returns

TRUE if the message was correctly parsed, FALSE if error is set.

Since: 1.28

Types and Values

MbimTai

typedef struct {
    guint16 plmn_mcc;
    guint16 plmn_mnc;
    guint32 tac;
} MbimTai;

A MbimTai element.

Members

guint16 plmn_mcc;

a guint16.

 

guint16 plmn_mnc;

a guint16.

 

guint32 tac;

a guint32.

 

Since: 1.28


MbimPacketFilterV3

typedef struct {
    guint32 filter_size;
    guint8 *packet_filter;
    guint8 *packet_mask;
    guint32 filter_id;
} MbimPacketFilterV3;

A MbimPacketFilterV3 element.

Members

guint32 filter_size;

a guint32.

 

guint8 *packet_filter;

an array of guint8 values.

 

guint8 *packet_mask;

an array of guint8 values.

 

guint32 filter_id;

a guint32.

 

Since: 1.28


MbimPacketFilterV3Array

typedef MbimPacketFilterV3 *MbimPacketFilterV3Array;

A NULL-terminated array of MbimPacketFilterV3 elements.

Since: 1.28