Back to index

im-sdk  12.3.91
im-invalid-message.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <sys/types.h>
00004 
00005 #include <iiimp-data.h>
00006 
00007 #include "iiimp-dataP.h"
00008 
00009 
00010 /* ARGSUSED0 */
00011 void
00012 iiimp_invalid_message_delete(IIIMP_data_s * data_s, IIIMP_message * m)
00013 {
00014     return;
00015 }
00016 
00017 
00018 /* ARGSUSED1 */
00019 uchar_t *
00020 iiimp_invalid_message_pack(
00021     IIIMP_data_s *   data_s,
00022     IIIMP_message *  opcode,
00023     size_t *         buf_size)
00024 {
00025     data_s->status = IIIMP_DATA_INVALID;
00026     return NULL;
00027 }
00028 
00029 
00030 /* ARGSUSED1 */
00031 IIIMP_message *
00032 iiimp_invalid_message_unpack(
00033     IIIMP_data_s *   data_s,
00034     IIIMP_card7             opcode,
00035     size_t *         nbyte,
00036     const uchar_t ** ptr)
00037 {
00038     data_s->status = IIIMP_DATA_INVALID;
00039     return NULL;
00040 }
00041 
00042 
00043 void
00044 iiimp_invalid_message_print(
00045     IIIMP_data_s *   data_s,
00046     IIIMP_message *  m)
00047 {
00048     (void)fprintf(data_s->print_fp, "unknown message packet ");
00049     if (NULL == m) {
00050        (void)fprintf(data_s->print_fp, "(NULL)\n");
00051     } else {
00052        (void)fprintf(data_s->print_fp, "(%d)\n", m->opcode);
00053     }
00054 }
00055 
00056 
00057 /* Local Variables: */
00058 /* c-file-style: "iiim-project" */
00059 /* End: */