Bug #1952 » 0005-gtp-genl-display-gtp-device-in-listing.patch
src/gtp-genl.c | ||
---|---|---|
141 | 141 |
EXPORT_SYMBOL(gtp_del_tunnel); |
142 | 142 | |
143 | 143 |
struct gtp_pdp { |
144 |
uint32_t ifidx; |
|
144 | 145 |
uint32_t version; |
145 | 146 |
union { |
146 | 147 |
struct { |
... | ... | |
181 | 182 |
case GTPA_PEER_ADDRESS: |
182 | 183 |
case GTPA_MS_ADDRESS: |
183 | 184 |
case GTPA_VERSION: |
185 |
case GTPA_LINK: |
|
184 | 186 |
if (mnl_attr_validate(attr, MNL_TYPE_U32) < 0) { |
185 | 187 |
perror("mnl_attr_validate"); |
186 | 188 |
return MNL_CB_ERROR; |
... | ... | |
210 | 212 | |
211 | 213 |
mnl_attr_parse(nlh, sizeof(*genl), genl_gtp_validate_cb, tb); |
212 | 214 | |
215 |
if (tb[GTPA_LINK]) |
|
216 |
pdp.ifidx = mnl_attr_get_u32(tb[GTPA_LINK]); |
|
213 | 217 |
if (tb[GTPA_TID]) |
214 | 218 |
pdp.u.v0.tid = mnl_attr_get_u64(tb[GTPA_TID]); |
215 | 219 |
if (tb[GTPA_I_TEI]) |
... | ... | |
245 | 249 |
return MNL_CB_ERROR; |
246 | 250 |
} |
247 | 251 | |
252 |
printf("%s ", if_indextoname(pdp.ifidx, buf)); |
|
253 | ||
248 | 254 |
if (tb[GTPA_VERSION]) |
249 | 255 |
pdp.version = mnl_attr_get_u32(tb[GTPA_VERSION]); |
250 | 256 |