Lines Matching refs:community
67 /** SNMP community string */
69 /** SNMP community string for write access */
71 /** SNMP community string for sending traps */
160 * Returns current SNMP community string.
161 * @return current SNMP community string
171 * Sets SNMP community string.
175 * @param community is a pointer to new community string
178 snmp_set_community(const char *const community)
181 LWIP_ASSERT("community string is too long!", strlen(community) <= SNMP_MAX_COMMUNITY_STR_LEN);
182 snmp_community = community;
187 * Returns current SNMP write-access community string.
188 * @return current SNMP write-access community string
198 * Returns current SNMP community string used for sending traps.
199 * @return current SNMP community string used for sending traps
209 * Sets SNMP community string for write-access.
213 * @param community is a pointer to new write-access community string
216 snmp_set_community_write(const char *const community)
219 LWIP_ASSERT("community string must not be NULL", community != NULL);
220 LWIP_ASSERT("community string is too long!", strlen(community) <= SNMP_MAX_COMMUNITY_STR_LEN);
221 snmp_community_write = community;
226 * Sets SNMP community string used for sending traps.
230 * @param community is a pointer to new trap community string
233 snmp_set_community_trap(const char *const community)
236 LWIP_ASSERT("community string is too long!", strlen(community) <= SNMP_MAX_COMMUNITY_STR_LEN);
237 snmp_community_trap = community;
780 /* decode main container consisting of version, community and PDU */
816 strncpy((char *)request->community, snmp_community, SNMP_MAX_COMMUNITY_STR_LEN);
817 request->community[SNMP_MAX_COMMUNITY_STR_LEN] = 0; /* ensure NULL termination (strncpy does NOT guarantee it!) */
818 request->community_strlen = (u16_t)strnlen((char *)request->community, SNMP_MAX_COMMUNITY_STR_LEN);
1132 /* decode community */
1138 err = snmp_asn1_dec_raw(&pbuf_stream, tlv.value_len, request->community, &request->community_strlen, SNMP_MAX_COMMUNITY_STR_LEN);
1140 /* community string does not fit in our buffer -> its too long -> its invalid */
1147 request->community[request->community_strlen] = 0;
1185 /* validate community (do this after decoding PDU type because we don't want to increase 'inbadcommunitynames' for wrong frame types */
1187 /* community string was too long or really empty*/
1193 /* our write community is empty, that means all our objects are readonly */
1196 } else if (strncmp(snmp_community_write, (const char *)request->community, SNMP_MAX_COMMUNITY_STR_LEN) != 0) {
1197 /* community name does not match */
1203 if (strncmp(snmp_community, (const char *)request->community, SNMP_MAX_COMMUNITY_STR_LEN) != 0) {
1204 /* community name does not match */
1294 /* community */
1297 OF_BUILD_EXEC( snmp_asn1_enc_raw(pbuf_stream, request->community, request->community_strlen) );