-/* Finds a 'remote_mp' with 'mpid' in 'cfm'. If no such 'remote_mp' exists
- * returns NULL. */
-const struct remote_mp *
-cfm_get_remote_mp(const struct cfm *cfm, uint16_t mpid)
-{
- return lookup_remote_mp(&cfm->remote_mps, mpid);
-}
-
-/* Generates 'maid' from 'md_name' and 'ma_name'. A NULL parameter indicates
- * the default should be used. Returns false if unsuccessful. */
-bool
-cfm_generate_maid(const char *md_name, const char *ma_name,
- uint8_t maid[CCM_MAID_LEN])
-{
- uint8_t *ma_p;
- size_t md_len, ma_len;
-
- if (!md_name) {
- md_name = "ovs";
- }
-
- if (!ma_name) {
- ma_name = "ovs";
- }
-
- memset(maid, 0, CCM_MAID_LEN);
-
- md_len = strlen(md_name);
- ma_len = strlen(ma_name);
-
- if (!md_len || !ma_len || md_len + ma_len + 4 > CCM_MAID_LEN) {
- return false;
- }
-
- maid[0] = 4; /* MD name string format. */
- maid[1] = md_len; /* MD name size. */
- memcpy(&maid[2], md_name, md_len); /* MD name. */
-
- ma_p = maid + 2 + md_len;
- ma_p[0] = 2; /* MA name string format. */
- ma_p[1] = ma_len; /* MA name size. */
- memcpy(&ma_p[2], ma_name, ma_len); /* MA name. */