Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8981149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:15:42+00:00 2026-06-15T20:15:42+00:00

It is probably relevant to other questions too. I need to build a simple

  • 0

It is probably relevant to other questions too.
I need to build a simple TFTP server in C (octet mode only) that will work with most TFTP clients available today (I only need to implement the server).

opcode   //2 byte
filename // string (unknown size)
0        // 1 byte
mode     // string (unknows size, max 9 chars considering 'netascii')
0        // 1 byte

But I’m having a problem: the RRQ/WRQ packets have a unknown length field “filename” (and “mode”). Because my server needs to be generic, how can I implement this option?
Create a ridiculously large buffer and wait until recvfrom() returns 0?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:15:43+00:00Added an answer on June 15, 2026 at 8:15 pm

    make the buffer no much larger than the payload size of an Ethernet packet…
    with TFTP recvfrom won’t return buffers larger than that…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .war project in Eclipse. It is probably not relevant but I
probably I'm sinking in an empty glass or maybe i've spent too many hours
Probably something really simple, but I'm having some real trouble with it. I have
Probably a very trivial problem. I have an object that looks like this: @PersistenceCapable
Probably I'm just too dump for googling, but I always thought char arrays get
Probably something simple, but heres my problem, I have implememnted a simple captcha into
This probably has probably been asked before, but I couldn't find anything relevant. Would
It seems interesting, that nobody asked this before. I have some basic-questions about the
A question I haven't seen answered that I'm finding very interesting. All the other
Probably right in front of me, but I am not sure how to set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.