• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/ecryptfs/

Lines Matching refs:packet_size

500  * @packet_size: This function writes the size of the parsed packet
509 size_t *packet_size, size_t max_packet_size)
516 (*packet_size) = 0;
524 if (unlikely((*packet_size) + 3 > max_packet_size)) {
530 if (data[(*packet_size)++] != ECRYPTFS_TAG_1_PACKET_TYPE) {
557 rc = parse_packet_length(&data[(*packet_size)], &body_size,
570 (*packet_size) += length_size;
571 if (unlikely((*packet_size) + body_size > max_packet_size)) {
577 if (unlikely(data[(*packet_size)++] != 0x03)) {
579 "[%d]\n", data[(*packet_size) - 1]);
585 &data[(*packet_size)], ECRYPTFS_SIG_SIZE);
586 *packet_size += ECRYPTFS_SIG_SIZE;
589 (*packet_size)++;
602 &data[(*packet_size)], (body_size - 0x02 - ECRYPTFS_SIG_SIZE));
603 (*packet_size) += (*new_auth_tok)->session_key.encrypted_key_size;
626 (*packet_size) = 0;
642 * @packet_size: This function writes the size of the parsed packet
652 size_t *packet_size, size_t max_packet_size)
659 (*packet_size) = 0;
667 if (unlikely((*packet_size) + 3 > max_packet_size)) {
674 if (data[(*packet_size)++] != ECRYPTFS_TAG_3_PACKET_TYPE) {
692 rc = parse_packet_length(&data[(*packet_size)], &body_size,
705 (*packet_size) += length_size;
713 if (unlikely((*packet_size) + body_size > max_packet_size)) {
727 if (unlikely(data[(*packet_size)++] != 0x04)) {
729 "[%d]\n", data[(*packet_size) - 1]);
736 (u16)data[(*packet_size)]);
739 switch(data[(*packet_size)++]) {
749 if (unlikely(data[(*packet_size)++] != 0x03)) {
758 switch (data[(*packet_size)++]) {
763 &data[(*packet_size)], ECRYPTFS_SALT_SIZE);
764 (*packet_size) += ECRYPTFS_SALT_SIZE;
769 ((u32) 16 + (data[(*packet_size)] & 15))
770 << ((data[(*packet_size)] >> 4) + 6);
771 (*packet_size)++;
776 &data[(*packet_size)],
778 (*packet_size) +=
788 "[%d]\n", data[(*packet_size) - 1]);
809 (*packet_size) = 0;
823 * @packet_size: This function writes the size of the parsed packet
832 size_t *packet_size, size_t max_packet_size)
838 (*packet_size) = 0;
846 if (unlikely((*packet_size) + 3 > max_packet_size)) {
853 if (data[(*packet_size)++] != ECRYPTFS_TAG_11_PACKET_TYPE) {
861 rc = parse_packet_length(&data[(*packet_size)], &body_size,
868 (*packet_size) += length_size;
884 if (unlikely((*packet_size) + body_size + 1 > max_packet_size)) {
891 if (data[(*packet_size)++] != 0x62) {
898 if (data[(*packet_size)++] != 0x08) {
905 (*packet_size) += 12; /* We don't care about the filename or
909 memcpy(contents, &data[(*packet_size)], (*tag_11_contents_size));
910 (*packet_size) += (*tag_11_contents_size);
914 (*packet_size) = 0;
1067 size_t packet_size;
1086 &packet_size, max_packet_size);
1093 i += packet_size;
1130 &packet_size, max_packet_size);
1137 i += packet_size;
1284 * @packet_size: This function will write the number of bytes that end
1293 struct ecryptfs_key_record *key_rec, size_t *packet_size)
1301 (*packet_size) = 0;
1353 dest[(*packet_size)++] = ECRYPTFS_TAG_1_PACKET_TYPE;
1356 rc = write_packet_length(&dest[(*packet_size)],
1365 (*packet_size) += packet_size_length;
1366 dest[(*packet_size)++] = 0x03; /* version 3 */
1367 memcpy(&dest[(*packet_size)], key_rec->sig, ECRYPTFS_SIG_SIZE);
1368 (*packet_size) += ECRYPTFS_SIG_SIZE;
1369 dest[(*packet_size)++] = RFC2440_CIPHER_RSA;
1370 memcpy(&dest[(*packet_size)], key_rec->enc_key,
1372 (*packet_size) += key_rec->enc_key_size;
1375 (*packet_size) = 0;
1441 * @packet_size: This function will write the number of bytes that end
1449 struct ecryptfs_key_record *key_rec, size_t *packet_size)
1466 (*packet_size) = 0;
1599 dest[(*packet_size)++] = ECRYPTFS_TAG_3_PACKET_TYPE;
1601 rc = write_packet_length(&dest[(*packet_size)],
1610 (*packet_size) += packet_size_length;
1611 dest[(*packet_size)++] = 0x04; /* version 4 */
1619 dest[(*packet_size)++] = cipher_code;
1620 dest[(*packet_size)++] = 0x03; /* S2K */
1621 dest[(*packet_size)++] = 0x01; /* MD5 (TODO: parameterize) */
1622 memcpy(&dest[(*packet_size)], auth_tok->token.password.salt,
1624 (*packet_size) += ECRYPTFS_SALT_SIZE; /* salt */
1625 dest[(*packet_size)++] = 0x60; /* hash iterations (65536) */
1626 memcpy(&dest[(*packet_size)], key_rec->enc_key,
1628 (*packet_size) += key_rec->enc_key_size;
1633 (*packet_size) = 0;