-/* $OpenBSD: ifconfig.c,v 1.442 2021/03/20 17:11:49 florian Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.443 2021/07/04 19:22:32 sthen Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
{
struct umb_info mi;
char provider[UMB_PROVIDERNAME_MAXLEN+1];
+ char providerid[UMB_PROVIDERID_MAXLEN+1];
char roamingtxt[UMB_ROAMINGTEXT_MAXLEN+1];
char devid[UMB_DEVID_MAXLEN+1];
char fwinfo[UMB_FWINFO_MAXLEN+1];
utf16_to_char(mi.iccid, UMB_ICCID_MAXLEN, iccid, sizeof (iccid));
utf16_to_char(mi.provider, UMB_PROVIDERNAME_MAXLEN,
provider, sizeof (provider));
- if (sid[0] || iccid[0] || provider[0]) {
+ utf16_to_char(mi.providerid, UMB_PROVIDERID_MAXLEN,
+ providerid, sizeof (providerid));
+ if (sid[0] || iccid[0]) {
printf("\t");
n = 0;
if (sid[0])
printf("%ssubscriber-id %s", n++ ? " " : "", sid);
if (iccid[0])
printf("%sICC-id %s", n++ ? " " : "", iccid);
- if (provider[0])
- printf("%sprovider %s", n ? " " : "", provider);
printf("\n");
}
utf16_to_char(mi.pn, UMB_PHONENR_MAXLEN, pn, sizeof (pn));
utf16_to_char(mi.apn, UMB_APN_MAXLEN, apn, sizeof (apn));
- if (pn[0] || apn[0]) {
+ if (pn[0] || apn[0] || provider[0] || providerid[0]) {
printf("\t");
n = 0;
if (pn[0])
printf("%sphone# %s", n++ ? " " : "", pn);
if (apn[0])
printf("%sAPN %s", n++ ? " " : "", apn);
+ if (provider[0])
+ printf("%sprovider %s", n++ ? " " : "", provider);
+ if (providerid[0])
+ printf("%sprovider-id %s", n ? " " : "", providerid);
printf("\n");
}
-/* $OpenBSD: if_umb.c,v 1.45 2021/05/18 14:23:03 kevlo Exp $ */
+/* $OpenBSD: if_umb.c,v 1.46 2021/07/04 19:22:31 sthen Exp $ */
/*
* Copyright (c) 2016 genua mbH
sc->sc_info.regmode = letoh32(rs->regmode);
sc->sc_info.cellclass = letoh32(rs->curcellclass);
- /* XXX should we remember the provider_id? */
umb_getinfobuf(data, len, rs->provname_offs, rs->provname_size,
sc->sc_info.provider, sizeof (sc->sc_info.provider));
+ umb_getinfobuf(data, len, rs->provid_offs, rs->provid_size,
+ sc->sc_info.providerid, sizeof (sc->sc_info.providerid));
umb_getinfobuf(data, len, rs->roamingtxt_offs, rs->roamingtxt_size,
sc->sc_info.roamingtxt, sizeof (sc->sc_info.roamingtxt));
-/* $OpenBSD: if_umb.h,v 1.9 2021/03/30 15:59:04 patrick Exp $ */
+/* $OpenBSD: if_umb.h,v 1.10 2021/07/04 19:22:32 sthen Exp $ */
/*
* Copyright (c) 2016 genua mbH
uint32_t cellclass;
#define UMB_PROVIDERNAME_MAXLEN 20
uint16_t provider[UMB_PROVIDERNAME_MAXLEN];
+#define UMB_PROVIDERID_MAXLEN 20
+ uint16_t providerid[UMB_PROVIDERID_MAXLEN];
#define UMB_PHONENR_MAXLEN 22
uint16_t pn[UMB_PHONENR_MAXLEN];
#define UMB_SUBSCRIBERID_MAXLEN 15