Lines Matching full:oid
38 unsigned length, int *oid, int oidsize);
54 const int *oid);
59 static unsigned asn1_size_oid(const int *oid);
79 * '_cupsSNMPCopyOID()' - Copy an OID.
84 int * /* O - New OID */
85 _cupsSNMPCopyOID(int *dst, /* I - Destination OID */ in _cupsSNMPCopyOID()
86 const int *src, /* I - Source OID */ in _cupsSNMPCopyOID()
154 * '_cupsSNMPIsOID()' - Test whether a SNMP response contains the specified OID.
156 * The array pointed to by "oid" is terminated by the value -1.
161 const int *oid) /* I - OID */ in _cupsSNMPIsOID() argument
170 DEBUG_printf(("4_cupsSNMPIsOID(packet=%p, oid=%p)", packet, oid)); in _cupsSNMPIsOID()
172 if (!packet || !oid) in _cupsSNMPIsOID()
184 i < CUPS_SNMP_MAX_OID && oid[i] >= 0 && packet->object_name[i] >= 0; in _cupsSNMPIsOID()
186 if (oid[i] != packet->object_name[i]) in _cupsSNMPIsOID()
194 i < CUPS_SNMP_MAX_OID && oid[i] == packet->object_name[i])); in _cupsSNMPIsOID()
196 return (i < CUPS_SNMP_MAX_OID && oid[i] == packet->object_name[i]); in _cupsSNMPIsOID()
202 * OID prefix.
210 const int *prefix) /* I - OID prefix */ in _cupsSNMPIsOIDPrefixed()
251 * '_cupsSNMPOIDToString()' - Convert an OID to a string.
256 _cupsSNMPOIDToString(const int *src, /* I - OID */ in _cupsSNMPOIDToString()
275 * Loop through the OID array and build a string... in _cupsSNMPOIDToString()
468 * '_cupsSNMPStringToOID()' - Convert a numeric OID string to an OID array.
471 * corresponding OID array terminated by -1.
474 * not a valid OID number.
477 int * /* O - Pointer to OID array or @code NULL@ on error */
478 _cupsSNMPStringToOID(const char *src, /* I - OID string */ in _cupsSNMPStringToOID()
479 int *dst, /* I - OID array */ in _cupsSNMPStringToOID()
480 int dstsize)/* I - Number of integers in OID array */ in _cupsSNMPStringToOID()
482 int *dstptr, /* Pointer into OID array */ in _cupsSNMPStringToOID()
483 *dstend; /* End of OID array */ in _cupsSNMPStringToOID()
526 * Terminate the end of the OID array and return... in _cupsSNMPStringToOID()
538 * This function queries all of the OIDs with the specified OID prefix,
552 const int *prefix, /* I - OID prefix */ in _cupsSNMPWalk()
561 /* Last OID we got */ in _cupsSNMPWalk()
581 * Copy the OID prefix and then loop until we have no more OIDs... in _cupsSNMPWalk()
634 * The array pointed to by "oid" is terminated by the value -1.
645 const int *oid) /* I - OID */ in _cupsSNMPWrite() argument
660 "community=\"%s\", request_type=%d, request_id=%u, oid=%p)", in _cupsSNMPWrite()
661 fd, address, version, community, request_type, request_id, oid)); in _cupsSNMPWrite()
665 request_type != CUPS_ASN1_GET_NEXT_REQUEST) || request_id < 1 || !oid) in _cupsSNMPWrite()
685 for (i = 0; oid[i] >= 0 && i < (CUPS_SNMP_MAX_OID - 1); i ++) in _cupsSNMPWrite()
686 packet.object_name[i] = oid[i]; in _cupsSNMPWrite()
689 if (oid[i] >= 0) in _cupsSNMPWrite()
691 DEBUG_puts("5_cupsSNMPWrite: Returning 0 (OID too big)"); in _cupsSNMPWrite()
734 int oid[CUPS_SNMP_MAX_OID]; /* OID value */ in asn1_debug() local
869 integer = asn1_get_oid(&buffer, bufend, value_length, oid, in asn1_debug()
875 fprintf(stderr, ".%d", oid[i]); in asn1_debug()
1005 snmp_set_error(packet, _("No name OID")); in asn1_decode_snmp()
1007 snmp_set_error(packet, _("Name OID uses indefinite length")); in asn1_decode_snmp()
1047 packet->object_value.oid, CUPS_SNMP_MAX_OID); in asn1_decode_snmp()
1096 namelen, /* Length of object name OID */ in asn1_encode_snmp()
1101 * Get the lengths of the community string, OID, and message... in asn1_encode_snmp()
1126 valuelen = asn1_size_oid(packet->object_value.oid); in asn1_encode_snmp()
1212 asn1_set_oid(&bufptr, packet->object_value.oid); in asn1_encode_snmp()
1293 * 'asn1_get_oid()' - Get an OID value.
1301 int *oid, /* I - OID buffer */ in asn1_get_oid() argument
1302 int oidsize) /* I - Size of OID buffer */ in asn1_get_oid()
1305 int *oidptr, /* Current OID */ in asn1_get_oid()
1306 *oidend; /* End of OID buffer */ in asn1_get_oid()
1307 int number; /* OID number */ in asn1_get_oid()
1314 oidptr = oid; in asn1_get_oid()
1315 oidend = oid + oidsize - 1; in asn1_get_oid()
1345 return ((int)(oidptr - oid)); in asn1_get_oid()
1539 * 'asn1_set_oid()' - Set an OID value.
1544 const int *oid) /* I - OID value */ in asn1_set_oid() argument
1549 asn1_set_length(buffer, asn1_size_oid(oid)); in asn1_set_oid()
1551 if (oid[1] < 0) in asn1_set_oid()
1553 asn1_set_packed(buffer, oid[0] * 40); in asn1_set_oid()
1557 asn1_set_packed(buffer, oid[0] * 40 + oid[1]); in asn1_set_oid()
1559 for (oid += 2; *oid >= 0; oid ++) in asn1_set_oid()
1560 asn1_set_packed(buffer, *oid); in asn1_set_oid()
1639 * OID value.
1643 asn1_size_oid(const int *oid) /* I - OID value */ in asn1_size_oid() argument
1648 if (oid[1] < 0) in asn1_size_oid()
1649 return (asn1_size_packed(oid[0] * 40)); in asn1_size_oid()
1651 for (length = asn1_size_packed(oid[0] * 40 + oid[1]), oid += 2; in asn1_size_oid()
1652 *oid >= 0; in asn1_size_oid()
1653 oid ++) in asn1_size_oid()
1654 length += asn1_size_packed(*oid); in asn1_size_oid()