C code


 
Thread Tools Search this Thread
Top Forums Programming C code
# 1  
Old 06-10-2009
C code

Hi

I don't understand this code line:
Code:
struct iphdr *iph=(struct iphdr *)data;

where data is an u_char.
What I can see is that we are creating a pointer (iph) to a iphdr struct, but the right side is not very clear. Can anyone explain the meaning, please?

Thanks in advance

Dedalus

-----Post Update-----

ok
i got it, is a casting operation

Thanks

D.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Linux

Go to a line of code , skip few lines of code

Hi , I have a code where i am using a infinite while loop . some thing like below while do if then #go to line 20 fi command 1; command 2; #line 20: sleep 34; (5 Replies)
Discussion started by: Paarth
5 Replies

2. Shell Programming and Scripting

Block of code replacement in Java source code through Unix script

Hi, I want to remove the following code from Source files (or replace the code with empty.) from all the source files in given directory. finally { if (null != hibernateSession && hibernateSession.isOpen()) { //hibernateSession.close(); } } It would be great if the script has... (2 Replies)
Discussion started by: hareeshram
2 Replies

3. UNIX for Dummies Questions & Answers

If ‘922’ Code does not exist on ‘03’ Record, ‘901’ Code will be there instead, move ‘03’ R

01,011600033,011600033,110516,0834,2,90,,2/ 02,011600033,011103093,1,110317,0834,,2/ 03,105581,,015,+00000416418,,,901,+00000000148,,,922,+000000 00354,,/ 03,113806,,015,+00000559618,,,901,+00000000096,,,922,+000000 00621,,/ 88,902,+0000000025218,,/... (1 Reply)
Discussion started by: sgoud
1 Replies

4. Shell Programming and Scripting

translate ksh code to csh code

hi all, Can any 1 help me translate this korn shell code to C shell code : email=$(grep "^$1" $folder/config_2.txt | awk '{print $2'}) In config_2.txt the content is : which mean in korn shell , $1=groupname and $2=email address. Now i need to write in C shell script,when i set the... (2 Replies)
Discussion started by: proghack
2 Replies

5. Programming

how i prepare a c++ code(c code) for implementing my own protocol format

helo my protocol format is given below { destno,mode,no.of packet,pktsize,,pktno,textsize,CRC} description:- { is starting flag destno - 4bytes mode - 1 byte no.of pkt - 4byes pktsize - 6 bytes ... (1 Reply)
Discussion started by: amitpansuria
1 Replies

6. UNIX for Advanced & Expert Users

Return code from PL/SQL Code

Hi Guys, I was just wondering if anybody can help me with this problem. OK, how we can get a value back from PL/SQL Script (not stored procedure/function) See the below example: (for example aaa.sh) #!/bin/ksh VALUE=`sqlplus -s user/password@test_id <<EOF @xxx.sq EOF` echo $VALUE ... (7 Replies)
Discussion started by: Shaz
7 Replies
Login or Register to Ask a Question
__gnu_pbds(3)						     Library Functions Manual						     __gnu_pbds(3)

NAME
__gnu_pbds - SYNOPSIS
Classes struct associative_tag class basic_branch struct basic_branch_tag class basic_hash_table struct basic_hash_tag struct basic_invalidation_guarantee struct binary_heap_tag struct binomial_heap_tag class cc_hash_max_collision_check_resize_trigger class cc_hash_table struct cc_hash_tag struct container_error struct container_tag struct container_traits struct container_traits_base struct container_traits_base< binary_heap_tag > struct container_traits_base< binomial_heap_tag > struct container_traits_base< cc_hash_tag > struct container_traits_base< gp_hash_tag > struct container_traits_base< list_update_tag > struct container_traits_base< ov_tree_tag > struct container_traits_base< pairing_heap_tag > struct container_traits_base< pat_trie_tag > struct container_traits_base< rb_tree_tag > struct container_traits_base< rc_binomial_heap_tag > struct container_traits_base< splay_tree_tag > struct container_traits_base< thin_heap_tag > class direct_mask_range_hashing class direct_mod_range_hashing class gp_hash_table struct gp_hash_tag class hash_exponential_size_policy class hash_load_check_resize_trigger class hash_prime_size_policy class hash_standard_resize_policy struct insert_error struct join_error class linear_probe_fn class list_update struct list_update_tag class lu_counter_policy class lu_move_to_front_policy struct null_node_update struct null_type struct ov_tree_tag struct pairing_heap_tag struct pat_trie_tag struct point_invalidation_guarantee class priority_queue struct priority_queue_tag class quadratic_probe_fn struct range_invalidation_guarantee struct rb_tree_tag struct rc_binomial_heap_tag struct resize_error class sample_probe_fn class sample_range_hashing class sample_ranged_hash_fn class sample_ranged_probe_fn class sample_resize_policy class sample_resize_trigger class sample_size_policy class sample_tree_node_update struct sample_trie_access_traits class sample_trie_node_update struct sample_update_policy struct sequence_tag struct splay_tree_tag struct string_tag struct thin_heap_tag class tree class tree_order_statistics_node_update struct tree_tag class trie class trie_order_statistics_node_update class trie_prefix_search_node_update struct trie_string_access_traits struct trie_tag struct trivial_iterator_tag Typedefs typedef void trivial_iterator_difference_type Functions void __throw_container_error () void __throw_insert_error () void __throw_join_error () void __throw_resize_error () Detailed Description GNU extensions for policy-based data structures for public use. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Tue Jun 10 2014 __gnu_pbds(3)