Socket sendto throwing Errno-101
===

After Running this Program, it is throwing Errno-101. I am just trying to send a broadcast packet using DGRAM Socket.Nothing more than that.Can some one help me in understanding the bug in this code ??

    int main() {
    
    int sockfd,fn_return=-1,opt_broadcast = 1,bytes_send,addr_len;
    struct sockaddr_in client_addr;
    unsigned char txmsg[100],rxmsg[100];
    
    strcpy(rxmsg,"Sample Test for Broadcast\0");
    printf("The value in rxmsg was %s \n",rxmsg);
    
    if((sockfd = socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP)) < 0) {
    printf("Error in Creating the Socket \n");
    }
    fn_return = setsockopt(sockfd,SOL_SOCKET,SO_BROADCAST,&opt_broadcast,sizeof(opt_broadcast));
    
    client_addr.sin_family = AF_INET;
    client_addr.sin_port = htons(68);
    inet_aton("255.255.255.255",&client_addr.sin_addr);
    bzero(&(client_addr.sin_zero),8);
    addr_len = sizeof(client_addr);
    
    //while(1) {
    if(bytes_send=sendto(sockfd,rxmsg,100,0,(struct sockaddr *)&client_addr, addr_len) < 0) {
       printf("Send to ERROR %d \n" , errno ); }
    else {
       printf("Packet Sent \n");
    }
    
    //}
    return 1;
    }

