Lines Matching defs:rpr
749 entity_setup(repcache_client_t *cp, struct rep_protocol_entity_setup *rpr)
756 if ((ep = entity_find(cp, rpr->rpr_entityid)) != NULL) {
762 if (type != rpr->rpr_entitytype)
767 switch (type = rpr->rpr_entitytype) {
786 ep->re_id = rpr->rpr_entityid;
802 const struct rep_protocol_entity_name *rpr = in;
809 ep = entity_find(cp, rpr->rpr_entityid);
817 sz, rpr->rpr_answertype, &sz);
836 const struct rep_protocol_entity_name *rpr = in;
842 ep = entity_find(cp, rpr->rpr_entityid);
870 struct rep_protocol_entity_get_child *rpr)
875 uint32_t parentid = rpr->rpr_entityid;
876 uint32_t childid = rpr->rpr_childid;
882 rpr->rpr_name[sizeof (rpr->rpr_name) - 1] = 0;
884 result = rc_node_get_child(&parent->re_node, rpr->rpr_name,
905 entity_get_parent(repcache_client_t *cp, struct rep_protocol_entity_parent *rpr)
910 uint32_t childid = rpr->rpr_entityid;
911 uint32_t outid = rpr->rpr_outid;
927 entity_get(repcache_client_t *cp, struct rep_protocol_entity_get *rpr)
932 ep = entity_find(cp, rpr->rpr_entityid);
937 switch (rpr->rpr_object) {
956 entity_update(repcache_client_t *cp, struct rep_protocol_entity_update *rpr)
961 if (rpr->rpr_changeid == INVALID_CHANGEID)
964 ep = entity_find(cp, rpr->rpr_entityid);
969 if (ep->re_changeid == rpr->rpr_changeid) {
974 ep->re_changeid = rpr->rpr_changeid;
983 entity_reset(repcache_client_t *cp, struct rep_protocol_entity_reset *rpr)
987 ep = entity_find(cp, rpr->rpr_entityid);
1018 struct rep_protocol_entity_create_child *rpr)
1023 uint32_t parentid = rpr->rpr_entityid;
1024 uint32_t childid = rpr->rpr_childid;
1028 if (rpr->rpr_changeid == INVALID_CHANGEID)
1035 rpr->rpr_name[sizeof (rpr->rpr_name) - 1] = 0;
1037 if (child->re_changeid == rpr->rpr_changeid) {
1041 rpr->rpr_childtype, rpr->rpr_name, &child->re_node);
1043 child->re_changeid = rpr->rpr_changeid;
1054 struct rep_protocol_entity_create_pg *rpr)
1059 uint32_t parentid = rpr->rpr_entityid;
1060 uint32_t childid = rpr->rpr_childid;
1064 if (rpr->rpr_changeid == INVALID_CHANGEID)
1071 rpr->rpr_name[sizeof (rpr->rpr_name) - 1] = 0;
1072 rpr->rpr_type[sizeof (rpr->rpr_type) - 1] = 0;
1074 if (child->re_changeid == rpr->rpr_changeid) {
1078 child->re_type, rpr->rpr_name, rpr->rpr_type,
1079 rpr->rpr_flags, &child->re_node);
1081 child->re_changeid = rpr->rpr_changeid;
1092 struct rep_protocol_entity_delete *rpr)
1096 uint32_t entityid = rpr->rpr_entityid;
1100 if (rpr->rpr_changeid == INVALID_CHANGEID)
1108 if (entity->re_changeid == rpr->rpr_changeid) {
1113 entity->re_changeid = rpr->rpr_changeid;
1122 entity_teardown(repcache_client_t *cp, struct rep_protocol_entity_teardown *rpr)
1124 entity_remove(cp, rpr->rpr_entityid);
1135 iter_setup(repcache_client_t *cp, struct rep_protocol_iter_request *rpr)
1145 if ((iter = iter_find(cp, rpr->rpr_iterid)) != NULL) {
1162 iter->ri_id = rpr->rpr_iterid;
1185 iter_start(repcache_client_t *cp, struct rep_protocol_iter_start *rpr)
1191 result = iter_find_w_entity(cp, rpr->rpr_iterid, &iter,
1192 rpr->rpr_entity, &ep);
1207 rpr->rpr_pattern[sizeof (rpr->rpr_pattern) - 1] = 0;
1210 rpr->rpr_itertype, rpr->rpr_flags, rpr->rpr_pattern);
1239 iter_read(repcache_client_t *cp, struct rep_protocol_iter_read *rpr)
1246 result = iter_find_w_entity(cp, rpr->rpr_iterid, &iter,
1247 rpr->rpr_entityid, &ep);
1252 sequence = rpr->rpr_sequence;
1295 const struct rep_protocol_iter_read_value *rpr = in;
1305 iter = iter_find(cp, rpr->rpr_iterid);
1312 sequence = rpr->rpr_sequence;
1348 iter_reset(repcache_client_t *cp, struct rep_protocol_iter_request *rpr)
1350 repcache_iter_t *iter = iter_find(cp, rpr->rpr_iterid);
1364 iter_teardown(repcache_client_t *cp, struct rep_protocol_iter_request *rpr)
1366 iter_remove(cp, rpr->rpr_iterid);
1372 tx_start(repcache_client_t *cp, struct rep_protocol_transaction_start *rpr)
1378 uint32_t txid = rpr->rpr_entityid_tx;
1379 uint32_t epid = rpr->rpr_entityid;
1413 const struct rep_protocol_transaction_commit *rpr = in;
1419 if (rpr->rpr_size != insz) {
1424 tx = entity_find(cp, rpr->rpr_entityid);
1437 out->rpr_response = rc_tx_commit(&tx->re_node, rpr->rpr_cmd,
1458 next_snaplevel(repcache_client_t *cp, struct rep_protocol_entity_pair *rpr)
1463 uint32_t srcid = rpr->rpr_entity_src;
1464 uint32_t destid = rpr->rpr_entity_dst;
1481 snapshot_take(repcache_client_t *cp, struct rep_protocol_snapshot_take *rpr)
1484 uint32_t srcid = rpr->rpr_entityid_src;
1486 uint32_t destid = rpr->rpr_entityid_dest;
1497 rpr->rpr_name[sizeof (rpr->rpr_name) - 1] = 0;
1499 if (rpr->rpr_flags == REP_SNAPSHOT_NEW)
1501 NULL, rpr->rpr_name, &dest->re_node);
1502 else if (rpr->rpr_flags == REP_SNAPSHOT_ATTACH &&
1503 rpr->rpr_name[0] == 0)
1517 struct rep_protocol_snapshot_take_named *rpr)
1520 uint32_t srcid = rpr->rpr_entityid_src;
1522 uint32_t destid = rpr->rpr_entityid_dest;
1533 rpr->rpr_svcname[sizeof (rpr->rpr_svcname) - 1] = 0;
1534 rpr->rpr_instname[sizeof (rpr->rpr_instname) - 1] = 0;
1535 rpr->rpr_name[sizeof (rpr->rpr_name) - 1] = 0;
1537 result = rc_snapshot_take_new(&src->re_node, rpr->rpr_svcname,
1538 rpr->rpr_instname, rpr->rpr_name, &dest->re_node);
1547 snapshot_attach(repcache_client_t *cp, struct rep_protocol_snapshot_attach *rpr)
1550 uint32_t srcid = rpr->rpr_entityid_src;
1552 uint32_t destid = rpr->rpr_entityid_dest;
1573 const struct rep_protocol_property_request *rpr = in;
1580 ep = entity_find(cp, rpr->rpr_entityid);
1615 const struct rep_protocol_property_request *rpr = in;
1621 ep = entity_find(cp, rpr->rpr_entityid);
1645 struct rep_protocol_propertygrp_request *rpr, int *out_fd)
1659 if ((ep = entity_find(cp, rpr->rpr_entityid)) == NULL) {
1689 struct rep_protocol_notify_request *rpr)
1691 rpr->rpr_pattern[sizeof (rpr->rpr_pattern) - 1] = 0;
1693 switch (rpr->rpr_type) {
1696 rpr->rpr_pattern));
1700 rpr->rpr_pattern));
1714 const struct rep_protocol_wait_request *rpr = in;
1733 if ((ep = entity_find(cp, rpr->rpr_entityid)) != NULL) {
1770 struct rep_protocol_backup_request *rpr)
1778 rpr->rpr_name[REP_PROTOCOL_NAME_LEN - 1] = 0;
1779 if (strcmp(rpr->rpr_name, REPOSITORY_BOOT_BACKUP) == 0)
1783 if (rpr->rpr_changeid != cp->rc_changeid) {
1784 result = backend_create_backup(rpr->rpr_name);
1786 cp->rc_changeid = rpr->rpr_changeid;
1799 * copied from the rep_protocol_annotation request at rpr to the client
1807 set_annotation(repcache_client_t *cp, struct rep_protocol_annotation *rpr)
1819 if (rpr->rpr_operation[0] != 0) {
1823 rpr->rpr_operation[sizeof (rpr->rpr_operation) - 1] = 0;
1824 if ((operation = strdup(rpr->rpr_operation)) == NULL)
1827 if (rpr->rpr_file[0] != 0) {
1831 rpr->rpr_file[sizeof (rpr->rpr_file) - 1] = 0;
1832 if ((file = strdup(rpr->rpr_file)) == NULL)
2027 struct rep_protocol_switch_request *rpr)
2038 if (rpr->rpr_changeid != cp->rc_changeid) {
2039 if ((result = backend_switch(rpr->rpr_flag)) ==
2041 cp->rc_changeid = rpr->rpr_changeid;
2051 const void *rpr);
2068 const void *rpr, int *out_fd);