8. Handling of destination address lists in SUBMIT_MULTI and SUBMIT_MULTI_RESP PDUs

Like the previus section, the problem of handle dinamic list, now in SUBMIT_MULTI y SUBMIT_MULTI_RESP PDU, is resolved with the following functions: build_dad( ... ), build_udad( ... ), destroy_dad( ... ) and destroy_udad( ... ). This functions allow create and destroy dinamic lists of parameters, now of destination address.

int build_dad( dad_t **dest, 
               dad_t  *source );
int destroy_dad( dad_t *sourceList );
int build_udad( udad_t **dest, 
               udad_t  *source );
int destroy_udad( udad_t *sourceList );
    
Please check the following applications code for understand how to handle this PDUs: submit_multi_test and submit_multi_resp_test. If you already handle optional parameters, you don't be problems with this functions.