error while including header file(dhcp.h) of ISC dhcp-4.2.3 to a C file.

ameen.shajahan at wipro.com ameen.shajahan at wipro.com
Mon Jan 23 04:58:02 UTC 2012


 52 struct dhcp_packet {
 53  u_int8_t  op;          /* 0: Message opcode/type */

From: dhcp-users-bounces+ameen.shajahan=wipro.com at lists.isc.org [mailto:dhcp-users-bounces+ameen.shajahan=wipro.com at lists.isc.org] On Behalf Of Jeff Waller
Sent: 20 January 2012 19:35
To: Users of ISC DHCP
Cc: dhcp-workers at lists.isc.org
Subject: Re: error while including header file(dhcp.h) of ISC dhcp-4.2.3 to a C file.

Haha, yea I saw that from the compiler error, I meant the actual contents of dhcp.h, line 53 (or is it
actually line 52?).


On Jan 20, 2012, at 12:45 AM, <ameen.shajahan at wipro.com<mailto:ameen.shajahan at wipro.com>> wrote:


Line no 53 in dhcp.h

From: dhcp-users-bounces+ameen.shajahan=wipro.com at lists.isc.org<mailto:dhcp-users-bounces+ameen.shajahan=wipro.com at lists.isc.org> [mailto:dhcp-users-bounces+ameen.shajahan=wipro.com at lists.isc.org] On Behalf Of Jeff Waller
Sent: 20 January 2012 00:07
To: Users of ISC DHCP
Cc: dhcp-workers at lists.isc.org<mailto:dhcp-workers at lists.isc.org>
Subject: Re: error while including header file(dhcp.h) of ISC dhcp-4.2.3 to a C file.

Well that is strange.  Having apparently extraneous UTF-8? characters in header files
seems wrong to me.  Could you provide that line in dhcp.h?

BTW my includes are slightly different, here's the whole list, the 2 at the bottom are most
relevant.


#include <string.h>
#include <time.h>
#include <stdarg.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <stdio.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <isc-dhcp/dst.h>
#include <dhcpctl/dhcpctl.h>



On Jan 19, 2012, at 9:50 AM, <ameen.shajahan at wipro.com<mailto:ameen.shajahan at wipro.com>> <ameen.shajahan at wipro.com<mailto:ameen.shajahan at wipro.com>> wrote:



Hi,
                I have written one C file called test.c and I have included header file(dhcp.h) of  ISC dhcp-4.2.3


vi test.c
#include<stdio.h>
#include "dhcp.h"
 int main(int argc, char** argv)
  {
     printf("test\n");
      return 0;
  }

I have written one makefile.

Vi Makefile

C_SRCS := $(wildcard *.c)
DHCP_ROOT := home/user/dhcp-4.2.3
CPPFLAGS +=  -I$(DHCP_ROOT)/includes \
                             -I$(DHCP_ROOT)/common \
                            -I$(DHCP_ROOT)/dhcpctl \
                            -I$(DHCP_ROOT)/omapip \
                           -I$(DHCP_ROOT)/includes/omapip \
                           -I$(DHCP_ROOT)/dhcp-output/include \
                            -I$(DHCP_ROOT)/bind \
                             -I$(DHCP_ROOT)/bind/include \
                             -I$(DHCP_ROOT)/bind/bind-9.8.1/contrib/query-loc-0.4.0



And I have compiled using make command.

[user at new dhcpd_test]$ make
----- Updating test.d
----- Compiling test.c
In file included from test.c:14:
/home/user/dhcp-4.2.3/includes/dhcp.h:52: error: expected specifier-qualifier-list before âu_int8_tâ

What would be the problem??
Please provide the solution.


Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com<http://www.wipro.com>
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>
https://lists.isc.org/mailman/listinfo/dhcp-users


Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com<http://www.wipro.com>
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org<mailto:dhcp-users at lists.isc.org>
https://lists.isc.org/mailman/listinfo/dhcp-users


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120123/363f587a/attachment.html>


More information about the dhcp-users mailing list