Home | History | Annotate | Download | only in cups

Lines Matching defs:bufptr

931   unsigned char	*bufptr,		/* Pointer into the data */
943 bufptr = buffer;
946 if (asn1_get_type(&bufptr, bufend) != CUPS_ASN1_SEQUENCE)
948 else if (asn1_get_length(&bufptr, bufend) == 0)
950 else if (asn1_get_type(&bufptr, bufend) != CUPS_ASN1_INTEGER)
952 else if ((length = asn1_get_length(&bufptr, bufend)) == 0)
954 else if ((packet->version = asn1_get_integer(&bufptr, bufend, length))
957 else if (asn1_get_type(&bufptr, bufend) != CUPS_ASN1_OCTET_STRING)
959 else if ((length = asn1_get_length(&bufptr, bufend)) == 0)
963 asn1_get_string(&bufptr, bufend, length, packet->community,
966 if ((packet->request_type = (cups_asn1_t)asn1_get_type(&bufptr, bufend))
969 else if (asn1_get_length(&bufptr, bufend) == 0)
971 else if (asn1_get_type(&bufptr, bufend) != CUPS_ASN1_INTEGER)
973 else if ((length = asn1_get_length(&bufptr, bufend)) == 0)
977 packet->request_id = (unsigned)asn1_get_integer(&bufptr, bufend, length);
979 if (asn1_get_type(&bufptr, bufend) != CUPS_ASN1_INTEGER)
981 else if ((length = asn1_get_length(&bufptr, bufend)) == 0)
985 packet->error_status = asn1_get_integer(&bufptr, bufend, length);
987 if (asn1_get_type(&bufptr, bufend) != CUPS_ASN1_INTEGER)
989 else if ((length = asn1_get_length(&bufptr, bufend)) == 0)
993 packet->error_index = asn1_get_integer(&bufptr, bufend, length);
995 if (asn1_get_type(&bufptr, bufend) != CUPS_ASN1_SEQUENCE)
997 else if (asn1_get_length(&bufptr, bufend) == 0)
1000 else if (asn1_get_type(&bufptr, bufend) != CUPS_ASN1_SEQUENCE)
1002 else if (asn1_get_length(&bufptr, bufend) == 0)
1004 else if (asn1_get_type(&bufptr, bufend) != CUPS_ASN1_OID)
1006 else if ((length = asn1_get_length(&bufptr, bufend)) == 0)
1010 asn1_get_oid(&bufptr, bufend, length, packet->object_name,
1013 packet->object_type = (cups_asn1_t)asn1_get_type(&bufptr, bufend);
1015 if ((length = asn1_get_length(&bufptr, bufend)) == 0 &&
1025 asn1_get_integer(&bufptr, bufend, length);
1030 asn1_get_integer(&bufptr, bufend, length);
1040 asn1_get_string(&bufptr, bufend, length,
1046 asn1_get_oid(&bufptr, bufend, length,
1052 asn1_get_integer(&bufptr, bufend, length);
1057 (unsigned)asn1_get_integer(&bufptr, bufend, length);
1062 (unsigned)asn1_get_integer(&bufptr, bufend, length);
1089 unsigned char *bufptr; /* Pointer into buffer */
1157 bufptr = buffer;
1159 *bufptr++ = CUPS_ASN1_SEQUENCE; /* SNMPv1 message header */
1160 asn1_set_length(&bufptr, msglen);
1162 asn1_set_integer(&bufptr, packet->version);
1165 *bufptr++ = CUPS_ASN1_OCTET_STRING; /* community */
1166 asn1_set_length(&bufptr, commlen);
1167 memcpy(bufptr, packet->community, commlen);
1168 bufptr += commlen;
1170 *bufptr++ = packet->request_type; /* Get-Request-PDU/Get-Next-Request-PDU */
1171 asn1_set_length(&bufptr, reqlen);
1173 asn1_set_integer(&bufptr, (int)packet->request_id);
1175 asn1_set_integer(&bufptr, packet->error_status);
1177 asn1_set_integer(&bufptr, packet->error_index);
1179 *bufptr++ = CUPS_ASN1_SEQUENCE; /* variable-bindings */
1180 asn1_set_length(&bufptr, listlen);
1182 *bufptr++ = CUPS_ASN1_SEQUENCE; /* variable */
1183 asn1_set_length(&bufptr, varlen);
1185 asn1_set_oid(&bufptr, packet->object_name);
1191 *bufptr++ = CUPS_ASN1_NULL_VALUE;
1193 *bufptr++ = 0; /* Length */
1197 asn1_set_integer(&bufptr, packet->object_value.boolean);
1201 asn1_set_integer(&bufptr, packet->object_value.integer);
1205 *bufptr++ = CUPS_ASN1_OCTET_STRING;
1206 asn1_set_length(&bufptr, valuelen);
1207 memcpy(bufptr, packet->object_value.string.bytes, valuelen);
1208 bufptr += valuelen;
1212 asn1_set_oid(&bufptr, packet->object_value.oid);
1219 return ((int)(bufptr - buffer));