diff options
Diffstat (limited to 'example/pp-location-update.c')
-rw-r--r-- | example/pp-location-update.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/example/pp-location-update.c b/example/pp-location-update.c index 099fbc0..d7c19f3 100644 --- a/example/pp-location-update.c +++ b/example/pp-location-update.c @@ -47,18 +47,36 @@ static int mm_locate_req(struct dect_handle *dh, struct dect_mm_endpoint *mme) return dect_mm_locate_req(dh, mme, ¶m); } +static void dl_establish_cfm(struct dect_handle *dh, bool success, + struct dect_data_link *ddl, + const struct dect_mac_conn_params *mcp) +{ + struct dect_mm_endpoint *mme; + + mme = dect_mm_endpoint_alloc(dh, ddl); + if (mme == NULL) + pexit("dect_mm_endpoint_alloc"); + + mm_locate_req(dh, mme); +} + static struct dect_mm_ops mm_ops = { .mm_locate_cfm = mm_locate_cfm, }; +static struct dect_lce_ops lce_ops = { + .dl_establish_cfm = dl_establish_cfm, +}; + static struct dect_ops ops = { + .lce_ops = &lce_ops, .mm_ops = &mm_ops, }; int main(int argc, char **argv) { const struct dect_fp_capabilities *fpc; - struct dect_mm_endpoint *mme; + struct dect_mac_conn_params mcp = {}; dect_pp_common_options(argc, argv); dect_pp_common_init(&ops, cluster, &ipui); @@ -69,11 +87,7 @@ int main(int argc, char **argv) goto out; } - mme = dect_mm_endpoint_alloc(dh, &ipui); - if (mme == NULL) - pexit("dect_mm_endpoint_alloc"); - - mm_locate_req(dh, mme); + dect_dl_establish_req(dh, &ipui, &mcp); dect_event_loop(); out: dect_common_cleanup(dh); |