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 7991835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:24:17+00:00 2026-06-04T13:24:17+00:00

In code example of Intel DPDK i have found this strange syntactical construction. Can

  • 0

In code example of Intel DPDK i have found this strange syntactical construction. Can anybody explain me what does it mean?

static const struct rte_eth_conf port_conf = {
    .rxmode = {
        .split_hdr_size = 0,
        .header_split   = 0,
        .hw_ip_checksum = 0,
        .hw_vlan_filter = 0,
        .jumbo_frame    = 0,
        .hw_strip_crc   = 0,
    },
    .txmode = {
    }
};
  • 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-04T13:24:18+00:00Added an answer on June 4, 2026 at 1:24 pm

    If you have

    struct X
    {
        type_a var_a;
        type_b var_b;
        type_c var_c;
        type_d var_d;
    };
    

    you can initialize an object like this:

    struct X x = {value_a, value_b, value_c, value_d};
    

    But this means you need to know the order of variables in X as well as having an initial value for all of it. Alternatively, you can initialize like this:

    struct X x = {
        .var_a = value_a,
        .var_b = value_b,
        .var_c = value_c,
        .var_d = value_d
    };
    

    This way, you can initialize member variables in any order, or even skip some.

    This is specially useful in a library where you have some variables needed to be initialized by the user, while other variables are more internal and could even be changed with different versions of your library. Using this kind of initialization, the user doesn’t need to know about those extra variables.

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

Sidebar

Related Questions

Hi I have a code example available here: http://jsbin.com/oxoweh My problem is that I
How can I put Intel asm code into my c++ application? I'm using Dev-C++.
I am new to multiprocessing I have run example code for two 'highly recommended'
Code example: private void comboBox_SelectedIndexChanged(object sender, EventArgs e) { if(some condition) { comboBox.Text =
Code example: <script> var data = new Array(); data[0] = 'hi'; data[1] = 'bye';
Consider following SWT code example: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet151.java?view=co How can I separate the inline defined class?
In the following code example how do the user/userParam references relate to the Customer
There is an excellent code example on how to make nice jQuery Twitter style
Is there any code example teaching how to zoom in and out in a
I need a code example or library which would parse Accept-Language header and return

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.