Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

I need some source code for the protocol HDLC/LAPB.

Posted on 1999-07-30
11
Medium Priority
?
1,353 Views
Last Modified: 2008-02-26
I have the documentation for the protocol, but am having a hard time implementing it.  If anyone knows where I can get some source code, or a site that has examples, I would appriecated it.  Don't need a complete program.  Thanks
0
Comment
Question by:kellyjj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +3
11 Comments
 
LVL 2

Expert Comment

by:serena77
ID: 1264126
0
 
LVL 2

Author Comment

by:kellyjj
ID: 1264127
while I enjoyed the first link, neitehr provided me with any info about the hdlc/lapb protocols.    Thanks
0
 
LVL 2

Expert Comment

by:serena77
ID: 1264128
you didnt ask about hdlc/lapb...
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Expert Comment

by:yogi_bansal
ID: 1264129
Check out the following site...
http://www.sangoma.com/hdlc.htm 
might be helpfull.
0
 
LVL 3

Expert Comment

by:Iexpert
ID: 1264130
What hardware are you using.
I've implemented HDLC code for Siemens ESCC2 and others,
What are you running over HDLC ?
0
 
LVL 2

Author Comment

by:kellyjj
ID: 1264131
I am running it on a intel based system.  What I am trying to do is connect a system transmit data, and then recieve responses.
0
 

Accepted Solution

by:
nisa earned 200 total points
ID: 1264132
I'm familiar on HDLC protocol on UNIX and WINNT systems but i did not have the source code with me now, anyway the general algorithm if you are on NT platform is :


rcvHDLC(someparameters)\
{
  int n;  
//do some setting on how you want to rcvThe data here i.e
blocking or nonblocking.(usually come with the technical documentations went you bought the product.)
   
// issue a rcv here normally depend on the driver please refer to you documentations. ie:
   
  n = read(..,fd,..);
 
//if you are in blocking mode then the thread will wait until there is data.

}

sndHDLC()
{int n;  
//do some setting on how you want to send data here i.e
blocking or nonblocking.(usually come with the technical documentations went you bought the product.)
   
// issue a send (write) here normally depend on the driver please refer to you documentations. ie:
   
  n = write(..,fd,..);
 
//where fd is the handle to the named pipe  
//if you are in blocking mode then the thread will try to send the whole buffer that you write on the pipe before returning.

}



handle fd; //assume everybody can see this var(gobal)
main()
{
 
//open a named pipe here so that you can rcv and send to a stream HDLC driver and use the file descriptor/handle when you want to receive and send(i forgot want are the parameters are, you can refer to MS SDK doc. if you are developing on MS based OS), anyway let's say that it looks
like this :

fd = OpenPipe(..,..,"<named pipe to hdlc driver>");



//create a thread that will listen(rcv) form the port(EIA-RC232 i supposed).
  createThread(..,rcvHDLC(someparameters));
  //sending part of the code.
  createThread(..,sndHDLC(someparameters));
 
  //do some other thing here ie managing rcv/snd buffer.  

}
0
 
LVL 2

Author Comment

by:kellyjj
ID: 1264133
Actually, that is the general flow of my program right now.  that is not what I have a problem with.  The problem I am having is the actual build of packets and such.  For example ,  which bytes/values must be in the starting frame? ending frame?  I hope this makes it a little clearer.
0
 

Expert Comment

by:nisa
ID: 1264134
Hi,
  Anyway... what OS does your app. run on? .. and are u working on distributed ports?. r u developing HDLC itself or using it to transport your data?
0
 
LVL 2

Author Comment

by:kellyjj
ID: 1264135
Hi nisa,

I am working on a SCO Unix platform,  and I am using it to transfer data.   Sorry for taking so long to get back,  I was out of town.


0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6820330
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects that and the expert will now receive these points, all verified.
Moondancer
Moderator @ Experts Exchange
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question