Lines Matching refs:bridge

42 #include <net/bridge.h>
51 * bridges, and by the bridge daemon to retrieve configuration information.
54 #define BRIDGE_SVC_NAME "network/bridge"
348 char bridge[MAXLINKNAMELEN];
351 status = dladm_bridge_getlink(handle, linkid, bridge, sizeof (bridge));
354 return (bridge_door_call(bridge, dtype, linkid, &buf, inlen, &buflen,
359 bridge_refresh(const char *bridge)
370 status = bridge_door_call(bridge, bdcBridgeGetRefreshCount,
377 if ((fmri = alloc_fmri(BRIDGE_SVC_NAME, bridge)) == NULL)
395 status = bridge_door_call(bridge,
404 fmri = alloc_fmri(TRILL_SVC_NAME, bridge);
416 * Look up bridge property values from SCF and return them.
633 * Create the datalink entry for the bridge. Note that all of
642 /* Convert bridge protection option string to dladm_bridge_prot_t */
655 /* Convert bridge protection option from dladm_bridge_prot_t to string */
750 * dependencies will keep it from going on-line until the bridge is running.
859 * Create a new bridge or modify an existing one. Update the SMF configuration
982 * If we're modifying an existing and running bridge, then tell the
1011 * Remove the bridge linkid if we've allocated one in this function but
1024 * Enable a newly-created bridge in SMF by creating "general/enabled" and
1034 * Set a link as a member of a bridge, or remove bridge membership. If the
1041 const char *bridge)
1049 if (*bridge != '\0' && !dladm_valid_bridgename(bridge))
1061 * Don't allow a link to be reassigned directly from one bridge
1064 if (*oldbridge != '\0' && *bridge != '\0') {
1073 if (*bridge != '\0') {
1075 DLADM_TYPE_STR, bridge);
1090 if (bridge[0] == '\0')
1091 bridge = oldbridge;
1092 status = bridge_refresh(bridge);
1098 * Get the name of the bridge of which the given linkid is a member.
1101 dladm_bridge_getlink(dladm_handle_t handle, datalink_id_t linkid, char *bridge,
1111 *bridge = '\0';
1112 status = dladm_get_conf_field(handle, conf, FBRIDGE, bridge, bridgelen);
1113 if (status == DLADM_STATUS_OK && *bridge == '\0')
1123 char bridge[MAXLINKNAMELEN];
1126 status = dladm_bridge_getlink(handle, linkid, bridge, sizeof (bridge));
1130 status = bridge_refresh(bridge);
1144 char bridge[MAXLINKNAMELEN];
1150 status = dladm_get_conf_field(handle, conf, FBRIDGE, bridge,
1151 sizeof (bridge));
1152 if (status == DLADM_STATUS_OK && strcmp(bha->bha_bridge, bridge) == 0) {
1163 * Delete a previously created bridge.
1166 dladm_bridge_delete(dladm_handle_t handle, const char *bridge, uint32_t flags)
1173 if (!dladm_valid_bridgename(bridge))
1176 /* Get the datalink ID for this bridge */
1177 (void) snprintf(linkname, sizeof (linkname), "%s0", bridge);
1193 arg.bha_bridge = bridge;
1198 * bridge. If so, we fail the operation.
1208 if ((status = disable_trill(bridge, flags)) != DLADM_STATUS_OK)
1212 status = shut_down_instance(BRIDGE_SVC_NAME, bridge, flags);
1239 dladm_valid_bridgename(const char *bridge)
1241 size_t len = strnlen(bridge, MAXLINKNAMELEN);
1248 * The bridge name cannot start or end with a digit.
1250 if (isdigit(bridge[0]) || isdigit(bridge[len - 1]))
1254 * The legal characters within a bridge name are:
1257 for (cp = bridge; *cp != '\0'; cp++) {
1266 * Convert a bridge-related observability node name back into the name of the
1267 * bridge. Returns B_FALSE without making changes if the input name is not in
1283 * Get bridge property values from the running daemon and return them in a
1308 * Get bridge state from the running daemon and return in structure borrowed
1320 /* Returns list of ports (datalink_id_t values) assigned to a bridge instance */
1337 * part of the bridge instance. First entry in the array is the
1413 dladm_bridge_get_fwdtable(dladm_handle_t handle, const char *bridge,
1423 "%s0", bridge);
1458 dladm_bridge_get_trillnick(const char *bridge, uint_t *nnick)
1467 (void) strlcpy(brcopy, bridge, sizeof (brcopy));
1507 dladm_bridge_get_nick(const char *bridge)
1513 if (bind_instance(TRILL_SVC_NAME, bridge, &sstate) != 0)
1525 dladm_bridge_set_nick(const char *bridge, uint16_t nick)
1536 if (scf_service_get_instance(sstate.ss_svc, bridge, sstate.ss_inst) !=
1573 if (rv == 1 && (fmri = alloc_fmri(TRILL_SVC_NAME, bridge)) != NULL) {